diff options
| author | NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> | 2020-08-13 01:23:44 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-12 10:23:44 -0700 |
| commit | dea76199aad32b41af3e6d33a265d62d187a3da2 (patch) | |
| tree | 9cb99d7591cc8f613f5b3fbe39676de3d0416f62 | |
| parent | d7fc2196c139b06e797afa3d6673c7bb9a278593 (diff) | |
| download | vcpkg-dea76199aad32b41af3e6d33a265d62d187a3da2.tar.gz vcpkg-dea76199aad32b41af3e6d33a265d62d187a3da2.zip | |
[curl] Fix static build (#12800)
* [curl] Fix static build
* Add static patch
| -rw-r--r-- | ports/curl/0002_fix_uwp.patch | 10 | ||||
| -rw-r--r-- | ports/curl/0011_fix_static_build.patch | 13 | ||||
| -rw-r--r-- | ports/curl/CONTROL | 2 | ||||
| -rw-r--r-- | ports/curl/portfile.cmake | 1 |
4 files changed, 20 insertions, 6 deletions
diff --git a/ports/curl/0002_fix_uwp.patch b/ports/curl/0002_fix_uwp.patch index ae3615875..16c00db4f 100644 --- a/ports/curl/0002_fix_uwp.patch +++ b/ports/curl/0002_fix_uwp.patch @@ -1,15 +1,15 @@ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
-index 62b7b33..9b0e2e1 100644
+index 62b7b33..8a4bd71 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
-@@ -107,7 +107,9 @@ endif()
+@@ -107,6 +107,10 @@ endif()
target_link_libraries(${LIB_NAME} ${CURL_LIBS})
--if(WIN32)
+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS)
-+elseif(WIN32)
++endif()
++
+ if(WIN32)
add_definitions(-D_USRDLL)
endif()
-
diff --git a/ports/curl/0011_fix_static_build.patch b/ports/curl/0011_fix_static_build.patch new file mode 100644 index 000000000..a50fa287f --- /dev/null +++ b/ports/curl/0011_fix_static_build.patch @@ -0,0 +1,13 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
+index 8a4bd71..1927fb0 100644
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -111,7 +111,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS)
+ endif()
+
+-if(WIN32)
++if(WIN32 AND BUILD_SHARED_LIBS)
+ add_definitions(-D_USRDLL)
+ endif()
+
diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index ef5881da0..6f50966de 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,6 +1,6 @@ Source: curl Version: 7.71.1 -Port-Version: 1 +Port-Version: 2 Build-Depends: zlib Homepage: https://github.com/curl/curl Description: A library for transferring data with URLs diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index db1367370..0ad9cd7a2 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_from_github( 0007_disable_tool_export_curl_target.patch 0009_fix_openssl_config.patch 0010_fix_othertests_cmake.patch + 0011_fix_static_build.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) |
