[vxl] fix build on non-x86 arches

Dan Horák sharkcz at fedoraproject.org
Wed Dec 5 13:30:39 UTC 2012


commit c92dd8b6e85824a04c4ee08ce3471b3d5e1b1199
Author: Dan Horák <dan at danny.cz>
Date:   Wed Dec 5 08:34:03 2012 -0500

    fix build on non-x86 arches

 vxl-1.17.0-secondary.patch |   30 ++++++++++++++++++++++++++++++
 vxl.spec                   |   10 +++++++++-
 2 files changed, 39 insertions(+), 1 deletions(-)
---
diff --git a/vxl-1.17.0-secondary.patch b/vxl-1.17.0-secondary.patch
new file mode 100644
index 0000000..39e7e6e
--- /dev/null
+++ b/vxl-1.17.0-secondary.patch
@@ -0,0 +1,30 @@
+diff -up vxl-git4e07960/core/vil/vil_round.h.secondary vxl-git4e07960/core/vil/vil_round.h
+--- vxl-git4e07960/core/vil/vil_round.h.secondary	2012-12-05 08:23:37.072384920 -0500
++++ vxl-git4e07960/core/vil/vil_round.h	2012-12-05 08:24:06.682385737 -0500
+@@ -25,9 +25,8 @@
+ # endif
+ #endif
+ 
+-// Turn on fast impl when using GCC on Intel-based machines with the following exception:
+-//   PPC with Mac OS X
+-#if defined(__GNUC__) && (!defined(__APPLE__)  || !defined(__ppc__) )
++// Turn on fast impl when using GCC on Intel-based machines
++#if defined(__GNUC__) && (defined(__i386__)  || defined(__x86_64__) )
+ # define GCC_USE_FAST_IMPL 1
+ #else
+ # define GCC_USE_FAST_IMPL 0
+diff -up vxl-git4e07960/core/vnl/vnl_math.h.secondary vxl-git4e07960/core/vnl/vnl_math.h
+--- vxl-git4e07960/core/vnl/vnl_math.h.secondary	2012-12-05 08:12:25.282386747 -0500
++++ vxl-git4e07960/core/vnl/vnl_math.h	2012-12-05 08:13:05.142387632 -0500
+@@ -53,9 +53,8 @@
+ #   include <emmintrin.h> // sse 2 intrinsics
+ # endif
+ #endif
+-// Turn on fast impl when using GCC on Intel-based machines with the following exception:
+-//   PPC with Mac OS X
+-#if defined(__GNUC__) && (!defined(__APPLE__)  || !defined(__ppc__) )
++// Turn on fast impl when using GCC on Intel-based machines
++#if defined(__GNUC__) && (defined(__i386__)  || defined(__x86_64__))
+ # define GCC_USE_FAST_IMPL 1
+ #else
+ # define GCC_USE_FAST_IMPL 0
diff --git a/vxl.spec b/vxl.spec
index 6cdef27..7aeeb67 100644
--- a/vxl.spec
+++ b/vxl.spec
@@ -1,7 +1,7 @@
 
 Name:		vxl	
 Version:	1.17.0	
-Release:	7%{?dist}
+Release:	8%{?dist}
 Summary:	C++ Libraries for Computer Vision Research and Implementation
 Group:		Development/Libraries
 License:	BSD
@@ -36,6 +36,8 @@ Patch22:	0022-Include-missing-vcl_cstdio.h-header.patch
 Patch23:	0023-Remove-volm-because-of-error-in-function-prototype.patch
 Patch24:	0024-Added-missing-sonames-for-mvl2-and-vepl1.patch
 
+Patch100:	%{name}-1.17.0-secondary
+
 #KL is used in an "UNMAINTAINED_LIBRARY", vgel is only built on request
 
 Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -55,7 +57,9 @@ BuildRequires:	libtiff-devel
 BuildRequires:	libXmu-devel 
 BuildRequires:	libXi-devel
 BuildRequires:	libjpeg-devel
+%ifnarch s390 s390x
 BuildRequires:	libdc1394-devel
+%endif
 BuildRequires:	libgeotiff-devel
 BuildRequires:	libjpeg-turbo-devel
 BuildRequires:	minizip-devel
@@ -145,6 +149,7 @@ find contrib/brl/b3p/expatpp -type f ! -name 'CMakeLists.txt' -execdir rm {} +
 %patch22 -p1
 %patch23 -p1
 %patch24 -p1
+%patch100 -p1 -b .secondary
 
 
 #Fix lib / lib64 problem during install:
@@ -237,6 +242,9 @@ ctest .
 
 
 %changelog
+* Wed Dec 05 2012 Dan Horák <dan[at]danny.cz> - 1.17.0-8
+- fix build on non-x86 arches
+
 * Sun Nov 25 2012 Mario Ceresa mrceresa fedoraproject org vxl 1.17.0-7%{?dist}
 - Changed source0 path to point to vxl 1.17
 - Added missing sonames


More information about the scm-commits mailing list