2022-11-10 04:14:28 +08:00
|
|
|
set(IDN2_FILENAME "libidn2-${VERSION}.tar.gz")
|
2017-10-12 17:56:58 +08:00
|
|
|
|
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2024-05-29 15:59:46 +08:00
|
|
|
URLS "https://ftp.gnu.org/gnu/libidn/${IDN2_FILENAME}"
|
|
|
|
"https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libidn/${IDN2_FILENAME}"
|
2017-10-12 17:56:58 +08:00
|
|
|
FILENAME "${IDN2_FILENAME}"
|
2024-05-29 15:59:46 +08:00
|
|
|
SHA512 eab5702bc0baed45492f8dde43a4d2ea3560ad80645e5f9e0cfa8d3b57bccd7fd782d04638e000ba07924a5d9f85e760095b55189188c4017b94705bef9b4a66
|
2017-10-12 17:56:58 +08:00
|
|
|
)
|
2019-01-09 08:07:42 +08:00
|
|
|
|
2022-11-10 04:14:28 +08:00
|
|
|
vcpkg_extract_source_archive(SOURCE_PATH
|
2021-07-27 02:02:24 +08:00
|
|
|
ARCHIVE "${ARCHIVE}"
|
2022-11-10 04:14:28 +08:00
|
|
|
SOURCE_BASE "v${VERSION}"
|
|
|
|
PATCHES
|
|
|
|
disable-subdirs.patch
|
|
|
|
fix-uwp.patch
|
2019-01-09 08:07:42 +08:00
|
|
|
)
|
2017-10-12 17:56:58 +08:00
|
|
|
|
2022-11-10 04:14:28 +08:00
|
|
|
vcpkg_list(SET options)
|
|
|
|
if("nls" IN_LIST FEATURES)
|
|
|
|
vcpkg_list(APPEND options "--enable-nls")
|
2020-09-28 08:49:45 +08:00
|
|
|
else()
|
2022-11-10 04:14:28 +08:00
|
|
|
vcpkg_list(APPEND options "--disable-nls")
|
|
|
|
endif()
|
2023-10-13 10:34:46 +08:00
|
|
|
set(ENV{AUTOPOINT} true) # true, the program
|
2022-11-10 04:14:28 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
vcpkg_list(APPEND options "CPPFLAGS=\$CPPFLAGS -DIDN2_STATIC")
|
2020-09-28 08:49:45 +08:00
|
|
|
endif()
|
2017-10-12 17:56:58 +08:00
|
|
|
|
2022-11-10 04:14:28 +08:00
|
|
|
set(ENV{GTKDOCIZE} true)
|
|
|
|
vcpkg_configure_make(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
AUTOCONFIG
|
|
|
|
COPY_SOURCE # include dir order problem
|
|
|
|
USE_WRAPPERS
|
|
|
|
OPTIONS
|
|
|
|
${options}
|
|
|
|
--disable-gtk-doc
|
|
|
|
--disable-doc
|
|
|
|
--disable-gcc-warnings
|
|
|
|
OPTIONS_RELEASE
|
|
|
|
"--with-libiconv-prefix=${CURRENT_INSTALLED_DIR}"
|
2022-11-11 02:48:27 +08:00
|
|
|
"--with-libunistring-prefix=${CURRENT_INSTALLED_DIR}"
|
2022-11-10 04:14:28 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
"--with-libiconv-prefix=${CURRENT_INSTALLED_DIR}/debug"
|
2022-11-11 02:48:27 +08:00
|
|
|
"--with-libunistring-prefix=${CURRENT_INSTALLED_DIR}/debug"
|
2022-11-10 04:14:28 +08:00
|
|
|
"CFLAGS=\$CFLAGS -I${CURRENT_INSTALLED_DIR}/include"
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_make()
|
2021-07-27 02:02:24 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2022-11-10 04:14:28 +08:00
|
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/idn2.h" "defined IDN2_STATIC" "1")
|
|
|
|
endif()
|
2021-07-27 02:02:24 +08:00
|
|
|
|
2022-11-10 04:14:28 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug"
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_copyright(
|
2024-05-29 15:59:46 +08:00
|
|
|
COMMENT [[
|
|
|
|
The installed C library libidn2 is dual-licensed under LGPLv3+|GPLv2+,
|
|
|
|
while the rest of the package is GPLv3+.
|
|
|
|
]]
|
2022-11-10 04:14:28 +08:00
|
|
|
FILE_LIST
|
|
|
|
"${SOURCE_PATH}/COPYING"
|
|
|
|
"${SOURCE_PATH}/COPYING.LESSERv3"
|
|
|
|
"${SOURCE_PATH}/COPYINGv2"
|
|
|
|
"${SOURCE_PATH}/COPYING.unicode"
|
|
|
|
)
|