Hello community, here is the log from the commit of package opencv for openSUSE:Factory checked in at 2017-07-11 08:24:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/opencv (Old) and /work/SRC/openSUSE:Factory/.opencv.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "opencv" Tue Jul 11 08:24:11 2017 rev:66 rq:507374 version:3.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/opencv/opencv.changes 2017-06-12 15:13:08.671635378 +0200 +++ /work/SRC/openSUSE:Factory/.opencv.new/opencv.changes 2017-07-11 08:24:12.513299329 +0200 @@ -1,0 +2,19 @@ +Mon Jun 5 12:15:24 UTC 2017 - [email protected] + +- Add conditional for the qt5/qt4 integration + * This is used only for gui tools, library is not affected +- Add provides/obsoletes for the qt5 packages to allow migration +- Drop patch opencv-qt5-sobump.diff + * Used only by the obsoleted qt5 variant + +------------------------------------------------------------------- +Mon Jun 5 11:29:06 UTC 2017 - [email protected] + +- Cleanup a bit with spec-cleaner +- Use %cmake macros +- Remove the conditions that are not really needed +- Add tests conditional disabled by default + * Many tests fail and there are missing testdata +- Switch to pkgconfig style dependencies + +------------------------------------------------------------------- Old: ---- opencv-qt5-sobump.diff opencv-qt5.changes opencv-qt5.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ opencv.spec ++++++ --- /var/tmp/diff_new_pack.HFisxp/_old 2017-07-11 08:24:14.636999804 +0200 +++ /var/tmp/diff_new_pack.HFisxp/_new 2017-07-11 08:24:14.636999804 +0200 @@ -16,11 +16,12 @@ # -%bcond_without ffmpeg - %define libname lib%{name} %define soname 3_2 - +# disabled by default as many fail +%bcond_with tests +%bcond_without qt5 +%bcond_without ffmpeg Name: opencv Version: 3.2.0 Release: 0 @@ -31,25 +32,49 @@ Source0: https://github.com/Itseez/opencv/archive/%{version}.tar.gz # This is the FACE module from the opencv_contrib package. Packaged separately to prevent too much usntable modules Source1: opencv_contrib_face-3.1.0.tar.bz2 +# PATCH-FIX-UPSTREAM opencv-gles.patch -- Make sure PERSPECTIVE_CORRECTION_HINT is validated first +Patch1: opencv-gles.patch # PATCH-FIX-OPENSUSE opencv-build-compare.patch -- avoid republish if some random external version number changes Patch8: opencv-build-compare.patch # PATCH-FIX-UPSTREAM opencv-gcc6-fix-pch-support-PR8345.patch -- fix PCH support on GCC 6.x Patch10: opencv-gcc6-fix-pch-support-PR8345.patch BuildRequires: cmake BuildRequires: fdupes -BuildRequires: unzip -%if 0%{?suse_version} > 1310 -BuildRequires: gstreamer-plugins-base-devel -%else -BuildRequires: gstreamer-0_10-plugins-base-devel -BuildRequires: libucil-devel -BuildRequires: libunicap-devel -%endif -BuildRequires: libdc1394-devel -%if 0%{?suse_version} > 1230 BuildRequires: libeigen3-devel +BuildRequires: libjasper-devel +BuildRequires: libjpeg-devel +BuildRequires: openblas-devel +BuildRequires: pkgconfig +BuildRequires: python-numpy-devel +BuildRequires: python3-numpy-devel +BuildRequires: tbb-devel +BuildRequires: unzip +BuildRequires: pkgconfig(IlmBase) +BuildRequires: pkgconfig(OpenEXR) +BuildRequires: pkgconfig(glu) +BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) +BuildRequires: pkgconfig(libdc1394-2) +BuildRequires: pkgconfig(libgphoto2) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libtiff-4) +BuildRequires: pkgconfig(libv4l2) +BuildRequires: pkgconfig(libv4lconvert) +BuildRequires: pkgconfig(python) +BuildRequires: pkgconfig(python3) +BuildRequires: pkgconfig(zlib) +Provides: opencv-qt5 +Obsoletes: opencv-qt5 +%if %{with qt5} +BuildRequires: pkgconfig(Qt5Concurrent) >= 5.2.0 +BuildRequires: pkgconfig(Qt5Gui) >= 5.2.0 +BuildRequires: pkgconfig(Qt5OpenGL) >= 5.2.0 +BuildRequires: pkgconfig(Qt5Test) >= 5.2.0 +BuildRequires: pkgconfig(Qt5Widgets) >= 5.2.0 %else -BuildRequires: libeigen2-devel +BuildRequires: pkgconfig(QtCore) +BuildRequires: pkgconfig(QtGui) +BuildRequires: pkgconfig(QtOpenGL) +BuildRequires: pkgconfig(QtTest) %endif %if %{with ffmpeg} BuildRequires: pkgconfig(libavcodec) @@ -57,33 +82,9 @@ BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libswscale) %endif -BuildRequires: libgphoto2-devel -BuildRequires: libjasper-devel -BuildRequires: libjpeg-devel -BuildRequires: libqt4-devel -BuildRequires: libtiff-devel -BuildRequires: libv4l-devel -%if 0%{?suse_version} > 1220 -BuildRequires: ilmbase-devel -BuildRequires: openexr-devel -%else -BuildRequires: OpenEXR-devel -BuildRequires: libilmbase-devel -%endif -BuildRequires: libpng16-compat-devel -BuildRequires: libpng16-devel -BuildRequires: openblas-devel -BuildRequires: python-devel -BuildRequires: python-numpy-devel -BuildRequires: python3-devel -BuildRequires: python3-numpy-devel %if 0%{?suse_version} != 1315 || 0%{?is_opensuse} BuildRequires: python-sphinx %endif -BuildRequires: tbb-devel -BuildRequires: zlib-devel -BuildRequires: pkgconfig(glu) -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description OpenCV means IntelĀ® Open Source Computer Vision Library. It is a collection of C @@ -91,8 +92,8 @@ Computer Vision algorithms. %package -n %{libname}%{soname} -Summary: Development files for using the OpenCV library -Group: Development/Libraries/C and C++ +Summary: Libraries to use OpenCV computer vision +Group: System/Libraries %description -n %{libname}%{soname} The Open Computer Vision Library is a collection of algorithms and sample code @@ -101,9 +102,7 @@ %package devel Summary: Development files for using the OpenCV library -# Since 2.4.7 Group: Development/Libraries/C and C++ -Provides: %{name}-devel-static = %{version} Requires: %{libname}%{soname} = %{version} Requires: %{name} = %{version} Requires: pkgconfig(gl) @@ -112,6 +111,8 @@ Requires: pkgconfig(sm) Requires: pkgconfig(x11) Requires: pkgconfig(xext) +Provides: %{name}-qt5-devel +Obsoletes: %{name}-qt5-devel %description devel This package contains the OpenCV C/C++ library and header files, as well as @@ -121,7 +122,9 @@ %package -n python-%{name} Summary: Python 2 bindings for apps which use OpenCV Group: Development/Libraries/Python -Requires: python-base >= %{py_ver} +Requires: python-base +Provides: python-%{name}-qt5 +Obsoletes: python-%{name}-qt5 %description -n python-%{name} This package contains Python 2 bindings for the OpenCV library. @@ -129,49 +132,40 @@ %package -n python3-%{name} Summary: Python 3 bindings for apps which use OpenCV Group: Development/Libraries/Python -Requires: python3-base >= %{py3_ver} +Requires: python3-base +Provides: python3-%{name}-qt5 +Obsoletes: python3-%{name}-qt5 %description -n python3-%{name} This package contains Python 3 bindings for the OpenCV library. %package doc Summary: Documentation and examples for OpenCV -Group: Development/Libraries/C and C++ +Group: Documentation/Other Recommends: python # Since this package also contains examples that need -devel to be compiled -Recommends: %{name}-devel +Suggests: %{name}-devel +Provides: %{name}-qt5-doc +Obsoletes: %{name}-qt5-doc %description doc This package contains the documentation and examples for the OpenCV library. %prep %setup -q -a 1 -%patch8 -p1 -%patch10 -p1 +%autopatch -p1 # Remove Windows specific files rm -f doc/packaging.txt -# Fix "wrong-file-end-of-line-encoding" rpmlint warning -# sed -i 's/\r$//' samples/c/facedetect.cmd %build -%ifarch ppc64le -if [ $(gcc -dumpversion) -ge 6 ]; then -export mlra=-mlra -fi -%endif -export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)" -export CXXFLAGS="%{optflags} ${mlra} $(getconf LFS_CFLAGS)" -mkdir build -cd build # TODO for OCV 3.3: https://github.com/opencv/opencv/wiki/CPU-optimizations-build-options -cmake -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX='%{_prefix}' \ - -DCMAKE_SKIP_RPATH=ON \ - -DBUILD_TESTS=OFF \ +%cmake \ +%if %{with tests} + -DBUILD_TESTS=ON \ +%endif -DINSTALL_C_EXAMPLES=ON \ -DINSTALL_PYTHON_EXAMPLES=ON \ - -DLIB_SUFFIX=$(echo %{_lib} | cut -b4-) \ -DENABLE_OMIT_FRAME_POINTER=OFF \ -DWITH_QT=ON \ -DWITH_OPENGL=ON \ @@ -179,24 +173,23 @@ -DWITH_XINE=ON \ -DWITH_IPP=OFF \ -DWITH_TBB=ON \ -%if 0%{?suse_version} <= 1310 - -DWITH_GSTREAMER_0_10=ON \ -%endif -%ifnarch x86_64 +%ifarch %{ix86} -DENABLE_SSE=0 \ -DENABLE_SSE2=0 \ %endif - -DENABLE_SSE3=0 \ - .. + -DENABLE_SSE3=0 make %{?_smp_mflags} VERBOSE=1 +%check +%if %{with tests} +export LD_LIBRARY_PATH=$(pwd)/build/lib:$LD_LIBRARY_PATH +%ctest +%endif + %install -cd build -make DESTDIR=%{?buildroot:%{buildroot}} install/fast +%cmake_install mkdir -p %{buildroot}%{_docdir}/%{name}-doc mv %{buildroot}%{_datadir}/OpenCV/samples %{buildroot}%{_docdir}/%{name}-doc/examples -# OpenCV 3.2 no longer install libopencv_ts.a if the tests are not enabled -install lib/libopencv_ts.a %{buildroot}%{_libdir} # Fix rpmlint warning "doc-file-dependency" chmod 644 %{buildroot}%{_docdir}/%{name}-doc/examples/python/*.py @@ -205,7 +198,6 @@ %fdupes -s %{buildroot}%{_includedir} %post -n %{libname}%{soname} -p /sbin/ldconfig - %postun -n %{libname}%{soname} -p /sbin/ldconfig %files @@ -222,7 +214,6 @@ %defattr(-,root,root,-) %{_includedir}/opencv/ %{_includedir}/opencv2/ -%{_libdir}/libopencv_ts.a %{_libdir}/lib*.so %{_libdir}/pkgconfig/opencv.pc %{_datadir}/OpenCV/OpenCVConfig*.cmake @@ -233,11 +224,7 @@ %files -n python3-%{name} %defattr(-,root,root,-) -%if 0%{?suse_version} > 1310 %{python3_sitearch}/cv2.%{py3_soflags}.so -%else -%{python3_sitearch}/cv2.so -%endif %files doc %defattr(-,root,root,-)
