From e8a5f4020261a9348abcec037ab265388ed0045e Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Sat, 11 Jan 2025 09:18:19 +0100 Subject: [PATCH 1/3] [libgcrypt] Update to 1.11.0 --- ports/libgcrypt/cross-tools.patch | 16 ++++++++-------- ports/libgcrypt/portfile.cmake | 15 +++++---------- ports/libgcrypt/upstream-fa21ddc1.patch | 20 -------------------- ports/libgcrypt/vcpkg.json | 4 ++-- versions/baseline.json | 2 +- versions/l-/libgcrypt.json | 5 +++++ 6 files changed, 21 insertions(+), 41 deletions(-) delete mode 100644 ports/libgcrypt/upstream-fa21ddc1.patch diff --git a/ports/libgcrypt/cross-tools.patch b/ports/libgcrypt/cross-tools.patch index fa65294e091a34..ab3555bf82af02 100644 --- a/ports/libgcrypt/cross-tools.patch +++ b/ports/libgcrypt/cross-tools.patch @@ -1,5 +1,5 @@ diff --git a/cipher/Makefile.am b/cipher/Makefile.am -index 264b3d3..254d946 100644 +index ea9014c..8aeedb7 100644 --- a/cipher/Makefile.am +++ b/cipher/Makefile.am @@ -19,6 +19,13 @@ @@ -16,14 +16,14 @@ index 264b3d3..254d946 100644 # Need to include ../src in addition to top_srcdir because gcrypt.h is # a built header. AM_CPPFLAGS = -I../src -I$(top_srcdir)/src -I../mpi -I$(top_srcdir)/mpi -@@ -144,8 +151,8 @@ EXTRA_libcipher_la_SOURCES = \ - blake2b-amd64-avx2.S blake2s-amd64-avx.S +@@ -160,8 +167,8 @@ EXTRA_libcipher_la_SOURCES = \ + blake2s-amd64-avx.S blake2s-amd64-avx512.S gost28147.lo: gost-sb.h --gost-sb.h: gost-s-box -- ./gost-s-box $@ -+gost-sb.h: $(HOST_TOOLS_PREFIX)/gost-s-box -+ $(HOST_TOOLS_PREFIX)/gost-s-box $@ +-gost-sb.h: gost-s-box$(EXEEXT_FOR_BUILD) +- ./gost-s-box$(EXEEXT_FOR_BUILD) $@ ++gost-sb.h: $(HOST_TOOLS_PREFIX)/gost-s-box$(EXEEXT_FOR_BUILD) ++ $(HOST_TOOLS_PREFIX)/gost-s-box$(EXEEXT_FOR_BUILD) $@ - gost-s-box: gost-s-box.c + gost-s-box$(EXEEXT_FOR_BUILD): gost-s-box.c $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ diff --git a/ports/libgcrypt/portfile.cmake b/ports/libgcrypt/portfile.cmake index 37e7271d5fbf2b..4e56f1cc1361b4 100644 --- a/ports/libgcrypt/portfile.cmake +++ b/ports/libgcrypt/portfile.cmake @@ -4,30 +4,25 @@ vcpkg_download_distfile(tarball "https://mirrors.dotsrc.org/gcrypt/libgcrypt/libgcrypt-${VERSION}.tar.bz2" "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${VERSION}.tar.bz2" FILENAME "libgcrypt-${VERSION}.tar.bz2" - SHA512 3a850baddfe8ffe8b3e96dc54af3fbb9e1dab204db1f06b9b90b8fbbfb7fb7276260cd1e61ba4dde5a662a2385385007478834e62e95f785d2e3d32652adb29e + SHA512 8e093e69e3c45d30838625ca008e995556f0d5b272de1c003d44ef94633bcc0d0ef5d95e8725eb531bfafb4490ac273488633e0c801200d4666194f86c3e270e ) vcpkg_extract_source_archive( SOURCE_PATH ARCHIVE "${tarball}" PATCHES cross-tools.patch - upstream-fa21ddc1.patch ) if(VCPKG_CROSSCOMPILING) set(ENV{HOST_TOOLS_PREFIX} "${CURRENT_HOST_INSTALLED_DIR}/manual-tools/${PORT}") endif() -vcpkg_list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DVCPKG_LANGUAGES=ASM;C") -vcpkg_cmake_get_vars(cmake_vars_file) -include("${cmake_vars_file}") - -vcpkg_configure_make( - AUTOCONFIG +vcpkg_make_configure( SOURCE_PATH "${SOURCE_PATH}" + AUTORECONF + LANGUAGES C ASM OPTIONS --disable-doc - "AS=${VCPKG_DETECTED_CMAKE_ASM_COMPILER}" "GPG_ERROR_CONFIG=no" OPTIONS_RELEASE "GPGRT_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/bin/gpgrt-config" @@ -35,7 +30,7 @@ vcpkg_configure_make( "GPGRT_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/debug/bin/gpgrt-config" ) -vcpkg_install_make(OPTIONS "CCAS=${VCPKG_DETECTED_CMAKE_ASM_COMPILER}") +vcpkg_make_install() vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() diff --git a/ports/libgcrypt/upstream-fa21ddc1.patch b/ports/libgcrypt/upstream-fa21ddc1.patch deleted file mode 100644 index b70408defa2845..00000000000000 --- a/ports/libgcrypt/upstream-fa21ddc1.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/random/rndgetentropy.c b/random/rndgetentropy.c -index 513da0b95..a6f3c4ab1 100644 ---- a/random/rndgetentropy.c -+++ b/random/rndgetentropy.c -@@ -81,6 +81,7 @@ _gcry_rndgetentropy_gather_random (void (*add)(const void*, size_t, - do - { - _gcry_pre_syscall (); -+#ifdef GRND_RANDOM - if (fips_mode ()) - { - /* DRBG chaining defined in SP 800-90A (rev 1) specify -@@ -98,6 +99,7 @@ _gcry_rndgetentropy_gather_random (void (*add)(const void*, size_t, - ret = getrandom (buffer, nbytes, GRND_RANDOM); - } - else -+#endif - { - nbytes = length < sizeof (buffer) ? length : sizeof (buffer); - ret = getentropy (buffer, nbytes); diff --git a/ports/libgcrypt/vcpkg.json b/ports/libgcrypt/vcpkg.json index 522c600be4a35d..a5600b42c94a5c 100644 --- a/ports/libgcrypt/vcpkg.json +++ b/ports/libgcrypt/vcpkg.json @@ -1,6 +1,6 @@ { "name": "libgcrypt", - "version": "1.10.2", + "version": "1.11.0", "description": "A general purpose cryptographic library", "homepage": "https://gnupg.org/software/libgcrypt/index.html", "license": null, @@ -12,7 +12,7 @@ }, "libgpg-error", { - "name": "vcpkg-cmake-get-vars", + "name": "vcpkg-make", "host": true } ] diff --git a/versions/baseline.json b/versions/baseline.json index b975d993ce5078..8cd845ca73f00f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4593,7 +4593,7 @@ "port-version": 0 }, "libgcrypt": { - "baseline": "1.10.2", + "baseline": "1.11.0", "port-version": 0 }, "libgd": { diff --git a/versions/l-/libgcrypt.json b/versions/l-/libgcrypt.json index 3e9265716b62e7..8ea86bf038ae5a 100644 --- a/versions/l-/libgcrypt.json +++ b/versions/l-/libgcrypt.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "79a41d30b3b38bb7f1766e2ebccf35823654ee61", + "version": "1.11.0", + "port-version": 0 + }, { "git-tree": "fb85f5dab3e4cacb5da45cf352ca23a25d7c4d18", "version": "1.10.2", From c70dc169ab2557210e3c3cd5d15a65c6b3d54448 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Sat, 11 Jan 2025 10:22:21 +0100 Subject: [PATCH 2/3] Fixup --- ports/libgcrypt/portfile.cmake | 4 +++- versions/l-/libgcrypt.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/libgcrypt/portfile.cmake b/ports/libgcrypt/portfile.cmake index 4e56f1cc1361b4..96d39a58ed648e 100644 --- a/ports/libgcrypt/portfile.cmake +++ b/ports/libgcrypt/portfile.cmake @@ -17,16 +17,18 @@ if(VCPKG_CROSSCOMPILING) set(ENV{HOST_TOOLS_PREFIX} "${CURRENT_HOST_INSTALLED_DIR}/manual-tools/${PORT}") endif() +set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/libgpg-error/aclocal/\"") vcpkg_make_configure( SOURCE_PATH "${SOURCE_PATH}" AUTORECONF LANGUAGES C ASM OPTIONS --disable-doc - "GPG_ERROR_CONFIG=no" OPTIONS_RELEASE + "GPG_ERROR_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/bin/gpgrt-config gpg-error" "GPGRT_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/bin/gpgrt-config" OPTIONS_DEBUG + "GPG_ERROR_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/debug/bin/gpgrt-config gpg-error" "GPGRT_CONFIG=${CURRENT_INSTALLED_DIR}/tools/libgpg-error/debug/bin/gpgrt-config" ) diff --git a/versions/l-/libgcrypt.json b/versions/l-/libgcrypt.json index 8ea86bf038ae5a..8dcad553188e84 100644 --- a/versions/l-/libgcrypt.json +++ b/versions/l-/libgcrypt.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "79a41d30b3b38bb7f1766e2ebccf35823654ee61", + "git-tree": "25423b72e31e0730a0cc3dfcc462fcea2b98efc6", "version": "1.11.0", "port-version": 0 }, From d4be46104c0ebe4e177b28581084649f8b47f337 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Sat, 11 Jan 2025 14:30:37 +0100 Subject: [PATCH 3/3] Fixup --- ports/libgcrypt/portfile.cmake | 6 ++++++ versions/l-/libgcrypt.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/libgcrypt/portfile.cmake b/ports/libgcrypt/portfile.cmake index 96d39a58ed648e..b292c871d9cc8b 100644 --- a/ports/libgcrypt/portfile.cmake +++ b/ports/libgcrypt/portfile.cmake @@ -6,11 +6,17 @@ vcpkg_download_distfile(tarball FILENAME "libgcrypt-${VERSION}.tar.bz2" SHA512 8e093e69e3c45d30838625ca008e995556f0d5b272de1c003d44ef94633bcc0d0ef5d95e8725eb531bfafb4490ac273488633e0c801200d4666194f86c3e270e ) +vcpkg_download_distfile(osx_asm_patch + URLS "https://github.com/gpg/libgcrypt/commit/bb0895bbb7c6d2b9502cbbf03da14d4ecf27a183.patch?full_index=1" + FILENAME "libgcrypt-1.11.0-bb0895b.diff" + SHA512 dc9a0f0c13b08bdc6e28b966c61f5a8695bc58a7bf5ea5a8376f3b293bde729f485342eabbc84e78ab37afaf12ba1ac4385f0baff0f5f4b31bc1d3b764893522 +) vcpkg_extract_source_archive( SOURCE_PATH ARCHIVE "${tarball}" PATCHES cross-tools.patch + "${osx_asm_patch}" ) if(VCPKG_CROSSCOMPILING) diff --git a/versions/l-/libgcrypt.json b/versions/l-/libgcrypt.json index 8dcad553188e84..9ec469eca83d95 100644 --- a/versions/l-/libgcrypt.json +++ b/versions/l-/libgcrypt.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "25423b72e31e0730a0cc3dfcc462fcea2b98efc6", + "git-tree": "7ef0287faf9a058810b2eb5378b3a66ea6adcf69", "version": "1.11.0", "port-version": 0 },