From 903773334048f91a3300b54936fd5673a9f511ba Mon Sep 17 00:00:00 2001 From: LE GARREC Vincent Date: Mon, 15 Apr 2024 19:51:41 +0200 Subject: [PATCH] [pcre2] Fix "There should be no absolute paths" (#37971) Problem occurs also on x64-linux-dynamic. ``` warning: There should be no absolute paths, such as the following, in an installed package: /home/XXX/prog/vcpkg/packages/pcre2_x64-linux-dynamic /home/XXX/prog/vcpkg/installed /home/XXX/prog/vcpkg/buildtrees/pcre2 /home/XXX/prog/vcpkg/downloads Absolute paths were found in the following files: /home/XXX/prog/vcpkg/packages/pcre2_x64-linux-dynamic/bin/pcre2-config /home/XXX/prog/vcpkg/packages/pcre2_x64-linux-dynamic/debug/bin/pcre2-config error: Found 1 post-build check problem(s). To submit these ports to curated catalogs, please first correct the portfile: /home/XXX/prog/vcpkg/ports/pcre2/portfile.cmake ``` - [ ] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [X] SHA512s are updated for each updated download. - ~~[ ] The "supports" clause reflects platforms that may be fixed by this new version.~~ - ~~[ ] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~~ - ~~[ ] Any patches that are no longer applied are deleted from the port's directory.~~ - [X] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [X] Only one version is added to each modified port's versions file. --- ports/pcre2/portfile.cmake | 18 +++++++++++------- ports/pcre2/vcpkg.json | 2 +- ports/rtabmap/gklib.patch | 13 +++++++++++++ ports/rtabmap/portfile.cmake | 1 + ports/rtabmap/vcpkg.json | 1 + versions/baseline.json | 4 ++-- versions/p-/pcre2.json | 5 +++++ versions/r-/rtabmap.json | 5 +++++ 8 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 ports/rtabmap/gklib.patch diff --git a/ports/pcre2/portfile.cmake b/ports/pcre2/portfile.cmake index 5d6c5c39b6..bd1ce03dec 100644 --- a/ports/pcre2/portfile.cmake +++ b/ports/pcre2/portfile.cmake @@ -60,13 +60,17 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/man" "${CURRENT_PACKAGES_DIR}/debug/share") -if(BUILD_STATIC) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") -elseif(VCPKG_TARGET_IS_WINDOWS) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/pcre2-config" "${CURRENT_PACKAGES_DIR}" "`dirname $0`/..") - if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/pcre2-config") - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/pcre2-config" "${CURRENT_PACKAGES_DIR}" "`dirname $0`/../..") - endif() +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/pcre2") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/pcre2-config" "${CURRENT_PACKAGES_DIR}/tools/pcre2/pcre2-config") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/pcre2/pcre2-config" "${CURRENT_PACKAGES_DIR}" [[$(cd "$(dirname "$0")/../.."; pwd -P)]]) +if(NOT VCPKG_BUILD_TYPE) + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/pcre2/debug") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/pcre2-config" "${CURRENT_PACKAGES_DIR}/tools/pcre2/debug/pcre2-config") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/pcre2/debug/pcre2-config" "${CURRENT_PACKAGES_DIR}/debug" [[$(cd "$(dirname "$0")/../../../debug"; pwd -P)]]) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/pcre2/debug/pcre2-config" [[${prefix}/include]] [[${prefix}/../include]]) +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin") endif() file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/pcre2/vcpkg.json b/ports/pcre2/vcpkg.json index 8585f46c89..45480eefd7 100644 --- a/ports/pcre2/vcpkg.json +++ b/ports/pcre2/vcpkg.json @@ -1,7 +1,7 @@ { "name": "pcre2", "version": "10.42", - "port-version": 2, + "port-version": 3, "description": "Regular Expression pattern matching using the same syntax and semantics as Perl 5.", "homepage": "https://github.com/PCRE2Project/pcre2", "license": "BSD-3-Clause", diff --git a/ports/rtabmap/gklib.patch b/ports/rtabmap/gklib.patch new file mode 100644 index 0000000000..2a66fcba18 --- /dev/null +++ b/ports/rtabmap/gklib.patch @@ -0,0 +1,13 @@ +--- 0.21.4.1-44dcfeb2ff/corelib/src/CMakeLists.txt.old 2024-04-12 09:59:07.656980900 +0200 ++++ 0.21.4.1-44dcfeb2ff/corelib/src/CMakeLists.txt 2024-04-12 09:59:46.701218300 +0200 +@@ -747,8 +747,8 @@ IF(GTSAM_FOUND) + ) + IF(WIN32) + #explicitly add metis target on windows (after gtsam target) +- SET(LIBRARIES +- ${LIBRARIES} ++ SET(PUBLIC_LIBRARIES ++ ${PUBLIC_LIBRARIES} + metis + ) + ENDIF(WIN32) diff --git a/ports/rtabmap/portfile.cmake b/ports/rtabmap/portfile.cmake index ff18dde98e..e063c884d1 100644 --- a/ports/rtabmap/portfile.cmake +++ b/ports/rtabmap/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( link-keywords.patch multi-definition.patch rtabmap-res-tool.patch + gklib.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS diff --git a/ports/rtabmap/vcpkg.json b/ports/rtabmap/vcpkg.json index 9d8ada3adc..b1ff61f422 100644 --- a/ports/rtabmap/vcpkg.json +++ b/ports/rtabmap/vcpkg.json @@ -1,6 +1,7 @@ { "name": "rtabmap", "version": "0.21.4.1", + "port-version": 1, "description": "Real-Time Appearance-Based Mapping", "homepage": "https://introlab.github.io/rtabmap/", "license": null, diff --git a/versions/baseline.json b/versions/baseline.json index de518762a7..cc19c37c3c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6698,7 +6698,7 @@ }, "pcre2": { "baseline": "10.42", - "port-version": 2 + "port-version": 3 }, "pdal": { "baseline": "2.5.3", @@ -7762,7 +7762,7 @@ }, "rtabmap": { "baseline": "0.21.4.1", - "port-version": 0 + "port-version": 1 }, "rtabmap-res-tool": { "baseline": "0.21.4.1", diff --git a/versions/p-/pcre2.json b/versions/p-/pcre2.json index 7510f429c4..9a030cefbd 100644 --- a/versions/p-/pcre2.json +++ b/versions/p-/pcre2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b7b4e761a5ad4ca25851cfa01dcb62f358a5378e", + "version": "10.42", + "port-version": 3 + }, { "git-tree": "20b801575053f62e43a5ab22a8812e3f01302e88", "version": "10.42", diff --git a/versions/r-/rtabmap.json b/versions/r-/rtabmap.json index 51c1a0253f..e6f095811b 100644 --- a/versions/r-/rtabmap.json +++ b/versions/r-/rtabmap.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "cfca9d505617acdca97ff519d414ae7e4a05ffa3", + "version": "0.21.4.1", + "port-version": 1 + }, { "git-tree": "ce0d77ecd72de4931d1230d3d0383a7f2e7295b7", "version": "0.21.4.1",