From dee924de74e81388140a53c32a919ecec57d20ab Mon Sep 17 00:00:00 2001 From: Lily Wang <94091114+LilyWangLL@users.noreply.github.com> Date: Mon, 27 May 2024 23:25:01 -0700 Subject: [PATCH] [libsodium] Update to 1.0.20 (#38954) Fixes #38947 - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [ ] ~~The "supports" clause reflects platforms that may be fixed by this new version.~~ - [ ] ~~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~~ - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file. --------- Co-authored-by: Lily Wang --- ports/libsodium/arm-neon.diff | 119 --------------------------------- ports/libsodium/portfile.cmake | 6 +- ports/libsodium/vcpkg.json | 3 +- versions/baseline.json | 4 +- versions/l-/libsodium.json | 5 ++ 5 files changed, 10 insertions(+), 127 deletions(-) delete mode 100644 ports/libsodium/arm-neon.diff diff --git a/ports/libsodium/arm-neon.diff b/ports/libsodium/arm-neon.diff deleted file mode 100644 index fb5302e736c2cb..00000000000000 --- a/ports/libsodium/arm-neon.diff +++ /dev/null @@ -1,119 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index df83ef5..be67d34 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -398,11 +398,6 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [ - have_armcrypto=no - AC_MSG_CHECKING(for ARM crypto instructions set) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -- #ifdef __clang__ -- # pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) -- #elif defined(__GNUC__) -- # pragma GCC target("+simd+crypto") -- #endif - #ifndef __ARM_FEATURE_CRYPTO - # define __ARM_FEATURE_CRYPTO 1 - #endif -@@ -411,6 +406,12 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [ - #endif - - #include -+ -+ #ifdef __clang__ -+ # pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) -+ #elif defined(__GNUC__) -+ # pragma GCC target("+simd+crypto") -+ #endif - ]], [[ - vaeseq_u8(vmovq_n_u8(0), vmovq_n_u8(0)); - -diff --git a/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c b/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c -index 825de8a..a01f60c 100644 ---- a/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c -+++ b/src/libsodium/crypto_aead/aegis128l/aegis128l_armcrypto.c -@@ -17,12 +17,6 @@ - - #include "aegis128l_armcrypto.h" - --#ifdef __clang__ --#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) --#elif defined(__GNUC__) --#pragma GCC target("+simd+crypto") --#endif -- - #ifndef __ARM_FEATURE_CRYPTO - #define __ARM_FEATURE_CRYPTO 1 - #endif -@@ -32,6 +26,12 @@ - - #include - -+#ifdef __clang__ -+#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) -+#elif defined(__GNUC__) -+#pragma GCC target("+simd+crypto") -+#endif -+ - #define AES_BLOCK_LENGTH 16 - - typedef uint8x16_t aes_block_t; -diff --git a/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c b/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c -index e1ebd57..058e207 100644 ---- a/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c -+++ b/src/libsodium/crypto_aead/aegis256/aegis256_armcrypto.c -@@ -17,12 +17,6 @@ - - #include "aegis256_armcrypto.h" - --#ifdef __clang__ --#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) --#elif defined(__GNUC__) --#pragma GCC target("+simd+crypto") --#endif -- - #ifndef __ARM_FEATURE_CRYPTO - #define __ARM_FEATURE_CRYPTO 1 - #endif -@@ -32,6 +26,12 @@ - - #include - -+#ifdef __clang__ -+#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) -+#elif defined(__GNUC__) -+#pragma GCC target("+simd+crypto") -+#endif -+ - #define AES_BLOCK_LENGTH 16 - - typedef uint8x16_t aes_block_t; -diff --git a/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c b/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c -index 0a5a128..aa76f5c 100644 ---- a/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c -+++ b/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c -@@ -19,12 +19,6 @@ - #define __vectorcall - #endif - --#ifdef __clang__ --#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) --#elif defined(__GNUC__) --#pragma GCC target("+simd+crypto") --#endif -- - #ifndef __ARM_FEATURE_CRYPTO - #define __ARM_FEATURE_CRYPTO 1 - #endif -@@ -34,6 +28,12 @@ - - #include - -+#ifdef __clang__ -+#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) -+#elif defined(__GNUC__) -+#pragma GCC target("+simd+crypto") -+#endif -+ - #define ABYTES crypto_aead_aes256gcm_ABYTES - #define NPUBBYTES crypto_aead_aes256gcm_NPUBBYTES - #define KEYBYTES crypto_aead_aes256gcm_KEYBYTES diff --git a/ports/libsodium/portfile.cmake b/ports/libsodium/portfile.cmake index 41fab984d9b892..51274e41dec5ac 100644 --- a/ports/libsodium/portfile.cmake +++ b/ports/libsodium/portfile.cmake @@ -1,11 +1,9 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO jedisct1/libsodium - REF ${VERSION} - SHA512 6094d7bf191ea3be85f2ddab76b71f1b9c69c786493db5b84d3c5d5a0237003377ddf6a8687a962ea651fe4a9369cf5ee1676ba0bae82690f5f7ef31a698efa9 + REF "${VERSION}-RELEASE" + SHA512 477b9dc10d87ae3c83db3fc207b50b9fe39593684a59f164986cce32bdaba95db0df7dee32149bf9a23c5794354fce8241d88a9a4bd4bbf2630483cbbc378c2f HEAD_REF master - PATCHES - arm-neon.diff # https://github.com/jedisct1/libsodium/commit/8f453f41f8834e0fe47610f2a3e03e696ddb3450 with fuzz 2 ) if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) diff --git a/ports/libsodium/vcpkg.json b/ports/libsodium/vcpkg.json index b5a25bdb59e549..4e2e4ba32ae5ae 100644 --- a/ports/libsodium/vcpkg.json +++ b/ports/libsodium/vcpkg.json @@ -1,7 +1,6 @@ { "name": "libsodium", - "version": "1.0.19", - "port-version": 2, + "version": "1.0.20", "description": "A modern and easy-to-use crypto library", "homepage": "https://libsodium.org/", "license": "ISC", diff --git a/versions/baseline.json b/versions/baseline.json index 9563a7ee033671..db1427902644ee 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4969,8 +4969,8 @@ "port-version": 2 }, "libsodium": { - "baseline": "1.0.19", - "port-version": 2 + "baseline": "1.0.20", + "port-version": 0 }, "libsonic": { "baseline": "0.2.0", diff --git a/versions/l-/libsodium.json b/versions/l-/libsodium.json index 3896b670bc3882..f046ecb802bad3 100644 --- a/versions/l-/libsodium.json +++ b/versions/l-/libsodium.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5ac7f4518f3cf6bd123fd625b19e32b98beb3e41", + "version": "1.0.20", + "port-version": 0 + }, { "git-tree": "24563a7817fe403090f82593e4be4c3bc8219510", "version": "1.0.19",