mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[curl] Update (#18971)
* Modernize portfile * Don't export implicit link libraries * Revise osx framework handling * Fix exported per-config location of dependencies * Move curl-config to tools, incl. debug variant * Update to 7.77.0 * Add WinIDN support and default IDN selection * Use pkgconfig for libidn2 configuration * Update to 0.78.0 * Remove obsolete nghttp2 staticlib patch * Fix libs duplication in pc file * Resolve transitive deps for pc file/curl-config * x-add-version * Fix winssl dependencies * Add winldap feature, not default * Update git-tree Co-authored-by: past-due <30942300+past-due@users.noreply.github.com>
This commit is contained in:
parent
ad42c88e51
commit
6a9ecfd57f
@ -13,16 +13,4 @@ index 62b7b33..8a4bd71 100644
|
||||
if(WIN32)
|
||||
add_definitions(-D_USRDLL)
|
||||
endif()
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9e47967..7694f04 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -505,7 +505,7 @@ if(USE_QUICHE)
|
||||
cmake_pop_check_state()
|
||||
endif()
|
||||
|
||||
-if(WIN32)
|
||||
+if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
set(USE_WIN32_CRYPTO ON)
|
||||
endif()
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5a13333..2dd274c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -431,6 +431,9 @@ if(USE_NGHTTP2)
|
||||
find_package(NGHTTP2 REQUIRED)
|
||||
include_directories(${NGHTTP2_INCLUDE_DIRS})
|
||||
list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES})
|
||||
+ if(NOT BUILD_SHARED_LIBS)
|
||||
+ add_definitions(-DNGHTTP2_STATICLIB)
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
function(CheckQuicSupportInOpenSSL)
|
@ -9,5 +9,6 @@ index 1d71e14..62b7b33 100644
|
||||
-if(WIN32)
|
||||
+if(WIN32 AND 0)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# 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")
|
||||
if(MSVC)
|
||||
# Add "_imp" as a suffix before the extension to avoid conflicting with
|
||||
# the statically linked "libcurl.lib"
|
||||
|
@ -1,51 +1,14 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index dc7223b..a661cb8 100644
|
||||
index 9f6de81..6702845 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -620,9 +620,6 @@ if(NOT CURL_DISABLE_LDAPS)
|
||||
check_include_file_concat("ldapssl.h" HAVE_LDAPSSL_H)
|
||||
@@ -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(APPEND CURL_LIBS ${LIBIDN2_LIBRARIES})
|
||||
+elseif(0)
|
||||
check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2)
|
||||
endif()
|
||||
|
||||
-# Check for idn
|
||||
-check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2)
|
||||
-
|
||||
# Check for symbol dlopen (same as HAVE_LIBDL)
|
||||
check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
|
||||
|
||||
@@ -870,6 +867,20 @@ if(CURL_CA_PATH_SET AND NOT USE_OPENSSL AND NOT USE_MBEDTLS)
|
||||
"Set CURL_CA_PATH=none or enable one of those TLS backends.")
|
||||
endif()
|
||||
|
||||
+if (CMAKE_USE_IDN2)
|
||||
+ include(FindPackageHandleStandardArgs)
|
||||
+ include(SelectLibraryConfigurations)
|
||||
+
|
||||
+ find_path(LIBIDN2_INCLUDE_DIRS idn2.h)
|
||||
+ find_library(LIBIDN2_LIBRARY_DEBUG NAMES libidn2 idn2 PATHS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib NO_DEFAULT_PATH Release RelWithDebInfo MinSizeRel)
|
||||
+ find_library(LIBIDN2_LIBRARY_RELEASE NAMES libidn2 idn2 PATHS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib NO_DEFAULT_PATH Debug)
|
||||
+ select_library_configurations(LIBIDN2)
|
||||
+
|
||||
+ add_definitions(-DHAVE_IDN2_H -DHAVE_LIBIDN2)
|
||||
+ include_directories(${LIBIDN2_INCLUDE_DIRS})
|
||||
+ link_libraries(${LIBIDN2_LIBRARY})
|
||||
+endif()
|
||||
+
|
||||
# Check for header files
|
||||
if(NOT UNIX)
|
||||
check_include_file_concat("windows.h" HAVE_WINDOWS_H)
|
||||
@@ -906,7 +917,6 @@ check_include_file_concat("crypto.h" HAVE_CRYPTO_H)
|
||||
check_include_file_concat("err.h" HAVE_ERR_H)
|
||||
check_include_file_concat("errno.h" HAVE_ERRNO_H)
|
||||
check_include_file_concat("fcntl.h" HAVE_FCNTL_H)
|
||||
-check_include_file_concat("idn2.h" HAVE_IDN2_H)
|
||||
check_include_file_concat("ifaddrs.h" HAVE_IFADDRS_H)
|
||||
check_include_file_concat("io.h" HAVE_IO_H)
|
||||
check_include_file_concat("krb.h" HAVE_KRB_H)
|
||||
@@ -1362,7 +1372,6 @@ _add_if("libz" HAVE_LIBZ)
|
||||
_add_if("brotli" HAVE_BROTLI)
|
||||
_add_if("zstd" HAVE_ZSTD)
|
||||
_add_if("AsynchDNS" USE_ARES OR USE_THREADS_POSIX OR USE_THREADS_WIN32)
|
||||
-_add_if("IDN" HAVE_LIBIDN2)
|
||||
_add_if("Largefile" (CURL_SIZEOF_CURL_OFF_T GREATER 4) AND
|
||||
((SIZEOF_OFF_T GREATER 4) OR USE_WIN32_LARGE_FILES))
|
||||
# TODO SSP1 (Schannel) check is missing
|
||||
|
@ -1,16 +1,59 @@
|
||||
diff -urw a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt 2021-05-10 20:46:52.204346972 +0200
|
||||
+++ b/CMakeLists.txt 2021-05-11 19:39:00.065235266 +0200
|
||||
@@ -1482,6 +1482,12 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8b2e428..ea430f4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1462,7 +1462,26 @@ 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})
|
||||
+function(flatten input output)
|
||||
+ set(output_libs "${${output}}")
|
||||
+ set(input_libs "${${input}}")
|
||||
+ while(input_libs)
|
||||
+ list(POP_BACK input_libs lib)
|
||||
+ if(NOT "${lib}" IN_LIST output_libs)
|
||||
+ if(TARGET "${lib}")
|
||||
+ get_target_property(link_libs "${lib}" INTERFACE_LINK_LIBRARIES)
|
||||
+ if(link_libs)
|
||||
+ flatten(link_libs output_libs)
|
||||
+ endif()
|
||||
+ endif()
|
||||
+ list(PREPEND output_libs "${lib}")
|
||||
+ endif()
|
||||
+ endwhile()
|
||||
+ set("${output}" "${output_libs}" PARENT_SCOPE)
|
||||
+endfunction()
|
||||
+set(CURL_LIBS_FLAT "")
|
||||
+flatten(CURL_LIBS CURL_LIBS_FLAT)
|
||||
+foreach(_lib ${CURL_LIBS_FLAT})
|
||||
if(TARGET "${_lib}")
|
||||
set(_libname "${_lib}")
|
||||
get_target_property(_libtype "${_libname}" TYPE)
|
||||
@@ -1473,12 +1492,26 @@ foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS})
|
||||
# this information in the .pc file.
|
||||
continue()
|
||||
endif()
|
||||
+ set(_lib NOTFOUND)
|
||||
+ if(DEFINED CMAKE_BUILD_TYPE)
|
||||
+ string(TOUPPER "${CMAKE_BUILD_TYPE}" config)
|
||||
+ get_target_property(_lib "${_libname}" IMPORTED_LOCATION_${config})
|
||||
+ endif()
|
||||
+ if(NOT _lib)
|
||||
get_target_property(_lib "${_libname}" LOCATION)
|
||||
+ endif()
|
||||
if(NOT _lib)
|
||||
message(WARNING "Bad lib in library list: ${_libname}")
|
||||
continue()
|
||||
endif()
|
||||
+ elseif(_lib MATCHES "^(.*)/([^/]*)[.]framework$")
|
||||
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()
|
||||
endif()
|
||||
+ endif()
|
||||
if(_lib MATCHES ".*/.*" OR _lib MATCHES "^-")
|
||||
set(LIBCURL_LIBS "${LIBCURL_LIBS} ${_lib}")
|
||||
else()
|
||||
|
13
ports/curl/0021-normaliz.patch
Normal file
13
ports/curl/0021-normaliz.patch
Normal 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()
|
25
ports/curl/0022-deduplicate-libs.patch
Normal file
25
ports/curl/0022-deduplicate-libs.patch
Normal file
@ -0,0 +1,25 @@
|
||||
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}")
|
||||
diff --git a/curl-config.in b/curl-config.in
|
||||
index 8b4a29a..e756ae8 100644
|
||||
--- a/curl-config.in
|
||||
+++ b/curl-config.in
|
||||
@@ -172,7 +172,7 @@ while test $# -gt 0; do
|
||||
|
||||
--static-libs)
|
||||
if test "X@ENABLE_STATIC@" != "Xno" ; then
|
||||
- echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@
|
||||
+ echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_NO_SHARED@
|
||||
else
|
||||
echo "curl was built with static libraries disabled" >&2
|
||||
exit 1
|
@ -1,12 +1,11 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO curl/curl
|
||||
REF e052859759b34d0e05ce0f17244873e5cd7b457b #curl-7_74_0
|
||||
SHA512 3dbbab00dda4f0e7d012fab358d2dd1362ff0c0f59c81f638fb547acba6f74a61c306906892447af3b18e8b0ebb93ebb8e0ac77e92247864bfa3a9c4ce7ea1d0
|
||||
REF bfbde883af33397943df68a3ae01847a634d33bf #curl-7_78_0
|
||||
SHA512 72c2d0daedbd1e0610f507f637c5725cb0769befe5205f613260217b692e27ec135711974f85660f863a49b415c1457d2d29960158758e232caa89f972f7045e
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0002_fix_uwp.patch
|
||||
0004_nghttp2_staticlib.patch
|
||||
0005_remove_imp_suffix.patch
|
||||
0006_fix_tool_depends.patch
|
||||
0007_disable_tool_export_curl_target.patch
|
||||
@ -14,12 +13,14 @@ vcpkg_from_github(
|
||||
0011_fix_static_build.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
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB)
|
||||
|
||||
# schannel will enable sspi, but sspi do not support uwp
|
||||
foreach(feature "schannel" "sspi" "tool")
|
||||
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()
|
||||
@ -29,48 +30,61 @@ 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
|
||||
openssl CMAKE_USE_OPENSSL
|
||||
mbedtls CMAKE_USE_MBEDTLS
|
||||
ssh CMAKE_USE_LIBSSH2
|
||||
tool BUILD_CURL_EXE
|
||||
c-ares ENABLE_ARES
|
||||
sspi CURL_WINDOWS_SSPI
|
||||
brotli CURL_BROTLI
|
||||
schannel CMAKE_USE_SCHANNEL
|
||||
sectransp CMAKE_USE_SECTRANSP
|
||||
idn2 CMAKE_USE_IDN2
|
||||
|
||||
# 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
|
||||
openssl CMAKE_USE_OPENSSL
|
||||
mbedtls CMAKE_USE_MBEDTLS
|
||||
ssh CMAKE_USE_LIBSSH2
|
||||
tool BUILD_CURL_EXE
|
||||
c-ares ENABLE_ARES
|
||||
sspi CURL_WINDOWS_SSPI
|
||||
brotli CURL_BROTLI
|
||||
schannel CMAKE_USE_SCHANNEL
|
||||
sectransp CMAKE_USE_SECTRANSP
|
||||
idn2 USE_LIBIDN2
|
||||
winidn USE_WIN32_IDN
|
||||
winldap USE_WIN32_LDAP
|
||||
INVERTED_FEATURES
|
||||
non-http HTTP_ONLY
|
||||
non-http HTTP_ONLY
|
||||
winldap CURL_DISABLE_LDAP # Only WinLDAP support ATM
|
||||
)
|
||||
|
||||
set(SECTRANSP_OPTIONS)
|
||||
set(OPTIONS_RELEASE "")
|
||||
set(OPTIONS_DEBUG "")
|
||||
if("idn2" IN_LIST FEATURES)
|
||||
x_vcpkg_pkgconfig_get_modules(PREFIX libidn2 MODULES libidn2 LIBS)
|
||||
list(APPEND OPTIONS_RELEASE "-DLIBIDN2_LIBRARIES=${libidn2_LIBS_RELEASE}")
|
||||
list(APPEND OPTIONS_DEBUG "-DLIBIDN2_LIBRARIES=${libidn2_LIBS_DEBUG}")
|
||||
endif()
|
||||
|
||||
set(SECTRANSP_OPTIONS "")
|
||||
if("sectransp" IN_LIST FEATURES)
|
||||
set(SECTRANSP_OPTIONS -DCURL_CA_PATH=none)
|
||||
endif()
|
||||
|
||||
# UWP targets
|
||||
set(UWP_OPTIONS)
|
||||
set(UWP_OPTIONS "")
|
||||
if(VCPKG_TARGET_IS_UWP)
|
||||
set(UWP_OPTIONS
|
||||
-DUSE_WIN32_LDAP=OFF
|
||||
-DCURL_DISABLE_TELNET=ON
|
||||
-DENABLE_IPV6=OFF
|
||||
-DENABLE_UNIX_SOCKETS=OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
${UWP_OPTIONS}
|
||||
${ADDITIONAL_SCRIPTS}
|
||||
${EXTRA_ARGS}
|
||||
${SECTRANSP_OPTIONS}
|
||||
-DBUILD_TESTING=OFF
|
||||
-DENABLE_MANUAL=OFF
|
||||
@ -78,73 +92,54 @@ vcpkg_configure_cmake(
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Perl=ON
|
||||
-DENABLE_DEBUG=ON
|
||||
-DCURL_CA_FALLBACK=ON
|
||||
OPTIONS_RELEASE
|
||||
${OPTIONS_RELEASE}
|
||||
OPTIONS_DEBUG
|
||||
${OPTIONS_DEBUG}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if ("tool" IN_LIST FEATURES)
|
||||
vcpkg_copy_tools(TOOL_NAMES curl AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CURL)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/CURL)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
#Fix install path
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/bin/curl-config CURL_CONFIG)
|
||||
string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${prefix}" CURL_CONFIG "${CURL_CONFIG}")
|
||||
string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${prefix}" CURL_CONFIG "${CURL_CONFIG}")
|
||||
string(REPLACE "\nprefix=\${prefix}" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../.. && pwd -P)]=] CURL_CONFIG "${CURL_CONFIG}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/bin/curl-config "${CURL_CONFIG}")
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/share/${PORT}/curl-config)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config)
|
||||
|
||||
file(GLOB FILES ${CURRENT_PACKAGES_DIR}/bin/*)
|
||||
if(NOT FILES)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||||
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" "-lcurl-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(GLOB FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*)
|
||||
if(NOT FILES)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
|
||||
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
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/curl/curl.h"
|
||||
"#ifdef CURL_STATICLIB"
|
||||
"#if 1"
|
||||
)
|
||||
else()
|
||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/curl/curl.h
|
||||
"#ifdef CURL_STATICLIB"
|
||||
"#if 0"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
# Fix the pkgconfig file for debug
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(READ ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc _contents)
|
||||
string(REPLACE " -lcurl" " -lcurl-d" _contents "${_contents}")
|
||||
string(REPLACE " -loptimized " " " _contents "${_contents}")
|
||||
string(REPLACE " -ldebug " " " _contents "${_contents}")
|
||||
string(REPLACE " ${CURRENT_INSTALLED_DIR}/lib/pthreadVC3.lib" "" _contents "${_contents}")
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc "${_contents}")
|
||||
endif()
|
||||
|
||||
# Fix the pkgconfig file for release
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(READ ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc _contents)
|
||||
string(REPLACE " -loptimized " " " _contents "${_contents}")
|
||||
string(REPLACE " -ldebug " " " _contents "${_contents}")
|
||||
string(REPLACE " ${CURRENT_INSTALLED_DIR}/debug/lib/pthreadVC3d.lib" "" _contents "${_contents}")
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libcurl.pc "${_contents}")
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc" " -lcurl" " -lcurl-d")
|
||||
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)
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
@ -1,10 +1,17 @@
|
||||
{
|
||||
"name": "curl",
|
||||
"version": "7.74.0",
|
||||
"port-version": 8,
|
||||
"version": "7.78.0",
|
||||
"description": "A library for transferring data with URLs",
|
||||
"homepage": "https://github.com/curl/curl",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"default-features": [
|
||||
@ -37,10 +44,35 @@
|
||||
"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"
|
||||
"libidn2",
|
||||
{
|
||||
"name": "vcpkg-pkgconfig-get-modules",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"mbedtls": {
|
||||
@ -108,7 +140,7 @@
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"winssl"
|
||||
"schannel"
|
||||
],
|
||||
"platform": "(windows & !uwp) | mingw"
|
||||
},
|
||||
@ -128,11 +160,27 @@
|
||||
"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"
|
||||
]
|
||||
|
@ -1573,8 +1573,8 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"curl": {
|
||||
"baseline": "7.74.0",
|
||||
"port-version": 8
|
||||
"baseline": "7.78.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"curlpp": {
|
||||
"baseline": "2018-06-15-3",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "0be4cff4d8e1d37a9ddf9ab264682771c69c0d72",
|
||||
"version": "7.78.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "cd05855cc1cd2d0f221664f0bfbe639b685fa028",
|
||||
"version": "7.74.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user