From 89f00b3b8611028566a5264afce725cdfdfddbb4 Mon Sep 17 00:00:00 2001 From: Gavin Lambert Date: Tue, 12 Nov 2024 20:38:04 +1300 Subject: [PATCH] [opencv2] Use DEBUG_POSTFIX in pkgconfig files (#42113) --- ports/opencv2/0021-pkgconfig-suffix.patch | 15 +++++++++++++++ ports/opencv2/portfile.cmake | 1 + ports/opencv2/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/o-/opencv2.json | 5 +++++ 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 ports/opencv2/0021-pkgconfig-suffix.patch diff --git a/ports/opencv2/0021-pkgconfig-suffix.patch b/ports/opencv2/0021-pkgconfig-suffix.patch new file mode 100644 index 00000000000000..3f0e45ca5c763f --- /dev/null +++ b/ports/opencv2/0021-pkgconfig-suffix.patch @@ -0,0 +1,15 @@ +--- a/cmake/OpenCVGenPkgconfig.cmake ++++ b/cmake/OpenCVGenPkgconfig.cmake +@@ -54,6 +54,12 @@ foreach(CVLib ${OpenCV_LIB_COMPONENTS}) + set(libname "${CVLib}") + endif() + ++ string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type) ++ get_target_property(libsuffix ${CVLib} ${build_type}_POSTFIX) ++ if(libsuffix) ++ string(APPEND libname "${libsuffix}") ++ endif() ++ + set(libpath "\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}") + list(APPEND OpenCV_LIB_COMPONENTS_ "-L${libpath}") + list(APPEND OpenCV_LIB_COMPONENTS_ "-l${libname}") diff --git a/ports/opencv2/portfile.cmake b/ports/opencv2/portfile.cmake index 6e673cbcf59c96..39335520c52a6b 100644 --- a/ports/opencv2/portfile.cmake +++ b/ports/opencv2/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_from_github( 0007-fix-config.patch 0019-fix-openexr.patch 0020-missing-include.patch + 0021-pkgconfig-suffix.patch ) # Disallow accidental build of vendored copies file(REMOVE_RECURSE "${SOURCE_PATH}/3rdparty/openexr") diff --git a/ports/opencv2/vcpkg.json b/ports/opencv2/vcpkg.json index 831ec3aff03e5f..10faa91e5eb329 100644 --- a/ports/opencv2/vcpkg.json +++ b/ports/opencv2/vcpkg.json @@ -1,7 +1,7 @@ { "name": "opencv2", "version": "2.4.13.7", - "port-version": 21, + "port-version": 22, "description": "Open Source Computer Vision Library", "homepage": "https://github.com/opencv/opencv", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index e6d5f49478f30e..1f38897927c65b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6650,7 +6650,7 @@ }, "opencv2": { "baseline": "2.4.13.7", - "port-version": 21 + "port-version": 22 }, "opencv3": { "baseline": "3.4.18", diff --git a/versions/o-/opencv2.json b/versions/o-/opencv2.json index 1e63362d97a6b4..7561d5ea762971 100644 --- a/versions/o-/opencv2.json +++ b/versions/o-/opencv2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "185c7b075159f3fae48b84163c487c6bfcd56c5a", + "version": "2.4.13.7", + "port-version": 22 + }, { "git-tree": "5e1c99f5f3fe591f1d87befd960c994dab246dcc", "version": "2.4.13.7",