diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2020-12-22 23:19:50 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-22 23:19:50 -0800 |
| commit | 3efce9a5c9d53ac486693bc52fd97a98ae4be81c (patch) | |
| tree | 4dd9e1bb3a0fb1ba997a282b9c933eb5e04ed86a | |
| parent | 4cf45e80e3eab2eece9b89e11015920da3a50580 (diff) | |
| download | vcpkg-3efce9a5c9d53ac486693bc52fd97a98ae4be81c.tar.gz vcpkg-3efce9a5c9d53ac486693bc52fd97a98ae4be81c.zip | |
[curl] Add feature idn2 (#14807)
Thanks for fixing phantom dependencies!
| -rw-r--r-- | ports/curl/0012-fix-dependency-idn2.patch | 51 | ||||
| -rw-r--r-- | ports/curl/CONTROL | 7 | ||||
| -rw-r--r-- | ports/curl/portfile.cmake | 4 |
3 files changed, 60 insertions, 2 deletions
diff --git a/ports/curl/0012-fix-dependency-idn2.patch b/ports/curl/0012-fix-dependency-idn2.patch new file mode 100644 index 000000000..19d5b1230 --- /dev/null +++ b/ports/curl/0012-fix-dependency-idn2.patch @@ -0,0 +1,51 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dc7223b..a661cb8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -620,9 +620,6 @@ if(NOT CURL_DISABLE_LDAPS) + check_include_file_concat("ldapssl.h" HAVE_LDAPSSL_H) + endif() + +-# Check for idn +-check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2) +- + # Check for symbol dlopen (same as HAVE_LIBDL) + check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN) + +@@ -870,6 +867,20 @@ if(CURL_CA_PATH_SET AND NOT USE_OPENSSL AND NOT USE_MBEDTLS) + "Set CURL_CA_PATH=none or enable one of those TLS backends.") + endif() + ++if (CMAKE_USE_IDN2) ++ include(FindPackageHandleStandardArgs) ++ include(SelectLibraryConfigurations) ++ ++ find_path(LIBIDN2_INCLUDE_DIRS idn2.h) ++ find_library(LIBIDN2_LIBRARY_DEBUG NAMES libidn2 idn2 PATHS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib NO_DEFAULT_PATH Release RelWithDebInfo MinSizeRel) ++ find_library(LIBIDN2_LIBRARY_RELEASE NAMES libidn2 idn2 PATHS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib NO_DEFAULT_PATH Debug) ++ select_library_configurations(LIBIDN2) ++ ++ add_definitions(-DHAVE_IDN2_H -DHAVE_LIBIDN2) ++ include_directories(${LIBIDN2_INCLUDE_DIRS}) ++ link_libraries(${LIBIDN2_LIBRARY}) ++endif() ++ + # Check for header files + if(NOT UNIX) + check_include_file_concat("windows.h" HAVE_WINDOWS_H) +@@ -906,7 +917,6 @@ check_include_file_concat("crypto.h" HAVE_CRYPTO_H) + check_include_file_concat("err.h" HAVE_ERR_H) + check_include_file_concat("errno.h" HAVE_ERRNO_H) + check_include_file_concat("fcntl.h" HAVE_FCNTL_H) +-check_include_file_concat("idn2.h" HAVE_IDN2_H) + check_include_file_concat("ifaddrs.h" HAVE_IFADDRS_H) + check_include_file_concat("io.h" HAVE_IO_H) + check_include_file_concat("krb.h" HAVE_KRB_H) +@@ -1362,7 +1372,6 @@ _add_if("libz" HAVE_LIBZ) + _add_if("brotli" HAVE_BROTLI) + _add_if("zstd" HAVE_ZSTD) + _add_if("AsynchDNS" USE_ARES OR USE_THREADS_POSIX OR USE_THREADS_WIN32) +-_add_if("IDN" HAVE_LIBIDN2) + _add_if("Largefile" (CURL_SIZEOF_CURL_OFF_T GREATER 4) AND + ((SIZEOF_OFF_T GREATER 4) OR USE_WIN32_LARGE_FILES)) + # TODO SSP1 (Schannel) check is missing diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 72bc677bb..82698dca9 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,4 +1,5 @@ Source: curl +Port-Version: 1 Version: 7.74.0 Build-Depends: zlib Homepage: https://github.com/curl/curl @@ -51,4 +52,8 @@ Description: SSPI support Feature: brotli Build-Depends: brotli -Description: brotli support (brotli)
\ No newline at end of file +Description: brotli support (brotli) + +Feature: idn2 +Build-Depends: libidn2 +Description: idn2 support (libidn2)
\ No newline at end of file diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index c2e53d4c3..6e18aecd0 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_from_github( 0009_fix_openssl_config.patch 0010_fix_othertests_cmake.patch 0011_fix_static_build.patch + 0012-fix-dependency-idn2.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) @@ -41,6 +42,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS brotli CURL_BROTLI schannel CMAKE_USE_SCHANNEL sectransp CMAKE_USE_SECTRANSP + idn2 CMAKE_USE_IDN2 INVERTED_FEATURES non-http HTTP_ONLY @@ -186,4 +188,4 @@ elseif(VCPKG_TARGET_IS_LINUX) endif() file(INSTALL ${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
\ No newline at end of file +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
