Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[curl] Use find_package c-ares provided by vcpkg #29350

Merged
merged 3 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ports/curl/0023-fix-find-cares.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f6e1071..62aed82 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -169,8 +169,8 @@ set(CURL_LIBS "")

if(ENABLE_ARES)
set(USE_ARES 1)
- find_package(CARES REQUIRED)
- list(APPEND CURL_LIBS ${CARES_LIBRARY})
+ find_package(c-ares CONFIG REQUIRED)
+ list(APPEND CURL_LIBS c-ares::cares)
endif()

include(CurlSymbolHiding)
3 changes: 2 additions & 1 deletion ports/curl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ vcpkg_from_github(
0022-deduplicate-libs.patch
mbedtls-ws2_32.patch
export-components.patch
0023-fix-find-cares.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down Expand Up @@ -123,4 +124,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
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)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
1 change: 1 addition & 0 deletions ports/curl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "curl",
"version": "7.87.0",
"port-version": 1,
"description": "A library for transferring data with URLs",
"homepage": "https://curl.se/",
"license": null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[No change requested.] Why does it have "license": null? I think the valid SPDX identifier would be "license": "CURL"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because not all files in CURL are under CURL license. Maybe it is improving.
Cf. https://tracker.debian.org/media/packages/c/curl/copyright-7.87.0-2

Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,7 @@
},
"curl": {
"baseline": "7.87.0",
"port-version": 0
"port-version": 1
},
"curlpp": {
"baseline": "2018-06-15",
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/curl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5ff0b614c9c181b954a5c3c9cf51df2f83a7f21f",
"version": "7.87.0",
"port-version": 1
},
{
"git-tree": "033fc823ccfc6d31034865b1175e45cffca29a3b",
"version": "7.87.0",
Expand Down