[packages/fox] - fix building on x32 - rel 3

baggins baggins at pld-linux.org
Sun Jan 3 22:03:14 CET 2016


commit 71c8b69bd66b3e846f1eb45bc955a62e8e5f169c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Jan 3 22:02:37 2016 +0100

    - fix building on x32
    - rel 3

 fox.spec  |  6 ++++--
 x32.patch | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 2 deletions(-)
---
diff --git a/fox.spec b/fox.spec
index 60a4fd9..6860b63 100644
--- a/fox.spec
+++ b/fox.spec
@@ -9,7 +9,7 @@ Summary(pl.UTF-8):	FOX - toolkit graficzny w C++
 Name:		fox
 # NOTE: after switching to 1.8.x keep stable (1.8.x) on HEAD and devel (1.9.x) on DEVEL
 Version:	1.7.49
-Release:	2
+Release:	3
 License:	LGPL v3+ with relinking exemption
 Group:		X11/Libraries
 Source0:	http://ftp.fox-toolkit.org/pub/%{name}-%{version}.tar.gz
@@ -17,6 +17,7 @@ Source0:	http://ftp.fox-toolkit.org/pub/%{name}-%{version}.tar.gz
 Patch0:		%{name}-opt.patch
 Patch1:		%{name}-link.patch
 Patch2:		%{name}-Makefile.patch
+Patch3:		x32.patch
 URL:		http://www.fox-toolkit.org/
 BuildRequires:	OpenGL-GLU-devel
 BuildRequires:	autoconf >= 2.59-9
@@ -40,7 +41,7 @@ BuildRequires:	xorg-lib-libXrandr-devel
 BuildRequires:	zlib-devel >= 1.1.4
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define 	_noautoreqdep	libGL.so.1 libGLU.so.1
+%define		_noautoreqdep	libGL.so.1 libGLU.so.1
 
 %description
 FOX is a C++-Based Library for Graphical User Interface Development
@@ -138,6 +139,7 @@ FOX - przykładowe programy.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %{__libtoolize}
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..b5de071
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,38 @@
+--- fox-1.7.49/lib/FXAtomic.cpp.orig	2016-01-03 21:32:28.624304727 +0100
++++ fox-1.7.49/lib/FXAtomic.cpp	2016-01-03 21:34:45.642765297 +0100
+@@ -266,7 +266,7 @@
+ FXptr atomicSet(volatile FXptr* ptr,FXptr v){
+ #if defined(WIN32) && ((_MSC_VER >= 1400) || (__BORLANDC__ >= 0x500))
+    return (FXptr)InterlockedExchangePointer(ptr,v);
+-#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER)) && defined(__i386__))
++#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER)) && (defined(__i386__) || defined(__ILP32__)))
+   FXptr ret=v;
+   __asm__ __volatile__("xchgl %0, (%1)\n\t" : "=r"(ret) : "r"(ptr), "0"(ret) : "memory", "cc");
+   return ret;
+@@ -290,7 +290,7 @@
+   return (FXptr)InterlockedExchangeAdd64((LONGLONG*)ptr,(LONGLONG)v);
+ #elif defined(WIN32)
+   return (FXptr)InterlockedExchangeAdd((LONG*)ptr,(LONG)v);
+-#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER)) && defined(__i386__))
++#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER)) && (defined(__i386__) || defined(__ILP32__)))
+   register FXptr ret=(void*)v;
+   __asm__ __volatile__ ("lock\n\t"
+                         "xaddl %0, (%1)\n\t" : "=r"(ret) : "r"(ptr), "0"(ret) : "memory", "cc");
+@@ -314,7 +314,7 @@
+ FXptr atomicCas(volatile FXptr* ptr,FXptr expect,FXptr v){
+ #if defined(WIN32) && ((_MSC_VER >= 1400) || (__BORLANDC__ >= 0x500))
+   return (FXptr)InterlockedCompareExchangePointer((void**)ptr,v,expect);
+-#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER)) && defined(__i386__))
++#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER)) && (defined(__i386__) || defined(__ILP32__)))
+   register FXptr ret=(FXptr)v;
+   __asm__ __volatile__("lock\n\t"
+                        "cmpxchgl %2, (%1)\n\t" : "=a"(ret) : "r"(ptr), "r"(v), "a"(expect) : "memory", "cc");
+@@ -340,7 +340,7 @@
+ FXbool atomicBoolCas(volatile FXptr* ptr,FXptr expect,FXptr v){
+ #if defined(WIN32) && ((_MSC_VER >= 1400) || (__BORLANDC__ >= 0x500))
+   return (InterlockedCompareExchangePointer((void**)ptr,v,expect)==expect);
+-#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER)) && defined(__i386__))
++#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER)) && (defined(__i386__) || defined(__ILP32__)))
+   register FXbool ret;
+   __asm__ __volatile__ ("lock\n\t"
+                         "cmpxchgl %2, (%1)\n\t"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/fox.git/commitdiff/71c8b69bd66b3e846f1eb45bc955a62e8e5f169c



More information about the pld-cvs-commit mailing list