diff --git a/ports/curl/0022-deduplicate-libs.patch b/ports/curl/0022-deduplicate-libs.patch index dac3b6788b..4216ab5634 100644 --- a/ports/curl/0022-deduplicate-libs.patch +++ b/ports/curl/0022-deduplicate-libs.patch @@ -1,10 +1,13 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0ceaf5b..ec714a5 100644 +index bb6ccf1..a0df85f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1682,6 +1682,7 @@ if(NOT CURL_DISABLE_INSTALL) +@@ -1913,8 +1913,10 @@ if(NOT CURL_DISABLE_INSTALL) + set(CPPFLAG_CURL_STATICLIB "") else() set(ENABLE_SHARED "no") ++ set(LIBCURL_PC_REQUIRES_PRIVATE "") # flattened into LIBCURL_LIBS + set(LIBCURL_PC_REQUIRES "${LIBCURL_PC_REQUIRES_PRIVATE}") set(LIBCURL_NO_SHARED "${LIBCURL_LIBS}") + set(LIBCURL_LIBS "") set(CPPFLAG_CURL_STATICLIB "-DCURL_STATICLIB") diff --git a/ports/curl/cmake-project-include.cmake b/ports/curl/cmake-project-include.cmake index 6867896083..fffc932c67 100644 --- a/ports/curl/cmake-project-include.cmake +++ b/ports/curl/cmake-project-include.cmake @@ -13,6 +13,10 @@ endif() # Use -l where possible. # Avoid duplicates. function(vcpkg_curl_flatten input output) + foreach(var IN ITEMS IMPORT_LIBRARY_SUFFIX STATIC_LIBRARY_SUFFIX SHARED_LIBRARY_SUFFIX) + string(REPLACE "." "[.]" "${var}" "${CMAKE_${var}}") + endforeach() + set(output_libs "${${output}}") if(CMAKE_BUILD_TYPE STREQUAL "Debug") string(REGEX REPLACE ";optimized;[^;]*|;debug" "" input_libs "VCPKG;${${input}}") @@ -67,11 +71,11 @@ function(vcpkg_curl_flatten input output) else() set(lib "-framework ${lib}") endif() - elseif(WIN32 AND lib MATCHES ".*/${CMAKE_IMPORT_LIBRARY_PREFIX}([^/]*)${CMAKE_IMPORT_LIBRARY_SUFFIX}") + elseif(WIN32 AND lib MATCHES ".*/${CMAKE_IMPORT_LIBRARY_PREFIX}([^/]*)${IMPORT_LIBRARY_SUFFIX}\$") set(lib -l${CMAKE_MATCH_1}) - elseif(lib MATCHES ".*/${CMAKE_STATIC_LIBRARY_PREFIX}([^/]*)${CMAKE_STATIC_LIBRARY_SUFFIX}") + elseif(lib MATCHES ".*/${CMAKE_STATIC_LIBRARY_PREFIX}([^/]*)${STATIC_LIBRARY_SUFFIX}\$") set(lib -l${CMAKE_MATCH_1}) - elseif(lib MATCHES ".*/${CMAKE_SHARED_LIBRARY_PREFIX}([^/]*)${CMAKE_SHARED_LIBRARY_SUFFIX}") + elseif(lib MATCHES ".*/${CMAKE_SHARED_LIBRARY_PREFIX}([^/]*)${SHARED_LIBRARY_SUFFIX}\$") set(lib -l${CMAKE_MATCH_1}) endif() if(NOT "${lib}" IN_LIST output_libs) diff --git a/ports/curl/dependencies.patch b/ports/curl/dependencies.patch index bdf8a91c44..a9c3c718c8 100644 --- a/ports/curl/dependencies.patch +++ b/ports/curl/dependencies.patch @@ -1,5 +1,5 @@ diff --git a/CMake/curl-config.cmake.in b/CMake/curl-config.cmake.in -index 9adb96e0a..9bf69004d 100644 +index 2ce8625..a0c039c 100644 --- a/CMake/curl-config.cmake.in +++ b/CMake/curl-config.cmake.in @@ -31,6 +31,19 @@ if(@USE_ZLIB@) @@ -23,10 +23,10 @@ index 9adb96e0a..9bf69004d 100644 check_required_components("@PROJECT_NAME@") diff --git a/CMakeLists.txt b/CMakeLists.txt -index c3525d3fc..1927464e8 100644 +index f9a775a..415206c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -164,7 +164,8 @@ set(CURL_LIBS "") +@@ -163,7 +163,8 @@ set(LIBCURL_PC_REQUIRES_PRIVATE "") if(ENABLE_ARES) set(USE_ARES 1) @@ -34,18 +34,9 @@ index c3525d3fc..1927464e8 100644 + find_package(CARES NAMES c-ares CONFIG REQUIRED) + set(CARES_LIBRARY c-ares::cares) list(APPEND CURL_LIBS ${CARES_LIBRARY}) + list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libcares") endif() - -@@ -461,7 +462,7 @@ if(use_core_foundation_and_core_services) - message(FATAL_ERROR "CoreServices framework not found") - endif() - -- list(APPEND CURL_LIBS "-framework CoreFoundation -framework CoreServices") -+ list(APPEND CURL_LIBS "-framework CoreFoundation" "-framework CoreServices") - endif() - - if(CURL_USE_OPENSSL) -@@ -577,10 +578,11 @@ endif() +@@ -591,7 +592,9 @@ endif() option(CURL_BROTLI "Set to ON to enable building curl with brotli support." OFF) set(HAVE_BROTLI OFF) if(CURL_BROTLI) @@ -55,11 +46,8 @@ index c3525d3fc..1927464e8 100644 + set(BROTLI_LIBRARIES "unofficial::brotli::brotlidec") if(BROTLI_FOUND) set(HAVE_BROTLI ON) -- set(CURL_LIBS "${BROTLI_LIBRARIES};${CURL_LIBS}") # For 'ld' linker. Emulate `list(PREPEND ...)` to stay compatible with backend; - struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf); - const mbedtls_x509_crt *peercert; -- char cipher_str[64]; -- uint16_t cipher_id; - #ifndef CURL_DISABLE_PROXY - const char * const pinnedpubkey = Curl_ssl_cf_is_proxy(cf)? - data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY]: -@@ -932,11 +930,18 @@ mbed_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data) - return CURLE_SSL_CONNECT_ERROR; - } - -- cipher_id = (uint16_t) -- mbedtls_ssl_get_ciphersuite_id_from_ssl(&backend->ssl); -- mbed_cipher_suite_get_str(cipher_id, cipher_str, sizeof(cipher_str), true); -- infof(data, "mbedTLS: Handshake complete, cipher is %s", cipher_str); -- -+#if MBEDTLS_VERSION_NUMBER >= 0x03020000 -+ { -+ char cipher_str[64]; -+ uint16_t cipher_id; -+ cipher_id = (uint16_t) -+ mbedtls_ssl_get_ciphersuite_id_from_ssl(&backend->ssl); -+ mbed_cipher_suite_get_str(cipher_id, cipher_str, sizeof(cipher_str), true); -+ infof(data, "mbedTLS: Handshake complete, cipher is %s", cipher_str); -+ } -+#else -+ infof(data, "mbedTLS: Handshake complete"); -+#endif - ret = mbedtls_ssl_get_verify_result(&backend->ssl); - - if(!conn_config->verifyhost) diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 41c7761eb0..e7ef696cfd 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -4,7 +4,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO curl/curl REF "${curl_version}" - SHA512 e66cbf9bd3ae7b9b031475210b80b883b6a133042fbbc7cf2413f399d1b38aa54ab7322626abd3c6f1af56e0d540221f618aa903bd6b463ac8324f2c4e92dfa8 + SHA512 9f7e92292bde501334ee415335404da7c40e033443c34464ed48af5bab7d1fd594859278eac695bec77ee6d58c0629162a7a9876a38a5abd404faa1c43f2b14e HEAD_REF master PATCHES 0005_remove_imp_suffix.patch @@ -13,7 +13,6 @@ vcpkg_from_github( export-components.patch dependencies.patch cmake-config.patch - fix-mbedtls.patch # From https://github.com/curl/curl/commit/0c4b4c1e93c8e869af230090f32346fdfd548f21 ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json index 0ac78267c9..29059b908a 100644 --- a/ports/curl/vcpkg.json +++ b/ports/curl/vcpkg.json @@ -1,7 +1,6 @@ { "name": "curl", - "version": "8.8.0", - "port-version": 4, + "version": "8.9.0", "description": "A library for transferring data with URLs", "homepage": "https://curl.se/", "license": "curl AND ISC AND BSD-3-Clause", diff --git a/scripts/test_ports/cmake/curl.diff b/scripts/test_ports/cmake/curl.diff new file mode 100644 index 0000000000..88ed22fce1 --- /dev/null +++ b/scripts/test_ports/cmake/curl.diff @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fdfe456a..a5d69b41 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -480,8 +480,8 @@ macro (CMAKE_BUILD_UTILITIES) + message(FATAL_ERROR + "CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!") + endif() +- set(CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS}) +- set(CMAKE_CURL_LIBRARIES ${CURL_LIBRARIES}) ++ set(CMAKE_CURL_INCLUDES ) ++ set(CMAKE_CURL_LIBRARIES CURL::libcurl) + else() + set(CURL_SPECIAL_ZLIB_H ${CMAKE_ZLIB_HEADER}) + set(CURL_SPECIAL_LIBZ_INCLUDES ${CMAKE_ZLIB_INCLUDES}) diff --git a/scripts/test_ports/cmake/portfile.cmake b/scripts/test_ports/cmake/portfile.cmake index cdbd2d6adf..7b3e98c76c 100644 --- a/scripts/test_ports/cmake/portfile.cmake +++ b/scripts/test_ports/cmake/portfile.cmake @@ -8,7 +8,9 @@ vcpkg_from_gitlab( SHA512 12df5d68aad6bf1bfa34c3a83b428e1ecdc0b2b746e92bf71157eec4b4c114c86f21e91509f26f5da6e8916941563750e63cc3218970eaba33d6de231599de34 HEAD_REF master - PATCHES fix-dependency-libuv.patch + PATCHES + curl.diff + fix-dependency-libuv.patch ) set(OPTIONS) if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP) diff --git a/scripts/test_ports/cmake/vcpkg.json b/scripts/test_ports/cmake/vcpkg.json index f1c6364d90..35bb3d346a 100644 --- a/scripts/test_ports/cmake/vcpkg.json +++ b/scripts/test_ports/cmake/vcpkg.json @@ -1,7 +1,7 @@ { "name": "cmake", "version": "3.22.2", - "port-version": 4, + "port-version": 5, "description": "CMake is an open-source, cross-platform family of tools designed to build, test and package software.", "homepage": "https://cmake.org/", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index 985ce02695..69265df8bb 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2105,8 +2105,8 @@ "port-version": 8 }, "curl": { - "baseline": "8.8.0", - "port-version": 4 + "baseline": "8.9.0", + "port-version": 0 }, "curlpp": { "baseline": "2018-06-15", diff --git a/versions/c-/curl.json b/versions/c-/curl.json index 1a69f58855..96e9e16f73 100644 --- a/versions/c-/curl.json +++ b/versions/c-/curl.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "58954b5f6ad96e9c390d6ae282b8a04c46a65ad3", + "version": "8.9.0", + "port-version": 0 + }, { "git-tree": "5d79bcc154132c187557e076a5bf5e0f5736dd6a", "version": "8.8.0",