From 0f717c5798e9fdb23eba0cb2c2e08a3545d9e7e3 Mon Sep 17 00:00:00 2001 From: Daniel Collins Date: Thu, 1 Jan 2026 15:44:10 +0000 Subject: [PATCH 1/2] [botan] Update to 3.10.0 --- .../0009-fix-regression-f2bf049-85491b3.patch | 13 --- ports/botan/fix-cmake-usage.patch | 79 ------------------- ports/botan/fix-x86-msvc-amalgamation.patch | 43 ++++++++++ ports/botan/libcxx-winpthread-fixes.patch | 14 ---- ports/botan/portfile.cmake | 27 ++----- ports/botan/vcpkg.json | 2 +- 6 files changed, 51 insertions(+), 127 deletions(-) delete mode 100644 ports/botan/0009-fix-regression-f2bf049-85491b3.patch delete mode 100644 ports/botan/fix-cmake-usage.patch create mode 100644 ports/botan/fix-x86-msvc-amalgamation.patch delete mode 100644 ports/botan/libcxx-winpthread-fixes.patch diff --git a/ports/botan/0009-fix-regression-f2bf049-85491b3.patch b/ports/botan/0009-fix-regression-f2bf049-85491b3.patch deleted file mode 100644 index 7dd1df31613293..00000000000000 --- a/ports/botan/0009-fix-regression-f2bf049-85491b3.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/configure.py b/configure.py -index fcf9e7e..c0f72df 100755 ---- a/configure.py -+++ b/configure.py -@@ -2351,6 +2351,8 @@ def create_template_vars(source_paths, build_paths, options, modules, disabled_m - # just transfer them over to just the compiler invocations - variables['cc_compile_flags'] = '%s %s' % (variables['cxx_abi_flags'], variables['cc_compile_flags']) - variables['cxx_abi_flags'] = '' -+ else: -+ variables['ldflags'] = '%s %s' % (variables['ldflags'], variables['cc_compile_flags']) - - variables['lib_flags'] = cc.gen_lib_flags(options, variables) - diff --git a/ports/botan/fix-cmake-usage.patch b/ports/botan/fix-cmake-usage.patch deleted file mode 100644 index e1c8f5978faa63..00000000000000 --- a/ports/botan/fix-cmake-usage.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff --git a/src/build-data/botan-config.cmake.in b/src/build-data/botan-config.cmake.in -index 8d14c4e..cfc9277 100644 ---- a/src/build-data/botan-config.cmake.in -+++ b/src/build-data/botan-config.cmake.in -@@ -65,27 +65,36 @@ if(DEFINED ${CMAKE_FIND_PACKAGE_NAME}_FOUND AND NOT ${${CMAKE_FIND_PACKAGE_NAME} - return() - endif() - --# botan-config.cmake lives in "${_Botan_PREFIX}/lib/cmake/Botan-X": traverse up to $_Botan_PREFIX -+# botan-config.cmake lives in "${_Botan_PREFIX}/share/botan": traverse up to $_Botan_PREFIX - set(_Botan_PREFIX "${CMAKE_CURRENT_LIST_DIR}") - get_filename_component(_Botan_PREFIX "${_Botan_PREFIX}" DIRECTORY) - get_filename_component(_Botan_PREFIX "${_Botan_PREFIX}" DIRECTORY) --get_filename_component(_Botan_PREFIX "${_Botan_PREFIX}" DIRECTORY) - - %{if build_static_lib} - if(NOT TARGET Botan::Botan-static) - add_library(Botan::Botan-static STATIC IMPORTED) - set_target_properties(Botan::Botan-static - PROPERTIES -- IMPORTED_LOCATION "${_Botan_PREFIX}/lib/%{static_lib_name}" -- INTERFACE_INCLUDE_DIRECTORIES "${_Botan_PREFIX}/include/botan-%{version_major}" -+ INTERFACE_INCLUDE_DIRECTORIES "${_Botan_PREFIX}/include" - IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" - INTERFACE_LINK_OPTIONS "SHELL:%{cxx_abi_flags}") -+ if(EXISTS "${_Botan_PREFIX}/debug/lib/%{static_lib_name}") -+ set_property(TARGET Botan::Botan-static APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) -+ set_target_properties(Botan::Botan-static PROPERTIES -+ IMPORTED_LOCATION_DEBUG "${_Botan_PREFIX}/debug/lib/%{static_lib_name}" -+ ) -+ endif() -+ set_property(TARGET Botan::Botan-static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) -+ set_target_properties(Botan::Botan-static PROPERTIES -+ IMPORTED_LOCATION_RELEASE "${_Botan_PREFIX}/lib/%{static_lib_name}" -+ ) - endif() - %{endif} - - %{if implib_name} --set(_Botan_implib "${_Botan_PREFIX}/lib/%{implib_name}") --set(_Botan_shared_lib "${_Botan_PREFIX}/bin/%{shared_lib_name}") -+set(_Botan_implib "${_Botan_PREFIX}/lib/%{implib_name}") -+set(_Botan_implib_debug "${_Botan_PREFIX}/debug/lib/%{implib_name}") -+set(_Botan_shared_lib "${_Botan_PREFIX}/bin/%{shared_lib_name}") - %{endif} - %{unless implib_name} - set(_Botan_implib "") -@@ -100,10 +109,28 @@ if(NOT TARGET Botan::Botan) - add_library(Botan::Botan SHARED IMPORTED) - set_target_properties(Botan::Botan - PROPERTIES -- IMPORTED_LOCATION "${_Botan_shared_lib}" -- IMPORTED_IMPLIB "${_Botan_implib}" -- INTERFACE_INCLUDE_DIRECTORIES "${_Botan_PREFIX}/include/botan-%{version_major}" -+ INTERFACE_INCLUDE_DIRECTORIES "${_Botan_PREFIX}/include" - INTERFACE_LINK_OPTIONS "SHELL:%{cxx_abi_flags}") -+ if(EXISTS "${_Botan_PREFIX}/debug/lib/%{shared_lib_name}") -+ set_property(TARGET Botan::Botan APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) -+ set_target_properties(Botan::Botan PROPERTIES -+ IMPORTED_LOCATION_DEBUG "${_Botan_PREFIX}/debug/bin/%{shared_lib_name}" -+ ) -+ if(NOT _Botan_implib STREQUAL "") -+ set_target_properties(Botan::Botan PROPERTIES -+ IMPORTED_IMPLIB_DEBUG ${_Botan_implib_debug} -+ ) -+ endif() -+ endif() -+ set_property(TARGET Botan::Botan APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) -+ set_target_properties(Botan::Botan PROPERTIES -+ IMPORTED_LOCATION_RELEASE "${_Botan_PREFIX}/bin/%{shared_lib_name}" -+ ) -+ if(NOT _Botan_implib STREQUAL "") -+ set_target_properties(Botan::Botan PROPERTIES -+ IMPORTED_IMPLIB_RELEASE ${_Botan_implib} -+ ) -+ endif() - set_property(TARGET Botan::Botan APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) - set_target_properties(Botan::Botan - PROPERTIES diff --git a/ports/botan/fix-x86-msvc-amalgamation.patch b/ports/botan/fix-x86-msvc-amalgamation.patch new file mode 100644 index 00000000000000..8b06dc39f0199a --- /dev/null +++ b/ports/botan/fix-x86-msvc-amalgamation.patch @@ -0,0 +1,43 @@ +commit d3856e94deb950ad6ae08049ca0b8758ab027f33 +Author: Rene Meusel +Date: Thu Jan 8 10:14:28 2026 +0100 + + FIX: build failure on MSVC x86 due to fault constraint + + Frankly, I'm not sure why this shows up on x86 MSVC only but + relaxing this constraint is consistent with the calling function + and also makes sense semantically. + +diff --git a/src/lib/utils/bitvector/bitvector.h b/src/lib/utils/bitvector/bitvector.h +index 4551dceb8..8ae6aaa4b 100644 +--- a/src/lib/utils/bitvector/bitvector.h ++++ b/src/lib/utils/bitvector/bitvector.h +@@ -1184,7 +1184,7 @@ class bitvector_base final { + + private: + template +- requires(all_same_v) ++ requires(all_same_v...>) + constexpr static auto apply(FnT fn, size_type bits, BlockTs... blocks) { + if constexpr(needs_mask) { + return fn(blocks..., make_mask>(bits)); + +commit 1e83c70ceb13cf5b712ecd1da3c5c1ad41d83151 +Author: Rene Meusel +Date: Thu Jan 8 10:51:29 2026 +0100 + + FIX: implicit conversion warning on MSVC x86 + +diff --git a/src/examples/hash.cpp b/src/examples/hash.cpp +index e886220ac..fa720d89c 100644 +--- a/src/examples/hash.cpp ++++ b/src/examples/hash.cpp +@@ -12,7 +12,7 @@ int main() { + while(std::cin.good()) { + // read STDIN to buffer + std::cin.read(reinterpret_cast(buf.data()), static_cast(buf.size())); +- size_t readcount = std::cin.gcount(); ++ const auto readcount = static_cast(std::cin.gcount()); + // update hash computations with read data + hash1->update(std::span{buf}.first(readcount)); + hash2->update(std::span{buf}.first(readcount)); diff --git a/ports/botan/libcxx-winpthread-fixes.patch b/ports/botan/libcxx-winpthread-fixes.patch deleted file mode 100644 index e20fe9fe98deab..00000000000000 --- a/ports/botan/libcxx-winpthread-fixes.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/src/tests/tests.h b/src/tests/tests.h -index 284cf28..ad4996b 100644 ---- a/src/tests/tests.h -+++ b/src/tests/tests.h -@@ -18,7 +18,9 @@ - #include - #include - #include -+#ifndef __ANDROID__ - #include -+#endif - #include - #include - #include diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake index 8a96f6cf142d8c..b0eda169d4a10b 100644 --- a/ports/botan/portfile.cmake +++ b/ports/botan/portfile.cmake @@ -2,7 +2,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO randombit/botan REF "${VERSION}" - SHA512 596f4c5c167d1a8d3e387b764fab95fc01827988df93da9cdf3c10d632c8e662d3f9a2121a43c79ab44534a45b7e63c0e1adef61c7666d7851b83f6065815788 + SHA512 83e8d9c877a7e1c253efb94953758dde141ef23f74c727294c3a9af60db02401e1aef92368908b297bad1fc005d155e6c63bd726ccc48ea831f46cc5c1915633 HEAD_REF master PATCHES embed-debug-info.patch @@ -10,9 +10,7 @@ vcpkg_from_github( verbose-install.patch configure-zlib.patch fix_android.patch - libcxx-winpthread-fixes.patch - fix-cmake-usage.patch - 0009-fix-regression-f2bf049-85491b3.patch # extract from PR 4255 + fix-x86-msvc-amalgamation.patch ) file(COPY "${CMAKE_CURRENT_LIST_DIR}/configure" DESTINATION "${SOURCE_PATH}") @@ -79,20 +77,14 @@ endif() if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) vcpkg_list(APPEND configure_arguments --os=windows) - if(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - vcpkg_list(APPEND configure_arguments --cc=msvc) - endif() - - # When compiling with Clang, -mrdrand is required to enable the RDRAND intrinsics. Botan will - # check for RDRAND at runtime before trying to use it, so we should be safe to specify this - # without triggering illegal instruction faults on older CPUs. if(VCPKG_DETECTED_CMAKE_CXX_COMPILER MATCHES "clang-cl(\.exe)?$") - vcpkg_list(APPEND configure_arguments "--extra-cxxflags=${VCPKG_DETECTED_CMAKE_CXX_FLAGS} -mrdrnd") - else() - # ...otherwise just forward the detected CXXFLAGS. - vcpkg_list(APPEND configure_arguments "--extra-cxxflags=${VCPKG_DETECTED_CMAKE_CXX_FLAGS}") + vcpkg_list(APPEND configure_arguments "--cc=clangcl") + elseif(VCPKG_DETECTED_CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + vcpkg_list(APPEND configure_arguments "--cc=msvc") endif() + vcpkg_list(APPEND configure_arguments "--extra-cxxflags=${VCPKG_DETECTED_CMAKE_CXX_FLAGS}") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") vcpkg_list(APPEND configure_arguments --enable-shared-library --disable-static-library) else() @@ -197,9 +189,4 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/botan-3" ) -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/botan/build.h" "#define BOTAN_INSTALL_PREFIX R\"(${CURRENT_PACKAGES_DIR})\"" "") -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/botan/build.h" "#define BOTAN_INSTALL_LIB_DIR R\"(${CURRENT_PACKAGES_DIR}\\lib)\"" "" IGNORE_UNCHANGED) -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/botan/build.h" "#define BOTAN_INSTALL_LIB_DIR R\"(${CURRENT_PACKAGES_DIR}/lib)\"" "" IGNORE_UNCHANGED) -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/botan/build.h" "--prefix=${CURRENT_PACKAGES_DIR}" "") - vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/license.txt") diff --git a/ports/botan/vcpkg.json b/ports/botan/vcpkg.json index 1c2ce26fbaaadd..eb2b7c81882af8 100644 --- a/ports/botan/vcpkg.json +++ b/ports/botan/vcpkg.json @@ -1,6 +1,6 @@ { "name": "botan", - "version": "3.7.1", + "version": "3.10.0", "description": "A cryptography library written in C++11", "homepage": "https://botan.randombit.net", "license": "BSD-2-Clause", From f02691ca915ec84d9c767fc63ba66aa95d46dab3 Mon Sep 17 00:00:00 2001 From: Daniel Collins Date: Thu, 1 Jan 2026 15:48:40 +0000 Subject: [PATCH 2/2] [botan] Update to 3.10.0 --- versions/b-/botan.json | 5 +++++ versions/baseline.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/b-/botan.json b/versions/b-/botan.json index 17c8f45c2efa28..a9e4e112c9c821 100644 --- a/versions/b-/botan.json +++ b/versions/b-/botan.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5e08c248836403a7fa5ae4f128909266f79dca8f", + "version": "3.10.0", + "port-version": 0 + }, { "git-tree": "312e72bd6bbd815b4a10035fd6bd48a7fdb32825", "version": "3.7.1", diff --git a/versions/baseline.json b/versions/baseline.json index 602f0afebb3d17..4539422f3f607b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1449,7 +1449,7 @@ "port-version": 0 }, "botan": { - "baseline": "3.7.1", + "baseline": "3.10.0", "port-version": 0 }, "box2d": {