Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=2009968ed0c47faa40da71546f095beba252f31e

commit 2009968ed0c47faa40da71546f095beba252f31e
Author: kikadf <[email protected]>
Date:   Mon Oct 13 11:50:17 2014 +0200

opencv-2.4.10-1-x86_64

* Fix build on i686

diff --git a/source/xmultimedia-extra/opencv/FrugalBuild 
b/source/xmultimedia-extra/opencv/FrugalBuild
index d5b5384..4b98e71 100644
--- a/source/xmultimedia-extra/opencv/FrugalBuild
+++ b/source/xmultimedia-extra/opencv/FrugalBuild
@@ -26,15 +26,16 @@ _F_cmake_confopts="-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTS=OFF \
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON"
-if [ "${CARCH}" = "i686" ] ;then
-       _F_cmake_confopts+=" -DENABLE_SSE=OFF \
-                             -DENABLE_SSE2=OFF \
-                             -DENABLE_SSE3=OFF"
-fi
Finclude sourceforge cmake
options=('noccache')
groups=('xmultimedia-extra')
archs=('i686' 'x86_64')
sha1sums=('0b185f5e332d5feef91722a6ed68c36a6d33909e')
+if [ "${CARCH}" = "i686" ] ;then
+       source+=(opencv-0001-core-fix-x86-PIC-code-compilation.patch)
+       sha1sums+=('1bf4ded0ab3ef860852495bb3908dfb7847f698e')
+fi
+
+

# optimization OK
diff --git 
a/source/xmultimedia-extra/opencv/opencv-0001-core-fix-x86-PIC-code-compilation.patch
 
b/source/xmultimedia-extra/opencv/opencv-0001-core-fix-x86-PIC-code-compilation.patch
new file mode 100644
index 0000000..c72617c
--- /dev/null
+++ 
b/source/xmultimedia-extra/opencv/opencv-0001-core-fix-x86-PIC-code-compilation.patch
@@ -0,0 +1,26 @@
+diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp
+index 5a970d5..e9ffdc7 100644
+--- a/modules/core/src/system.cpp
++++ b/modules/core/src/system.cpp
+ <at>  <at>  -267,14 +267,17  <at>  <at>  struct HWFeatures
+          : "cc"
+         );
+         #else
++        // We need to preserve ebx since we are compiling PIC code.
++        // This means we cannot use "=b" for the 2nd output register.
+         asm volatile
+         (
+          "pushl %%ebx\n\t"
+          "movl $7,%%eax\n\t"
+          "movl $0,%%ecx\n\t"
+          "cpuid\n\t"
++         "movl %%ebx,%1\n\t"
+          "popl %%ebx\n\t"
+-         : "=a"(cpuid_data[0]), "=b"(cpuid_data[1]), "=c"(cpuid_data[2]), 
"=d"(cpuid_data[3])
++         : "=a"(cpuid_data[0]), "=r"(cpuid_data[1]), "=c"(cpuid_data[2]), 
"=d"(cpuid_data[3])
+          :
+          : "cc"
+         );
+--
+2.1.2
+
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to