diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index c0d5d14e5d..cf4a2a265a 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -29,6 +29,16 @@ if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CRT_LINKAGE STREQUAL "static") set(ABSL_STATIC_RUNTIME_OPTION "-DABSL_MSVC_STATIC_RUNTIME=ON") endif() +set(ABSL_MINGW_OPTIONS "") +if(VCPKG_TARGET_IS_MINGW) + # LIBRT-NOTFOUND is needed since the system librt may be found by cmake in + # a cross-compile setup. + # See https://github.com/pywinrt/pywinrt/pull/83 for the FIReference + # definition issue. + set(ABSL_MINGW_OPTIONS "-DLIBRT=LIBRT-NOTFOUND" + "-DCMAKE_CXX_FLAGS=-D____FIReference_1_boolean_INTERFACE_DEFINED__") +endif() + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" DISABLE_PARALLEL_CONFIGURE @@ -37,6 +47,7 @@ vcpkg_cmake_configure( ${ABSL_USE_CXX17_OPTION} ${ABSL_TEST_HELPERS_OPTIONS} ${ABSL_STATIC_RUNTIME_OPTION} + ${ABSL_MINGW_OPTIONS} ) vcpkg_cmake_install() diff --git a/ports/abseil/vcpkg.json b/ports/abseil/vcpkg.json index 94aad36b09..6ef02f955b 100644 --- a/ports/abseil/vcpkg.json +++ b/ports/abseil/vcpkg.json @@ -1,7 +1,7 @@ { "name": "abseil", "version": "20250127.1", - "port-version": 2, + "port-version": 3, "description": [ "Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.", "In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.", diff --git a/ports/boost-charconv/portfile.cmake b/ports/boost-charconv/portfile.cmake index e6235ee853..4bf6ad1ffc 100644 --- a/ports/boost-charconv/portfile.cmake +++ b/ports/boost-charconv/portfile.cmake @@ -9,6 +9,10 @@ vcpkg_from_github( ) set(FEATURE_OPTIONS "") +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_IS_MINGW) + # when cross compile, cmake generates the error try_run() invoked in cross-compiling mode + list(APPEND FEATURE_OPTIONS "-DBOOST_CHARCONV_QUADMATH_FOUND_EXITCODE=0") +endif() boost_configure_and_install( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} diff --git a/ports/boost-charconv/vcpkg.json b/ports/boost-charconv/vcpkg.json index be193302dd..d69e745305 100644 --- a/ports/boost-charconv/vcpkg.json +++ b/ports/boost-charconv/vcpkg.json @@ -2,6 +2,7 @@ "$comment": "Automatically generated by scripts/boost/generate-ports.ps1", "name": "boost-charconv", "version": "1.88.0", + "port-version": 1, "description": "Boost charconv module", "homepage": "https://www.boost.org/libs/charconv", "license": "BSL-1.0", diff --git a/ports/boost-locale/portfile.cmake b/ports/boost-locale/portfile.cmake index cd25e95f71..75148595b0 100644 --- a/ports/boost-locale/portfile.cmake +++ b/ports/boost-locale/portfile.cmake @@ -10,6 +10,10 @@ vcpkg_from_github( set(FEATURE_OPTIONS "") include("${CMAKE_CURRENT_LIST_DIR}/features.cmake") +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_IS_MINGW) + # mingw cross compile toolchain lacks std conv support + list(APPEND FEATURE_OPTIONS "-DBOOST_LOCALE_ENABLE_STD=OFF") +endif() boost_configure_and_install( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} diff --git a/ports/boost-locale/vcpkg.json b/ports/boost-locale/vcpkg.json index c0a74a48c3..838173db30 100644 --- a/ports/boost-locale/vcpkg.json +++ b/ports/boost-locale/vcpkg.json @@ -2,6 +2,7 @@ "$comment": "Automatically generated by scripts/boost/generate-ports.ps1", "name": "boost-locale", "version": "1.88.0", + "port-version": 1, "description": "Boost locale module", "homepage": "https://www.boost.org/libs/locale", "license": "BSL-1.0", diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 36fe4725a9..656c332cf7 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -40,6 +40,11 @@ if(VCPKG_TARGET_IS_IOS) list(APPEND FEATURE_OPTIONS "-DIOS_DEPLOYMENT_TARGET=${VCPKG_OSX_DEPLOYMENT_TARGET}") endif() +# Add big object support for MinGW +if(VCPKG_TARGET_IS_MINGW) + list(APPEND FEATURE_OPTIONS "-DCMAKE_CXX_FLAGS=-Wa,-mbig-obj") +endif() + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS diff --git a/ports/ceres/vcpkg.json b/ports/ceres/vcpkg.json index e68fde7450..0145463c6f 100644 --- a/ports/ceres/vcpkg.json +++ b/ports/ceres/vcpkg.json @@ -1,7 +1,7 @@ { "name": "ceres", "version": "2.2.0", - "port-version": 3, + "port-version": 4, "description": "non-linear optimization package", "homepage": "https://github.com/ceres-solver/ceres-solver", "license": "Apache-2.0", diff --git a/ports/protobuf/fix-mingw-tail-call.patch b/ports/protobuf/fix-mingw-tail-call.patch new file mode 100644 index 0000000000..dc9de46500 --- /dev/null +++ b/ports/protobuf/fix-mingw-tail-call.patch @@ -0,0 +1,18 @@ +diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc +index 56f995e45e..bc7a01e534 100644 +--- a/src/google/protobuf/port_def.inc ++++ b/src/google/protobuf/port_def.inc +@@ -228,11 +228,12 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), + #endif + #if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \ + !defined(_ARCH_PPC) && !defined(__wasm__) && \ +- !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) ++ !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) && !defined(__MINGW32__) + // Compilation fails on ARM32: b/195943306 + // Compilation fails on powerpc64le: b/187985113 + // Compilation fails on X86 Windows: + // https://github.com/llvm/llvm-project/issues/53271 ++// Compilation fails on MINGW: https://github.com/protocolbuffers/protobuf/issues/21625 + #define PROTOBUF_MUSTTAIL [[clang::musttail]] + #define PROTOBUF_TAILCALL true + #else diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 4c66afe286..b2ee288d81 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_github( fix-default-proto-file-path.patch fix-utf8-range.patch fix-install-dirs.patch + fix-mingw-tail-call.patch ) string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" protobuf_BUILD_PROTOC_BINARIES) diff --git a/ports/protobuf/vcpkg.json b/ports/protobuf/vcpkg.json index f703246a72..798dc1cd8f 100644 --- a/ports/protobuf/vcpkg.json +++ b/ports/protobuf/vcpkg.json @@ -1,6 +1,7 @@ { "name": "protobuf", "version": "5.29.5", + "port-version": 1, "description": "Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.", "homepage": "https://github.com/protocolbuffers/protobuf", "license": "BSD-3-Clause", diff --git a/scripts/boost/generate-ports.ps1 b/scripts/boost/generate-ports.ps1 index 3096db51c3..3c98a0656f 100644 --- a/scripts/boost/generate-ports.ps1 +++ b/scripts/boost/generate-ports.ps1 @@ -29,6 +29,8 @@ $semverVersion = ($version -replace "(\d+(\.\d+){1,3}).*", "`$1") # Clear this array when moving to a new boost version $defaultPortVersion = 0 $portVersions = @{ + 'boost-charconv' = 1; + 'boost-locale' = 1; } function Get-PortVersion { diff --git a/scripts/boost/pre-build-stubs/charconv.cmake b/scripts/boost/pre-build-stubs/charconv.cmake new file mode 100644 index 0000000000..58d074a79a --- /dev/null +++ b/scripts/boost/pre-build-stubs/charconv.cmake @@ -0,0 +1,4 @@ +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_IS_MINGW) + # when cross compile, cmake generates the error try_run() invoked in cross-compiling mode + list(APPEND FEATURE_OPTIONS "-DBOOST_CHARCONV_QUADMATH_FOUND_EXITCODE=0") +endif() \ No newline at end of file diff --git a/scripts/boost/pre-build-stubs/locale.cmake b/scripts/boost/pre-build-stubs/locale.cmake new file mode 100644 index 0000000000..2ebcfc904e --- /dev/null +++ b/scripts/boost/pre-build-stubs/locale.cmake @@ -0,0 +1,4 @@ +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_IS_MINGW) + # mingw cross compile toolchain lacks std conv support + list(APPEND FEATURE_OPTIONS "-DBOOST_LOCALE_ENABLE_STD=OFF") +endif() \ No newline at end of file diff --git a/versions/a-/abseil.json b/versions/a-/abseil.json index fa5dfeeef9..e0905bb874 100644 --- a/versions/a-/abseil.json +++ b/versions/a-/abseil.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "77d9d95320ba6300dccfde18b9bee6c93795461e", + "version": "20250127.1", + "port-version": 3 + }, { "git-tree": "15a046bb4ccc8e59bc9f31df290400a07c587675", "version": "20250127.1", diff --git a/versions/b-/boost-charconv.json b/versions/b-/boost-charconv.json index 69ed7c6a31..f0e69d6d57 100644 --- a/versions/b-/boost-charconv.json +++ b/versions/b-/boost-charconv.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "859e7bb591f69fe28ee2ce640a341c3be30075c9", + "version": "1.88.0", + "port-version": 1 + }, { "git-tree": "774cea931cf10e80061780d8467e7ea5f494ca03", "version": "1.88.0", diff --git a/versions/b-/boost-locale.json b/versions/b-/boost-locale.json index ddfa7a2b0b..977815d6fc 100644 --- a/versions/b-/boost-locale.json +++ b/versions/b-/boost-locale.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "7021457116baad60cefbbf264e5757da594dabf4", + "version": "1.88.0", + "port-version": 1 + }, { "git-tree": "4ba4b7944265f4cece979cc6569d9ab3b87f282c", "version": "1.88.0", diff --git a/versions/baseline.json b/versions/baseline.json index 7e1c73a2f3..031d14dcf5 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -18,7 +18,7 @@ }, "abseil": { "baseline": "20250127.1", - "port-version": 2 + "port-version": 3 }, "absent": { "baseline": "0.3.1", @@ -846,7 +846,7 @@ }, "boost-charconv": { "baseline": "1.88.0", - "port-version": 0 + "port-version": 1 }, "boost-chrono": { "baseline": "1.88.0", @@ -1086,7 +1086,7 @@ }, "boost-locale": { "baseline": "1.88.0", - "port-version": 0 + "port-version": 1 }, "boost-lockfree": { "baseline": "1.88.0", @@ -1642,7 +1642,7 @@ }, "ceres": { "baseline": "2.2.0", - "port-version": 3 + "port-version": 4 }, "cfitsio": { "baseline": "3.49", @@ -7594,7 +7594,7 @@ }, "protobuf": { "baseline": "5.29.5", - "port-version": 0 + "port-version": 1 }, "protobuf-c": { "baseline": "1.5.2", diff --git a/versions/c-/ceres.json b/versions/c-/ceres.json index 3fca1d594f..24971b1404 100644 --- a/versions/c-/ceres.json +++ b/versions/c-/ceres.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "990a68bdbd8678fc0c74294470228bf70a33cc75", + "version": "2.2.0", + "port-version": 4 + }, { "git-tree": "b1913608889f8a846b03535473b16f60a2b3b5d1", "version": "2.2.0", diff --git a/versions/p-/protobuf.json b/versions/p-/protobuf.json index b88d618ca1..d2f6d809fe 100644 --- a/versions/p-/protobuf.json +++ b/versions/p-/protobuf.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "7e946d4afefe3c33f74394d788f89c41e6881a77", + "version": "5.29.5", + "port-version": 1 + }, { "git-tree": "a5e9b41d69815a0ce0573afe7074b718fa82edba", "version": "5.29.5",