From 564e69a906940b89aef4144510d79a7fc83af2cb Mon Sep 17 00:00:00 2001 From: jim wang <122244446+jimwang118@users.noreply.github.com> Date: Sat, 20 Jan 2024 03:58:51 +0800 Subject: [PATCH] [botan] Update to 3.2.0 (#36211) * update to 3.2.0 * update version * fix android * update version * fix patch * update verseion --- ports/botan/embed-debug-info.patch | 6 +++--- ports/botan/fix_android.patch | 13 +++++++++++++ ports/botan/portfile.cmake | 3 ++- ports/botan/vcpkg.json | 3 +-- versions/b-/botan.json | 5 +++++ versions/baseline.json | 4 ++-- 6 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 ports/botan/fix_android.patch diff --git a/ports/botan/embed-debug-info.patch b/ports/botan/embed-debug-info.patch index 09a17202e0..840f6e7326 100644 --- a/ports/botan/embed-debug-info.patch +++ b/ports/botan/embed-debug-info.patch @@ -1,11 +1,11 @@ diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt -index 2306a4485..977e2e958 100644 +index 64b6eae..66258ca 100644 --- a/src/build-data/cc/msvc.txt +++ b/src/build-data/cc/msvc.txt -@@ -17,10 +17,10 @@ optimization_flags "/O2 /Oi" +@@ -20,10 +20,10 @@ optimization_flags "/O2 /Oi" size_optimization_flags "/O1 /Os" - # for debug info in the object file: + # for debug info in the object file (required if using sccache): -#debug_info_flags "/Z7" +debug_info_flags "/Z7" diff --git a/ports/botan/fix_android.patch b/ports/botan/fix_android.patch new file mode 100644 index 0000000000..a8b562861a --- /dev/null +++ b/ports/botan/fix_android.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/utils/prefetch.cpp b/src/lib/utils/prefetch.cpp +index 40786b3..e0d5239 100644 +--- a/src/lib/utils/prefetch.cpp ++++ b/src/lib/utils/prefetch.cpp +@@ -12,7 +12,7 @@ + namespace Botan { + + uint64_t prefetch_array_raw(size_t bytes, const void* arrayv) noexcept { +-#if defined(__cpp_lib_hardware_interference_size) ++#if defined(__cpp_lib_hardware_interference_size) && (!defined(BOTAN_TARGET_OS_IS_ANDROID) || defined(NDK_IS_NEWER_THAN_25)) + const size_t cache_line_size = std::hardware_destructive_interference_size; + #else + // We arbitrarily use a 64 byte cache line, which is by far the most diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake index c22752e397..f788e8b425 100644 --- a/ports/botan/portfile.cmake +++ b/ports/botan/portfile.cmake @@ -2,13 +2,14 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO randombit/botan REF "${VERSION}" - SHA512 fb6be83b0292bb28319061721fe10ea16776a942b381780a8d4bece9b86e3525a0f533e3572e54c6498b08c4dc421a746bff8f0302f3ea0d810e266811331a65 + SHA512 13f40635fc92b00b9392aa8ed96b5825f0cc8147d51337e2c225e0f29d0428732293190aa5fb2a7d2c5e7d57db748ae0fbed4536dee8af00e8d6fd405e784e1d HEAD_REF master PATCHES embed-debug-info.patch pkgconfig.patch verbose-install.patch configure-zlib.patch + fix_android.patch ) file(COPY "${CMAKE_CURRENT_LIST_DIR}/configure" DESTINATION "${SOURCE_PATH}") diff --git a/ports/botan/vcpkg.json b/ports/botan/vcpkg.json index 8c9fe75aee..25020a9c46 100644 --- a/ports/botan/vcpkg.json +++ b/ports/botan/vcpkg.json @@ -1,7 +1,6 @@ { "name": "botan", - "version": "3.1.1", - "port-version": 1, + "version": "3.2.0", "description": "A cryptography library written in C++11", "homepage": "https://botan.randombit.net", "license": "BSD-2-Clause", diff --git a/versions/b-/botan.json b/versions/b-/botan.json index 012914ab7c..a2fa214d3e 100644 --- a/versions/b-/botan.json +++ b/versions/b-/botan.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3482b0255e093b6d091aa4aff11992c89ec45d6e", + "version": "3.2.0", + "port-version": 0 + }, { "git-tree": "c031a70866fae7751496d7edfd01caad2773dd08", "version": "3.1.1", diff --git a/versions/baseline.json b/versions/baseline.json index e6ec33b4b7..f86f3c5be1 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1301,8 +1301,8 @@ "port-version": 0 }, "botan": { - "baseline": "3.1.1", - "port-version": 1 + "baseline": "3.2.0", + "port-version": 0 }, "box2d": { "baseline": "2.4.1",