[Curl] Upgrades 2019.05.08 (#6429)

* [Curl] Upgrades 2019.05.08

* merge changes from master

* Fix cpr failure

* Fix the case issue in Linux

* Update patch and portfile

* Update the portfile that changed by my mistake

* [curl] Update to 7.65.0 to skip USE_DARWINSSL regression. Disable PERL since we don't build the manual anyway.

* Rename DARWINSSL to SECTRANSP

* Update the name and error detect
This commit is contained in:
Phoebe 2019-05-27 07:53:41 +08:00 committed by Robert Schumacher
parent 0cbbeda9cd
commit 9ffac4d56e
7 changed files with 140 additions and 142 deletions

View File

@ -0,0 +1,13 @@
diff --git a/cpr/error.cpp b/cpr/error.cpp
index 713cb10..4143f93 100644
--- a/cpr/error.cpp
+++ b/cpr/error.cpp
@@ -38,8 +38,6 @@ ErrorCode Error::getErrorCodeForCurlError(std::int32_t curl_code) {
return ErrorCode::SSL_LOCAL_CERTIFICATE_ERROR;
case CURLE_SSL_CIPHER:
return ErrorCode::GENERIC_SSL_ERROR;
- case CURLE_SSL_CACERT:
- return ErrorCode::SSL_CACERT_ERROR;
case CURLE_USE_SSL_FAILED:
return ErrorCode::GENERIC_SSL_ERROR;
case CURLE_SSL_ENGINE_INITFAILED:

View File

@ -1,4 +1,4 @@
Source: cpr Source: cpr
Version: 1.3.0-6 Version: 1.3.0-7
Description: C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project. Description: C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project.
Build-Depends: curl[core] Build-Depends: curl[core]

View File

@ -10,6 +10,7 @@ vcpkg_from_github(
HEAD_REF master HEAD_REF master
PATCHES PATCHES
001-cpr-config.patch 001-cpr-config.patch
002_cpr_fixcase.patch
) )
vcpkg_configure_cmake( vcpkg_configure_cmake(

View File

@ -1,5 +1,5 @@
diff --git a/CMake/FindLibSSH2.cmake b/CMake/FindLibSSH2.cmake diff --git a/CMake/FindLibSSH2.cmake b/CMake/FindLibSSH2.cmake
index 84822dba7..0d6219425 100644 index 84822db..0d62194 100644
--- a/CMake/FindLibSSH2.cmake --- a/CMake/FindLibSSH2.cmake
+++ b/CMake/FindLibSSH2.cmake +++ b/CMake/FindLibSSH2.cmake
@@ -12,7 +12,7 @@ endif() @@ -12,7 +12,7 @@ endif()
@ -11,18 +11,3 @@ index 84822dba7..0d6219425 100644
) )
if(LIBSSH2_INCLUDE_DIR) if(LIBSSH2_INCLUDE_DIR)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e6dbb73f1..1e2ff138e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1144,7 +1144,9 @@ function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE)
endfunction()
-if(WIN32 AND NOT CYGWIN)
+if(MSVC)
+ set(CURL_INSTALL_CMAKE_DIR share/curl)
+elseif(WIN32 AND NOT CYGWIN)
set(CURL_INSTALL_CMAKE_DIR CMake)
else()
set(CURL_INSTALL_CMAKE_DIR lib/cmake/curl)

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b73b98..72f6171 100644 index 38b7b7d..5b3d33e 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -882,7 +882,9 @@ check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT) @@ -897,7 +897,9 @@ check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT)
check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME) check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME)
# symbol exists in win32, but function does not. # symbol exists in win32, but function does not.
@ -38,39 +38,39 @@ index 8337c72..41867b2 100644
} }
else { else {
diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c
index e896276..268f0ea 100644 index e7060eb..9cd76f7 100644
--- a/lib/curl_ntlm_core.c --- a/lib/curl_ntlm_core.c
+++ b/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c
@@ -743,9 +743,12 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, @@ -726,10 +726,11 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash,
/* Calculate the timestamp */ /* Calculate the timestamp */
#ifdef DEBUGBUILD #ifdef DEBUGBUILD
- char *force_timestamp = getenv("CURL_FORCETIME"); - char *force_timestamp = getenv("CURL_FORCETIME");
- if(force_timestamp) - if(force_timestamp)
+ char *force_timestamp = curl_getenv("CURL_FORCETIME"); + char *force_timestamp = curl_getenv("CURL_FORCETIME");
+ if (force_timestamp) + if(force_timestamp) {
+ {
tw = CURL_OFF_T_C(11644473600) * 10000000; tw = CURL_OFF_T_C(11644473600) * 10000000;
- else
+ free(force_timestamp); + free(force_timestamp);
+ } + }
else
#endif #endif
tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000; tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000;
diff --git a/lib/ftp.c b/lib/ftp.c diff --git a/lib/ftp.c b/lib/ftp.c
index 8042edf..3442df7 100644 index 825aaaa..3b96670 100644
--- a/lib/ftp.c --- a/lib/ftp.c
+++ b/lib/ftp.c +++ b/lib/ftp.c
@@ -4260,7 +4260,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) @@ -4262,7 +4262,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
/* prevpath is "raw" so we convert the input path before we compare the /* prevpath is "raw" so we convert the input path before we compare the
strings */ strings */
size_t dlen; size_t dlen;
- char *path; - char *path;
+ char *path = NULL; + char *path = NULL;
CURLcode result = CURLcode result =
Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, TRUE); Curl_urldecode(conn->data, ftp->path, 0, &path, &dlen, TRUE);
if(result) { if(result) {
diff --git a/lib/rand.c b/lib/rand.c diff --git a/lib/rand.c b/lib/rand.c
index 2670af9..0d18d37 100644 index 6ee45fe..b2d712d 100644
--- a/lib/rand.c --- a/lib/rand.c
+++ b/lib/rand.c +++ b/lib/rand.c
@@ -44,7 +44,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) @@ -44,7 +44,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd)

View File

@ -1,5 +1,5 @@
Source: curl Source: curl
Version: 7.61.1-7 Version: 7.65.0
Build-Depends: zlib Build-Depends: zlib
Description: A library for transferring data with URLs Description: A library for transferring data with URLs
Default-Features: ssl Default-Features: ssl
@ -15,7 +15,7 @@ Build-Depends: nghttp2, curl[ssl]
Description: HTTP2 support Description: HTTP2 support
Feature: ssl Feature: ssl
Build-Depends: curl[openssl] (!windows&!osx), curl[winssl] (windows), curl[darwinssl] (osx) Build-Depends: curl[openssl] (!windows&!osx), curl[winssl] (windows), curl[sectransp] (osx)
Description: Default SSL backend Description: Default SSL backend
Feature: ssh Feature: ssh
@ -34,5 +34,5 @@ Feature: mbedtls
Build-Depends: mbedtls Build-Depends: mbedtls
Description: SSL support (mbedTLS) Description: SSL support (mbedTLS)
Feature: darwinssl Feature: sectransp
Description: SSL support (darwinssl) Description: SSL support (sectransp)

View File

@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO curl/curl REPO curl/curl
REF curl-7_61_1 REF curl-7_65_0
SHA512 09fa3c87f8d516eabe3241247a5094c32ee0481961cf85bf78ecb13acdf23bb2ec82f113d2660271d22742c79e76d73fb122730fa28e34c7f5477c05a4a6534c SHA512 436b6b42654c1db2b3f69df410a7f28401a50faf18e74f328a93585c147541e697664b0e9e7df03239fd76c797c1bb4f435f4c668a6b0ad28bdd67e17f786491
HEAD_REF master HEAD_REF master
PATCHES PATCHES
0001_cmake.patch 0001_cmake.patch
@ -40,14 +40,14 @@ if("mbedtls" IN_LIST FEATURES)
set(USE_MBEDTLS ON) set(USE_MBEDTLS ON)
endif() endif()
set(USE_DARWINSSL OFF) set(USE_SECTRANSP OFF)
set(DARWINSSL_OPTIONS) set(SECTRANSP_OPTIONS)
if("darwinssl" IN_LIST FEATURES) if("sectransp" IN_LIST FEATURES)
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") if(NOT VCPKG_CMAKE_SYSTEM_NAME OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
message(FATAL_ERROR "darwinssl is not supported on non-Apple platforms") message(FATAL_ERROR "sectransp is not supported on non-Apple platforms")
endif() endif()
set(USE_DARWINSSL ON) set(USE_SECTRANSP ON)
set(DARWINSSL_OPTIONS set(SECTRANSP_OPTIONS
-DCURL_CA_PATH=none -DCURL_CA_PATH=none
) )
endif() endif()
@ -83,16 +83,12 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
) )
endif() endif()
vcpkg_find_acquire_program(PERL)
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
vcpkg_add_to_path(${PERL_PATH})
vcpkg_configure_cmake( vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA PREFER_NINJA
OPTIONS OPTIONS
${UWP_OPTIONS} ${UWP_OPTIONS}
${DARWINSSL_OPTIONS} ${SECTRANSP_OPTIONS}
${HTTP2_OPTIONS} ${HTTP2_OPTIONS}
-DBUILD_TESTING=OFF -DBUILD_TESTING=OFF
-DBUILD_CURL_EXE=${BUILD_CURL_EXE} -DBUILD_CURL_EXE=${BUILD_CURL_EXE}
@ -101,9 +97,10 @@ vcpkg_configure_cmake(
-DCMAKE_USE_OPENSSL=${USE_OPENSSL} -DCMAKE_USE_OPENSSL=${USE_OPENSSL}
-DCMAKE_USE_WINSSL=${USE_WINSSL} -DCMAKE_USE_WINSSL=${USE_WINSSL}
-DCMAKE_USE_MBEDTLS=${USE_MBEDTLS} -DCMAKE_USE_MBEDTLS=${USE_MBEDTLS}
-DCMAKE_USE_DARWINSSL=${USE_DARWINSSL} -DCMAKE_USE_SECTRANSP=${USE_SECTRANSP}
-DCMAKE_USE_LIBSSH2=${USE_LIBSSH2} -DCMAKE_USE_LIBSSH2=${USE_LIBSSH2}
-DHTTP_ONLY=${USE_HTTP_ONLY} -DHTTP_ONLY=${USE_HTTP_ONLY}
-DCMAKE_DISABLE_FIND_PACKAGE_Perl=ON
OPTIONS_RELEASE OPTIONS_RELEASE
-DBUILD_CURL_EXE=${BUILD_CURL_EXE} -DBUILD_CURL_EXE=${BUILD_CURL_EXE}
OPTIONS_DEBUG OPTIONS_DEBUG
@ -113,10 +110,12 @@ vcpkg_configure_cmake(
vcpkg_install_cmake() vcpkg_install_cmake()
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/curl) if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/CURL)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/curl) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CURL)
elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/curl) elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/curl)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/curl) vcpkg_fixup_cmake_targets(CONFIG_PATH share/curl)
else()
message(FATAL_ERROR "Could not locate the curl config files")
endif() endif()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright)