diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/boost-build | |
Diffstat (limited to 'vcpkg/ports/boost-build')
| -rw-r--r-- | vcpkg/ports/boost-build/0001-fix-get-version.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/boost-build/0002-fix-emscripten.patch | 22 | ||||
| -rw-r--r-- | vcpkg/ports/boost-build/0003-workaround-MSVC-codegen-bug-in-17.5-on-ARM64.patch | 26 | ||||
| -rw-r--r-- | vcpkg/ports/boost-build/portfile.cmake | 63 | ||||
| -rw-r--r-- | vcpkg/ports/boost-build/vcpkg.json | 14 |
5 files changed, 138 insertions, 0 deletions
diff --git a/vcpkg/ports/boost-build/0001-fix-get-version.patch b/vcpkg/ports/boost-build/0001-fix-get-version.patch new file mode 100644 index 0000000..73be450 --- /dev/null +++ b/vcpkg/ports/boost-build/0001-fix-get-version.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/clang-linux.jam b/src/tools/clang-linux.jam +index ce270c584..f93d1fa86 100644 +--- a/src/tools/clang-linux.jam ++++ b/src/tools/clang-linux.jam +@@ -123,7 +123,7 @@ rule init ( version ? : command * : options * ) { + + rule get-full-version ( command-string ) + { +- return [ common.match-command-output version : "version ([0-9.]+)" ++ return [ common.match-command-output version : "([0-9]+.[0-9]+.[0-9]+)" + : "$(command-string) --version" ] ; + } + diff --git a/vcpkg/ports/boost-build/0002-fix-emscripten.patch b/vcpkg/ports/boost-build/0002-fix-emscripten.patch new file mode 100644 index 0000000..a187aae --- /dev/null +++ b/vcpkg/ports/boost-build/0002-fix-emscripten.patch @@ -0,0 +1,22 @@ +diff --git a/src/tools/emscripten.jam b/src/tools/emscripten.jam +index 0ed289fae..4bd6c589a 100644 +--- a/src/tools/emscripten.jam ++++ b/src/tools/emscripten.jam +@@ -34,6 +34,7 @@ support instead of native WebAssembly exception handling. + import feature ; + import os ; + import toolset ; ++import generators ; + import common ; + import type ; + import version ; +@@ -41,6 +42,9 @@ import args ; + + feature.extend toolset : emscripten ; + ++generators.override builtin.lib-generator : emscripten.prebuilt ; ++generators.override emscripten.searched-lib-generator : searched-lib-generator ; ++ + feature.feature embind : off on : propagated ; + feature.feature closure : off on full : propagated ; + feature.feature link-optimization : off on full : propagated ; diff --git a/vcpkg/ports/boost-build/0003-workaround-MSVC-codegen-bug-in-17.5-on-ARM64.patch b/vcpkg/ports/boost-build/0003-workaround-MSVC-codegen-bug-in-17.5-on-ARM64.patch new file mode 100644 index 0000000..3e1aa6d --- /dev/null +++ b/vcpkg/ports/boost-build/0003-workaround-MSVC-codegen-bug-in-17.5-on-ARM64.patch @@ -0,0 +1,26 @@ +From 1004fb82914b8295fe4ec43afb510994babf2161 Mon Sep 17 00:00:00 2001 +From: Matt Gardner <magardn@microsoft.com> +Date: Fri, 17 Mar 2023 15:09:17 -0700 +Subject: [PATCH] workaround MSVC codegen bug in 17.5 on ARM64 + +--- + src/engine/glob.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/engine/glob.cpp b/src/engine/glob.cpp +index bec00ee56..1ce66c7e6 100644 +--- a/src/engine/glob.cpp ++++ b/src/engine/glob.cpp +@@ -111,6 +111,9 @@ int glob( const char * c, const char * s ) + * globchars() - build a bitlist to check for character group match. + */ + ++#if defined(_MSC_VER) && _MSC_VER == 1935 && defined(_M_ARM64) ++__declspec(noinline) ++#endif + static void globchars( const char * s, const char * e, char * b ) + { + int neg = 0; +-- +2.33.0.vfs.0.0 + diff --git a/vcpkg/ports/boost-build/portfile.cmake b/vcpkg/ports/boost-build/portfile.cmake new file mode 100644 index 0000000..74988bd --- /dev/null +++ b/vcpkg/ports/boost-build/portfile.cmake @@ -0,0 +1,63 @@ +# Automatically generated by scripts/boost/generate-ports.ps1 + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") + return() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/build + REF boost-${VERSION} + SHA512 10d8a534541f3dc1ad0c04d2aaab4b66b23d7f56a01aa044a0f3dbaf3f00c4c0d593ef739d51c9dd3ccc3d42aaac7531391716d21ec6becf6200139b7366387c + HEAD_REF master + PATCHES + 0001-fix-get-version.patch + 0002-fix-emscripten.patch + 0003-workaround-MSVC-codegen-bug-in-17.5-on-ARM64.patch +) + +# This fixes the lib path to use desktop libs instead of uwp -- TODO: improve this with better "host" compilation +string(REPLACE "\\store\\;" "\\;" LIB "$ENV{LIB}") +set(ENV{LIB} "${LIB}") + +file(COPY + ${SOURCE_PATH}/ + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build +) + +file(READ "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" _contents) +string(REPLACE " /ZW /EHsc " "" _contents "${_contents}") +string(REPLACE "-nologo" "" _contents "${_contents}") +string(REPLACE "/nologo" "" _contents "${_contents}") +string(REPLACE "/Zm800" "" _contents "${_contents}") +string(REPLACE "<define>_WIN32_WINNT=0x0602" "" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" "${_contents}") + +message(STATUS "Bootstrapping...") +if(CMAKE_HOST_WIN32) + if(VCPKG_TARGET_IS_MINGW) + set(TOOLSET mingw) + else() + set(TOOLSET msvc) + endif() + vcpkg_execute_required_process( + COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" ${TOOLSET} + WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build + LOGNAME bootstrap-${TARGET_TRIPLET} + ) +else() + vcpkg_execute_required_process( + COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.sh" + WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build + LOGNAME bootstrap-${TARGET_TRIPLET} + ) +endif() + +vcpkg_download_distfile(BOOST_LICENSE + URLS "https://raw.githubusercontent.com/boostorg/boost/refs/tags/boost-${VERSION}/LICENSE_1_0.txt" + FILENAME "boost-${VERSION}-LICENSE_1_0.txt" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 +) +vcpkg_install_copyright(FILE_LIST "${BOOST_LICENSE}") diff --git a/vcpkg/ports/boost-build/vcpkg.json b/vcpkg/ports/boost-build/vcpkg.json new file mode 100644 index 0000000..d3d720c --- /dev/null +++ b/vcpkg/ports/boost-build/vcpkg.json @@ -0,0 +1,14 @@ +{ + "$comment": "Automatically generated by scripts/boost/generate-ports.ps1", + "name": "boost-build", + "version": "1.89.0", + "description": "Boost build module", + "homepage": "https://github.com/boostorg/build", + "license": "BSL-1.0", + "dependencies": [ + { + "name": "boost-uninstall", + "version>=": "1.89.0" + } + ] +} |