rebuilt to fix wrong cmake files on i586 which don't like to digikam [release 2.4.9-2mamba;Thu Sep 04 2014]

This commit is contained in:
Silvan Calarco 2024-01-06 08:10:48 +01:00
parent bd615357cd
commit 35db541444
2 changed files with 77 additions and 13 deletions

View File

@ -0,0 +1,55 @@
diff --git a/package/opencv/opencv-0001-core-fix-x86-PIC-code-compilation.patch b/package/opencv/opencv-0001-core-fix-x86-PIC-code-compilation.patch
new file mode 100644
index 0000000..9e8c2e9
--- /dev/null
+++ b/package/opencv/opencv-0001-core-fix-x86-PIC-code-compilation.patch
@@ -0,0 +1,49 @@
+From ea50be0529c248961e1b66293f8a9e4b807294a6 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sun, 12 Oct 2014 10:17:23 +0200
+Subject: [PATCH] core: fix x86 PIC code compilation
+
+This bug was triggered by Buildroot autobuilders [1,2], causing this
+kind of failures [3,4]:
+
+ [ 14%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o
+ /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp: In function '(static initializers for /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp)':
+ /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp:280:10: error: inconsistent operand constraints in an 'asm'
+ make[3]: *** [modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o] Error 1
+
+[1] http://buildroot.org/
+[2] http://autobuild.buildroot.org/
+[3] http://autobuild.buildroot.org/?reason=opencv-2.4.10
+[4] http://autobuild.buildroot.org/results/483/4838285b25d6293a5cf0bb9eadd5040a7c75d766/build-end.log
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ modules/core/src/system.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+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
+@@ -267,14 +267,17 @@ 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
+

View File

@ -2,7 +2,7 @@
%define javaver %(echo %version | cut -d. -f1-3 | tr -d .) %define javaver %(echo %version | cut -d. -f1-3 | tr -d .)
Name: opencv Name: opencv
Version: 2.4.9 Version: 2.4.9
Release: 1mamba Release: 2mamba
Summary: Collection of algorithms for computer vision Summary: Collection of algorithms for computer vision
Group: Development/Libraries Group: Development/Libraries
Vendor: openmamba Vendor: openmamba
@ -13,43 +13,44 @@ Source: http://downloads.sourceforge.net/project/opencvlibrary/opencv-uni
#Source: http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/%{version}/opencv-%{version}.tar.gz #Source: http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/%{version}/opencv-%{version}.tar.gz
Patch0: %{name}-2.1.0-libpng14.patch Patch0: %{name}-2.1.0-libpng14.patch
Patch1: %{name}-2.3.1-arm-build.patch Patch1: %{name}-2.3.1-arm-build.patch
Patch2: opencv-2.4.9-buildfix-x86-asm-constraint.patch
License: BSD License: BSD
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libatk-devel BuildRequires: libatk-devel
BuildRequires: libavcodec-devel BuildRequires: libavcodec-ffmpeg-devel
BuildRequires: libavformat-devel BuildRequires: libavformat-ffmpeg-devel
BuildRequires: libavutil-devel BuildRequires: libavutil-ffmpeg-devel
BuildRequires: libbzip2-devel BuildRequires: libbzip2-devel
BuildRequires: libcairo-devel BuildRequires: libcairo-devel
BuildRequires: libdc1394-devel BuildRequires: libdc1394-devel
BuildRequires: libfontconfig-devel BuildRequires: libfontconfig-devel
BuildRequires: libfreetype-devel BuildRequires: libfreetype-devel
BuildRequires: libgcc BuildRequires: libgcc
BuildRequires: libgdk-pixbuf-devel
BuildRequires: libglib-devel BuildRequires: libglib-devel
BuildRequires: libgst-plugins-base-devel BuildRequires: libgst-plugins-base010-devel
BuildRequires: libgstreamer-devel BuildRequires: libgstreamer010-devel
BuildRequires: libgtk-devel BuildRequires: libgtk2-devel
BuildRequires: libilmbase-devel
BuildRequires: libjasper-devel BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
BuildRequires: libogg-devel BuildRequires: libopenexr-devel
BuildRequires: libpango-devel BuildRequires: libpango-devel
BuildRequires: libpng12-devel
BuildRequires: libpng-devel BuildRequires: libpng-devel
BuildRequires: libpython-devel BuildRequires: libpython-devel
BuildRequires: libpython27-devel
BuildRequires: libstdc++6-devel BuildRequires: libstdc++6-devel
BuildRequires: libswscale-devel BuildRequires: libswscale-ffmpeg-devel
BuildRequires: libtheora-devel
BuildRequires: libtiff-devel BuildRequires: libtiff-devel
BuildRequires: libunicap-devel BuildRequires: libunicap-devel
BuildRequires: libv4l-devel BuildRequires: libv4l-devel
BuildRequires: libvorbis-devel
BuildRequires: libxine-devel BuildRequires: libxine-devel
BuildRequires: libxml2-devel BuildRequires: libxml2-devel
BuildRequires: libz-devel BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRequires: python-Imaging BuildRequires: python-Imaging
BuildRequires: python-numpy BuildRequires: python-numpy
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
@ -86,6 +87,11 @@ This package contains Python bindings for the OpenCV library.
%prep %prep
%setup -q %setup -q
%ifarch %{ix86}
%patch2 -p1
%endif
# WARNING: don't reinstall with -D -T or cmake files will be incorrect
#% ifarch arm #% ifarch arm
#% patch1 -p2 #% patch1 -p2
#% endif #% endif
@ -174,6 +180,9 @@ rm -fr %{buildroot}%{_datadir}/opencv/doc
%{python_sitelib}/cv2.so %{python_sitelib}/cv2.so
%changelog %changelog
* Thu Sep 04 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.9-2mamba
- rebuilt to fix wrong cmake files on i586 which don't like to digikam
* Tue Jul 15 2014 Automatic Build System <autodist@mambasoft.it> 2.4.9-1mamba * Tue Jul 15 2014 Automatic Build System <autodist@mambasoft.it> 2.4.9-1mamba
- automatic version update by autodist - automatic version update by autodist