diff --git a/cmake/Options/TileDBToolchain.cmake b/cmake/Options/TileDBToolchain.cmake index c68053f5d42..f6ca3e16c70 100644 --- a/cmake/Options/TileDBToolchain.cmake +++ b/cmake/Options/TileDBToolchain.cmake @@ -20,7 +20,7 @@ if (NOT DEFINED CMAKE_TOOLCHAIN_FILE) # Inspired from https://github.com/Azure/azure-sdk-for-cpp/blob/azure-core_1.10.3/cmake-modules/AzureVcpkg.cmake message("TILEDB_DISABLE_AUTO_VCPKG is not defined. Fetch a local copy of vcpkg.") # To help with resolving conflicts, when you update the commit, also update its date. - set(VCPKG_COMMIT_STRING 1b4d69f3028d74401a001aa316986a670ca6289a) # 2023-09-27 + set(VCPKG_COMMIT_STRING ac2a14f35fcd57d7a38f09af75dd5258e96dd6ac) # 2023-11-16 message("Vcpkg commit string used: ${VCPKG_COMMIT_STRING}") include(FetchContent) FetchContent_Declare( diff --git a/ports/curl/0002_fix_uwp.patch b/ports/curl/0002_fix_uwp.patch deleted file mode 100644 index 71f1d83c948..00000000000 --- a/ports/curl/0002_fix_uwp.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index 8cea346c3..967312905 100644 ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -118,6 +118,10 @@ if(CURL_HAS_LTO) - INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE) - endif() - -+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -+ set_property(TARGET ${LIB_NAME} APPEND PROPERTY COMPILE_DEFINITIONS "_WINSOCK_DEPRECATED_NO_WARNINGS") -+endif() -+ - if(WIN32) - if(BUILD_SHARED_LIBS) - if(MSVC) diff --git a/ports/curl/0005_remove_imp_suffix.patch b/ports/curl/0005_remove_imp_suffix.patch deleted file mode 100644 index e52da2585b6..00000000000 --- a/ports/curl/0005_remove_imp_suffix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index 1d71e14..62b7b33 100644 ---- a/lib/CMakeLists.txt -+++ b/lib/CMakeLists.txt -@@ -125,7 +125,6 @@ if(WIN32) - if(MSVC) - # 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") - endif() - endif() - endif() diff --git a/ports/curl/0012-fix-dependency-idn2.patch b/ports/curl/0012-fix-dependency-idn2.patch deleted file mode 100644 index 9db27979e1a..00000000000 --- a/ports/curl/0012-fix-dependency-idn2.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9f6de81..6702845 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -632,6 +632,7 @@ endif() - # Check for idn2 - option(USE_LIBIDN2 "Use libidn2 for IDN support" ON) - if(USE_LIBIDN2) -- check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2) -+ set(HAVE_LIBIDN2 TRUE) -+ list(INSERT CURL_LIBS 0 ${LIBIDN2_LINK_LIBRARIES}) - else() - set(HAVE_LIBIDN2 OFF) - endif() diff --git a/ports/curl/0020-fix-pc-file.patch b/ports/curl/0020-fix-pc-file.patch deleted file mode 100644 index 21eab0933ba..00000000000 --- a/ports/curl/0020-fix-pc-file.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8b2e428..ea430f4 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1505,7 +1505,9 @@ 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}) -+set(CURL_LIBS_FLAT "") -+vcpkg_curl_flatten(CURL_LIBS CURL_LIBS_FLAT) -+foreach(_lib ${CURL_LIBS_FLAT}) - if(TARGET "${_lib}") - set(_libname "${_lib}") - get_target_property(_imported "${_libname}" IMPORTED) diff --git a/ports/curl/0022-deduplicate-libs.patch b/ports/curl/0022-deduplicate-libs.patch deleted file mode 100644 index 16cc0498a3b..00000000000 --- a/ports/curl/0022-deduplicate-libs.patch +++ /dev/null @@ -1,12 +0,0 @@ -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/ports/curl/0023-fix-find-cares.patch b/ports/curl/0023-fix-find-cares.patch deleted file mode 100644 index 4aa11acfa1c..00000000000 --- a/ports/curl/0023-fix-find-cares.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/CMake/curl-config.cmake.in b/CMake/curl-config.cmake.in -index 496a92d0e..564415ef6 100644 ---- a/CMake/curl-config.cmake.in -+++ b/CMake/curl-config.cmake.in -@@ -30,6 +30,9 @@ endif() - if(@USE_ZLIB@) - find_dependency(ZLIB @ZLIB_VERSION_MAJOR@) - endif() -+if(@USE_ARES@) -+ find_dependency(c-ares) -+endif() - - include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") - check_required_components("@PROJECT_NAME@") -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b43520751..dbf62751f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -169,8 +169,8 @@ set(CURL_LIBS "") - - if(ENABLE_ARES) - set(USE_ARES 1) -- find_package(CARES REQUIRED) -- list(APPEND CURL_LIBS ${CARES_LIBRARY}) -+ find_package(c-ares CONFIG REQUIRED) -+ list(APPEND CURL_LIBS c-ares::cares) - endif() - - include(CurlSymbolHiding) diff --git a/ports/curl/CVE-2023-38545_7.87.0.patch b/ports/curl/CVE-2023-38545_7.87.0.patch deleted file mode 100644 index c15c273ea41..00000000000 --- a/ports/curl/CVE-2023-38545_7.87.0.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 92fd36dd54de9ac845549944692eb33c5aee7343 Mon Sep 17 00:00:00 2001 -From: Jay Satiro -Date: Mon, 9 Oct 2023 17:15:44 -0400 -Subject: [PATCH] socks: return error if hostname too long for remote resolve - -Prior to this change the state machine attempted to change the remote -resolve to a local resolve if the hostname was longer than 255 -characters. Unfortunately that did not work as intended and caused a -security issue. - -This patch applies to curl versions 7.87.0 - 8.1.2. Other versions -that are affected take a different patch. Refer to the CVE advisory -for more information. - -Bug: https://curl.se/docs/CVE-2023-38545.html ---- - lib/socks.c | 8 +++---- - tests/data/Makefile.inc | 2 +- - tests/data/test728 | 64 +++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 69 insertions(+), 5 deletions(-) - create mode 100644 tests/data/test728 - -diff --git a/lib/socks.c b/lib/socks.c -index d491e08..e7da5b4 100644 ---- a/lib/socks.c -+++ b/lib/socks.c -@@ -539,9 +539,9 @@ static CURLproxycode do_SOCKS5(struct Curl_cfilter *cf, - - /* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */ - if(!socks5_resolve_local && hostname_len > 255) { -- infof(data, "SOCKS5: server resolving disabled for hostnames of " -- "length > 255 [actual len=%zu]", hostname_len); -- socks5_resolve_local = TRUE; -+ failf(data, "SOCKS5: the destination hostname is too long to be " -+ "resolved remotely by the proxy."); -+ return CURLPX_LONG_HOSTNAME; - } - - if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI)) -@@ -882,7 +882,7 @@ static CURLproxycode do_SOCKS5(struct Curl_cfilter *cf, - } - else { - socksreq[len++] = 3; -- socksreq[len++] = (char) hostname_len; /* one byte address length */ -+ socksreq[len++] = (unsigned char) hostname_len; /* one byte length */ - memcpy(&socksreq[len], sx->hostname, hostname_len); /* w/o NULL */ - len += hostname_len; - } -diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc -index 3e0221a..64b11de 100644 ---- a/tests/data/Makefile.inc -+++ b/tests/data/Makefile.inc -@@ -99,7 +99,7 @@ test679 test680 test681 test682 test683 test684 test685 \ - \ - test700 test701 test702 test703 test704 test705 test706 test707 test708 \ - test709 test710 test711 test712 test713 test714 test715 test716 test717 \ --test718 test719 test720 test721 \ -+test718 test719 test720 test721 test728 \ - \ - test800 test801 test802 test803 test804 test805 test806 test807 test808 \ - test809 test810 test811 test812 test813 test814 test815 test816 test817 \ -diff --git a/tests/data/test728 b/tests/data/test728 -new file mode 100644 -index 0000000..05bcf28 ---- /dev/null -+++ b/tests/data/test728 -@@ -0,0 +1,64 @@ -+ -+ -+ -+HTTP -+HTTP GET -+SOCKS5 -+SOCKS5h -+followlocation -+ -+ -+ -+# -+# Server-side -+ -+# The hostname in this redirect is 256 characters and too long (> 255) for -+# SOCKS5 remote resolve. curl must return error CURLE_PROXY in this case. -+ -+HTTP/1.1 301 Moved Permanently -+Location: http://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/ -+Content-Length: 0 -+Connection: close -+ -+ -+ -+ -+# -+# Client-side -+ -+ -+proxy -+ -+ -+http -+socks5 -+ -+ -+SOCKS5h with HTTP redirect to hostname too long -+ -+ -+--no-progress-meter --location --proxy socks5h://%HOSTIP:%SOCKSPORT http://%HOSTIP:%HTTPPORT/%TESTNUMBER -+ -+ -+ -+# -+# Verify data after the test has been "shot" -+ -+ -+GET /%TESTNUMBER HTTP/1.1 -+Host: %HOSTIP:%HTTPPORT -+User-Agent: curl/%VERSION -+Accept: */* -+ -+ -+ -+97 -+ -+# the error message is verified because error code CURLE_PROXY (97) may be -+# returned for any number of reasons and we need to make sure it is -+# specifically for the reason below so that we know the check is working. -+ -+curl: (97) SOCKS5: the destination hostname is too long to be resolved remotely by the proxy. -+ -+ -+ --- -2.7.4 - diff --git a/ports/curl/cmake-project-include.cmake b/ports/curl/cmake-project-include.cmake deleted file mode 100644 index 27254864c20..00000000000 --- a/ports/curl/cmake-project-include.cmake +++ /dev/null @@ -1,82 +0,0 @@ -# Process the libs and targets in the variable named by `input` -# into a flat list of libs in the variable named by `output`. -# Simplify -framework elements. -# Use -l where possible. -# Avoid duplicates. -function(vcpkg_curl_flatten input output) - set(output_libs "${${output}}") - if(CMAKE_BUILD_TYPE STREQUAL "Debug") - string(REGEX REPLACE ";optimized;[^;]*|;debug" "" input_libs "VCPKG;${${input}}") - else() - string(REGEX REPLACE ";debug;[^;]*|;optimized" "" input_libs "VCPKG;${${input}}") - endif() - list(REMOVE_AT input_libs 0) - while(input_libs) - list(POP_BACK input_libs lib) - if(TARGET "${lib}") - set(import_lib "") - set(import_location "") - get_target_property(type "${lib}" TYPE) - if(NOT type STREQUAL "INTERFACE_LIBRARY") - if(CMAKE_BUILD_TYPE STREQUAL "Debug") - get_target_property(link_libs "${lib}" IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG) - get_target_property(import_lib "${lib}" IMPORTED_IMPLIB_DEBUG) - get_target_property(import_location "${lib}" IMPORTED_LOCATION_DEBUG) - else() - get_target_property(link_libs "${lib}" IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE) - get_target_property(import_lib "${lib}" IMPORTED_IMPLIB_RELEASE) - get_target_property(import_location "${lib}" IMPORTED_LOCATION_RELEASE) - endif() - if(link_libs) - vcpkg_curl_flatten(link_libs output_libs) - endif() - get_target_property(link_libs "${lib}" IMPORTED_LINK_INTERFACE_LIBRARIES) - if(link_libs) - vcpkg_curl_flatten(link_libs output_libs) - endif() - if(NOT import_lib) - get_target_property(import_lib "${lib}" IMPORTED_IMPLIB) - endif() - if(NOT import_location) - get_target_property(import_location "${lib}" IMPORTED_LOCATION) - endif() - endif() - get_target_property(link_libs "${lib}" INTERFACE_LINK_LIBRARIES) - if(link_libs) - vcpkg_curl_flatten(link_libs output_libs) - endif() - if(import_lib) - set(lib "${import_lib}") - elseif(import_location) - set(lib "${import_location}") - endif() - 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() - elseif(WIN32 AND lib MATCHES ".*/${CMAKE_IMPORT_LIBRARY_PREFIX}([^/]*)${CMAKE_IMPORT_LIBRARY_SUFFIX}") - set(lib -l${CMAKE_MATCH_1}) - elseif(lib MATCHES ".*/${CMAKE_STATIC_LIBRARY_PREFIX}([^/]*)${CMAKE_STATIC_LIBRARY_SUFFIX}") - set(lib -l${CMAKE_MATCH_1}) - endif() - if(NOT "${lib}" IN_LIST output_libs) - list(PREPEND output_libs "${lib}") - endif() - endwhile() - set("${output}" "${output_libs}" PARENT_SCOPE) -endfunction() - -if(CURL_USE_LIBSSH2) - find_package(Libssh2 CONFIG REQUIRED) - set(LIBSSH2_FOUND TRUE) - get_target_property(LIBSSH2_INCLUDE_DIR Libssh2::libssh2 INTERFACE_INCLUDE_DIRECTORIES) - set(LIBSSH2_LIBRARY Libssh2::libssh2) -endif() - -if(USE_LIBIDN2) - find_package(PkgConfig REQUIRED) - pkg_check_modules(LIBIDN2 REQUIRED libidn2) -endif() diff --git a/ports/curl/export-components.patch b/ports/curl/export-components.patch deleted file mode 100644 index 1a727e5deac..00000000000 --- a/ports/curl/export-components.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 874a237..3974956 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1617,8 +1617,17 @@ if(CURL_ENABLE_EXPORT_TARGET) - ) - endif() - -+set(components_file "${CMAKE_CURRENT_BINARY_DIR}/CURLConfigComponents.cmake") -+file(CONFIGURE OUTPUT "${components_file}" CONTENT [[ -+foreach(z_vcpkg_curl_component IN ITEMS @SUPPORT_FEATURES@ @SUPPORT_PROTOCOLS@) -+ if(z_vcpkg_curl_component MATCHES "^[-_a-zA-Z0-9]*$") -+ set(CURL_${z_vcpkg_curl_component}_FOUND TRUE) -+ endif() -+endforeach() -+]] @ONLY) -+ - install( -- FILES ${version_config} ${project_config} -+ FILES ${version_config} ${project_config} ${components_file} - DESTINATION ${CURL_INSTALL_CMAKE_DIR} - ) - diff --git a/ports/curl/mbedtls-ws2_32.patch b/ports/curl/mbedtls-ws2_32.patch deleted file mode 100644 index 37e4f18c94e..00000000000 --- a/ports/curl/mbedtls-ws2_32.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMake/FindMbedTLS.cmake b/CMake/FindMbedTLS.cmake -index 7bdb197..c8c5a73 100644 ---- a/CMake/FindMbedTLS.cmake -+++ b/CMake/FindMbedTLS.cmake -@@ -26,6 +26,9 @@ find_library(MBEDX509_LIBRARY mbedx509) - find_library(MBEDCRYPTO_LIBRARY mbedcrypto) - - set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}") -+if(WIN32) -+ list(APPEND MBEDTLS_LIBRARIES ws2_32) -+endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(MbedTLS DEFAULT_MSG diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake deleted file mode 100644 index 2492fbb10e8..00000000000 --- a/ports/curl/portfile.cmake +++ /dev/null @@ -1,129 +0,0 @@ -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO curl/curl - REF curl-7_88_1 - SHA512 c5caa1f95580ddbf2041c9c4b885f84d4f5c5fcb905a5ea59f9dbb58a98fc292260f95cb935e963bf83d7dcecf98561deef5ce3ff91cdcb29a080559cff0ed64 - HEAD_REF master - PATCHES - 0002_fix_uwp.patch - 0005_remove_imp_suffix.patch - 0012-fix-dependency-idn2.patch - 0020-fix-pc-file.patch - 0022-deduplicate-libs.patch - mbedtls-ws2_32.patch - export-components.patch - 0023-fix-find-cares.patch - CVE-2023-38545_7.87.0.patch -) - -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 - wolfssl CURL_USE_WOLFSSL - openssl CURL_USE_OPENSSL - mbedtls CURL_USE_MBEDTLS - ssh CURL_USE_LIBSSH2 - tool BUILD_CURL_EXE - c-ares ENABLE_ARES - sspi CURL_WINDOWS_SSPI - brotli CURL_BROTLI - schannel CURL_USE_SCHANNEL - sectransp CURL_USE_SECTRANSP - idn2 USE_LIBIDN2 - winidn USE_WIN32_IDN - winldap USE_WIN32_LDAP - websockets ENABLE_WEBSOCKETS - zstd CURL_ZSTD - INVERTED_FEATURES - non-http HTTP_ONLY - winldap CURL_DISABLE_LDAP # Only WinLDAP support ATM -) - -set(OPTIONS "") -if("idn2" IN_LIST FEATURES) - vcpkg_find_acquire_program(PKGCONFIG) - list(APPEND OPTIONS "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}") -endif() - -if("sectransp" IN_LIST FEATURES) - list(APPEND OPTIONS -DCURL_CA_PATH=none -DCURL_CA_BUNDLE=none) -endif() - -# UWP targets -if(VCPKG_TARGET_IS_UWP) - list(APPEND OPTIONS - -DCURL_DISABLE_TELNET=ON - -DENABLE_IPV6=OFF - -DENABLE_UNIX_SOCKETS=OFF - ) -endif() - -if(VCPKG_TARGET_IS_WINDOWS) - list(APPEND OPTIONS -DENABLE_UNICODE=ON) -endif() - -vcpkg_cmake_configure( - SOURCE_PATH "${SOURCE_PATH}" - OPTIONS - "-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake" - ${FEATURE_OPTIONS} - ${OPTIONS} - -DBUILD_TESTING=OFF - -DENABLE_MANUAL=OFF - -DCURL_CA_FALLBACK=ON - -DCURL_USE_LIBPSL=OFF - OPTIONS_DEBUG - -DENABLE_DEBUG=ON -) -vcpkg_cmake_install() -vcpkg_copy_pdbs() - -if ("tool" IN_LIST FEATURES) - vcpkg_copy_tools(TOOL_NAMES curl AUTO_CLEAN) -endif() - -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/CURL) - -vcpkg_fixup_pkgconfig() -set(namespec "curl") -if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) - set(namespec "libcurl") - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libcurl.pc" " -lcurl" " -l${namespec}") -endif() -if(NOT DEFINED VCPKG_BUILD_TYPE) - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc" " -lcurl" " -l${namespec}-d") -endif() - -#Fix install path -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" "-l${namespec}-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(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -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() - -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/curl/curl.h" - "#ifdef CURL_STATICLIB" - "#if 1" - ) -endif() - -file(INSTALL "${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") -vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/ports/curl/vcpkg-cmake-wrapper.cmake b/ports/curl/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index c74dc2fb03f..00000000000 --- a/ports/curl/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,68 +0,0 @@ -cmake_policy(PUSH) -cmake_policy(SET CMP0012 NEW) -cmake_policy(SET CMP0054 NEW) -cmake_policy(SET CMP0057 NEW) - -if(NOT CMAKE_VERSION VERSION_LESS 3.14 AND COMPONENTS IN_LIST ARGS) - include("${CMAKE_CURRENT_LIST_DIR}/CURLConfigComponents.cmake") -endif() - -list(REMOVE_ITEM ARGS "NO_MODULE" "CONFIG" "MODULE") -_find_package(${ARGS} CONFIG) - -if(CURL_FOUND) - include("${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake") - - get_target_property(_curl_include_dirs CURL::libcurl INTERFACE_INCLUDE_DIRECTORIES) - get_target_property(_curl_link_libraries CURL::libcurl INTERFACE_LINK_LIBRARIES) - if(NOT _curl_link_libraries) - set(_curl_link_libraries "") - endif() - if(_curl_link_libraries MATCHES "ZLIB::ZLIB") - string(REGEX REPLACE "([\$]<[^;]*)?ZLIB::ZLIB([^;]*>)?" "${ZLIB_LIBRARIES}" _curl_link_libraries "${_curl_link_libraries}") - endif() - if(_curl_link_libraries MATCHES "OpenSSL::") - string(REGEX REPLACE "([\$]<[^;]*)?OpenSSL::(SSL|Crypto)([^;]*>)?" "${OPENSSL_LIBRARIES}" _curl_link_libraries "${_curl_link_libraries}") - endif() - if(_curl_link_libraries MATCHES "Libssh2::libssh2") - # TODO: move find_dependency(Libssh2 CONFIG) into CURL config - find_package(Libssh2 CONFIG QUIET) - get_target_property(_libssh2_LIBRARY_DEBUG Libssh2::libssh2 IMPORTED_IMPLIB_DEBUG) - get_target_property(_libssh2_LIBRARY_RELEASE Libssh2::libssh2 IMPORTED_IMPLIB_RELEASE) - if(NOT IMPORTED_IMPLIB_DEBUG AND NOT IMPORTED_IMPLIB_RELEASE) - get_target_property(_libssh2_LIBRARY_DEBUG Libssh2::libssh2 IMPORTED_LOCATION_DEBUG) - get_target_property(_libssh2_LIBRARY_RELEASE Libssh2::libssh2 IMPORTED_LOCATION_RELEASE) - endif() - select_library_configurations(_libssh2) - string(REGEX REPLACE "([\$]<[^;]*)?Libssh2::libssh2([^;]*>)?" "${_libssh2_LIBRARIES}" _curl_link_libraries "${_curl_link_libraries}") - unset(_libssh2_LIBRARIES) - unset(_libssh2_LIBRARY_DEBUG) - unset(_libssh2_LIBRARY_RELEASE) - endif() - if(_curl_link_libraries MATCHES "::") - message(WARNING "CURL_LIBRARIES list at least one target. This will not work for use cases where targets are not resolved.") - endif() - - if (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - get_target_property(_curl_location_debug CURL::libcurl IMPORTED_IMPLIB_DEBUG) - get_target_property(_curl_location_release CURL::libcurl IMPORTED_IMPLIB_RELEASE) - endif() - - if(NOT _curl_location_debug AND NOT _curl_location_release) - get_target_property(_curl_location_debug CURL::libcurl IMPORTED_LOCATION_DEBUG) - get_target_property(_curl_location_release CURL::libcurl IMPORTED_LOCATION_RELEASE) - endif() - - set(CURL_INCLUDE_DIRS "${_curl_include_dirs}") - set(CURL_LIBRARY_DEBUG "${_curl_location_debug}" CACHE INTERNAL "vcpkg") - set(CURL_LIBRARY_RELEASE "${_curl_location_release}" CACHE INTERNAL "vcpkg") - select_library_configurations(CURL) - set(CURL_LIBRARIES ${CURL_LIBRARY} ${_curl_link_libraries}) - set(CURL_VERSION_STRING "${CURL_VERSION}") - - unset(_curl_include_dirs) - unset(_curl_link_libraries) - unset(_curl_location_debug) - unset(_curl_location_release) -endif() -cmake_policy(POP) diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json deleted file mode 100644 index a07a8d01339..00000000000 --- a/ports/curl/vcpkg.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "name": "curl", - "version": "7.88.1", - "port-version": 1, - "description": "A library for transferring data with URLs", - "homepage": "https://curl.se/", - "license": null, - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - }, - "zlib" - ], - "default-features": [ - "non-http", - "ssl" - ], - "features": { - "brotli": { - "description": "brotli support (brotli)", - "dependencies": [ - "brotli" - ] - }, - "c-ares": { - "description": "c-ares support", - "dependencies": [ - "c-ares" - ] - }, - "http2": { - "description": "HTTP2 support", - "dependencies": [ - { - "name": "curl", - "default-features": false, - "features": [ - "ssl" - ] - }, - "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": [ - "libidn2" - ] - }, - "mbedtls": { - "description": "SSL support (mbedTLS)", - "dependencies": [ - "mbedtls" - ] - }, - "non-http": { - "description": "Enables protocols beyond HTTP/HTTPS/HTTP2" - }, - "openssl": { - "description": "SSL support (OpenSSL)", - "dependencies": [ - "openssl" - ] - }, - "schannel": { - "description": "SSL support (Secure Channel)", - "supports": "windows & !uwp", - "dependencies": [ - { - "name": "curl", - "default-features": false, - "features": [ - "sspi" - ] - } - ] - }, - "sectransp": { - "description": "SSL support (sectransp)", - "supports": "osx | ios" - }, - "ssh": { - "description": "SSH support via libssh2", - "dependencies": [ - { - "name": "curl", - "default-features": false, - "features": [ - "non-http" - ] - }, - { - "name": "curl", - "default-features": false, - "features": [ - "openssl" - ] - }, - "libssh2" - ] - }, - "ssl": { - "description": "Default SSL backend", - "dependencies": [ - { - "name": "curl", - "default-features": false, - "features": [ - "sectransp" - ], - "platform": "osx | ios" - }, - { - "name": "curl", - "default-features": false, - "features": [ - "schannel" - ], - "platform": "(windows & !uwp) | mingw" - }, - { - "name": "curl", - "default-features": false, - "features": [ - "openssl" - ], - "platform": "(uwp | !windows) & !(osx | ios) & !mingw" - } - ] - }, - "sspi": { - "description": "SSPI support", - "supports": "windows & !uwp" - }, - "tool": { - "description": "Builds curl executable", - "supports": "!uwp" - }, - "websockets": { - "description": "WebSocket support (experimental)" - }, - "winidn": { - "description": "WinIDN support", - "supports": "windows" - }, - "winldap": { - "description": "LDAP support (WinLDAP). This feature does not include LDAPS support.", - "supports": "windows & !uwp", - "dependencies": [ - { - "name": "curl", - "default-features": false, - "features": [ - "non-http" - ] - } - ] - }, - "winssl": { - "description": "Legacy name for schannel", - "supports": "windows & !uwp", - "dependencies": [ - { - "name": "curl", - "default-features": false, - "features": [ - "schannel" - ] - } - ] - }, - "wolfssl": { - "description": "SSL support (wolfSSL)", - "dependencies": [ - "wolfssl" - ] - }, - "zstd": { - "description": "ZStandard support (zstd)", - "dependencies": [ - "zstd" - ] - } - } -} diff --git a/vcpkg.json b/vcpkg.json index 9c2fa1e3f84..ce2bd65276d 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -112,6 +112,10 @@ { "name": "abseil", "version": "20230802.1" + }, + { + "name": "curl", + "version": "8.4.0" } ] }