2022-11-15 08:54:13 +08:00
|
|
|
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"
|
2024-03-02 06:36:06 +08:00
|
|
|
SHA512 74eddba01ce4c2ffdca781c85db3bb52c85f1db3c09813ee2b8ceea0608f92ca3912fd9266f55deb36a8ba4d01802895ca5d5d219e7d9caec45e1a8534e45a84
|
2021-03-12 04:42:05 +08:00
|
|
|
)
|
2022-11-15 08:54:13 +08:00
|
|
|
vcpkg_extract_source_archive(SOURCE_PATH
|
|
|
|
ARCHIVE "${tarball}"
|
|
|
|
SOURCE_BASE "v${VERSION}"
|
|
|
|
PATCHES
|
|
|
|
use-gmp-pkgconfig.patch
|
2021-03-12 04:42:05 +08:00
|
|
|
)
|
|
|
|
|
2022-11-15 08:54:13 +08:00
|
|
|
vcpkg_list(SET options)
|
|
|
|
|
|
|
|
if("nls" IN_LIST FEATURES)
|
|
|
|
vcpkg_list(APPEND options "--enable-nls")
|
2021-03-26 03:16:08 +08:00
|
|
|
else()
|
2022-11-15 08:54:13 +08:00
|
|
|
set(ENV{AUTOPOINT} true) # true, the program
|
|
|
|
vcpkg_list(APPEND options "--disable-nls")
|
2021-03-26 03:16:08 +08:00
|
|
|
endif()
|
|
|
|
if ("openssl" IN_LIST FEATURES)
|
2022-11-15 08:54:13 +08:00
|
|
|
vcpkg_list(APPEND options "--enable-openssl-compatibility")
|
2021-03-26 03:16:08 +08:00
|
|
|
endif()
|
|
|
|
|
2023-10-07 01:37:04 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_list(APPEND options "LIBS=\$LIBS -liconv -lcharset") # for libunistring
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(VCPKG_CROSSCOMPILING)
|
|
|
|
vcpkg_cmake_get_vars(cmake_vars_file)
|
|
|
|
include("${cmake_vars_file}")
|
|
|
|
set(ccas "${VCPKG_DETECTED_CMAKE_C_COMPILER}")
|
|
|
|
cmake_path(GET ccas PARENT_PATH ccas_dir)
|
|
|
|
vcpkg_add_to_path("${ccas_dir}")
|
|
|
|
cmake_path(GET ccas FILENAME ccas_command)
|
|
|
|
vcpkg_list(APPEND options "CCAS=${ccas_command}")
|
2022-11-15 08:54:13 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
set(ENV{GTKDOCIZE} true) # true, the program
|
2021-03-12 04:42:05 +08:00
|
|
|
vcpkg_configure_make(
|
2021-05-25 02:57:02 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2022-11-15 08:54:13 +08:00
|
|
|
AUTOCONFIG
|
2021-03-12 04:42:05 +08:00
|
|
|
OPTIONS
|
2022-11-15 08:54:13 +08:00
|
|
|
--disable-dependency-tracking
|
2021-03-12 04:42:05 +08:00
|
|
|
--disable-doc
|
2022-11-15 08:54:13 +08:00
|
|
|
--disable-guile
|
|
|
|
--disable-libdane
|
2021-03-12 04:42:05 +08:00
|
|
|
--disable-maintainer-mode
|
|
|
|
--disable-rpath
|
2022-11-15 08:54:13 +08:00
|
|
|
--disable-tests
|
2022-11-23 00:53:54 +08:00
|
|
|
--with-brotli=no
|
|
|
|
--with-p11-kit=no
|
|
|
|
--with-tpm=no
|
|
|
|
--with-tpm2=no
|
|
|
|
--with-zstd=no
|
2022-11-15 08:54:13 +08:00
|
|
|
${options}
|
|
|
|
YACC=false # false, the program - not used here
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
--disable-tools
|
2021-03-12 04:42:05 +08:00
|
|
|
)
|
|
|
|
vcpkg_install_make()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2023-10-07 01:37:04 +08:00
|
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
2021-03-12 04:42:05 +08:00
|
|
|
|
2021-05-25 02:57:02 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2022-11-15 08:54:13 +08:00
|
|
|
|
|
|
|
vcpkg_install_copyright(
|
|
|
|
FILE_LIST
|
|
|
|
"${SOURCE_PATH}/LICENSE"
|
|
|
|
"${SOURCE_PATH}/doc/COPYING"
|
|
|
|
"${SOURCE_PATH}/doc/COPYING.LESSER"
|
|
|
|
)
|