diff --git a/opencv-4.1.2-cmake-includedir.patch b/opencv-4.1.2-cmake-includedir.patch new file mode 100644 index 0000000..ade7358 --- /dev/null +++ b/opencv-4.1.2-cmake-includedir.patch @@ -0,0 +1,11 @@ +--- opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in.orig 2019-11-14 20:10:06.372000000 +0100 ++++ opencv-4.1.2/cmake/templates/OpenCVConfig.cmake.in 2019-11-14 20:10:31.100000000 +0100 +@@ -77,7 +77,7 @@ + # Extract the directory where *this* file has been installed (determined at cmake run-time) + # Get the absolute path with no ../.. relative marks, to eliminate implicit linker warnings + get_filename_component(OpenCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_DIR}" REALPATH) +-get_filename_component(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/@OpenCV_INSTALL_PATH_RELATIVE_CONFIGCMAKE@" REALPATH) ++get_filename_component(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../../../" REALPATH) + + # Search packages for host system instead of packages for target system. + # in case of cross compilation this macro should be defined by toolchain file diff --git a/opencv.spec b/opencv.spec index 3678f5d..9f6f85b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -2,7 +2,7 @@ %define javaver %(echo %version | cut -d. -f1-3 | tr -d .) Name: opencv Version: 4.1.2 -Release: 2mamba +Release: 3mamba Summary: Collection of algorithms for computer vision Group: Development/Libraries Vendor: openmamba @@ -15,6 +15,7 @@ Patch0: %{name}-2.1.0-libpng14.patch Patch1: %{name}-2.3.1-arm-build.patch Patch2: opencv-2.4.9-buildfix-x86-asm-constraint.patch Patch3: opencv-2.4.10-i586-inconsistent-constraint-asm.patch +Patch4: opencv-4.1.2-cmake-includedir.patch License: BSD ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -107,6 +108,8 @@ Requires: python-numpy-py36 %description -n python-cv-py36 This package contains Python bindings for the OpenCV library. +%debug_package + %prep %setup -q -c mv opencv-opencv-*/* . @@ -115,6 +118,7 @@ mv opencv-opencv-*/* . %patch2 -p1 %endif #%patch3 -p1 +%patch4 -p1 %build #-- Interfaces: @@ -137,6 +141,8 @@ mv opencv-opencv-*/* . -DCMAKE_CXX_FLAGS:STRING="$RPM_OPT_FLAGS -D__STDC_CONSTANT_MACROS" \ -DPYTHON3_EXECUTABLE:PATH=%{__python36} \ -DPYTHON3_PACKAGES_PATH:PATH=%{python36_sitelib} \ + -DOPENCV_GENERATE_PKGCONFIG=ON \ + -DOPENCV_ENABLE_NONFREE=ON \ -DLIB_SUFFIX= %make_jobs @@ -182,6 +188,7 @@ rm -fr %{buildroot}%{_datadir}/opencv/doc %{_libdir}/libopencv_*.so %dir %{_libdir}/cmake/opencv4 %{_libdir}/cmake/opencv4/OpenCV*.cmake +%{_libdir}/pkgconfig/opencv4.pc %dir %{_datadir}/licenses/opencv4 %{_datadir}/licenses/opencv4/* @@ -203,6 +210,9 @@ rm -fr %{buildroot}%{_datadir}/opencv/doc %endif %changelog +* Thu Nov 14 2019 Silvan Calarco 4.1.2-3mamba +- fix cmake file for wrong include dir + * Sat Nov 09 2019 Silvan Calarco 4.1.2-2mamba - fix double provide/obsolete for opencv-python