[ilmbase] fix build on non-x86 arches

Dan Horák sharkcz at fedoraproject.org
Tue Sep 4 08:35:41 UTC 2012


commit 2df2c7d9a8ec6ab8af82f8fe79eac8a0f4da998a
Author: Dan Horák <dan at danny.cz>
Date:   Tue Sep 4 10:35:35 2012 +0200

    fix build on non-x86 arches

 ilmbase-1.0.3-secondary.patch |   12 ++++++++++++
 ilmbase.spec                  |    8 +++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/ilmbase-1.0.3-secondary.patch b/ilmbase-1.0.3-secondary.patch
new file mode 100644
index 0000000..d358fbb
--- /dev/null
+++ b/ilmbase-1.0.3-secondary.patch
@@ -0,0 +1,12 @@
+diff -up ilmbase-1.0.3/IexMath/IexMathFpu.cpp.secondary ilmbase-1.0.3/IexMath/IexMathFpu.cpp
+--- ilmbase-1.0.3/IexMath/IexMathFpu.cpp.secondary	2012-09-04 10:26:55.000000000 +0200
++++ ilmbase-1.0.3/IexMath/IexMathFpu.cpp	2012-09-04 10:27:20.000000000 +0200
+@@ -27,7 +27,7 @@
+ #endif
+ 
+ 
+-#ifdef HAVE_UCONTEXT_H
++#if defined(HAVE_UCONTEXT_H) && (defined(__x86_64__) || defined(__i386__))
+ 
+ 
+ #include <ucontext.h>
diff --git a/ilmbase.spec b/ilmbase.spec
index afcff2d..7118981 100644
--- a/ilmbase.spec
+++ b/ilmbase.spec
@@ -1,7 +1,7 @@
 
 Name:	 ilmbase 
 Version: 1.0.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: Abstraction/convenience libraries
 
 Group:	 System Environment/Libraries
@@ -21,6 +21,8 @@ BuildRequires: pkgconfig
 Patch50: ilmbase-1.0.3-so6.patch
 # explicitly add $(PTHREAD_LIBS) to libIlmThread linkage (helps workaround below)
 Patch51: ilmbase-1.0.2-no_undefined.patch
+# the FPU exception code is x86 specific
+Patch52: ilmbase-1.0.3-secondary.patch
 
 ## upstream patches
 # fix build on i686/32bit
@@ -53,6 +55,7 @@ Requires: pkgconfig
 
 %patch50 -p1 -b .so6
 %patch51 -p1 -b .no_undefined
+%patch52 -p1 -b .secondary
 %if %{__isa_bits} == 32
 %patch100 -p1 -b .ucontext
 %endif
@@ -110,6 +113,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Sep 04 2012 Dan Horák <dan[at]danny.cz> 1.0.3-2
+- fix build on non-x86 arches
+
 * Sun Aug 05 2012 Rex Dieter <rdieter at fedoraproject.org> 1.0.3-1
 - ilmbase-1.0.3
 - ix86 fix courtesy of Nicolas Chauvet <kwizart at gmail.com>


More information about the scm-commits mailing list