public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/opencv] opencv5: Fixed cmake script for generating opencv.pc file
Date: Fri, 28 Aug 2026 13:30:07 GMT [thread overview]
Message-ID: <178792380754.1.17435789269877025489.rpms-opencv-57420fa10459@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/opencv
Branch : opencv5
Commit : 57420fa10459836fd30f120ff0fa9ff84a1fb16d
Author : Honza Horák <hhorak@redhat.com>
Date : 2012-07-04T16:22:39+02:00
Stats : +49/-0 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/opencv/c/57420fa10459836fd30f120ff0fa9ff84a1fb16d?branch=opencv5
Log:
Fixed cmake script for generating opencv.pc file
Fixed OpenCVConfig script file
---
diff --git a/opencv-pkgcmake.patch b/opencv-pkgcmake.patch
new file mode 100644
index 0000000..2e57d4d
--- /dev/null
+++ b/opencv-pkgcmake.patch
@@ -0,0 +1,49 @@
+diff -up OpenCV-2.4.1/cmake/OpenCVGenPkgconfig.cmake.pkgcmake OpenCV-2.4.1/cmake/OpenCVGenPkgconfig.cmake
+--- OpenCV-2.4.1/cmake/OpenCVGenPkgconfig.cmake.pkgcmake 2012-05-31 16:05:39.000000000 +0200
++++ OpenCV-2.4.1/cmake/OpenCVGenPkgconfig.cmake 2012-07-03 15:00:40.127943903 +0200
+@@ -10,7 +10,7 @@
+ # -------------------------------------------------------------------------------------------
+ set(prefix "${CMAKE_INSTALL_PREFIX}")
+ set(exec_prefix "\${prefix}")
+-set(libdir "") #TODO: need link paths for OpenCV_EXTRA_COMPONENTS
++set(libdir "\${prefix}/${OPENCV_LIB_INSTALL_PATH}")
+ set(includedir "\${prefix}/${OPENCV_INCLUDE_PREFIX}")
+ set(VERSION ${OPENCV_VERSION})
+
+@@ -36,7 +36,7 @@ ocv_list_reverse(OpenCV_LIB_COMPONENTS)
+ ocv_list_reverse(OpenCV_EXTRA_COMPONENTS)
+
+ #build the list of components
+-set(OpenCV_LIB_COMPONENTS_ "")
++set(OpenCV_LIB_COMPONENTS_ "-L\${libdir}")
+ foreach(CVLib ${OpenCV_LIB_COMPONENTS})
+ get_target_property(libpath ${CVLib} LOCATION_${CMAKE_BUILD_TYPE})
+ get_filename_component(libname "${libpath}" NAME)
+@@ -51,8 +51,10 @@ foreach(CVLib ${OpenCV_LIB_COMPONENTS})
+ else()
+ set(installDir "${OPENCV_LIB_INSTALL_PATH}")
+ endif()
+-
+- set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} \${exec_prefix}/${installDir}/${libname}")
++ string(REPLACE "libopencv" "-lopencv" libname "${libname}")
++ string(REPLACE ".so" "" libname "${libname}")
++ string(REPLACE ".dylib" "" libname "${libname}")
++ set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} ${libname}")
+ endforeach()
+
+ # add extra dependencies required for OpenCV
+diff -up OpenCV-2.4.1/cmake/templates/OpenCVConfig.cmake.in.pkgcmake OpenCV-2.4.1/cmake/templates/OpenCVConfig.cmake.in
+--- OpenCV-2.4.1/cmake/templates/OpenCVConfig.cmake.in.pkgcmake 2012-07-03 15:01:44.060358547 +0200
++++ OpenCV-2.4.1/cmake/templates/OpenCVConfig.cmake.in 2012-07-03 15:02:12.787669436 +0200
+@@ -55,9 +55,9 @@ get_filename_component(OpenCV_CONFIG_PAT
+ if(NOT WIN32)
+ # Get the absolute path with no ../.. relative marks, to eliminate implicit linker warnings
+ if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 2.8)
+- get_filename_component(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../.." ABSOLUTE)
++ get_filename_component(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../../.." ABSOLUTE)
+ else()
+- get_filename_component(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../.." REALPATH)
++ get_filename_component(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../../.." REALPATH)
+ endif()
+ endif()
+
reply other threads:[~2026-08-28 13:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178792380754.1.17435789269877025489.rpms-opencv-57420fa10459@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox