Fix vcpkg-tool-meson clobbering the tools directory. (#37585)

This commit is contained in:
Billy O'Neal 2024-03-21 13:19:13 -07:00 committed by GitHub
parent 9765877106
commit 936588e231
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 7 deletions

View File

@ -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()

View File

@ -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",

View File

@ -9034,7 +9034,7 @@
},
"vcpkg-tool-meson": {
"baseline": "1.3.2",
"port-version": 0
"port-version": 1
},
"vcpkg-tool-mozbuild": {
"baseline": "4.0.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "17b86f3a18ad63659d4dfbafc194969279a7a4f0",
"version": "1.3.2",
"port-version": 1
},
{
"git-tree": "7b3bad7cb3eec367da9a8f2c6593b25e00720c66",
"version": "1.3.2",