Skip to content
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
20 changes: 16 additions & 4 deletions ports/curl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ vcpkg_from_github(
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
http2 USE_NGHTTP2
http3 USE_NGTCP2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouln't http3 also be wired to control the use of nghttp3?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It adding nghttp3 inside curl cmake automatic.
I don't want it will be confusion with openssl + nghttp3 the experimental way for http3 with openssl.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"automatic" without context doesn't answer the question.

I looked it up now: USE_NGTCP2 is (almost*) sufficient to control the use of the nghttp3 dependency (USE_QUICHE left aside):
https://github.com/curl/curl/blob/cfbfb65047e85e6b08af65fe9cdbcf68e9ad496a/CMakeLists.txt#L1087-L1131

*) There is the multi-ssl problem again: curl could support this with wolfssl, but the port won't allow that combination - feature "http3" can depend only on one particlar SSL option.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Given that USE_NGHTTP3 does not appear to be an input I'm happy with this as @talregev has written

wolfssl CURL_USE_WOLFSSL
openssl CURL_USE_OPENSSL
mbedtls CURL_USE_MBEDTLS
Expand All @@ -22,7 +23,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
c-ares ENABLE_ARES
sspi CURL_WINDOWS_SSPI
brotli CURL_BROTLI
schannel CURL_USE_SCHANNEL
idn2 USE_LIBIDN2
winidn USE_WIN32_IDN
zstd CURL_ZSTD
Expand All @@ -40,12 +40,24 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
websockets CURL_DISABLE_WEBSOCKETS
)

set(OPTIONS "")
if("ssl" IN_LIST FEATURES AND
NOT "http3" IN_LIST FEATURES AND
# (windows & !uwp) | mingw to match curl[ssl]'s "platform"
((VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP) OR VCPKG_TARGET_IS_MINGW))
list(APPEND FEATURE_OPTIONS -DCURL_USE_SCHANNEL=ON)
endif()

if("sectransp" IN_LIST FEATURES)
list(APPEND OPTIONS -DCURL_CA_PATH=none -DCURL_CA_BUNDLE=none)
if("http3" IN_LIST FEATURES AND
("wolfssl" IN_LIST FEATURES OR
"mbedtls" IN_LIST FEATURES OR
"gnutls" IN_LIST FEATURES))
message(FATAL_ERROR "http3 is incompatible with curl multi-ssl, preventing combination with wolfssl, mbedtls or \
gnutls in vcpkg's curated registry. To use curl http3 on ngtcp2 on one of the other TLS backends, author an \
overlay-port which exchanges curl[ssl]'s and curl[http3]'s openssl dependencies with the backend you want.")
endif()

set(OPTIONS "")

if(VCPKG_TARGET_IS_UWP)
list(APPEND OPTIONS
-DCURL_DISABLE_TELNET=ON
Expand Down
50 changes: 30 additions & 20 deletions ports/curl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "curl",
"version": "8.15.0",
"port-version": 1,
"description": "A library for transferring data with URLs",
"homepage": "https://curl.se/",
"license": "curl AND ISC AND BSD-3-Clause",
Expand Down Expand Up @@ -33,7 +34,7 @@
]
},
"gnutls": {
"description": "SSL support (gnutls)",
"description": "TLS support (gnutls)",
"dependencies": [
{
"name": "libgnutls",
Expand Down Expand Up @@ -71,6 +72,26 @@
"nghttp2"
]
},
"http3": {
"description": "HTTP3 support with ngtcp2 on openssl",
"dependencies": [
{
"name": "curl",
"default-features": false,
"features": [
"openssl"
]
},
"nghttp3",
{
"name": "ngtcp2",
"default-features": false,
Comment on lines +87 to +88
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it even possible to set default-features to false for other dependencies than "self" (i.e. curl trying to set ngtcp2 to non-default)? I read somewhere in the issue tracker that this can only be explicitly set by the root project and otherwise has no effect. My Gradle build script wrapper around vcpkg at least complains about this now. Or is my check too strict?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Having false here is the necessary condition for having control in the top-level manifest / install command.
Otherwise this feature would explicitly depend on ngtcp2's default features, and then the user couldn't ask for less.

"features": [
"openssl"
]
}
]
},
"httpsrr": {
"description": "enable support for HTTPS RR"
},
Expand Down Expand Up @@ -119,16 +140,16 @@
]
},
"mbedtls": {
"description": "SSL support (mbedTLS)",
"description": "TLS support (mbedTLS)",
"dependencies": [
"mbedtls"
]
},
"non-http": {
"description": "Enables protocols beyond HTTP/HTTPS/HTTP2"
"description": "Enables protocols beyond HTTP/HTTPS/HTTP2/HTTP3"
},
"openssl": {
"description": "SSL support (OpenSSL)",
"description": "TLS support (OpenSSL)",
"dependencies": [
"openssl"
]
Expand All @@ -145,19 +166,6 @@
"librtmp"
]
},
"schannel": {
"description": "SSL support (Secure Channel)",
"supports": "windows & !uwp",
"dependencies": [
{
"name": "curl",
"default-features": false,
"features": [
"sspi"
]
}
]
},
"ssh": {
"description": "SSH support via libssh2",
"dependencies": [
Expand All @@ -179,17 +187,19 @@
]
},
"ssl": {
"description": "Default SSL backend",
"description": "Default SSL / TLS implementation.",
"dependencies": [
{
"$comment": "Defaults to schannel on Windows, unless http3 is also enabled",
"name": "curl",
"default-features": false,
"features": [
"schannel"
"sspi"
],
"platform": "(windows & !uwp) | mingw"
},
{
"$comment": "Otherwise, defaults to OpenSSL.",
"name": "curl",
"default-features": false,
"features": [
Expand All @@ -213,7 +223,7 @@
},
"sspi": {
"description": "SSPI support",
"supports": "windows & !uwp"
"supports": "(windows & !uwp) | mingw"
},
"tool": {
"description": "Builds curl executable",
Expand Down
4 changes: 4 additions & 0 deletions ports/nghttp3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
)
file(APPEND "${CURRENT_PACKAGES_DIR}/include/nghttp3/version.h" [[
]])
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/nghttp3/nghttp3.h"
"#ifdef NGHTTP3_STATICLIB"
"#if 1"
)
endif()

file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
Expand Down
1 change: 1 addition & 0 deletions ports/nghttp3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "nghttp3",
"version": "1.11.0",
"port-version": 1,
"description": "Implementation of RFC 9114 HTTP/3 mapping over QUIC and RFC 9204 QPACK in C",
"homepage": "https://github.com/ngtcp2/nghttp3",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions ports/ngtcp2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,11 @@ file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/share"
)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ngtcp2/ngtcp2.h"
"#ifdef NGTCP2_STATICLIB"
"#if 1"
)
endif()

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
1 change: 1 addition & 0 deletions ports/ngtcp2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "ngtcp2",
"version": "1.14.0",
"port-version": 1,
"description": "ngtcp2 project is an effort to implement RFC9000 QUIC protocol.",
"homepage": "https://github.com/ngtcp2/ngtcp2",
"license": "MIT",
Expand Down
5 changes: 3 additions & 2 deletions scripts/ci.feature.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ crashpad:x64-linux=fail
ctemplate:x64-linux=fail
ctemplate:x64-osx=fail
cuda:x64-osx=fail
curl[core,http3,gnutls]=options
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note for other reviewers: This has the effect of testing http3 and no longer testing the other TLS backends in our 'combined' feature test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We do test the other tls (multissl) in the vcpkg-ci-curl.

curl[core,http3,mbedtls]=options
curl[core,http3,wolfssl]=options
dbghelp=skip # Since pipeline cannot automatically install dbghelp dependency, skip this detection
dimcli(windows & static)=fail # VS2019 version 16.9.4's project system changes where PDBs are placed in a way that breaks the upstream build script of this port. See https://developercommunity.visualstudio.com/t/Toolset-169-regression-vcxproj-producin/1356639
discord-game-sdk:x64-windows-static-md=fail
Expand Down Expand Up @@ -750,7 +753,6 @@ cppzmq:arm64-uwp = cascade
cppzmq:x64-uwp = cascade
cub(!((windows & x64 & !uwp) | (linux & x64) | (linux & arm64))) = cascade
cuda-api-wrappers(uwp | osx) = cascade
curl[wolfssl](uwp) = cascade
cutelyst2:arm64-uwp = cascade
cutelyst2:arm64-windows = cascade
cutelyst2:x64-uwp = cascade
Expand Down Expand Up @@ -2102,7 +2104,6 @@ cgns[fortran](windows | android) = feature-fails # No fortran compiler installed
coroutine(osx) = fail # requires c++20
crashrpt(windows) = fail # precompiled header errors. See https://github.com/microsoft/vcpkg/issues/33470
ctbench(osx) = fail # requires C++ 20
curl[brotli,c-ares,http2,idn,idn2,mbedtls,non-http,openssl,sectransp,ssh,ssl,tool,websockets,wolfssl](osx) = combination-fails
date[remote-api](uwp) = feature-fails # error C2065: 'FOLDERID_ProgramFiles': undeclared identifier. See https://github.com/microsoft/vcpkg/issues/33610
dcmtk[core,iconv,icu,openssl,png,tiff,tools,xml2,zlib](osx) = combination-fails # missing symbols from libtiff. See https://github.com/microsoft/vcpkg/issues/33512
dcmtk[xml2](windows) = feature-fails # fatal error C1083: Cannot open include file: 'iconv.h'. See https://github.com/microsoft/vcpkg/issues/33473
Expand Down
6 changes: 3 additions & 3 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2230,7 +2230,7 @@
},
"curl": {
"baseline": "8.15.0",
"port-version": 0
"port-version": 1
},
"curlcpp": {
"baseline": "3.1",
Expand Down Expand Up @@ -6690,15 +6690,15 @@
},
"nghttp3": {
"baseline": "1.11.0",
"port-version": 0
"port-version": 1
},
"ngspice": {
"baseline": "41",
"port-version": 0
},
"ngtcp2": {
"baseline": "1.14.0",
"port-version": 0
"port-version": 1
},
"nifly": {
"baseline": "1.0.0",
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": "c5d9f2f0044ff09a375a67bd48932a2c020f5bee",
"version": "8.15.0",
"port-version": 1
},
{
"git-tree": "17b5e90a884a7d07cfc52c26add29106ac9eba6f",
"version": "8.15.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/n-/nghttp3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d81385a72b9ddcb9dbc739c903c5f5ef12ec175a",
"version": "1.11.0",
"port-version": 1
},
{
"git-tree": "d0db6768afcb72470e7d8185a6672310acfe4b30",
"version": "1.11.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/n-/ngtcp2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f6bd527d4857cc0d6df883cecab441e88dc80666",
"version": "1.14.0",
"port-version": 1
},
{
"git-tree": "f5fd984152442d9806e349f1037c0bf98cd3589f",
"version": "1.14.0",
Expand Down