From 669dc3d5badbd82f45382727af145b19acec0044 Mon Sep 17 00:00:00 2001 From: Ghislain Cottat Date: Mon, 14 Apr 2025 10:00:50 +0200 Subject: [PATCH 1/3] Revert "Remove installation of msys2 during ktx build." Because KTX's FindBash.cmake does not find git's bash (from gitforwindows.org) when it is not installed in the default path (C:/Program Files/Git) _and_ the default installations options are used, which do not put Git/bin nor Git/usr/bin paths in Windows' PATH. This reverts commit 4c5c5488d256ab37ba759450f34775b709ce35c0. --- extern/vcpkg-overlays/ktx/portfile.cmake | 30 ++++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/extern/vcpkg-overlays/ktx/portfile.cmake b/extern/vcpkg-overlays/ktx/portfile.cmake index 887362c8f..5c7fbebbb 100644 --- a/extern/vcpkg-overlays/ktx/portfile.cmake +++ b/extern/vcpkg-overlays/ktx/portfile.cmake @@ -16,21 +16,21 @@ vcpkg_from_git( file(REMOVE "${SOURCE_PATH}/other_include/zstd_errors.h") vcpkg_list(SET OPTIONS) -# if(VCPKG_TARGET_IS_WINDOWS) -# vcpkg_acquire_msys(MSYS_ROOT -# PACKAGES -# bash -# DIRECT_PACKAGES -# # Required for "getopt" -# "https://repo.msys2.org/msys/x86_64/util-linux-2.35.2-3-x86_64.pkg.tar.zst" -# da26540881cd5734072717133307e5d1a27a60468d3656885507833b80f24088c5382eaa0234b30bdd9e8484a6638b4514623f5327f10b19eed36f12158e8edb -# # Required for "dos2unix" -# "https://mirror.msys2.org/msys/x86_64/dos2unix-7.5.1-1-x86_64.pkg.tar.zst" -# 83d85e6ccea746ef9e8153a0d605e774dbe7efc0ee952804acfee4ffd7e3b0386a353b45ff989dd99bc3ce75968209fea3d246ad2af88bbb5c4eca12fc5a8f92 -# ) -# vcpkg_add_to_path("${MSYS_ROOT}/usr/bin") -# vcpkg_list(APPEND OPTIONS "-DBASH_EXECUTABLE=${MSYS_ROOT}/usr/bin/bash.exe") -# endif() +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_acquire_msys(MSYS_ROOT + PACKAGES + bash + DIRECT_PACKAGES + # Required for "getopt" + "https://repo.msys2.org/msys/x86_64/util-linux-2.35.2-3-x86_64.pkg.tar.zst" + da26540881cd5734072717133307e5d1a27a60468d3656885507833b80f24088c5382eaa0234b30bdd9e8484a6638b4514623f5327f10b19eed36f12158e8edb + # Required for "dos2unix" + "https://mirror.msys2.org/msys/x86_64/dos2unix-7.5.1-1-x86_64.pkg.tar.zst" + 83d85e6ccea746ef9e8153a0d605e774dbe7efc0ee952804acfee4ffd7e3b0386a353b45ff989dd99bc3ce75968209fea3d246ad2af88bbb5c4eca12fc5a8f92 + ) + vcpkg_add_to_path("${MSYS_ROOT}/usr/bin") + vcpkg_list(APPEND OPTIONS "-DBASH_EXECUTABLE=${MSYS_ROOT}/usr/bin/bash.exe") +endif() string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) From 323328079cc5ce4a421dc3dfcdc2dd7a8ecfc630 Mon Sep 17 00:00:00 2001 From: Ghislain Cottat Date: Mon, 14 Apr 2025 11:02:55 +0200 Subject: [PATCH 2/3] [vcpkg/ktx] upgrade msys2 packages to latest versions --- extern/vcpkg-overlays/ktx/portfile.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extern/vcpkg-overlays/ktx/portfile.cmake b/extern/vcpkg-overlays/ktx/portfile.cmake index 5c7fbebbb..c6a438dd7 100644 --- a/extern/vcpkg-overlays/ktx/portfile.cmake +++ b/extern/vcpkg-overlays/ktx/portfile.cmake @@ -22,11 +22,11 @@ if(VCPKG_TARGET_IS_WINDOWS) bash DIRECT_PACKAGES # Required for "getopt" - "https://repo.msys2.org/msys/x86_64/util-linux-2.35.2-3-x86_64.pkg.tar.zst" - da26540881cd5734072717133307e5d1a27a60468d3656885507833b80f24088c5382eaa0234b30bdd9e8484a6638b4514623f5327f10b19eed36f12158e8edb + "https://repo.msys2.org/msys/x86_64/util-linux-2.40.2-2-x86_64.pkg.tar.zst" + bf45b16cd470f8d82a9fe03842a09da2e6c60393c11f4be0bab354655072c7a461afc015b9c07f9f5c87a0e382cd867e4f079ede0d42f1589aa99ebbb3f76309 # Required for "dos2unix" - "https://mirror.msys2.org/msys/x86_64/dos2unix-7.5.1-1-x86_64.pkg.tar.zst" - 83d85e6ccea746ef9e8153a0d605e774dbe7efc0ee952804acfee4ffd7e3b0386a353b45ff989dd99bc3ce75968209fea3d246ad2af88bbb5c4eca12fc5a8f92 + "https://mirror.msys2.org/msys/x86_64/dos2unix-7.5.2-1-x86_64.pkg.tar.zst" + e5e949f01b19c82630131e338a4642da75e42f84220f5af4a97a11dd618e363396567b233d2adab79e05422660a0000abcbbabcd17efcadf37f07fe7565f041e ) vcpkg_add_to_path("${MSYS_ROOT}/usr/bin") vcpkg_list(APPEND OPTIONS "-DBASH_EXECUTABLE=${MSYS_ROOT}/usr/bin/bash.exe") From 6cf6b32dd3776ed722f983b527c0505f31fd32c7 Mon Sep 17 00:00:00 2001 From: Ghislain Cottat Date: Mon, 14 Apr 2025 11:45:44 +0200 Subject: [PATCH 3/3] |vcpkg,ktx] CHANGES.md --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 886ba7b16..7564e9e84 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,7 @@ - Fixed a linking issue introduced in *v2.15.0* in `GoogleTilesTestSetup`. - The "unsupported primitive mode" warning is now only logged once to avoid console spam. +- Fixed a build issue with KTX-Software's overlay port on Windows when there is no bash.exe in the system PATH and Git-for-windows is installed in a non-default directory. ### v2.15.0 - 2025-04-01