aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorras0219 <533828+ras0219@users.noreply.github.com>2021-05-13 14:00:32 -0700
committerGitHub <noreply@github.com>2021-05-13 14:00:32 -0700
commite6dcc079c81161786eb7b052209a2047e79f2c6c (patch)
treeea78d0369165ac28a20e6e9c5fc9a99730e8098d
parent1c066931af5c582b183fb805370f6cd94f48e822 (diff)
downloadvcpkg-e6dcc079c81161786eb7b052209a2047e79f2c6c.tar.gz
vcpkg-e6dcc079c81161786eb7b052209a2047e79f2c6c.zip
[curl] Fix android builds. Greatly simplify pkgconfig handling. (#17418)
* [curl] Fix android builds. Greatly simplify pkgconfig handling. * [curl] Fix permissions on curl-config * [curl] Fix missing assigment in replacement * [curl] Update version Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
-rw-r--r--ports/curl/0009_fix_openssl_config.patch27
-rw-r--r--ports/curl/CONTROL59
-rw-r--r--ports/curl/CurlAndroidCrossCompile.cmake16
-rw-r--r--ports/curl/portfile.cmake128
-rw-r--r--ports/curl/vcpkg.json143
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/c-/curl.json5
7 files changed, 180 insertions, 200 deletions
diff --git a/ports/curl/0009_fix_openssl_config.patch b/ports/curl/0009_fix_openssl_config.patch
deleted file mode 100644
index 45334a34d..000000000
--- a/ports/curl/0009_fix_openssl_config.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
---- a/CMakeLists.txt (revision e052859759b34d0e05ce0f17244873e5cd7b457b)
-+++ b/CMakeLists.txt (date 1617452756163)
-@@ -383,14 +383,21 @@
- endif()
-
- if(CMAKE_USE_OPENSSL)
-- find_package(OpenSSL REQUIRED)
-+ if(ANDROID)
-+ message(WARNING "Setting paths manually (instead of using pkg-config) since this is an android build" )
-+
-+ set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARY} ${CRYPT_LIBRARY})
-+ include_directories("${OPENSSL_INCLUDE}")
-+ else()
-+ find_package(OpenSSL REQUIRED)
-+ endif()
- set(SSL_ENABLED ON)
- set(USE_OPENSSL ON)
-
- # Depend on OpenSSL via imported targets if supported by the running
- # version of CMake. This allows our dependents to get our dependencies
- # transitively.
-- if(NOT CMAKE_VERSION VERSION_LESS 3.4)
-+ if(NOT CMAKE_VERSION VERSION_LESS 3.4 AND NOT ANDROID)
- list(APPEND CURL_LIBS OpenSSL::SSL OpenSSL::Crypto)
- else()
- list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES})
diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL
deleted file mode 100644
index 009e54c78..000000000
--- a/ports/curl/CONTROL
+++ /dev/null
@@ -1,59 +0,0 @@
-Source: curl
-Port-Version: 4
-Version: 7.74.0
-Build-Depends: zlib
-Homepage: https://github.com/curl/curl
-Description: A library for transferring data with URLs
-Default-Features: ssl, non-http
-
-Feature: tool
-Description: Builds curl executable
-
-Feature: non-http
-Description: Enables protocols beyond HTTP/HTTPS/HTTP2
-
-Feature: http2
-Build-Depends: nghttp2, curl[core,ssl]
-Description: HTTP2 support
-
-Feature: ssl
-Build-Depends: curl[core,openssl] ((uwp|!windows)&!osx), curl[core,winssl] (windows&!uwp), curl[core,sectransp] (osx)
-Description: Default SSL backend
-
-Feature: ssh
-Build-Depends: curl[core,openssl], libssh2, curl[core,non-http]
-Description: SSH support via libssh2
-
-Feature: openssl
-Build-Depends: openssl
-Description: SSL support (OpenSSL)
-
-Feature: schannel
-Description: SSL support (Secure Channel)
-Build-Depends: curl[core,sspi]
-
-Feature: winssl
-Description: Legacy name for schannel
-Build-Depends: curl[schannel]
-
-Feature: mbedtls
-Build-Depends: mbedtls
-Description: SSL support (mbedTLS)
-
-Feature: sectransp
-Description: SSL support (sectransp)
-
-Feature: c-ares
-Build-Depends: c-ares
-Description: c-ares support
-
-Feature: sspi
-Description: SSPI support
-
-Feature: brotli
-Build-Depends: brotli
-Description: brotli support (brotli)
-
-Feature: idn2
-Build-Depends: libidn2
-Description: idn2 support (libidn2)
diff --git a/ports/curl/CurlAndroidCrossCompile.cmake b/ports/curl/CurlAndroidCrossCompile.cmake
deleted file mode 100644
index 43a5a1492..000000000
--- a/ports/curl/CurlAndroidCrossCompile.cmake
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
-# SPDX-License-Identifier: Apache-2.0.
-#
-
-SET( HAVE_GLIBC_STRERROR_R 1 CACHE STRING "Result from TRY_RUN" FORCE)
-SET( HAVE_GLIBC_STRERROR_R__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE)
-SET( HAVE_POSIX_STRERROR_R 0 CACHE STRING "Result from TRY_RUN" FORCE)
-SET( HAVE_POSIX_STRERROR_R__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE)
-SET( HAVE_POLL_FINE_EXITCODE 0 CACHE STRING "Result from TRY_RUN" FORCE )
-SET( HAVE_POLL_FINE_EXITCODE__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE)
-SET( CURL_HAS_H2_EXITCODE 0 CACHE STRING "Result from TRY_RUN" FORCE )
-SET( CURL_HAS_H2_EXITCODE__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE)
-SET( CURL_HAS_TLS_PROXY_EXITCODE 0 CACHE STRING "Result from TRY_RUN" FORCE )
-SET( CURL_HAS_TLS_PROXY_EXITCODE__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE)
-SET( OPENSSL_CRYPTO_LIBRARY crypto CACHE STRING "Set crypto" FORCE )
-SET( OPENSSL_SSL_LIBRARY ssl CACHE STRING "Set ssl" FORCE )
diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake
index be66d452b..21e813ab0 100644
--- a/ports/curl/portfile.cmake
+++ b/ports/curl/portfile.cmake
@@ -10,7 +10,6 @@ vcpkg_from_github(
0005_remove_imp_suffix.patch
0006_fix_tool_depends.patch
0007_disable_tool_export_curl_target.patch
- 0009_fix_openssl_config.patch
0010_fix_othertests_cmake.patch
0011_fix_static_build.patch
0012-fix-dependency-idn2.patch
@@ -64,22 +63,6 @@ if(VCPKG_TARGET_IS_UWP)
)
endif()
-if(VCPKG_TARGET_IS_ANDROID)
- set(ADDITIONAL_SCRIPTS -C "${CMAKE_CURRENT_LIST_DIR}/CurlAndroidCrossCompile.cmake")
-
- set(EXTRA_ARGS -DOPENSSL_INCLUDE="${CURRENT_INSTALLED_DIR}/include")
-
- set(EXTRA_ARGS_DEBUG
- -DOPENSSL_LIBRARY="${CURRENT_INSTALLED_DIR}/debug/lib/libssl.so"
- -DCRYPT_LIBRARY="${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.so"
- )
-
- set(EXTRA_ARGS_RELEASE
- -DOPENSSL_LIBRARY="${CURRENT_INSTALLED_DIR}/lib/libssl.so"
- -DCRYPT_LIBRARY="${CURRENT_INSTALLED_DIR}/lib/libcrypto.so"
- )
-endif()
-
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
@@ -94,10 +77,6 @@ vcpkg_configure_cmake(
-DCMAKE_DISABLE_FIND_PACKAGE_Perl=ON
-DENABLE_DEBUG=ON
-DCURL_CA_FALLBACK=ON
- OPTIONS_DEBUG
- ${EXTRA_ARGS_DEBUG}
- OPTIONS_RELEASE
- ${EXTRA_ARGS_RELEASE}
)
vcpkg_install_cmake()
@@ -112,15 +91,22 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CURL)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/curl-config DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
-file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config)
#Fix install path
-file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/curl-config CURL_CONFIG)
-string(REPLACE "${CURRENT_PACKAGES_DIR}" "${CURRENT_INSTALLED_DIR}" CURL_CONFIG "${CURL_CONFIG}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/curl-config "${CURL_CONFIG}")
-
-if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+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)
+endif()
+file(GLOB FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*)
+if(NOT FILES)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
@@ -135,81 +121,29 @@ else()
)
endif()
+
# Fix the pkgconfig file for debug
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
- if(VCPKG_TARGET_IS_WINDOWS)
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "-lcurl" "-lcurl-d")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/zlib.lib" "-lzlibd")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/libssl.lib" "-lssl")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.lib" "-lcrypto")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/mbedtls.lib" "-lmbedtls")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/mbedx509.lib" "-lmbedx509")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/mbedcrypto.lib" "-lmbedcrypto")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/nghttp2.lib" "-lnghttp2")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/libssh2.lib" "-lssh2")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/cares.lib" "-lcares")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/brotlicommon.lib" "-lbrotlicommon")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/brotlidec.lib" "-lbrotlidec")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/pthreadVC3d.lib" "-lpthreadVC3d")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc " ${CURRENT_INSTALLED_DIR}/lib/pthreadVC3.lib" "")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc " -loptimized" "")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc " -ldebug" "")
-
- elseif(VCPKG_TARGET_IS_LINUX)
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "-lcurl" "-lcurl-d")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/libssl.a" "-lssl")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.a" "-lcrypto")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/libmbedtls.a" "-lmbedtls")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/libmbedx509.a" "-lmbedx509")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/libmbedcrypto.a" "-lmbedcrypto")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/libnghttp2.a" "-lnghttp2")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/libssh2.a" "-lssh2")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/libcares.a" "-lcares")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc "${CURRENT_INSTALLED_DIR}/debug/lib/libz.a" "-lz")
- endif()
- file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libcurl.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
+ 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")
- if(VCPKG_TARGET_IS_WINDOWS)
- #vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "-lcurl" "-lcurl")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/zlib.lib" "-lzlib")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/libssl.lib" "-lssl")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/libcrypto.lib" "-lcrypto")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/mbedtls.lib" "-lmbedtls")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/mbedx509.lib" "-lmbedx509")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/mbedcrypto.lib" "-lmbedcrypto")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/nghttp2.lib" "-lnghttp2")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/libssh2.lib" "-lssh2")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/cares.lib" "-lcares")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/brotlicommon.lib" "-lbrotlicommon")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/brotlidec.lib" "-lbrotlidec")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/pthreadVC3.lib" "-lpthreadVC3")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc " ${CURRENT_INSTALLED_DIR}/debug/lib/pthreadVC3d.lib" "")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc " -loptimized" "")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc " -ldebug" "")
- elseif(VCPKG_TARGET_IS_LINUX)
- #vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "-lcurl" "-lcurl")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/libssl.a" "-lssl")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/libcrypto.a" "-lcrypto")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/libmbedtls.a" "-lmbedtls")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/libmbedx509.a" "-lmbedx509")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/libmbedcrypto.a" "-lmbedcrypto")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/libnghttp2.a" "-lnghttp2")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/libssh2.a" "-lssh2")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/libcares.a" "-lcares")
- vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc "${CURRENT_INSTALLED_DIR}/lib/libz.a" "-lz")
- endif()
- file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libcurl.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
-endif()
-if(VCPKG_TARGET_IS_WINDOWS)
- vcpkg_fixup_pkgconfig()
-elseif(VCPKG_TARGET_IS_LINUX)
- vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread dl c)
-elseif(VCPKG_TARGET_IS_ANDROID)
- file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
+ 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()
+
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)
diff --git a/ports/curl/vcpkg.json b/ports/curl/vcpkg.json
new file mode 100644
index 000000000..61a578971
--- /dev/null
+++ b/ports/curl/vcpkg.json
@@ -0,0 +1,143 @@
+{
+ "name": "curl",
+ "version": "7.74.0",
+ "port-version": 5,
+ "description": "A library for transferring data with URLs",
+ "homepage": "https://github.com/curl/curl",
+ "dependencies": [
+ "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"
+ ]
+ },
+ "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": [
+ "winssl"
+ ],
+ "platform": "windows & !uwp"
+ },
+ {
+ "name": "curl",
+ "default-features": false,
+ "features": [
+ "openssl"
+ ],
+ "platform": "(uwp | !windows) & !osx"
+ }
+ ]
+ },
+ "sspi": {
+ "description": "SSPI support"
+ },
+ "tool": {
+ "description": "Builds curl executable"
+ },
+ "winssl": {
+ "description": "Legacy name for schannel",
+ "dependencies": [
+ {
+ "name": "curl",
+ "features": [
+ "schannel"
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/versions/baseline.json b/versions/baseline.json
index bb8324ad4..e1e87d0b1 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -1538,7 +1538,7 @@
},
"curl": {
"baseline": "7.74.0",
- "port-version": 4
+ "port-version": 5
},
"curlpp": {
"baseline": "2018-06-15-3",
diff --git a/versions/c-/curl.json b/versions/c-/curl.json
index aad7a5216..08fc46d67 100644
--- a/versions/c-/curl.json
+++ b/versions/c-/curl.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "8be2f3a1be62244a892aeba05026579fbf7200b4",
+ "version": "7.74.0",
+ "port-version": 5
+ },
+ {
"git-tree": "883db9cb07e4982bf1bf327d5b3fa5a88b6304d8",
"version-string": "7.74.0",
"port-version": 4