[curl] Update to 8.9.0 (#40081)

This commit is contained in:
Kai Pastor 2024-07-31 02:42:29 +02:00 committed by GitHub
parent 752799690b
commit 1dc5ee30eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 63 additions and 109 deletions

View File

@ -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")

View File

@ -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)

View File

@ -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 <v3.15 CMake.
list(APPEND CURL_LIBS ${BROTLI_LIBRARIES})
include_directories(${BROTLI_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_INCLUDES ${BROTLI_INCLUDE_DIRS})
@@ -590,7 +592,9 @@ endif()
@@ -604,7 +607,9 @@ endif()
option(CURL_ZSTD "Set to ON to enable building curl with zstd support." OFF)
set(HAVE_ZSTD OFF)
if(CURL_ZSTD)
@ -70,7 +58,7 @@ index c3525d3fc..1927464e8 100644
if(Zstd_FOUND AND NOT Zstd_VERSION VERSION_LESS "1.0.0")
set(HAVE_ZSTD ON)
list(APPEND CURL_LIBS ${Zstd_LIBRARIES})
@@ -883,8 +887,13 @@ endif()
@@ -913,8 +918,12 @@ endif()
# Check for idn2
option(USE_LIBIDN2 "Use libidn2 for IDN support" ON)
if(USE_LIBIDN2)
@ -79,13 +67,12 @@ index c3525d3fc..1927464e8 100644
+ pkg_check_modules(LIBIDN2 REQUIRED libidn2)
+ set(HAVE_LIBIDN2 TRUE)
if(HAVE_LIBIDN2)
+ list(APPEND CURL_LIBS ${LIBIDN2_LINK_LIBRARIES})
+ set(HAVE_IDN2_H TRUE)
+ elseif(0)
set(CURL_LIBS "idn2;${CURL_LIBS}")
set(LIBIDN2_LINK_LIBRARIES "idn2")
check_include_file_concat("idn2.h" HAVE_IDN2_H)
endif()
@@ -920,11 +929,18 @@ mark_as_advanced(CURL_USE_LIBPSL)
@@ -963,12 +972,19 @@ mark_as_advanced(CURL_USE_LIBPSL)
set(USE_LIBPSL OFF)
if(CURL_USE_LIBPSL)
@ -94,8 +81,6 @@ index c3525d3fc..1927464e8 100644
+ pkg_check_modules(LIBPSL REQUIRED libpsl)
if(LIBPSL_FOUND)
- list(APPEND CURL_LIBS ${LIBPSL_LIBRARY})
- list(APPEND CMAKE_REQUIRED_INCLUDES "${LIBPSL_INCLUDE_DIR}")
- include_directories("${LIBPSL_INCLUDE_DIR}")
+ # Remove standard win32 libs pulled in transitively from icu
+ string(REPLACE " " "|" win32_standard_libraries "/(${CMAKE_C_STANDARD_LIBRARIES})[.]lib\$")
+ foreach(lib IN LISTS LIBPSL_LINK_LIBRARIES)
@ -105,10 +90,13 @@ index c3525d3fc..1927464e8 100644
+ endif()
+ endforeach()
+ list(APPEND CURL_LIBS ${LIBPSL_LINK_LIBRARIES})
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libpsl")
- list(APPEND CMAKE_REQUIRED_INCLUDES "${LIBPSL_INCLUDE_DIR}")
- include_directories("${LIBPSL_INCLUDE_DIR}")
set(USE_LIBPSL ON)
endif()
endif()
@@ -935,7 +951,13 @@ mark_as_advanced(CURL_USE_LIBSSH2)
@@ -979,7 +995,13 @@ mark_as_advanced(CURL_USE_LIBSSH2)
set(USE_LIBSSH2 OFF)
if(CURL_USE_LIBSSH2)
@ -122,9 +110,9 @@ index c3525d3fc..1927464e8 100644
+ get_target_property(LIBSSH2_INCLUDE_DIR "${LIBSSH2_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES)
if(LIBSSH2_FOUND)
list(APPEND CURL_LIBS ${LIBSSH2_LIBRARY})
list(APPEND CMAKE_REQUIRED_INCLUDES "${LIBSSH2_INCLUDE_DIR}")
@@ -957,11 +979,24 @@ if(NOT USE_LIBSSH2 AND CURL_USE_LIBSSH)
endif()
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libssh2")
@@ -1012,11 +1034,24 @@ if(CURL_USE_GSASL)
set(USE_GSASL ON)
endif()
+option(CURL_USE_GSASL "Use GSASL implementation" OFF)
@ -149,7 +137,7 @@ index c3525d3fc..1927464e8 100644
set(HAVE_GSSAPI ${GSS_FOUND})
if(GSS_FOUND)
@@ -973,6 +1008,7 @@ if(CURL_USE_GSSAPI)
@@ -1028,6 +1063,7 @@ if(CURL_USE_GSSAPI)
check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H)
check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H)
@ -157,25 +145,3 @@ index c3525d3fc..1927464e8 100644
if(NOT GSS_FLAVOUR STREQUAL "Heimdal")
# MIT
set(_INCLUDE_LIST "")
@@ -1618,6 +1654,7 @@ if(NOT CURL_DISABLE_INSTALL)
_add_if("UnixSockets" USE_UNIX_SOCKETS)
_add_if("libz" HAVE_LIBZ)
_add_if("brotli" HAVE_BROTLI)
+ _add_if("gsasl" USE_GSASL)
_add_if("zstd" HAVE_ZSTD)
_add_if("AsynchDNS" USE_ARES OR USE_THREADS_POSIX OR USE_THREADS_WIN32)
_add_if("IDN" HAVE_LIBIDN2 OR USE_WIN32_IDN OR USE_APPLE_IDN)
diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake
index 3a46c6490..7ce3facb6 100644
--- a/lib/curl_config.h.cmake
+++ b/lib/curl_config.h.cmake
@@ -713,6 +713,9 @@ ${SIZEOF_TIME_T_CODE}
/* if librtmp/rtmpdump is in use */
#cmakedefine USE_LIBRTMP 1
+/* if GSASL is in use */
+#cmakedefine USE_GSASL 1
+
/* Define to 1 if you don't want the OpenSSL configuration to be loaded
automatically */
#cmakedefine CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG 1

View File

@ -1,12 +1,11 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec714a5..478527e 100644
index 3820c2d..f9a775a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1754,9 +1754,18 @@ if(NOT CURL_DISABLE_INSTALL)
DESTINATION ${CURL_INSTALL_CMAKE_DIR}
@@ -1952,7 +1952,17 @@ if(NOT CURL_DISABLE_INSTALL)
)
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@)
@ -15,10 +14,9 @@ index ec714a5..478527e 100644
+ endif()
+ endforeach()
+ ]] @ONLY)
install(
- FILES ${version_config} ${project_config}
+ FILES ${version_config} ${project_config} ${components_file}
+
install(FILES ${version_config} ${project_config}
+ ${components_file}
DESTINATION ${CURL_INSTALL_CMAKE_DIR}
)

View File

@ -1,37 +0,0 @@
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c
index ec0b10dd9a9f88..98a4ea01b1830b 100644
--- a/lib/vtls/mbedtls.c
+++ b/lib/vtls/mbedtls.c
@@ -902,8 +902,6 @@ mbed_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data)
(struct mbed_ssl_backend_data *)connssl->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)

View File

@ -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

View File

@ -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",

View File

@ -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})

View File

@ -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)

View File

@ -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",

View File

@ -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",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "58954b5f6ad96e9c390d6ae282b8a04c46a65ad3",
"version": "8.9.0",
"port-version": 0
},
{
"git-tree": "5d79bcc154132c187557e076a5bf5e0f5736dd6a",
"version": "8.8.0",