From 24b7af97c1801eb272e16f3271687ef07dc6f82d Mon Sep 17 00:00:00 2001 From: Force Charlie Date: Wed, 30 May 2018 10:56:50 +0800 Subject: [curl] fix curl[tool] support HTTP2 use WinSSL --- ports/curl/0005_winssl_http2.patch | 79 ++++++++++++++++++++++++++++++++++++++ ports/curl/CONTROL | 2 +- ports/curl/portfile.cmake | 1 + 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 ports/curl/0005_winssl_http2.patch diff --git a/ports/curl/0005_winssl_http2.patch b/ports/curl/0005_winssl_http2.patch new file mode 100644 index 000000000..0a7ca6f53 --- /dev/null +++ b/ports/curl/0005_winssl_http2.patch @@ -0,0 +1,79 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bf25b1f79..dac74d7f7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1104,12 +1104,17 @@ include(CMake/OtherTests.cmake) + + add_definitions(-DHAVE_CONFIG_H) + +-# For windows, all compilers used by cmake should support large files ++# For Windows, all compilers used by CMake should support large files + if(WIN32) + set(USE_WIN32_LARGE_FILES ON) ++ ++ # Use the manifest embedded in the Windows Resource ++ set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -DCURL_EMBED_MANIFEST") + endif(WIN32) + + if(MSVC) ++ # Disable default manifest added by CMake ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") + add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) + if(CMAKE_C_FLAGS MATCHES "/W[0-4]") + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") +diff --git a/src/curl.rc b/src/curl.rc +index 5f49d2236..f54c4b234 100644 +--- a/src/curl.rc ++++ b/src/curl.rc +@@ -61,3 +61,51 @@ BEGIN + VALUE "Translation", 0x409, 1200 + END + END ++ ++/* Manifest */ ++ ++#if defined(CURL_EMBED_MANIFEST) ++ ++/* String escaping rules: ++ https://msdn.microsoft.com/library/aa381050 ++ Application Manifest doc, including the list of 'supportedOS Id's: ++ https://msdn.microsoft.com/library/aa374191 */ ++ ++#ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID ++#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 ++#endif ++#ifndef RT_MANIFEST ++#define RT_MANIFEST 24 ++#endif ++ ++#define _STR(macro) _STR_(macro) ++#define _STR_(macro) #macro ++ ++CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST ++BEGIN ++ "" ++ "" ++ "" ++ "" ++ "" ++ "" /* Vista / Server 2008 */ ++ "" /* 7 / Server 2008 R2 */ ++ "" /* 8 / Server 2012 */ ++ "" /* 8.1 / Server 2012 R2 */ ++ "" /* 10 / Server 2016 */ ++ "" ++ "" ++ "" ++ "" ++ "" ++ "" ++ "" ++ "" ++ "" ++ "" ++END ++ ++#endif diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 61456a99b..f54c6c643 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7.60.0-1 +Version: 7.60.0-2 Build-Depends: zlib Description: A library for transferring data with URLs Default-Features: ssl diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 329ead341..8f6d70917 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -14,6 +14,7 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/0002_fix_uwp.patch ${CMAKE_CURRENT_LIST_DIR}/0003_fix_libraries.patch ${CMAKE_CURRENT_LIST_DIR}/0004_nghttp2_staticlib.patch + ${CMAKE_CURRENT_LIST_DIR}/0005_winssl_http2.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) -- cgit v1.2.3