diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2017-08-11 12:36:02 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-11 12:36:02 -0700 |
| commit | e4f553a5c8ed4207b36fdf0e85f1d06cb9b0d204 (patch) | |
| tree | 99dbab9f42486efe32b912608d50fa99019dc253 | |
| parent | 2cdabbf028d6b18c6dd14a84408957f87a925b67 (diff) | |
| parent | ce452195c89df9f9a93e98bf27701a093d1550f1 (diff) | |
| download | vcpkg-e4f553a5c8ed4207b36fdf0e85f1d06cb9b0d204.tar.gz vcpkg-e4f553a5c8ed4207b36fdf0e85f1d06cb9b0d204.zip | |
Merge pull request #1633 from codicodi/curl-7.55.0
[curl] update to 7.55.0
| -rw-r--r-- | ports/curl/0002_fix_uwp.patch | 77 | ||||
| -rw-r--r-- | ports/curl/CONTROL | 2 | ||||
| -rw-r--r-- | ports/curl/portfile.cmake | 80 |
3 files changed, 78 insertions, 81 deletions
diff --git a/ports/curl/0002_fix_uwp.patch b/ports/curl/0002_fix_uwp.patch index 5cd0678cf..a3f227fb1 100644 --- a/ports/curl/0002_fix_uwp.patch +++ b/ports/curl/0002_fix_uwp.patch @@ -1,20 +1,20 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index ed3f38a..d6480b7 100644 +index 0caf3dc..de9fcdb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1010,7 +1010,9 @@ include(CMake/OtherTests.cmake) - add_definitions(-DHAVE_CONFIG_H) +@@ -941,7 +941,9 @@ check_symbol_exists(ioctl "${CURL_INCLUDES}" HAVE_IOCTL) + check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT) - # For windows, do not allow the compiler to use default target (Vista). + # symbol exists in win32, but function does not. -if(WIN32) +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + add_definitions(-D_WIN32_WINNT=0x0A00 -DHAVE_STRUCT_POLLFD -D_WINSOCK_DEPRECATED_NO_WARNINGS) +elseif(WIN32) - add_definitions(-D_WIN32_WINNT=0x0501) - endif(WIN32) - + if(ENABLE_INET_PTON) + check_function_exists(inet_pton HAVE_INET_PTON) + # _WIN32_WINNT_VISTA (0x0600) diff --git a/lib/curl_gethostname.c b/lib/curl_gethostname.c -index 2591fd8..cef38ac 100644 +index 8337c72..41867b2 100644 --- a/lib/curl_gethostname.c +++ b/lib/curl_gethostname.c @@ -21,6 +21,7 @@ @@ -25,7 +25,7 @@ index 2591fd8..cef38ac 100644 #include "curl_gethostname.h" -@@ -64,9 +65,10 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) { +@@ -64,9 +65,10 @@ int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) #ifdef DEBUGBUILD /* Override host name when environment variable CURL_GETHOSTNAME is set */ @@ -38,10 +38,10 @@ index 2591fd8..cef38ac 100644 } else { diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c -index 812a073..02c8416 100644 +index aea5452..c1f59f2 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c -@@ -696,9 +696,12 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, +@@ -700,9 +700,12 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash, /* Calculate the timestamp */ #ifdef DEBUGBUILD @@ -57,40 +57,23 @@ index 812a073..02c8416 100644 #endif tw = ((curl_off_t)time(NULL) + CURL_OFF_T_C(11644473600)) * 10000000; diff --git a/lib/ftp.c b/lib/ftp.c -index b231731..d50779f 100644 +index 6e86e53..a96fe1a 100644 --- a/lib/ftp.c +++ b/lib/ftp.c -@@ -3250,7 +3250,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status, - ssize_t nread; - int ftpcode; - CURLcode result = CURLE_OK; -- char *path; -+ char *path = NULL; - const char *path_to_use = data->state.path; - - if(!ftp) -diff --git a/lib/smb.c b/lib/smb.c -index 7cb0c96..2f43d3c 100644 ---- a/lib/smb.c -+++ b/lib/smb.c -@@ -32,8 +32,12 @@ - - #ifdef HAVE_PROCESS_H - #include <process.h> -+#if defined(CURL_WINDOWS_APP) -+#define getpid GetCurrentProcessId -+#else - #define getpid _getpid - #endif -+#endif - - #include "smb.h" - #include "urldata.h" -diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c -index 56a8823..5a895ed 100644 ---- a/lib/vtls/vtls.c -+++ b/lib/vtls/vtls.c -@@ -197,7 +197,7 @@ unsigned int Curl_rand(struct Curl_easy *data) +@@ -4292,7 +4292,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) + /* prevpath is "raw" so we convert the input path before we compare the + strings */ + size_t dlen; +- char *path; ++ char *path = NULL; + CURLcode result = + Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, FALSE); + if(result) { +diff --git a/lib/rand.c b/lib/rand.c +index 2713a0a..7da6e00 100644 +--- a/lib/rand.c ++++ b/lib/rand.c +@@ -44,7 +44,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) static bool seeded = FALSE; #ifdef CURLDEBUG @@ -98,12 +81,12 @@ index 56a8823..5a895ed 100644 + char *force_entropy = curl_getenv("CURL_ENTROPY"); if(force_entropy) { if(!seeded) { - size_t elen = strlen(force_entropy); -@@ -208,6 +208,7 @@ unsigned int Curl_rand(struct Curl_easy *data) - } + unsigned int seed = 0; +@@ -58,6 +58,7 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) else randseed++; + *rnd = randseed; + free(force_entropy); - return randseed; + return CURLE_OK; } #endif diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 9ae7e7e52..320d82afb 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,4 +1,4 @@ Source: curl -Version: 7.51.0-3 +Version: 7.55.0 Build-Depends: zlib, openssl, libssh2 Description: A library for transferring data with URLs diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 35bfbd592..c00f813b2 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/curl-curl-7_51_0) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://github.com/curl/curl/archive/curl-7_51_0.tar.gz" - FILENAME "curl-7.51.0.tar.gz" - SHA512 88ec572efb1b2fb793dc26b627e54863718e774343283f0eb92022ce252f7798332d9d3f20f63e45c38576614a000abbf12570e91e14a118f150e0378f1a27e5 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO curl/curl + REF curl-7_55_0 + SHA512 7b49e7761f5864589c6cd6eb14d8e6908797c986d8bc46a3d8dc32b7bcd12d5af464259cf3f9975a4792c8e2a504f04dd071d266d2340082a31f7ee508e17d08 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} @@ -14,41 +14,40 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/0002_fix_uwp.patch ) -if (VCPKG_CRT_LINKAGE STREQUAL dynamic) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) SET(CURL_STATICLIB OFF) else() SET(CURL_STATICLIB ON) endif() +set(UWP_OPTIONS) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_TESTING=OFF - -DBUILD_CURL_EXE=OFF - -DENABLE_MANUAL=OFF - -DUSE_WIN32_LDAP=OFF - -DCURL_DISABLE_TELNET=ON - -DENABLE_IPV6=OFF - -DENABLE_UNIX_SOCKETS=OFF - -DCMAKE_USE_OPENSSL=ON - -DCURL_STATICLIB=${CURL_STATICLIB} - OPTIONS_DEBUG - -DENABLE_DEBUG=ON - ) -else() - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_TESTING=OFF - -DBUILD_CURL_EXE=OFF - -DENABLE_MANUAL=OFF - -DCURL_STATICLIB=${CURL_STATICLIB} - OPTIONS_DEBUG - -DENABLE_DEBUG=ON + set(UWP_OPTIONS + -DUSE_WIN32_LDAP=OFF + -DCURL_DISABLE_TELNET=ON + -DENABLE_IPV6=OFF + -DENABLE_UNIX_SOCKETS=OFF ) endif() +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_PATH ${PERL} DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${PERL_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${UWP_OPTIONS} + -DBUILD_TESTING=OFF + -DBUILD_CURL_EXE=OFF + -DENABLE_MANUAL=OFF + -DCURL_STATICLIB=${CURL_STATICLIB} + -DCMAKE_USE_OPENSSL=ON + OPTIONS_DEBUG + -DENABLE_DEBUG=ON +) + vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright) @@ -56,6 +55,21 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + # Drop debug suffix, as FindCURL.cmake does not look for it + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl.lib) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libcurl_imp.lib ${CURRENT_PACKAGES_DIR}/lib/libcurl.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl-d_imp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libcurl.lib) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +file(READ ${CURRENT_PACKAGES_DIR}/include/curl/curl.h CURL_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "#ifdef CURL_STATICLIB" "#if 1" CURL_H "${CURL_H}") +else() + string(REPLACE "#ifdef CURL_STATICLIB" "#if 0" CURL_H "${CURL_H}") endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/curl/curl.h "${CURL_H}") -vcpkg_copy_pdbs()
\ No newline at end of file +vcpkg_copy_pdbs() |
