From 936588e23157b56507069ad664b020881c119e54 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Thu, 21 Mar 2024 13:19:13 -0700 Subject: [PATCH] Fix vcpkg-tool-meson clobbering the tools directory. (#37585) --- ports/vcpkg-tool-meson/vcpkg-port-config.cmake | 15 +++++++++------ ports/vcpkg-tool-meson/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/v-/vcpkg-tool-meson.json | 5 +++++ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ports/vcpkg-tool-meson/vcpkg-port-config.cmake b/ports/vcpkg-tool-meson/vcpkg-port-config.cmake index 959055ea01..e9c83e43b9 100644 --- a/ports/vcpkg-tool-meson/vcpkg-port-config.cmake +++ b/ports/vcpkg-tool-meson/vcpkg-port-config.cmake @@ -41,22 +41,25 @@ if(NOT SCRIPT_MESON) FILENAME "${download_filename}" ) - file(REMOVE_RECURSE "${path_to_search}-tmp/../") - file(MAKE_DIRECTORY "${path_to_search}-tmp/../") + file(REMOVE_RECURSE "${path_to_search}") + file(REMOVE_RECURSE "${path_to_search}-tmp") + file(MAKE_DIRECTORY "${path_to_search}-tmp") file(ARCHIVE_EXTRACT INPUT "${archive_path}" - DESTINATION "${path_to_search}-tmp/../" + DESTINATION "${path_to_search}-tmp" #PATTERNS "**/mesonbuild/*" "**/*.py" ) z_vcpkg_apply_patches( - SOURCE_PATH "${path_to_search}-tmp/../meson-${ref}/" + SOURCE_PATH "${path_to_search}-tmp/meson-${ref}" PATCHES "${CMAKE_CURRENT_LIST_DIR}/adjust-args.patch" "${CMAKE_CURRENT_LIST_DIR}/meson-intl.patch" "${CMAKE_CURRENT_LIST_DIR}/adjust-python-dep.patch" "${CMAKE_CURRENT_LIST_DIR}/remove-freebsd-pcfile-specialization.patch" ) - file(COPY "${path_to_search}-tmp/../meson-${ref}/meson.py" "${path_to_search}-tmp/../meson-${ref}/mesonbuild" DESTINATION "${path_to_search}") - file(REMOVE_RECURSE "${path_to_search}-tmp/../meson-${ref}") + file(MAKE_DIRECTORY "${path_to_search}") + file(RENAME "${path_to_search}-tmp/meson-${ref}/meson.py" "${path_to_search}/meson.py") + file(RENAME "${path_to_search}-tmp/meson-${ref}/mesonbuild" "${path_to_search}/mesonbuild") + file(REMOVE_RECURSE "${path_to_search}-tmp") set(SCRIPT_MESON "${path_to_search}/meson.py") endif() diff --git a/ports/vcpkg-tool-meson/vcpkg.json b/ports/vcpkg-tool-meson/vcpkg.json index b4d24a4ebd..a0f292ed72 100644 --- a/ports/vcpkg-tool-meson/vcpkg.json +++ b/ports/vcpkg-tool-meson/vcpkg.json @@ -1,6 +1,7 @@ { "name": "vcpkg-tool-meson", "version": "1.3.2", + "port-version": 1, "description": "Meson build system", "homepage": "https://github.com/mesonbuild/meson", "license": "Apache-2.0", diff --git a/versions/baseline.json b/versions/baseline.json index ed8bafa5ad..fc924b371f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9034,7 +9034,7 @@ }, "vcpkg-tool-meson": { "baseline": "1.3.2", - "port-version": 0 + "port-version": 1 }, "vcpkg-tool-mozbuild": { "baseline": "4.0.2", diff --git a/versions/v-/vcpkg-tool-meson.json b/versions/v-/vcpkg-tool-meson.json index fc498441de..c50df4297f 100644 --- a/versions/v-/vcpkg-tool-meson.json +++ b/versions/v-/vcpkg-tool-meson.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "17b86f3a18ad63659d4dfbafc194969279a7a4f0", + "version": "1.3.2", + "port-version": 1 + }, { "git-tree": "7b3bad7cb3eec367da9a8f2c6593b25e00720c66", "version": "1.3.2",