2022-11-15 08:54:13 +08:00
|
|
|
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
2021-03-12 04:42:05 +08:00
|
|
|
|
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"
|
|
|
|
SHA512 72c78d7fcb024393c1d15f2a1856608ae4460ba43cc5bbbb4c29b80508cae6cb822df4638029de2363437d110187e0a3cc19a7288c3b2f44b2f648399a028438
|
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()
|
|
|
|
|
2022-11-15 08:54:13 +08:00
|
|
|
if(VCPKG_TARGET_IS_OSX)
|
|
|
|
vcpkg_list(APPEND options "LDFLAGS=\$LDFLAGS -framework CoreFoundation")
|
|
|
|
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
|
2022-11-15 08:54:13 +08:00
|
|
|
--disable-silent-rules
|
2021-03-12 04:42:05 +08:00
|
|
|
--disable-rpath
|
2022-11-15 08:54:13 +08:00
|
|
|
--disable-tests
|
2021-03-12 04:42:05 +08:00
|
|
|
--without-p11-kit
|
2021-05-25 02:57:02 +08:00
|
|
|
--without-tpm
|
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()
|
|
|
|
|
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"
|
|
|
|
)
|