Skip to content

Commit

Permalink
[libgcrypt] Update to 1.11.0 (#43212)
Browse files Browse the repository at this point in the history
  • Loading branch information
dg0yt authored Jan 14, 2025
1 parent 2968c14 commit 761becd
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 42 deletions.
16 changes: 8 additions & 8 deletions ports/libgcrypt/cross-tools.patch
Original file line number Diff line number Diff line change
@@ -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 @@
Expand All @@ -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) \
25 changes: 14 additions & 11 deletions ports/libgcrypt/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,41 @@ 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_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
upstream-fa21ddc1.patch
"${osx_asm_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
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
"AS=${VCPKG_DETECTED_CMAKE_ASM_COMPILER}"
"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"
)

vcpkg_install_make(OPTIONS "CCAS=${VCPKG_DETECTED_CMAKE_ASM_COMPILER}")
vcpkg_make_install()
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()

Expand Down
20 changes: 0 additions & 20 deletions ports/libgcrypt/upstream-fa21ddc1.patch

This file was deleted.

4 changes: 2 additions & 2 deletions ports/libgcrypt/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -12,7 +12,7 @@
},
"libgpg-error",
{
"name": "vcpkg-cmake-get-vars",
"name": "vcpkg-make",
"host": true
}
]
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4577,7 +4577,7 @@
"port-version": 0
},
"libgcrypt": {
"baseline": "1.10.2",
"baseline": "1.11.0",
"port-version": 0
},
"libgd": {
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libgcrypt.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7ef0287faf9a058810b2eb5378b3a66ea6adcf69",
"version": "1.11.0",
"port-version": 0
},
{
"git-tree": "fb85f5dab3e4cacb5da45cf352ca23a25d7c4d18",
"version": "1.10.2",
Expand Down

0 comments on commit 761becd

Please sign in to comment.