Skip to content

Commit

Permalink
Fix vcpkg-tool-meson clobbering the tools directory. (microsoft#37585)
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyONeal authored Mar 21, 2024
1 parent 9765877 commit 936588e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
15 changes: 9 additions & 6 deletions ports/vcpkg-tool-meson/vcpkg-port-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
1 change: 1 addition & 0 deletions ports/vcpkg-tool-meson/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -9034,7 +9034,7 @@
},
"vcpkg-tool-meson": {
"baseline": "1.3.2",
"port-version": 0
"port-version": 1
},
"vcpkg-tool-mozbuild": {
"baseline": "4.0.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/v-/vcpkg-tool-meson.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "17b86f3a18ad63659d4dfbafc194969279a7a4f0",
"version": "1.3.2",
"port-version": 1
},
{
"git-tree": "7b3bad7cb3eec367da9a8f2c6593b25e00720c66",
"version": "1.3.2",
Expand Down

0 comments on commit 936588e

Please sign in to comment.