From 4fa14179cb8335f2288b10cd7ad4646224d08d42 Mon Sep 17 00:00:00 2001 From: SunBlack Date: Mon, 17 Aug 2026 22:13:41 +0200 Subject: [PATCH] [libgnutls] Update to 3.8.13 (#53414) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ports/libgnutls/portfile.cmake | 176 ++++++++++++++++++--------------- ports/libgnutls/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/l-/libgnutls.json | 5 + 4 files changed, 101 insertions(+), 84 deletions(-) diff --git a/ports/libgnutls/portfile.cmake b/ports/libgnutls/portfile.cmake index 7948253fb1..b02a669cf7 100644 --- a/ports/libgnutls/portfile.cmake +++ b/ports/libgnutls/portfile.cmake @@ -1,82 +1,94 @@ -string(REGEX REPLACE "^([0-9]*[.][0-9]*)[.].*" "\\1" GNUTLS_BRANCH "${VERSION}") -vcpkg_download_distfile(tarball - URLS - "https://gnupg.org/ftp/gcrypt/gnutls/v${GNUTLS_BRANCH}/gnutls-${VERSION}.tar.xz" - "https://mirrors.dotsrc.org/gcrypt/gnutls/v${GNUTLS_BRANCH}/gnutls-${VERSION}.tar.xz" - "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnutls/v${GNUTLS_BRANCH}/gnutls-${VERSION}.tar.xz" - FILENAME "gnutls-${VERSION}.tar.xz" - SHA512 332a8e5200461517c7f08515e3aaab0bec6222747422e33e9e7d25d35613e3d0695a803fce226bd6a83f723054f551328bd99dcf0573e142be777dcf358e1a3b -) -vcpkg_extract_source_archive(SOURCE_PATH - ARCHIVE "${tarball}" - SOURCE_BASE "v${VERSION}" - PATCHES - ccasflags.patch - use-gmp-pkgconfig.patch -) - -vcpkg_list(SET options) - -if("nls" IN_LIST FEATURES) - vcpkg_list(APPEND options "--enable-nls") -else() - set(ENV{AUTOPOINT} true) # true, the program - vcpkg_list(APPEND options "--disable-nls") -endif() -if ("openssl" IN_LIST FEATURES) - vcpkg_list(APPEND options "--enable-openssl-compatibility") -endif() - -if(VCPKG_TARGET_IS_WINDOWS) - vcpkg_list(APPEND options "LIBS=\$LIBS -liconv -lcharset") # for libunistring -endif() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_list(APPEND options "ac_cv_dlopen_soname_works=no") # ensure vcpkg libs -endif() - -set(ENV{GTKDOCIZE} true) # true, the program -set(ENV{YACC} false) # false, the program - not used here - -vcpkg_make_configure( - SOURCE_PATH "${SOURCE_PATH}" - AUTORECONF - OPTIONS - --disable-dependency-tracking - --disable-doc - --disable-guile - --disable-libdane - --disable-maintainer-mode - --disable-rpath - --disable-tests - --with-brotli=no - --with-liboqs=no - --with-p11-kit=no - --with-tpm=no - --with-tpm2=no - --with-zlib=link - --with-zstd=no - ${options} - OPTIONS_DEBUG - --disable-tools -) -vcpkg_make_install() -vcpkg_fixup_pkgconfig() -vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") - -vcpkg_install_copyright( - COMMENT [[ -The main libraries (libgnutls and libdane) are released under the -GNU Lesser General Public License version 2.1 or later -(LGPLv2+, see COPYING.LESSERv2 for the license terms), and -the gnutls-openssl extra library and the application are under the -GNU General Public License version 3 or later -(GPLv3+, see COPYING for the license terms), -unless otherwise specified in the indivual source files. -]] - FILE_LIST - "${SOURCE_PATH}/COPYING.LESSERv2" - "${SOURCE_PATH}/COPYING" -) +string(REGEX REPLACE "^([0-9]*[.][0-9]*)[.].*" "\\1" GNUTLS_BRANCH "${VERSION}") +vcpkg_download_distfile(tarball + URLS + "https://gnupg.org/ftp/gcrypt/gnutls/v${GNUTLS_BRANCH}/gnutls-${VERSION}.tar.xz" + "https://mirrors.dotsrc.org/gcrypt/gnutls/v${GNUTLS_BRANCH}/gnutls-${VERSION}.tar.xz" + "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnutls/v${GNUTLS_BRANCH}/gnutls-${VERSION}.tar.xz" + FILENAME "gnutls-${VERSION}.tar.xz" + SHA512 71bf189a836fd18d58b9e995d4bfcecdb0aae6129dfd44247b98422b2f127dd868f9905d28fad2ca05afd919a0e6b3c8eebb6b95804067d3a8dab31ebdc72453 +) +vcpkg_extract_source_archive(SOURCE_PATH + ARCHIVE "${tarball}" + SOURCE_BASE "v${VERSION}" + PATCHES + ccasflags.patch + use-gmp-pkgconfig.patch +) + +vcpkg_list(SET options) + +if("nls" IN_LIST FEATURES) + vcpkg_list(APPEND options "--enable-nls") +else() + set(ENV{AUTOPOINT} true) # true, the program + vcpkg_list(APPEND options "--disable-nls") +endif() +if ("openssl" IN_LIST FEATURES) + vcpkg_list(APPEND options "--enable-openssl-compatibility") +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_list(APPEND options "LIBS=\$LIBS -liconv -lcharset") # for libunistring +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_list(APPEND options "ac_cv_dlopen_soname_works=no") # ensure vcpkg libs +endif() + +set(ENV{GTKDOCIZE} true) # true, the program +set(ENV{YACC} false) # false, the program - not used here + +vcpkg_make_configure( + SOURCE_PATH "${SOURCE_PATH}" + AUTORECONF + LANGUAGES ASM C CXX + OPTIONS + --disable-dependency-tracking + --disable-doc + --disable-guile + --disable-libdane + --disable-maintainer-mode + --disable-rpath + --disable-tests + --with-brotli=no + --with-liboqs=no + --with-p11-kit=no + --with-tpm=no + --with-tpm2=no + --with-zlib=link + --with-zstd=no + ${options} + OPTIONS_DEBUG + --disable-tools +) +vcpkg_make_install() +vcpkg_fixup_pkgconfig() +vcpkg_copy_tools( + TOOL_NAMES + certtool + gnutls-cli + gnutls-cli-debug + gnutls-serv + ocsptool + psktool + SEARCH_DIR "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin" +) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +vcpkg_install_copyright( + COMMENT [[ +The main libraries (libgnutls and libdane) are released under the +GNU Lesser General Public License version 2.1 or later +(LGPLv2+, see COPYING.LESSERv2 for the license terms), and +the gnutls-openssl extra library and the application are under the +GNU General Public License version 3 or later +(GPLv3+, see COPYING for the license terms), +unless otherwise specified in the indivual source files. +]] + FILE_LIST + "${SOURCE_PATH}/COPYING.LESSERv2" + "${SOURCE_PATH}/COPYING" + "${SOURCE_PATH}/lib/inih/LICENSE.txt" +) diff --git a/ports/libgnutls/vcpkg.json b/ports/libgnutls/vcpkg.json index d06cf5a734..a5b51d87dc 100644 --- a/ports/libgnutls/vcpkg.json +++ b/ports/libgnutls/vcpkg.json @@ -1,6 +1,6 @@ { "name": "libgnutls", - "version": "3.8.12", + "version": "3.8.13", "description": "A secure communications library implementing the SSL, TLS and DTLS protocols.", "homepage": "https://www.gnutls.org/", "license": null, diff --git a/versions/baseline.json b/versions/baseline.json index 2fb92bb5df..c068345a9e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5117,7 +5117,7 @@ "port-version": 1 }, "libgnutls": { - "baseline": "3.8.12", + "baseline": "3.8.13", "port-version": 0 }, "libgo": { diff --git a/versions/l-/libgnutls.json b/versions/l-/libgnutls.json index 9c292d62a5..cf9270f8e1 100644 --- a/versions/l-/libgnutls.json +++ b/versions/l-/libgnutls.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "56a20e18acacd00d679773b5e19986ce42d02e6b", + "version": "3.8.13", + "port-version": 0 + }, { "git-tree": "79ee3e6ff71c38fb2b1f91930c94986db0506c85", "version": "3.8.12",