Accepting request 726804 from science

Add pkgconfig file

OBS-URL: https://build.opensuse.org/request/show/726804
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv?expand=0&rev=76
This commit is contained in:
Dominique Leuenberger 2019-09-02 10:39:38 +00:00 committed by Git OBS Bridge
commit c6a279d079
3 changed files with 50 additions and 24 deletions

9
opencv-includedir.patch Normal file
View File

@ -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}

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Aug 28 15:05:46 UTC 2019 - Marius Kittler <marius.kittler@suse.com>
- Include pkg-config file in opencv-devel package
* Add opencv-includedir.patch
-------------------------------------------------------------------
Tue Aug 27 10:23:45 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Avoid use of ®/™ signs in specfiles as per guidelines.
-------------------------------------------------------------------
Mon Aug 19 11:13:05 UTC 2019 - Jonathan Brielmaier <jbrielmaier@suse.de>
@ -936,4 +947,3 @@ Sat Jan 16 19:45:04 UTC 2010 - tittiatcoke@gmail.com
Fri Oct 9 19:23:14 UTC 2009 - cmorve69@yahoo.es
- Initial package

View File

@ -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
@ -108,7 +110,7 @@ BuildRequires: pkgconfig(libswscale)
%endif
%description
OpenCV means Intel® Open Source Computer Vision Library. It is a collection of C
OpenCV means Intel Open Source Computer Vision Library. It is a collection of C
functions and a few C++ classes that implement some popular Image Processing and
Computer Vision algorithms.
@ -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