From aaeb4778a3a8f24211e9cca8746d1a43a5ea66f9efa6b79268c5b126915d47a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Wed, 28 Aug 2019 16:57:07 +0000 Subject: [PATCH] Accepting request 726779 from home:mkittler:branches:science This include pkg-config file in opencv-devel package. The problem with wrong include and linker search paths mentioned in the previous SR has been fixed. OBS-URL: https://build.opensuse.org/request/show/726779 OBS-URL: https://build.opensuse.org/package/show/science/opencv?expand=0&rev=4 --- opencv-includedir.patch | 9 +++++++++ opencv.changes | 5 +++++ opencv.spec | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 opencv-includedir.patch diff --git a/opencv-includedir.patch b/opencv-includedir.patch new file mode 100644 index 0000000..2ba9fa2 --- /dev/null +++ b/opencv-includedir.patch @@ -0,0 +1,9 @@ +diff -u -r opencv-4.0.1/cmake/templates/opencv-XXX.pc.in opencv-4.0.1-includedir/cmake/templates/opencv-XXX.pc.in +--- opencv-4.0.1/cmake/templates/opencv-XXX.pc.in 2018-12-22 07:03:30.000000000 +0000 ++++ opencv-4.0.1-includedir/cmake/templates/opencv-XXX.pc.in 2019-02-07 15:08:15.016613349 +0000 +@@ -11,4 +10,4 @@ + Version: @OPENCV_VERSION_PLAIN@ + Libs: @OPENCV_PC_LIBS@ + Libs.private: @OPENCV_PC_LIBS_PRIVATE@ +-Cflags: -I${includedir_old} -I${includedir_new} ++Cflags: -I${includedir_new} diff --git a/opencv.changes b/opencv.changes index efd3e00..d0f88d5 100644 --- a/opencv.changes +++ b/opencv.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Aug 28 15:05:46 UTC 2019 - Marius Kittler + +- Include pkg-config file in opencv-devel package + ------------------------------------------------------------------- Mon Aug 19 11:13:05 UTC 2019 - Jonathan Brielmaier diff --git a/opencv.spec b/opencv.spec index 0c10f85..985d43b 100644 --- a/opencv.spec +++ b/opencv.spec @@ -49,6 +49,8 @@ Patch0: opencv-gles.patch Patch1: opencv-build-compare.patch # PATCH-FIX-OPENSUSE 0001-Do-not-include-glx.h-when-using-GLES.patch -- Fix build error on 32bit ARM, due to incompatible pointer types, https://github.com/opencv/opencv/issues/9171 Patch2: 0001-Do-not-include-glx.h-when-using-GLES.patch +# PATCH-FIX-OPENSUSE opencv-includedir.patch -- Fix wrong include path in pkgconfig file +Patch3: opencv-includedir.patch BuildRequires: cmake BuildRequires: fdupes BuildRequires: libeigen3-devel @@ -199,6 +201,7 @@ rm -f doc/packaging.txt %endif -DOPENCV_INCLUDE_INSTALL_PATH=%{_includedir} \ -DOPENCV_LICENSES_INSTALL_PATH=%{_licensedir}/%{name} \ + -DOPENCV_GENERATE_PKGCONFIG=ON \ -DINSTALL_C_EXAMPLES=ON \ -DINSTALL_PYTHON_EXAMPLES=ON \ -DENABLE_OMIT_FRAME_POINTER=OFF \ @@ -258,6 +261,9 @@ chmod 644 %{buildroot}%{_docdir}/%{name}-doc/examples/python/*.py # Remove LD_LIBRARY_PATH wrapper script, we install into proper library dirs rm %{buildroot}%{_bindir}/setup_vars_opencv4.sh +# Fix duplicated install prefix in pkg-config file +sed -i -e 's|//usr||g' %{buildroot}%{_libdir}/pkgconfig/opencv4.pc + %fdupes -s %{buildroot}%{_docdir}/%{name}-doc/examples %fdupes -s %{buildroot}%{_includedir} @@ -303,6 +309,7 @@ rm %{buildroot}%{_bindir}/setup_vars_opencv4.sh %license LICENSE LICENSE.contrib %{_includedir}/opencv2/ %{_libdir}/lib*.so +%{_libdir}/pkgconfig/opencv4.pc %dir %{_libdir}/cmake/opencv4 %{_libdir}/cmake/opencv4/OpenCVConfig*.cmake %{_libdir}/cmake/opencv4/OpenCVModules*.cmake