From 5f53d8df242f6522ef38c7d6c0502b2de3c1b6be Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 13 Jul 2021 20:38:00 +0200 Subject: [PATCH 01/16] Modernize portfile --- ports/curl/portfile.cmake | 88 +++++++++++++++++---------------------- ports/curl/vcpkg.json | 8 ++++ 2 files changed, 47 insertions(+), 49 deletions(-) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 6d410fb58b9231..36a4ac594ece3c 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -19,7 +19,7 @@ vcpkg_from_github( string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) # schannel will enable sspi, but sspi do not support uwp -foreach(feature "schannel" "sspi" "tool") +foreach(feature IN ITEMS "schannel" "sspi" "tool") if(feature IN_LIST FEATURES AND VCPKG_TARGET_IS_UWP) message(FATAL_ERROR "Feature ${feature} is not supported on UWP.") endif() @@ -31,30 +31,30 @@ endif() vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES - # Support HTTP2 TLS Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location. - http2 USE_NGHTTP2 - openssl CMAKE_USE_OPENSSL - mbedtls CMAKE_USE_MBEDTLS - ssh CMAKE_USE_LIBSSH2 - tool BUILD_CURL_EXE - c-ares ENABLE_ARES - sspi CURL_WINDOWS_SSPI - brotli CURL_BROTLI - schannel CMAKE_USE_SCHANNEL - sectransp CMAKE_USE_SECTRANSP - idn2 CMAKE_USE_IDN2 + # Support HTTP2 TLS Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location. + http2 USE_NGHTTP2 + openssl CMAKE_USE_OPENSSL + mbedtls CMAKE_USE_MBEDTLS + ssh CMAKE_USE_LIBSSH2 + tool BUILD_CURL_EXE + c-ares ENABLE_ARES + sspi CURL_WINDOWS_SSPI + brotli CURL_BROTLI + schannel CMAKE_USE_SCHANNEL + sectransp CMAKE_USE_SECTRANSP + idn2 CMAKE_USE_IDN2 INVERTED_FEATURES - non-http HTTP_ONLY + non-http HTTP_ONLY ) -set(SECTRANSP_OPTIONS) +set(SECTRANSP_OPTIONS "") if("sectransp" IN_LIST FEATURES) set(SECTRANSP_OPTIONS -DCURL_CA_PATH=none) endif() # UWP targets -set(UWP_OPTIONS) +set(UWP_OPTIONS "") if(VCPKG_TARGET_IS_UWP) set(UWP_OPTIONS -DUSE_WIN32_LDAP=OFF @@ -64,13 +64,11 @@ if(VCPKG_TARGET_IS_UWP) ) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS ${FEATURE_OPTIONS} +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} ${UWP_OPTIONS} - ${ADDITIONAL_SCRIPTS} - ${EXTRA_ARGS} ${SECTRANSP_OPTIONS} -DBUILD_TESTING=OFF -DENABLE_MANUAL=OFF @@ -79,72 +77,64 @@ vcpkg_configure_cmake( -DENABLE_DEBUG=ON -DCURL_CA_FALLBACK=ON ) - -vcpkg_install_cmake() - +vcpkg_cmake_install() vcpkg_copy_pdbs() if ("tool" IN_LIST FEATURES) vcpkg_copy_tools(TOOL_NAMES curl AUTO_CLEAN) endif() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CURL) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/CURL) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") #Fix install path -file(READ ${CURRENT_PACKAGES_DIR}/bin/curl-config CURL_CONFIG) +file(READ "${CURRENT_PACKAGES_DIR}/bin/curl-config" CURL_CONFIG) string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${prefix}" CURL_CONFIG "${CURL_CONFIG}") string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${prefix}" CURL_CONFIG "${CURL_CONFIG}") string(REPLACE "\nprefix=\${prefix}" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../.. && pwd -P)]=] CURL_CONFIG "${CURL_CONFIG}") -file(WRITE ${CURRENT_PACKAGES_DIR}/bin/curl-config "${CURL_CONFIG}") -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/share/${PORT}/curl-config) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config) +file(WRITE "${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURL_CONFIG}") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_PACKAGES_DIR}/share/${PORT}/curl-config") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/curl-config") -file(GLOB FILES ${CURRENT_PACKAGES_DIR}/bin/*) +file(GLOB FILES "${CURRENT_PACKAGES_DIR}/bin/*") if(NOT FILES) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") endif() -file(GLOB FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*) +file(GLOB FILES "${CURRENT_PACKAGES_DIR}/debug/bin/*") if(NOT FILES) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/curl/curl.h + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/curl/curl.h" "#ifdef CURL_STATICLIB" "#if 1" ) -else() - vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/curl/curl.h - "#ifdef CURL_STATICLIB" - "#if 0" - ) endif() - # Fix the pkgconfig file for debug if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(READ ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc _contents) + file(READ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc" _contents) string(REPLACE " -lcurl" " -lcurl-d" _contents "${_contents}") string(REPLACE " -loptimized " " " _contents "${_contents}") string(REPLACE " -ldebug " " " _contents "${_contents}") string(REPLACE " ${CURRENT_INSTALLED_DIR}/lib/pthreadVC3.lib" "" _contents "${_contents}") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) - file(WRITE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc "${_contents}") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") + file(WRITE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc" "${_contents}") endif() # Fix the pkgconfig file for release if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(READ ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc _contents) + file(READ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc" _contents) string(REPLACE " -loptimized " " " _contents "${_contents}") string(REPLACE " -ldebug " " " _contents "${_contents}") string(REPLACE " ${CURRENT_INSTALLED_DIR}/debug/lib/pthreadVC3d.lib" "" _contents "${_contents}") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) - file(WRITE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libcurl.pc "${_contents}") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") + file(WRITE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libcurl.pc" "${_contents}") endif() vcpkg_fixup_pkgconfig() 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) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json index 7059f6d4749868..c76b3727b5cf94 100644 --- a/ports/curl/vcpkg.json +++ b/ports/curl/vcpkg.json @@ -5,6 +5,14 @@ "description": "A library for transferring data with URLs", "homepage": "https://github.com/curl/curl", "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, "zlib" ], "default-features": [ From 05a3b7b5487b371d3be0f21a954c76e0953bab24 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 13 Jul 2021 20:52:56 +0200 Subject: [PATCH 02/16] Don't export implicit link libraries --- ports/curl/0020-fix-pc-file.patch | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ports/curl/0020-fix-pc-file.patch b/ports/curl/0020-fix-pc-file.patch index cd79597821941e..4475556c1ea096 100644 --- a/ports/curl/0020-fix-pc-file.patch +++ b/ports/curl/0020-fix-pc-file.patch @@ -1,7 +1,17 @@ -diff -urw a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt 2021-05-10 20:46:52.204346972 +0200 -+++ b/CMakeLists.txt 2021-05-11 19:39:00.065235266 +0200 -@@ -1482,6 +1482,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f9a2d73..905873e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1459,7 +1459,7 @@ set(includedir "\${prefix}/include") + set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}") + set(LIBCURL_LIBS "") + set(libdir "${CMAKE_INSTALL_PREFIX}/lib") +-foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) ++foreach(_lib ${CURL_LIBS}) + if(TARGET "${_lib}") + set(_libname "${_lib}") + get_target_property(_libtype "${_libname}" TYPE) +@@ -1475,6 +1475,12 @@ foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) message(WARNING "Bad lib in library list: ${_libname}") continue() endif() From 17c1466232b126ba88b092d7c750b194458fc8ca Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 15 Jul 2021 07:42:40 +0200 Subject: [PATCH 03/16] Revise osx framework handling --- ports/curl/0020-fix-pc-file.patch | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ports/curl/0020-fix-pc-file.patch b/ports/curl/0020-fix-pc-file.patch index 4475556c1ea096..c97abba98f4935 100644 --- a/ports/curl/0020-fix-pc-file.patch +++ b/ports/curl/0020-fix-pc-file.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index f9a2d73..905873e 100644 +index f9a2d73..6ca43f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1459,7 +1459,7 @@ set(includedir "\${prefix}/include") @@ -11,16 +11,17 @@ index f9a2d73..905873e 100644 if(TARGET "${_lib}") set(_libname "${_lib}") get_target_property(_libtype "${_libname}" TYPE) -@@ -1475,6 +1475,12 @@ foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) - message(WARNING "Bad lib in library list: ${_libname}") +@@ -1476,6 +1476,13 @@ foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) continue() endif() -+ elseif(_lib MATCHES "^(.*)/([^/]*)[.]framework$") + endif() ++ if(_lib MATCHES "^(.*)/([^/]*)[.]framework$") + if(CMAKE_MATCH_1 IN_LIST CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES) + set(_lib "-framework ${CMAKE_MATCH_2}") + else() + set(_lib "-framework ${_lib}") + endif() - endif() ++ endif() if(_lib MATCHES ".*/.*" OR _lib MATCHES "^-") set(LIBCURL_LIBS "${LIBCURL_LIBS} ${_lib}") + else() From 57030f26c4dc176001ee6702e982c18c6d5e388e Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 15 Jul 2021 07:51:30 +0200 Subject: [PATCH 04/16] Fix exported per-config location of dependencies --- ports/curl/0020-fix-pc-file.patch | 17 +++++++++++++++-- ports/curl/portfile.cmake | 24 +++--------------------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/ports/curl/0020-fix-pc-file.patch b/ports/curl/0020-fix-pc-file.patch index c97abba98f4935..5a1f9ea282d1d7 100644 --- a/ports/curl/0020-fix-pc-file.patch +++ b/ports/curl/0020-fix-pc-file.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index f9a2d73..6ca43f9 100644 +index f9a2d73..62e0b4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1459,7 +1459,7 @@ set(includedir "\${prefix}/include") @@ -11,7 +11,20 @@ index f9a2d73..6ca43f9 100644 if(TARGET "${_lib}") set(_libname "${_lib}") get_target_property(_libtype "${_libname}" TYPE) -@@ -1476,6 +1476,13 @@ foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) +@@ -1470,12 +1470,26 @@ foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) + # this information in the .pc file. + continue() + endif() ++ set(_lib NOTFOUND) ++ if(DEFINED CMAKE_BUILD_TYPE) ++ string(TOUPPER "${CMAKE_BUILD_TYPE}" config) ++ get_target_property(_lib "${_libname}" IMPORTED_LOCATION_${config}) ++ endif() ++ if(NOT _lib) + get_target_property(_lib "${_libname}" LOCATION) ++ endif() + if(NOT _lib) + message(WARNING "Bad lib in library list: ${_libname}") continue() endif() endif() diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 36a4ac594ece3c..f1e62186ebd1f9 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -113,28 +113,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") ) endif() -# Fix the pkgconfig file for debug -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(READ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc" _contents) - string(REPLACE " -lcurl" " -lcurl-d" _contents "${_contents}") - string(REPLACE " -loptimized " " " _contents "${_contents}") - string(REPLACE " -ldebug " " " _contents "${_contents}") - string(REPLACE " ${CURRENT_INSTALLED_DIR}/lib/pthreadVC3.lib" "" _contents "${_contents}") - file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") - file(WRITE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc" "${_contents}") -endif() - -# Fix the pkgconfig file for release -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(READ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc" _contents) - string(REPLACE " -loptimized " " " _contents "${_contents}") - string(REPLACE " -ldebug " " " _contents "${_contents}") - string(REPLACE " ${CURRENT_INSTALLED_DIR}/debug/lib/pthreadVC3d.lib" "" _contents "${_contents}") - file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") - file(WRITE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libcurl.pc" "${_contents}") -endif() - vcpkg_fixup_pkgconfig() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc" " -lcurl" " -lcurl-d") +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) From c2668f69ffa12071b5b420c40dfcf053dc91bcdd Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 15 Jul 2021 08:01:40 +0200 Subject: [PATCH 05/16] Move curl-config to tools, incl. debug variant --- ports/curl/portfile.cmake | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index f1e62186ebd1f9..2c53fdaf9ebd0a 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -89,20 +89,23 @@ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/CURL) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") #Fix install path -file(READ "${CURRENT_PACKAGES_DIR}/bin/curl-config" CURL_CONFIG) -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${prefix}" CURL_CONFIG "${CURL_CONFIG}") -string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${prefix}" CURL_CONFIG "${CURL_CONFIG}") -string(REPLACE "\nprefix=\${prefix}" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../.. && pwd -P)]=] CURL_CONFIG "${CURL_CONFIG}") -file(WRITE "${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURL_CONFIG}") -file(RENAME "${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_PACKAGES_DIR}/share/${PORT}/curl-config") -file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/curl-config") - -file(GLOB FILES "${CURRENT_PACKAGES_DIR}/bin/*") -if(NOT FILES) - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_PACKAGES_DIR}" "\${prefix}") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_INSTALLED_DIR}" "\${prefix}") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/curl-config" "\nprefix=\${prefix}" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../../.. && pwd -P)]=]) +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/curl-config") +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/curl-config") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "${CURRENT_PACKAGES_DIR}" "\${prefix}") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "${CURRENT_INSTALLED_DIR}" "\${prefix}") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "\nprefix=\${prefix}/debug" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../../../.. && pwd -P)]=]) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "-lcurl" "-lcurl-d") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "curl." "curl-d.") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/curl-config") endif() -file(GLOB FILES "${CURRENT_PACKAGES_DIR}/debug/bin/*") -if(NOT FILES) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") endif() From d64d2508256e3eb3f0287b13ddbc751bfe8a7cd7 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Mon, 8 Feb 2021 15:27:07 -0500 Subject: [PATCH 06/16] Update to 7.77.0 --- ports/curl/0002_fix_uwp.patch | 12 ------ ports/curl/0005_remove_imp_suffix.patch | 5 ++- ports/curl/0012-fix-dependency-idn2.patch | 51 ----------------------- ports/curl/portfile.cmake | 7 ++-- ports/curl/vcpkg.json | 3 +- 5 files changed, 7 insertions(+), 71 deletions(-) delete mode 100644 ports/curl/0012-fix-dependency-idn2.patch diff --git a/ports/curl/0002_fix_uwp.patch b/ports/curl/0002_fix_uwp.patch index 5aa451bf401d91..c1572624a3775f 100644 --- a/ports/curl/0002_fix_uwp.patch +++ b/ports/curl/0002_fix_uwp.patch @@ -13,16 +13,4 @@ index 62b7b33..8a4bd71 100644 if(WIN32) add_definitions(-D_USRDLL) endif() -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9e47967..7694f04 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -505,7 +505,7 @@ if(USE_QUICHE) - cmake_pop_check_state() - endif() - --if(WIN32) -+if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(USE_WIN32_CRYPTO ON) - endif() diff --git a/ports/curl/0005_remove_imp_suffix.patch b/ports/curl/0005_remove_imp_suffix.patch index c83a196520a56c..83ec1051336796 100644 --- a/ports/curl/0005_remove_imp_suffix.patch +++ b/ports/curl/0005_remove_imp_suffix.patch @@ -9,5 +9,6 @@ index 1d71e14..62b7b33 100644 -if(WIN32) +if(WIN32 AND 0) if(BUILD_SHARED_LIBS) - # Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib" - set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib") + if(MSVC) + # Add "_imp" as a suffix before the extension to avoid conflicting with + # the statically linked "libcurl.lib" diff --git a/ports/curl/0012-fix-dependency-idn2.patch b/ports/curl/0012-fix-dependency-idn2.patch deleted file mode 100644 index 19d5b12307d36f..00000000000000 --- a/ports/curl/0012-fix-dependency-idn2.patch +++ /dev/null @@ -1,51 +0,0 @@ -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/portfile.cmake b/ports/curl/portfile.cmake index 2c53fdaf9ebd0a..937714ef12675f 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO curl/curl - REF e052859759b34d0e05ce0f17244873e5cd7b457b #curl-7_74_0 - SHA512 3dbbab00dda4f0e7d012fab358d2dd1362ff0c0f59c81f638fb547acba6f74a61c306906892447af3b18e8b0ebb93ebb8e0ac77e92247864bfa3a9c4ce7ea1d0 + REF 6b951a6928811507d493303b2878e848c077b471 #curl-7_77_0 + SHA512 47390ae10116af6697aae1d2e8b517ba478e3ab5a036df0c46653cfba571b21086bf33887768ea7a0764a5ff7c5ba6a303856c55c1b6978d17ef8d39f3bb80f1 HEAD_REF master PATCHES 0002_fix_uwp.patch @@ -12,7 +12,6 @@ vcpkg_from_github( 0007_disable_tool_export_curl_target.patch 0010_fix_othertests_cmake.patch 0011_fix_static_build.patch - 0012-fix-dependency-idn2.patch 0020-fix-pc-file.patch ) @@ -42,7 +41,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS brotli CURL_BROTLI schannel CMAKE_USE_SCHANNEL sectransp CMAKE_USE_SECTRANSP - idn2 CMAKE_USE_IDN2 + idn2 USE_LIBIDN2 INVERTED_FEATURES non-http HTTP_ONLY diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json index c76b3727b5cf94..4766edc35fb887 100644 --- a/ports/curl/vcpkg.json +++ b/ports/curl/vcpkg.json @@ -1,7 +1,6 @@ { "name": "curl", - "version": "7.74.0", - "port-version": 8, + "version": "7.77.0", "description": "A library for transferring data with URLs", "homepage": "https://github.com/curl/curl", "dependencies": [ From a8cd2bcd8cda68c37b3d4763bb241a7e16c15959 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Mon, 19 Jul 2021 21:47:39 +0200 Subject: [PATCH 07/16] Add WinIDN support and default IDN selection --- ports/curl/0021-normaliz.patch | 13 +++++++++++++ ports/curl/portfile.cmake | 6 ++++++ ports/curl/vcpkg.json | 24 ++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 ports/curl/0021-normaliz.patch diff --git a/ports/curl/0021-normaliz.patch b/ports/curl/0021-normaliz.patch new file mode 100644 index 00000000000000..ca331cf9afdfac --- /dev/null +++ b/ports/curl/0021-normaliz.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6d209be..9f6de81 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -638,7 +638,7 @@ endif() + if(WIN32) + option(USE_WIN32_IDN "Use WinIDN for IDN support" OFF) + if(USE_WIN32_IDN) +- list(APPEND CURL_LIBS "Normaliz") ++ list(APPEND CURL_LIBS "normaliz") + set(WANT_IDN_PROTOTYPES ON) + endif() + endif() diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 937714ef12675f..ed3c4dfa3d3cd7 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_from_github( 0010_fix_othertests_cmake.patch 0011_fix_static_build.patch 0020-fix-pc-file.patch + 0021-normaliz.patch # for mingw on case-sensitive file system ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) @@ -28,6 +29,10 @@ if("sectransp" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_OSX) message(FATAL_ERROR "sectransp is not supported on non-Apple platforms") endif() +if("winidn" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature winidn is not supported on non-Windows platforms.") +endif() + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES # Support HTTP2 TLS Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location. @@ -42,6 +47,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS schannel CMAKE_USE_SCHANNEL sectransp CMAKE_USE_SECTRANSP idn2 USE_LIBIDN2 + winidn USE_WIN32_IDN INVERTED_FEATURES non-http HTTP_ONLY diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json index 4766edc35fb887..8a3175445c02a1 100644 --- a/ports/curl/vcpkg.json +++ b/ports/curl/vcpkg.json @@ -44,6 +44,27 @@ "nghttp2" ] }, + "idn": { + "description": "Default IDN support", + "dependencies": [ + { + "name": "curl", + "default-features": false, + "features": [ + "winidn" + ], + "platform": "windows" + }, + { + "name": "curl", + "default-features": false, + "features": [ + "idn2" + ], + "platform": "!windows" + } + ] + }, "idn2": { "description": "idn2 support (libidn2)", "dependencies": [ @@ -135,6 +156,9 @@ "tool": { "description": "Builds curl executable" }, + "winidn": { + "description": "WinIDN support" + }, "winssl": { "description": "Legacy name for schannel", "dependencies": [ From 89ad5a51b00882a84b135a3039f5a7c2025ff703 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Mon, 19 Jul 2021 21:41:01 +0200 Subject: [PATCH 08/16] Use pkgconfig for libidn2 configuration --- ports/curl/0012-fix-dependency-idn2.patch | 14 ++++++++++++++ ports/curl/portfile.cmake | 13 +++++++++++++ ports/curl/vcpkg.json | 6 +++++- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 ports/curl/0012-fix-dependency-idn2.patch diff --git a/ports/curl/0012-fix-dependency-idn2.patch b/ports/curl/0012-fix-dependency-idn2.patch new file mode 100644 index 00000000000000..9388f91a0b2497 --- /dev/null +++ b/ports/curl/0012-fix-dependency-idn2.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9f6de81..6702845 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -632,6 +632,9 @@ endif() + option(USE_LIBIDN2 "Use libidn2 for IDN support" ON) + set(HAVE_LIBIDN2 OFF) + if(USE_LIBIDN2) ++ set(HAVE_LIBIDN2 TRUE) ++ list(APPEND CURL_LIBS ${LIBIDN2_LIBRARIES}) ++elseif(0) + check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2) + endif() + diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index ed3c4dfa3d3cd7..6e1ff5fce674dd 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_from_github( 0007_disable_tool_export_curl_target.patch 0010_fix_othertests_cmake.patch 0011_fix_static_build.patch + 0012-fix-dependency-idn2.patch 0020-fix-pc-file.patch 0021-normaliz.patch # for mingw on case-sensitive file system ) @@ -53,6 +54,14 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS non-http HTTP_ONLY ) +set(OPTIONS_RELEASE "") +set(OPTIONS_DEBUG "") +if("idn2" IN_LIST FEATURES) + x_vcpkg_pkgconfig_get_modules(PREFIX libidn2 MODULES libidn2 LIBS) + list(APPEND OPTIONS_RELEASE "-DLIBIDN2_LIBRARIES=${libidn2_LIBS_RELEASE}") + list(APPEND OPTIONS_DEBUG "-DLIBIDN2_LIBRARIES=${libidn2_LIBS_DEBUG}") +endif() + set(SECTRANSP_OPTIONS "") if("sectransp" IN_LIST FEATURES) set(SECTRANSP_OPTIONS -DCURL_CA_PATH=none) @@ -81,6 +90,10 @@ vcpkg_cmake_configure( -DCMAKE_DISABLE_FIND_PACKAGE_Perl=ON -DENABLE_DEBUG=ON -DCURL_CA_FALLBACK=ON + OPTIONS_RELEASE + ${OPTIONS_RELEASE} + OPTIONS_DEBUG + ${OPTIONS_DEBUG} ) vcpkg_cmake_install() vcpkg_copy_pdbs() diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json index 8a3175445c02a1..7e7cb03bd4fe65 100644 --- a/ports/curl/vcpkg.json +++ b/ports/curl/vcpkg.json @@ -68,7 +68,11 @@ "idn2": { "description": "idn2 support (libidn2)", "dependencies": [ - "libidn2" + "libidn2", + { + "name": "vcpkg-pkgconfig-get-modules", + "host": true + } ] }, "mbedtls": { From b7c71e6a61cc6896ff1e8977b14e562794ea32a0 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 28 Jul 2021 09:46:45 +0200 Subject: [PATCH 09/16] Update to 0.78.0 --- ports/curl/portfile.cmake | 4 ++-- ports/curl/vcpkg.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 6e1ff5fce674dd..d2d1a852c0ce32 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO curl/curl - REF 6b951a6928811507d493303b2878e848c077b471 #curl-7_77_0 - SHA512 47390ae10116af6697aae1d2e8b517ba478e3ab5a036df0c46653cfba571b21086bf33887768ea7a0764a5ff7c5ba6a303856c55c1b6978d17ef8d39f3bb80f1 + REF bfbde883af33397943df68a3ae01847a634d33bf #curl-7_78_0 + SHA512 72c2d0daedbd1e0610f507f637c5725cb0769befe5205f613260217b692e27ec135711974f85660f863a49b415c1457d2d29960158758e232caa89f972f7045e HEAD_REF master PATCHES 0002_fix_uwp.patch diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json index 7e7cb03bd4fe65..9af92cf82b3c13 100644 --- a/ports/curl/vcpkg.json +++ b/ports/curl/vcpkg.json @@ -1,6 +1,6 @@ { "name": "curl", - "version": "7.77.0", + "version": "7.78.0", "description": "A library for transferring data with URLs", "homepage": "https://github.com/curl/curl", "dependencies": [ From c731965050ffcb5b218c88da43e11d899421a8e3 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 28 Jul 2021 18:07:35 +0200 Subject: [PATCH 10/16] Remove obsolete nghttp2 staticlib patch --- ports/curl/0004_nghttp2_staticlib.patch | 14 -------------- ports/curl/portfile.cmake | 1 - 2 files changed, 15 deletions(-) delete mode 100644 ports/curl/0004_nghttp2_staticlib.patch diff --git a/ports/curl/0004_nghttp2_staticlib.patch b/ports/curl/0004_nghttp2_staticlib.patch deleted file mode 100644 index 4bd6e4afdd77f0..00000000000000 --- a/ports/curl/0004_nghttp2_staticlib.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 5a13333..2dd274c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -431,6 +431,9 @@ if(USE_NGHTTP2) - find_package(NGHTTP2 REQUIRED) - include_directories(${NGHTTP2_INCLUDE_DIRS}) - list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES}) -+ if(NOT BUILD_SHARED_LIBS) -+ add_definitions(-DNGHTTP2_STATICLIB) -+ endif() - endif() - - function(CheckQuicSupportInOpenSSL) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index d2d1a852c0ce32..bd0b731729beb7 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -6,7 +6,6 @@ vcpkg_from_github( HEAD_REF master PATCHES 0002_fix_uwp.patch - 0004_nghttp2_staticlib.patch 0005_remove_imp_suffix.patch 0006_fix_tool_depends.patch 0007_disable_tool_export_curl_target.patch From a3f10af5e3887bc35de91ab09dbbe87ffe7895ae Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Fri, 30 Jul 2021 06:00:04 +0200 Subject: [PATCH 11/16] Fix libs duplication in pc file --- ports/curl/0022-deduplicate-libs.patch | 25 +++++++++++++++++++++++++ ports/curl/portfile.cmake | 1 + 2 files changed, 26 insertions(+) create mode 100644 ports/curl/0022-deduplicate-libs.patch diff --git a/ports/curl/0022-deduplicate-libs.patch b/ports/curl/0022-deduplicate-libs.patch new file mode 100644 index 00000000000000..bd027d4cb41442 --- /dev/null +++ b/ports/curl/0022-deduplicate-libs.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 09d82f1..f0d99e6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1507,6 +1507,7 @@ else() + set(ENABLE_SHARED "no") + set(ENABLE_STATIC "yes") + set(LIBCURL_NO_SHARED "${LIBCURL_LIBS}") ++ set(LIBCURL_LIBS "") + endif() + # "a" (Linux) or "lib" (Windows) + string(REPLACE "." "" libext "${CMAKE_STATIC_LIBRARY_SUFFIX}") +diff --git a/curl-config.in b/curl-config.in +index 8b4a29a..e756ae8 100644 +--- a/curl-config.in ++++ b/curl-config.in +@@ -172,7 +172,7 @@ while test $# -gt 0; do + + --static-libs) + if test "X@ENABLE_STATIC@" != "Xno" ; then +- echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ ++ echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_NO_SHARED@ + else + echo "curl was built with static libraries disabled" >&2 + exit 1 diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index bd0b731729beb7..ccdadf1604a1b1 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -14,6 +14,7 @@ vcpkg_from_github( 0012-fix-dependency-idn2.patch 0020-fix-pc-file.patch 0021-normaliz.patch # for mingw on case-sensitive file system + 0022-deduplicate-libs.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) From 2bae8fa55220b4ae689fcd9d9bbdeed20ddb3109 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Fri, 30 Jul 2021 22:38:58 +0200 Subject: [PATCH 12/16] Resolve transitive deps for pc file/curl-config --- ports/curl/0020-fix-pc-file.patch | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/ports/curl/0020-fix-pc-file.patch b/ports/curl/0020-fix-pc-file.patch index 5a1f9ea282d1d7..c9967ac2c22c92 100644 --- a/ports/curl/0020-fix-pc-file.patch +++ b/ports/curl/0020-fix-pc-file.patch @@ -1,17 +1,36 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index f9a2d73..62e0b4d 100644 +index 8b2e428..ea430f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1459,7 +1459,7 @@ set(includedir "\${prefix}/include") +@@ -1462,7 +1462,26 @@ set(includedir "\${prefix}/include") set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}") set(LIBCURL_LIBS "") set(libdir "${CMAKE_INSTALL_PREFIX}/lib") -foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) -+foreach(_lib ${CURL_LIBS}) ++function(flatten input output) ++ set(output_libs "${${output}}") ++ set(input_libs "${${input}}") ++ while(input_libs) ++ list(POP_BACK input_libs lib) ++ if(NOT "${lib}" IN_LIST output_libs) ++ if(TARGET "${lib}") ++ get_target_property(link_libs "${lib}" INTERFACE_LINK_LIBRARIES) ++ if(link_libs) ++ flatten(link_libs output_libs) ++ endif() ++ endif() ++ list(PREPEND output_libs "${lib}") ++ endif() ++ endwhile() ++ set("${output}" "${output_libs}" PARENT_SCOPE) ++endfunction() ++set(CURL_LIBS_FLAT "") ++flatten(CURL_LIBS CURL_LIBS_FLAT) ++foreach(_lib ${CURL_LIBS_FLAT}) if(TARGET "${_lib}") set(_libname "${_lib}") get_target_property(_libtype "${_libname}" TYPE) -@@ -1470,12 +1470,26 @@ foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) +@@ -1473,12 +1492,26 @@ foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) # this information in the .pc file. continue() endif() From dd030e3f9d55e84550bdd71399eb9bc8bb2c98ed Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Fri, 30 Jul 2021 06:00:50 +0200 Subject: [PATCH 13/16] x-add-version --- versions/baseline.json | 4 ++-- versions/c-/curl.json | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 2b77f92ecbdb86..82dbc85b20df1b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1573,8 +1573,8 @@ "port-version": 0 }, "curl": { - "baseline": "7.74.0", - "port-version": 8 + "baseline": "7.78.0", + "port-version": 0 }, "curlpp": { "baseline": "2018-06-15-3", diff --git a/versions/c-/curl.json b/versions/c-/curl.json index e0b511bb645e8b..e7585a9ea97b17 100644 --- a/versions/c-/curl.json +++ b/versions/c-/curl.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3b222f10416598923412d2b0c46fd604c724bc64", + "version": "7.78.0", + "port-version": 0 + }, { "git-tree": "cd05855cc1cd2d0f221664f0bfbe639b685fa028", "version": "7.74.0", From 0192cadd19194bb0c8cc27ba64d29bf892e27904 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 4 Aug 2021 12:26:08 +0200 Subject: [PATCH 14/16] Fix winssl dependencies --- ports/curl/vcpkg.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json index 9af92cf82b3c13..ae7ce5cca123df 100644 --- a/ports/curl/vcpkg.json +++ b/ports/curl/vcpkg.json @@ -140,7 +140,7 @@ "name": "curl", "default-features": false, "features": [ - "winssl" + "schannel" ], "platform": "(windows & !uwp) | mingw" }, @@ -168,6 +168,7 @@ "dependencies": [ { "name": "curl", + "default-features": false, "features": [ "schannel" ] From 95eaf4ef19784783e2ea2b6d6cc2555f7c6600c0 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 5 Aug 2021 07:30:49 +0200 Subject: [PATCH 15/16] Add winldap feature, not default --- ports/curl/portfile.cmake | 14 ++++++++------ ports/curl/vcpkg.json | 12 ++++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index ccdadf1604a1b1..8080bda06effb9 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -20,7 +20,7 @@ vcpkg_from_github( string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) # schannel will enable sspi, but sspi do not support uwp -foreach(feature IN ITEMS "schannel" "sspi" "tool") +foreach(feature IN ITEMS "schannel" "sspi" "tool" "winldap") if(feature IN_LIST FEATURES AND VCPKG_TARGET_IS_UWP) message(FATAL_ERROR "Feature ${feature} is not supported on UWP.") endif() @@ -30,9 +30,11 @@ if("sectransp" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_OSX) message(FATAL_ERROR "sectransp is not supported on non-Apple platforms") endif() -if("winidn" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) - message(FATAL_ERROR "Feature winidn is not supported on non-Windows platforms.") -endif() +foreach(feature IN ITEMS "winldap" "winidn") + if(feature IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature ${feature} is not supported on non-Windows platforms.") + endif() +endforeach() vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES @@ -49,9 +51,10 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS sectransp CMAKE_USE_SECTRANSP idn2 USE_LIBIDN2 winidn USE_WIN32_IDN - + winldap USE_WIN32_LDAP INVERTED_FEATURES non-http HTTP_ONLY + winldap CURL_DISABLE_LDAP # Only WinLDAP support ATM ) set(OPTIONS_RELEASE "") @@ -71,7 +74,6 @@ endif() set(UWP_OPTIONS "") if(VCPKG_TARGET_IS_UWP) set(UWP_OPTIONS - -DUSE_WIN32_LDAP=OFF -DCURL_DISABLE_TELNET=ON -DENABLE_IPV6=OFF -DENABLE_UNIX_SOCKETS=OFF diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json index ae7ce5cca123df..281d77f4fba904 100644 --- a/ports/curl/vcpkg.json +++ b/ports/curl/vcpkg.json @@ -163,6 +163,18 @@ "winidn": { "description": "WinIDN support" }, + "winldap": { + "description": "LDAP support (WinLDAP). This feature does not include LDAPS support.", + "dependencies": [ + { + "name": "curl", + "default-features": false, + "features": [ + "non-http" + ] + } + ] + }, "winssl": { "description": "Legacy name for schannel", "dependencies": [ From b4035ccbfdd6744cdbb9f29453afe42a064a5315 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 5 Aug 2021 08:09:19 +0200 Subject: [PATCH 16/16] Update git-tree --- versions/c-/curl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/c-/curl.json b/versions/c-/curl.json index e7585a9ea97b17..7c9b97571943f5 100644 --- a/versions/c-/curl.json +++ b/versions/c-/curl.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "3b222f10416598923412d2b0c46fd604c724bc64", + "git-tree": "0be4cff4d8e1d37a9ddf9ab264682771c69c0d72", "version": "7.78.0", "port-version": 0 },