Skip to content

Commit

Permalink
Refactor curl ports:
Browse files Browse the repository at this point in the history
- Add tests
- Refine dependencies patch
- gssapi feature is not for windows
  • Loading branch information
talregev committed May 17, 2024
1 parent de9557b commit d7df30d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 8 deletions.
12 changes: 6 additions & 6 deletions ports/curl/dependencies.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMake/curl-config.cmake.in b/CMake/curl-config.cmake.in
index 056907c..c89c686 100644
index 9adb96e0a..a013adf7a 100644
--- a/CMake/curl-config.cmake.in
+++ b/CMake/curl-config.cmake.in
@@ -31,6 +31,16 @@ if(@USE_ZLIB@)
Expand All @@ -20,7 +20,7 @@ index 056907c..c89c686 100644
check_required_components("@PROJECT_NAME@")

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 049ac34..cc0fe19 100644
index 656aa7c74..90a7c1371 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -163,7 +163,8 @@ set(CURL_LIBS "")
Expand Down Expand Up @@ -74,16 +74,16 @@ index 049ac34..cc0fe19 100644
if(LIBSSH2_FOUND)
list(APPEND CURL_LIBS ${LIBSSH2_LIBRARY})
list(APPEND CMAKE_REQUIRED_INCLUDES "${LIBSSH2_INCLUDE_DIR}")
@@ -917,6 +917,14 @@ option(CURL_USE_GSSAPI "Use GSSAPI implementation (right now only Heimdal is sup
@@ -917,6 +925,14 @@ option(CURL_USE_GSSAPI "Use GSSAPI implementation (right now only Heimdal is sup
mark_as_advanced(CURL_USE_GSSAPI)

if(CURL_USE_GSSAPI)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(KRB5 REQUIRED krb5 krb5-gssapi)
+ list(APPEND CURL_LIBS ${KRB5_LINK_LIBRARIES} resolv)
+ set(HAVE_GSSAPI_GSSAPI_H ON)
+ set(HAVE_GSSAPI_GSSAPI_GENERIC_H ON)
+ set(HAVE_GSSAPI_GSSAPI_KRB5_H ON)
+ check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
+ check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H)
+ check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H)
+ set(HAVE_GSSAPI ON)
+ elseif(0)
find_package(GSS)
Expand Down
3 changes: 2 additions & 1 deletion ports/curl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "curl",
"version": "8.7.1",
"port-version": 3,
"port-version": 4,
"description": "A library for transferring data with URLs",
"homepage": "https://curl.se/",
"license": "curl AND ISC AND BSD-3-Clause",
Expand Down Expand Up @@ -35,6 +35,7 @@
},
"gssapi": {
"description": "krb5 support",
"supports": "!windows",
"dependencies": [
"krb5"
]
Expand Down
19 changes: 19 additions & 0 deletions scripts/test_ports/vcpkg-ci-curl/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,25 @@
"tool"
],
"platform": "!android & !uwp"
},
{
"name": "curl",
"features": [
"brotli",
"c-ares",
"http2",
"idn",
"psl",
"ssh",
"zstd"
]
},
{
"name": "curl",
"features": [
"gssapi"
],
"platform": "!windows"
}
]
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2090,7 +2090,7 @@
},
"curl": {
"baseline": "8.7.1",
"port-version": 3
"port-version": 4
},
"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": "9e168f7df3f2fd8378527f440c7079b0e902d13e",
"version": "8.7.1",
"port-version": 4
},
{
"git-tree": "32945fcb82088dc4055db602b3ebe95f67f04326",
"version": "8.7.1",
Expand Down

0 comments on commit d7df30d

Please sign in to comment.