early-access version 2853
This commit is contained in:
15
externals/vcpkg/ports/curl/0002_fix_uwp.patch
vendored
Executable file
15
externals/vcpkg/ports/curl/0002_fix_uwp.patch
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
||||
index 62b7b33..8a4bd71 100644
|
||||
--- a/lib/CMakeLists.txt
|
||||
+++ b/lib/CMakeLists.txt
|
||||
@@ -115,6 +115,10 @@ if(CURL_HAS_LTO)
|
||||
INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE)
|
||||
endif()
|
||||
|
||||
+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
+ set_property(TARGET ${LIB_NAME} APPEND PROPERTY COMPILE_DEFINITIONS "_WINSOCK_DEPRECATED_NO_WARNINGS")
|
||||
+endif()
|
||||
+
|
||||
if(WIN32)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set_property(TARGET ${LIB_NAME} APPEND PROPERTY COMPILE_DEFINITIONS "_USRDLL")
|
||||
12
externals/vcpkg/ports/curl/0005_remove_imp_suffix.patch
vendored
Executable file
12
externals/vcpkg/ports/curl/0005_remove_imp_suffix.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
||||
index 1d71e14..62b7b33 100644
|
||||
--- a/lib/CMakeLists.txt
|
||||
+++ b/lib/CMakeLists.txt
|
||||
@@ -125,7 +125,6 @@ if(WIN32)
|
||||
if(MSVC)
|
||||
# Add "_imp" as a suffix before the extension to avoid conflicting with
|
||||
# the statically linked "libcurl.lib"
|
||||
- set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
14
externals/vcpkg/ports/curl/0012-fix-dependency-idn2.patch
vendored
Executable file
14
externals/vcpkg/ports/curl/0012-fix-dependency-idn2.patch
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9f6de81..6702845 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -632,6 +632,9 @@ endif()
|
||||
option(USE_LIBIDN2 "Use libidn2 for IDN support" ON)
|
||||
set(HAVE_LIBIDN2 OFF)
|
||||
if(USE_LIBIDN2)
|
||||
+ set(HAVE_LIBIDN2 TRUE)
|
||||
+ list(INSERT CURL_LIBS 0 ${LIBIDN2_LINK_LIBRARIES})
|
||||
+elseif(0)
|
||||
check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2)
|
||||
endif()
|
||||
|
||||
15
externals/vcpkg/ports/curl/0020-fix-pc-file.patch
vendored
Executable file
15
externals/vcpkg/ports/curl/0020-fix-pc-file.patch
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8b2e428..ea430f4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1505,7 +1505,9 @@ set(includedir "\${prefix}/include")
|
||||
set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
set(LIBCURL_LIBS "")
|
||||
set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
-foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS})
|
||||
+set(CURL_LIBS_FLAT "")
|
||||
+vcpkg_curl_flatten(CURL_LIBS CURL_LIBS_FLAT)
|
||||
+foreach(_lib ${CURL_LIBS_FLAT})
|
||||
if(TARGET "${_lib}")
|
||||
set(_libname "${_lib}")
|
||||
get_target_property(_imported "${_libname}" IMPORTED)
|
||||
13
externals/vcpkg/ports/curl/0021-normaliz.patch
vendored
Executable file
13
externals/vcpkg/ports/curl/0021-normaliz.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6d209be..9f6de81 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -638,7 +638,7 @@ endif()
|
||||
if(WIN32)
|
||||
option(USE_WIN32_IDN "Use WinIDN for IDN support" OFF)
|
||||
if(USE_WIN32_IDN)
|
||||
- list(APPEND CURL_LIBS "Normaliz")
|
||||
+ list(APPEND CURL_LIBS "normaliz")
|
||||
set(WANT_IDN_PROTOTYPES ON)
|
||||
endif()
|
||||
endif()
|
||||
12
externals/vcpkg/ports/curl/0022-deduplicate-libs.patch
vendored
Executable file
12
externals/vcpkg/ports/curl/0022-deduplicate-libs.patch
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 09d82f1..f0d99e6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1507,6 +1507,7 @@ else()
|
||||
set(ENABLE_SHARED "no")
|
||||
set(ENABLE_STATIC "yes")
|
||||
set(LIBCURL_NO_SHARED "${LIBCURL_LIBS}")
|
||||
+ set(LIBCURL_LIBS "")
|
||||
endif()
|
||||
# "a" (Linux) or "lib" (Windows)
|
||||
string(REPLACE "." "" libext "${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
82
externals/vcpkg/ports/curl/cmake-project-include.cmake
vendored
Executable file
82
externals/vcpkg/ports/curl/cmake-project-include.cmake
vendored
Executable file
@@ -0,0 +1,82 @@
|
||||
# Process the libs and targets in the variable named by `input`
|
||||
# into a flat list of libs in the variable named by `output`.
|
||||
# Simplify -framework elements.
|
||||
# Use -l where possible.
|
||||
# Avoid duplicates.
|
||||
function(vcpkg_curl_flatten input output)
|
||||
set(output_libs "${${output}}")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
string(REGEX REPLACE ";optimized;[^;]*|;debug" "" input_libs "VCPKG;${${input}}")
|
||||
else()
|
||||
string(REGEX REPLACE ";debug;[^;]*|;optimized" "" input_libs "VCPKG;${${input}}")
|
||||
endif()
|
||||
list(REMOVE_AT input_libs 0)
|
||||
while(input_libs)
|
||||
list(POP_BACK input_libs lib)
|
||||
if(TARGET "${lib}")
|
||||
set(import_lib "")
|
||||
set(import_location "")
|
||||
get_target_property(type "${lib}" TYPE)
|
||||
if(NOT type STREQUAL "INTERFACE_LIBRARY")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
get_target_property(link_libs "${lib}" IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG)
|
||||
get_target_property(import_lib "${lib}" IMPORTED_IMPLIB_DEBUG)
|
||||
get_target_property(import_location "${lib}" IMPORTED_LOCATION_DEBUG)
|
||||
else()
|
||||
get_target_property(link_libs "${lib}" IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE)
|
||||
get_target_property(import_lib "${lib}" IMPORTED_IMPLIB_RELEASE)
|
||||
get_target_property(import_location "${lib}" IMPORTED_LOCATION_RELEASE)
|
||||
endif()
|
||||
if(link_libs)
|
||||
vcpkg_curl_flatten(link_libs output_libs)
|
||||
endif()
|
||||
get_target_property(link_libs "${lib}" IMPORTED_LINK_INTERFACE_LIBRARIES)
|
||||
if(link_libs)
|
||||
vcpkg_curl_flatten(link_libs output_libs)
|
||||
endif()
|
||||
if(NOT import_lib)
|
||||
get_target_property(import_lib "${lib}" IMPORTED_IMPLIB)
|
||||
endif()
|
||||
if(NOT import_location)
|
||||
get_target_property(import_location "${lib}" IMPORTED_LOCATION)
|
||||
endif()
|
||||
endif()
|
||||
get_target_property(link_libs "${lib}" INTERFACE_LINK_LIBRARIES)
|
||||
if(link_libs)
|
||||
vcpkg_curl_flatten(link_libs output_libs)
|
||||
endif()
|
||||
if(import_lib)
|
||||
set(lib "${import_lib}")
|
||||
elseif(import_location)
|
||||
set(lib "${import_location}")
|
||||
endif()
|
||||
endif()
|
||||
if(lib MATCHES "^(.*)/([^/]*)[.]framework$")
|
||||
if(CMAKE_MATCH_1 IN_LIST CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES)
|
||||
set(lib "-framework ${CMAKE_MATCH_2}")
|
||||
else()
|
||||
set(lib "-framework ${lib}")
|
||||
endif()
|
||||
elseif(WIN32 AND lib MATCHES ".*/${CMAKE_IMPORT_LIBRARY_PREFIX}([^/]*)${CMAKE_IMPORT_LIBRARY_SUFFIX}")
|
||||
set(lib -l${CMAKE_MATCH_1})
|
||||
elseif(lib MATCHES ".*/${CMAKE_STATIC_LIBRARY_PREFIX}([^/]*)${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
set(lib -l${CMAKE_MATCH_1})
|
||||
endif()
|
||||
if(NOT "${lib}" IN_LIST output_libs)
|
||||
list(PREPEND output_libs "${lib}")
|
||||
endif()
|
||||
endwhile()
|
||||
set("${output}" "${output_libs}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if(CURL_USE_LIBSSH2)
|
||||
find_package(Libssh2 CONFIG REQUIRED)
|
||||
set(LIBSSH2_FOUND TRUE)
|
||||
get_target_property(LIBSSH2_INCLUDE_DIR Libssh2::libssh2 INTERFACE_INCLUDE_DIRECTORIES)
|
||||
set(LIBSSH2_LIBRARY Libssh2::libssh2)
|
||||
endif()
|
||||
|
||||
if(USE_LIBIDN2)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LIBIDN2 REQUIRED libidn2)
|
||||
endif()
|
||||
23
externals/vcpkg/ports/curl/export-components.patch
vendored
Executable file
23
externals/vcpkg/ports/curl/export-components.patch
vendored
Executable file
@@ -0,0 +1,23 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 874a237..3974956 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1617,8 +1617,17 @@ if(CURL_ENABLE_EXPORT_TARGET)
|
||||
)
|
||||
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@)
|
||||
+ if(z_vcpkg_curl_component MATCHES "^[-_a-zA-Z0-9]*$")
|
||||
+ set(CURL_${z_vcpkg_curl_component}_FOUND TRUE)
|
||||
+ endif()
|
||||
+endforeach()
|
||||
+]] @ONLY)
|
||||
+
|
||||
install(
|
||||
- FILES ${version_config} ${project_config}
|
||||
+ FILES ${version_config} ${project_config} ${components_file}
|
||||
DESTINATION ${CURL_INSTALL_CMAKE_DIR}
|
||||
)
|
||||
|
||||
14
externals/vcpkg/ports/curl/mbedtls-ws2_32.patch
vendored
Executable file
14
externals/vcpkg/ports/curl/mbedtls-ws2_32.patch
vendored
Executable file
@@ -0,0 +1,14 @@
|
||||
diff --git a/CMake/FindMbedTLS.cmake b/CMake/FindMbedTLS.cmake
|
||||
index 7bdb197..c8c5a73 100644
|
||||
--- a/CMake/FindMbedTLS.cmake
|
||||
+++ b/CMake/FindMbedTLS.cmake
|
||||
@@ -26,6 +26,9 @@ find_library(MBEDX509_LIBRARY mbedx509)
|
||||
find_library(MBEDCRYPTO_LIBRARY mbedcrypto)
|
||||
|
||||
set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}")
|
||||
+if(WIN32)
|
||||
+ list(APPEND MBEDTLS_LIBRARIES ws2_32)
|
||||
+endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(MbedTLS DEFAULT_MSG
|
||||
148
externals/vcpkg/ports/curl/portfile.cmake
vendored
Executable file
148
externals/vcpkg/ports/curl/portfile.cmake
vendored
Executable file
@@ -0,0 +1,148 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO curl/curl
|
||||
REF curl-7_83_1
|
||||
SHA512 f4ede3c829aaa1142358d956cba4b33f06d3f0319c9f1cd65b63413de60a8690165e10fcb876fc413a20fcfa53bba2a064bb4b8c3070dbf474c2f2288eeab019
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0002_fix_uwp.patch
|
||||
0005_remove_imp_suffix.patch
|
||||
0012-fix-dependency-idn2.patch
|
||||
0020-fix-pc-file.patch
|
||||
0021-normaliz.patch # for mingw on case-sensitive file system
|
||||
0022-deduplicate-libs.patch
|
||||
mbedtls-ws2_32.patch
|
||||
export-components.patch
|
||||
wolfssl-ntlm.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB)
|
||||
|
||||
# schannel will enable sspi, but sspi do not support uwp
|
||||
foreach(feature IN ITEMS "schannel" "sspi" "tool" "winldap")
|
||||
if(feature IN_LIST FEATURES AND VCPKG_TARGET_IS_UWP)
|
||||
message(FATAL_ERROR "Feature ${feature} is not supported on UWP.")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if("sectransp" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_OSX)
|
||||
message(FATAL_ERROR "sectransp is not supported on non-Apple platforms")
|
||||
endif()
|
||||
|
||||
foreach(feature IN ITEMS "winldap" "winidn")
|
||||
if(feature IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
message(FATAL_ERROR "Feature ${feature} is not supported on non-Windows platforms.")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
# Support HTTP2 TLS Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location.
|
||||
http2 USE_NGHTTP2
|
||||
wolfssl CURL_USE_WOLFSSL
|
||||
openssl CURL_USE_OPENSSL
|
||||
mbedtls CURL_USE_MBEDTLS
|
||||
ssh CURL_USE_LIBSSH2
|
||||
tool BUILD_CURL_EXE
|
||||
c-ares ENABLE_ARES
|
||||
sspi CURL_WINDOWS_SSPI
|
||||
brotli CURL_BROTLI
|
||||
schannel CURL_USE_SCHANNEL
|
||||
sectransp CURL_USE_SECTRANSP
|
||||
idn2 USE_LIBIDN2
|
||||
winidn USE_WIN32_IDN
|
||||
winldap USE_WIN32_LDAP
|
||||
INVERTED_FEATURES
|
||||
non-http HTTP_ONLY
|
||||
winldap CURL_DISABLE_LDAP # Only WinLDAP support ATM
|
||||
)
|
||||
|
||||
set(OPTIONS "")
|
||||
set(OPTIONS_RELEASE "")
|
||||
set(OPTIONS_DEBUG "")
|
||||
if("idn2" IN_LIST FEATURES)
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
list(APPEND OPTIONS "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}")
|
||||
endif()
|
||||
|
||||
if("sectransp" IN_LIST FEATURES)
|
||||
list(APPEND OPTIONS -DCURL_CA_PATH=none)
|
||||
endif()
|
||||
|
||||
# UWP targets
|
||||
if(VCPKG_TARGET_IS_UWP)
|
||||
list(APPEND OPTIONS
|
||||
-DCURL_DISABLE_TELNET=ON
|
||||
-DENABLE_IPV6=OFF
|
||||
-DENABLE_UNIX_SOCKETS=OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
"-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake"
|
||||
${FEATURE_OPTIONS}
|
||||
${OPTIONS}
|
||||
-DBUILD_TESTING=OFF
|
||||
-DENABLE_MANUAL=OFF
|
||||
-DCURL_STATICLIB=${CURL_STATICLIB}
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Perl=ON
|
||||
-DENABLE_DEBUG=ON
|
||||
-DCURL_CA_FALLBACK=ON
|
||||
OPTIONS_RELEASE
|
||||
${OPTIONS_RELEASE}
|
||||
OPTIONS_DEBUG
|
||||
${OPTIONS_DEBUG}
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if ("tool" IN_LIST FEATURES)
|
||||
vcpkg_copy_tools(TOOL_NAMES curl AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/CURL)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
set(namespec "curl")
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
set(namespec "libcurl")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libcurl.pc" " -lcurl" " -l${namespec}")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc" " -lcurl" " -l${namespec}-d")
|
||||
endif()
|
||||
|
||||
#Fix install path
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_PACKAGES_DIR}" "\${prefix}")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_INSTALLED_DIR}" "\${prefix}")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/curl-config" "\nprefix=\${prefix}" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../../.. && pwd -P)]=])
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/curl-config")
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/curl-config")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "${CURRENT_PACKAGES_DIR}" "\${prefix}")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "${CURRENT_INSTALLED_DIR}" "\${prefix}")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "\nprefix=\${prefix}/debug" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../../../.. && pwd -P)]=])
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "-lcurl" "-l${namespec}-d")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "curl." "curl-d.")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/curl-config")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/curl/curl.h"
|
||||
"#ifdef CURL_STATICLIB"
|
||||
"#if 1"
|
||||
)
|
||||
endif()
|
||||
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
51
externals/vcpkg/ports/curl/vcpkg-cmake-wrapper.cmake
vendored
Executable file
51
externals/vcpkg/ports/curl/vcpkg-cmake-wrapper.cmake
vendored
Executable file
@@ -0,0 +1,51 @@
|
||||
cmake_policy(PUSH)
|
||||
cmake_policy(SET CMP0012 NEW)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
cmake_policy(SET CMP0057 NEW)
|
||||
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.14 AND COMPONENTS IN_LIST ARGS)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/CURLConfigComponents.cmake")
|
||||
endif()
|
||||
|
||||
list(REMOVE_ITEM ARGS "NO_MODULE" "CONFIG" "MODULE")
|
||||
_find_package(${ARGS} CONFIG)
|
||||
|
||||
if(CURL_FOUND)
|
||||
get_target_property(_curl_include_dirs CURL::libcurl INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property(_curl_link_libraries CURL::libcurl INTERFACE_LINK_LIBRARIES)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
get_target_property(_curl_location_debug CURL::libcurl IMPORTED_IMPLIB_DEBUG)
|
||||
get_target_property(_curl_location_release CURL::libcurl IMPORTED_IMPLIB_RELEASE)
|
||||
endif()
|
||||
|
||||
if(NOT _curl_location_debug AND NOT _curl_location_release)
|
||||
get_target_property(_curl_location_debug CURL::libcurl IMPORTED_LOCATION_DEBUG)
|
||||
get_target_property(_curl_location_release CURL::libcurl IMPORTED_LOCATION_RELEASE)
|
||||
endif()
|
||||
|
||||
if(NOT _curl_link_libraries)
|
||||
set(_curl_link_libraries "")
|
||||
endif()
|
||||
|
||||
if("Libssh2::libssh2" IN_LIST _curl_link_libraries)
|
||||
find_package(Libssh2 CONFIG QUIET)
|
||||
endif()
|
||||
|
||||
set(CURL_INCLUDE_DIRS "${_curl_include_dirs}")
|
||||
set(CURL_LIBRARY_DEBUG "${_curl_location_debug}")
|
||||
set(CURL_LIBRARY_RELEASE "${_curl_location_release}")
|
||||
|
||||
#For builds which rely on CURL_LIBRAR(Y/IES)
|
||||
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
|
||||
select_library_configurations(CURL)
|
||||
|
||||
set(CURL_LIBRARIES ${CURL_LIBRARY} ${_curl_link_libraries})
|
||||
set(CURL_VERSION_STRING "${CURL_VERSION}")
|
||||
|
||||
unset(_curl_include_dirs)
|
||||
unset(_curl_link_libraries)
|
||||
unset(_curl_location_debug)
|
||||
unset(_curl_location_release)
|
||||
endif()
|
||||
cmake_policy(POP)
|
||||
195
externals/vcpkg/ports/curl/vcpkg.json
vendored
Executable file
195
externals/vcpkg/ports/curl/vcpkg.json
vendored
Executable file
@@ -0,0 +1,195 @@
|
||||
{
|
||||
"name": "curl",
|
||||
"version": "7.83.1",
|
||||
"port-version": 2,
|
||||
"description": "A library for transferring data with URLs",
|
||||
"homepage": "https://curl.se/",
|
||||
"license": null,
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"default-features": [
|
||||
"non-http",
|
||||
"ssl"
|
||||
],
|
||||
"features": {
|
||||
"brotli": {
|
||||
"description": "brotli support (brotli)",
|
||||
"dependencies": [
|
||||
"brotli"
|
||||
]
|
||||
},
|
||||
"c-ares": {
|
||||
"description": "c-ares support",
|
||||
"dependencies": [
|
||||
"c-ares"
|
||||
]
|
||||
},
|
||||
"http2": {
|
||||
"description": "HTTP2 support",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"ssl"
|
||||
]
|
||||
},
|
||||
"nghttp2"
|
||||
]
|
||||
},
|
||||
"idn": {
|
||||
"description": "Default IDN support",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"winidn"
|
||||
],
|
||||
"platform": "windows"
|
||||
},
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"idn2"
|
||||
],
|
||||
"platform": "!windows"
|
||||
}
|
||||
]
|
||||
},
|
||||
"idn2": {
|
||||
"description": "idn2 support (libidn2)",
|
||||
"dependencies": [
|
||||
"libidn2"
|
||||
]
|
||||
},
|
||||
"mbedtls": {
|
||||
"description": "SSL support (mbedTLS)",
|
||||
"dependencies": [
|
||||
"mbedtls"
|
||||
]
|
||||
},
|
||||
"non-http": {
|
||||
"description": "Enables protocols beyond HTTP/HTTPS/HTTP2"
|
||||
},
|
||||
"openssl": {
|
||||
"description": "SSL support (OpenSSL)",
|
||||
"dependencies": [
|
||||
"openssl"
|
||||
]
|
||||
},
|
||||
"schannel": {
|
||||
"description": "SSL support (Secure Channel)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"sspi"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sectransp": {
|
||||
"description": "SSL support (sectransp)"
|
||||
},
|
||||
"ssh": {
|
||||
"description": "SSH support via libssh2",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"non-http"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"openssl"
|
||||
]
|
||||
},
|
||||
"libssh2"
|
||||
]
|
||||
},
|
||||
"ssl": {
|
||||
"description": "Default SSL backend",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"sectransp"
|
||||
],
|
||||
"platform": "osx"
|
||||
},
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"schannel"
|
||||
],
|
||||
"platform": "(windows & !uwp) | mingw"
|
||||
},
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"openssl"
|
||||
],
|
||||
"platform": "(uwp | !windows) & !osx & !mingw"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sspi": {
|
||||
"description": "SSPI support"
|
||||
},
|
||||
"tool": {
|
||||
"description": "Builds curl executable"
|
||||
},
|
||||
"winidn": {
|
||||
"description": "WinIDN support"
|
||||
},
|
||||
"winldap": {
|
||||
"description": "LDAP support (WinLDAP). This feature does not include LDAPS support.",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"non-http"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"winssl": {
|
||||
"description": "Legacy name for schannel",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"schannel"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"wolfssl": {
|
||||
"description": "SSL support (wolfSSL)",
|
||||
"dependencies": [
|
||||
"wolfssl"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
38
externals/vcpkg/ports/curl/wolfssl-ntlm.patch
vendored
Executable file
38
externals/vcpkg/ports/curl/wolfssl-ntlm.patch
vendored
Executable file
@@ -0,0 +1,38 @@
|
||||
--- a/lib/curl_ntlm_core.c
|
||||
+++ b/lib/curl_ntlm_core.c
|
||||
@@ -60,12 +60,17 @@
|
||||
|
||||
#ifdef USE_WOLFSSL
|
||||
#include <wolfssl/options.h>
|
||||
-#endif
|
||||
-
|
||||
+# include <wolfssl/openssl/des.h>
|
||||
+# include <wolfssl/openssl/md5.h>
|
||||
+# include <wolfssl/openssl/ssl.h>
|
||||
+# include <wolfssl/openssl/rand.h>
|
||||
+#else
|
||||
# include <openssl/des.h>
|
||||
# include <openssl/md5.h>
|
||||
# include <openssl/ssl.h>
|
||||
# include <openssl/rand.h>
|
||||
+#endif
|
||||
+
|
||||
# if (defined(OPENSSL_VERSION_NUMBER) && \
|
||||
(OPENSSL_VERSION_NUMBER < 0x00907001L)) && !defined(USE_WOLFSSL)
|
||||
# define DES_key_schedule des_key_schedule
|
||||
diff -ur a/lib/curl_ntlm_core.h b/lib/curl_ntlm_core.h
|
||||
--- a/lib/curl_ntlm_core.h 2022-05-10 23:11:15.000000000 -0700
|
||||
+++ b/lib/curl_ntlm_core.h 2022-05-16 16:48:39.931726300 -0700
|
||||
@@ -35,10 +35,10 @@
|
||||
#define NTLM_NEEDS_NSS_INIT
|
||||
#endif
|
||||
|
||||
-#if defined(USE_OPENSSL) || defined(USE_WOLFSSL)
|
||||
#ifdef USE_WOLFSSL
|
||||
# include <wolfssl/options.h>
|
||||
-#endif
|
||||
+# include <wolfssl/openssl/ssl.h>
|
||||
+#elif defined(USE_OPENSSL)
|
||||
# include <openssl/ssl.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user