Skip to content

Commit 62a13f2

Browse files
committed
bring back http3 support for curl
1 parent f900575 commit 62a13f2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/SPC/builder/unix/library/curl.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ protected function build(): void
2424
->optionalLib('libssh2', fn ($lib) => "-DLIBSSH2_LIBRARY=\"{$lib->getStaticLibFiles(style: 'cmake')}\" -DLIBSSH2_INCLUDE_DIR={$lib->getIncludeDir()}", '-DCURL_USE_LIBSSH2=OFF')
2525
->optionalLib('nghttp2', fn ($lib) => "-DUSE_NGHTTP2=ON -DNGHTTP2_LIBRARY=\"{$lib->getStaticLibFiles(style: 'cmake')}\" -DNGHTTP2_INCLUDE_DIR={$lib->getIncludeDir()}", '-DUSE_NGHTTP2=OFF')
2626
->optionalLib('nghttp3', fn ($lib) => "-DUSE_NGHTTP3=ON -DNGHTTP3_LIBRARY=\"{$lib->getStaticLibFiles(style: 'cmake')}\" -DNGHTTP3_INCLUDE_DIR={$lib->getIncludeDir()}", '-DUSE_NGHTTP3=OFF')
27+
->optionalLib('ngtcp2', fn ($lib) => "-DUSE_NGTCP2=ON -DNGNGTCP2_LIBRARY=\"{$lib->getStaticLibFiles(style: 'cmake')}\" -DNGNGTCP2_INCLUDE_DIR={$lib->getIncludeDir()}", '-DUSE_NGTCP2=OFF')
2728
->optionalLib('ldap', ...cmake_boolean_args('CURL_DISABLE_LDAP', true))
2829
->optionalLib('zstd', ...cmake_boolean_args('CURL_ZSTD'))
2930
->optionalLib('idn2', ...cmake_boolean_args('USE_LIBIDN2'))
3031
->optionalLib('psl', ...cmake_boolean_args('CURL_USE_LIBPSL'))
3132
->optionalLib('libcares', '-DENABLE_ARES=ON')
3233
->addConfigureArgs(
33-
'-DBUILD_CURL_EXE=OFF',
34+
'-DBUILD_CURL_EXE=ON',
3435
'-DBUILD_LIBCURL_DOCS=OFF',
3536
)
3637
->build();

src/globals/ext-tests/curl.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@
1616
curl_close($curl);
1717
assert($data !== false);
1818
}
19+
if (phpversion() >= '8.2') {
20+
assert(($curl_version['features'] & CURL_VERSION_HTTP3) === CURL_VERSION_HTTP3);
21+
}

0 commit comments

Comments
 (0)