From 523d1b481167b30133d52183421ed05e2ed829c6 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 22 Feb 2024 06:59:11 +0100 Subject: [PATCH] [vcpkg baseline][vcpkg scripts] Drop `${pc_sysrootdir}` (#36843) Fixes xcb-util-errors baseline regression. --- ports/xcb-util-errors/fix_python.patch | 20 -------------------- ports/xcb-util-errors/portfile.cmake | 8 +------- ports/xcb-util-errors/vcpkg.json | 1 + scripts/cmake/vcpkg_fixup_pkgconfig.cmake | 4 ++++ versions/baseline.json | 2 +- versions/x-/xcb-util-errors.json | 5 +++++ 6 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 ports/xcb-util-errors/fix_python.patch diff --git a/ports/xcb-util-errors/fix_python.patch b/ports/xcb-util-errors/fix_python.patch deleted file mode 100644 index e6cba0939b..0000000000 --- a/ports/xcb-util-errors/fix_python.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/src/extensions.py b/src/extensions.py -index 94d7d57fe..022d4003e 100644 ---- a/src/extensions.py -+++ b/src/extensions.py -@@ -1,5 +1,6 @@ - #!/usr/bin/env python - import sys -+import glob - from xml.etree.cElementTree import parse - - class Module(object): -@@ -83,7 +84,7 @@ def parseFile(filename): - - # Parse the xml file - output_file = sys.argv[1] --for input_file in sys.argv[2:]: -+for input_file in glob.glob(sys.argv[2]): - parseFile(input_file) - - assert xproto != None diff --git a/ports/xcb-util-errors/portfile.cmake b/ports/xcb-util-errors/portfile.cmake index 516cf6090d..813ed1f47b 100644 --- a/ports/xcb-util-errors/portfile.cmake +++ b/ports/xcb-util-errors/portfile.cmake @@ -1,10 +1,7 @@ if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS) message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet!") set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -else() - -if(VCPKG_TARGET_IS_WINDOWS) - set(PATCHES fix_python.patch) + return() endif() vcpkg_from_gitlab( @@ -14,7 +11,6 @@ vcpkg_from_gitlab( REF 517dd82c079de762a7426f20166a44f11e8d38c5 #1.0.1 SHA512 391f6bc9452bf4d6a3f1fa69232cdbef43f9fcd339b8d1965132a3b227ed7ebcbaad553fe64d42bc525811caedf3ff9d5bec108f6ac2efd5a014f75fb35cbf85 HEAD_REF master - PATCHES ${PATCHES} ) file(TOUCH "${SOURCE_PATH}/m4/dummy") set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"") @@ -36,5 +32,3 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) -endif() - diff --git a/ports/xcb-util-errors/vcpkg.json b/ports/xcb-util-errors/vcpkg.json index 8202f6fcef..57ea925fd6 100644 --- a/ports/xcb-util-errors/vcpkg.json +++ b/ports/xcb-util-errors/vcpkg.json @@ -1,6 +1,7 @@ { "name": "xcb-util-errors", "version": "1.0.1", + "port-version": 1, "description": "XCB utility library that gives human readable names to error, event, & request codes.", "homepage": "https://xcb.freedesktop.org/", "license": null, diff --git a/scripts/cmake/vcpkg_fixup_pkgconfig.cmake b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake index 299c1e402e..2c2fd31ff2 100644 --- a/scripts/cmake/vcpkg_fixup_pkgconfig.cmake +++ b/scripts/cmake/vcpkg_fixup_pkgconfig.cmake @@ -3,6 +3,10 @@ function(z_vcpkg_fixup_pkgconfig_process_data arg_variable arg_config arg_prefix # to use LF instead of CRLF. This allows to use simpler regex matches. string(REPLACE "\r\n" "\n" contents "\n${${arg_variable}}\n") + # We use ${pcfiledir} for relocatable pc files, and on windows, + # pkgconf initializes ${pc_sysrootdir} to invalid '/'. + string(REPLACE [[${pc_sysrootdir}]] "" contents "${contents}") + string(REPLACE "${CURRENT_PACKAGES_DIR}" [[${prefix}]] contents "${contents}") string(REPLACE "${CURRENT_INSTALLED_DIR}" [[${prefix}]] contents "${contents}") if(VCPKG_HOST_IS_WINDOWS) diff --git a/versions/baseline.json b/versions/baseline.json index 879a892222..9335847d69 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9330,7 +9330,7 @@ }, "xcb-util-errors": { "baseline": "1.0.1", - "port-version": 0 + "port-version": 1 }, "xcb-util-m4": { "baseline": "2022-01-24", diff --git a/versions/x-/xcb-util-errors.json b/versions/x-/xcb-util-errors.json index fc7319e54a..01626d467c 100644 --- a/versions/x-/xcb-util-errors.json +++ b/versions/x-/xcb-util-errors.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8deabed62d4ee817fc4c913c8f4c21dc9a13609b", + "version": "1.0.1", + "port-version": 1 + }, { "git-tree": "b4f1619f7e94fe694b69d8021d6864e0d0369ce8", "version": "1.0.1",