[Pcre2] Check if files exists before call vcpkg_replace_string. (#22003)

* Check if files exists before call vcpkg_replace_string.

* Update per comments.

Only guard debug.

* Update ports/pcre2/portfile.cmake

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

* Bump port-version.

Co-authored-by: GLUD Lars <lars.glud@leica-geosystems.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
Lars Glud 2021-12-14 19:46:50 +01:00 committed by GitHub
parent 1e1ed5d16b
commit 404819d78f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View File

@ -56,7 +56,9 @@ if(BUILD_STATIC)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
elseif(VCPKG_TARGET_IS_WINDOWS) elseif(VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/pcre2-config" "${CURRENT_PACKAGES_DIR}" "`dirname $0`/..") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/pcre2-config" "${CURRENT_PACKAGES_DIR}" "`dirname $0`/..")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/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()
endif() endif()
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,7 +1,7 @@
{ {
"name": "pcre2", "name": "pcre2",
"version": "10.39", "version": "10.39",
"port-version": 1, "port-version": 2,
"description": "Regular Expression pattern matching using the same syntax and semantics as Perl 5.", "description": "Regular Expression pattern matching using the same syntax and semantics as Perl 5.",
"homepage": "https://github.com/PhilipHazel/pcre2", "homepage": "https://github.com/PhilipHazel/pcre2",
"dependencies": [ "dependencies": [

View File

@ -5190,7 +5190,7 @@
}, },
"pcre2": { "pcre2": {
"baseline": "10.39", "baseline": "10.39",
"port-version": 1 "port-version": 2
}, },
"pdal": { "pdal": {
"baseline": "1.7.1", "baseline": "1.7.1",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "9a15903858198c8a3b890972b5e8c0d2aa3f89f8",
"version": "10.39",
"port-version": 2
},
{ {
"git-tree": "b25437749e0bcdd96807c66a8fc8764382c55203", "git-tree": "b25437749e0bcdd96807c66a8fc8764382c55203",
"version": "10.39", "version": "10.39",