[packages/opencv] - fix paths in pkgconfig file and add missing dir to package - rel 2

baggins baggins at pld-linux.org
Sun Mar 7 11:05:15 CET 2021


commit e652d7a77a25c38968a6ddbb02fb4d39f69ba4a6
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Mar 7 11:04:43 2021 +0100

    - fix paths in pkgconfig file and add missing dir to package
    - rel 2

 opencv.spec           |  5 ++++-
 pkgconfig-paths.patch | 30 ++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)
---
diff --git a/opencv.spec b/opencv.spec
index 70dfea6..b52909d 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -60,7 +60,7 @@ Summary:	A library of programming functions mainly aimed at real time computer v
 Summary(pl.UTF-8):	Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
 Name:		opencv
 Version:	4.5.1
-Release:	1
+Release:	2
 Epoch:		1
 %if %{with unicap} || %{with xine}
 License:	GPL (enforced by used libraries), BSD (opencv itself)
@@ -104,6 +104,7 @@ Source40:	https://github.com/opencv/ade/archive/v0.1.1f/v0.1.1f.zip
 # Source40-md5:	b624b995ec9c439cbc2e9e6ee940d3a2
 Patch0:		%{name}-ximea.patch
 Patch1:		python-install.patch
+Patch2:		pkgconfig-paths.patch
 URL:		http://www.opencv.org/
 %{?with_pvapi:BuildRequires:	AVT_GigE_SDK-devel}
 %{?with_opencl:BuildRequires:	OpenCL-devel}
@@ -327,6 +328,7 @@ Wiązania Pythona 3 do OpenCV.
 
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 cache_file() {
 	f="$1"
@@ -643,6 +645,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libopencv_viz.so
 %endif
 %{_includedir}/opencv4
+%dir %{_libdir}/cmake/opencv4
 %{_libdir}/cmake/opencv4/OpenCV*.cmake
 %{_pkgconfigdir}/opencv4.pc
 
diff --git a/pkgconfig-paths.patch b/pkgconfig-paths.patch
new file mode 100644
index 0000000..948c35e
--- /dev/null
+++ b/pkgconfig-paths.patch
@@ -0,0 +1,30 @@
+--- opencv-4.5.1/cmake/OpenCVGenPkgconfig.cmake~	2020-12-21 21:01:38.000000000 +0100
++++ opencv-4.5.1/cmake/OpenCVGenPkgconfig.cmake	2021-03-07 10:47:09.068714587 +0100
+@@ -124,14 +124,14 @@
+ ocv_list_unique(_3rdparty)
+ 
+ set(OPENCV_PC_LIBS
+-  "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}"
++  "-L${OPENCV_LIB_INSTALL_PATH}"
+   "${_modules}"
+ )
+ if(BUILD_SHARED_LIBS)
+   set(OPENCV_PC_LIBS_PRIVATE "${_extra}")
+ else()
+   set(OPENCV_PC_LIBS_PRIVATE
+-    "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}"
++    "-L${OPENCV_3P_LIB_INSTALL_PATH}"
+     "${_3rdparty}"
+     "${_extra}"
+   )
+@@ -142,8 +142,8 @@
+ #generate the .pc file
+ set(prefix      "${CMAKE_INSTALL_PREFIX}")
+ set(exec_prefix "\${prefix}")
+-set(libdir      "\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}")
+-set(includedir  "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}")
++set(libdir      "${OPENCV_LIB_INSTALL_PATH}")
++set(includedir  "${OPENCV_INCLUDE_INSTALL_PATH}")
+ 
+ configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv-XXX.pc.in"
+                "${CMAKE_BINARY_DIR}/unix-install/${OPENCV_PC_FILE_NAME}"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/opencv.git/commitdiff/e652d7a77a25c38968a6ddbb02fb4d39f69ba4a6



More information about the pld-cvs-commit mailing list