| 22 |
22 |
S="${WORKDIR}/${P//_/-}"
|
| 23 |
23 |
else
|
| 24 |
24 |
CURL_URI="https://curl.se/download/"
|
| 25 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
|
25 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
| 26 |
26 |
fi
|
| 27 |
27 |
SRC_URI="
|
| 28 |
28 |
${CURL_URI}${P//_/-}.tar.xz
|
| ... | ... | |
| 33 |
33 |
LICENSE="BSD curl ISC test? ( BSD-4 )"
|
| 34 |
34 |
SLOT="0"
|
| 35 |
35 |
IUSE="+adns +alt-svc brotli debug ech +ftp gnutls gopher +hsts +http2 +http3 +httpsrr idn +imap kerberos ldap"
|
| 36 |
|
IUSE+=" mbedtls +openssl +pop3 +psl +quic rtmp rustls samba sasl-scram +smtp ssh ssl static-libs test"
|
|
36 |
IUSE+=" mbedtls +openssl +pop3 +psl +quic rustls sasl-scram +smtp ssh ssl static-libs test"
|
| 37 |
37 |
IUSE+=" telnet +tftp +websockets zstd"
|
| 38 |
38 |
# These select the default tls implementation / which quic impl to use
|
| 39 |
39 |
IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
|
| ... | ... | |
| 45 |
45 |
|
| 46 |
46 |
# To simplify dependency management in the ebuild we'll require c-ares for HTTPS RR (for now?).
|
| 47 |
47 |
# HTTPS RR in cURL is a dependency for:
|
| 48 |
|
# - ECH (requires patched openssl or gnutls currently, enabled with rustls)
|
|
48 |
# - ECH (enabled with rustls, ossl 4.0+)
|
| 49 |
49 |
# - Fetching the ALPN list which should provide a better HTTP/3 experience.
|
| 50 |
|
|
| 51 |
50 |
# Only one default ssl / quic provider can be enabled
|
| 52 |
51 |
# The default provider needs its USE satisfied
|
| 53 |
52 |
# HTTP/3 and MultiSSL are mutually exclusive; it's not clear if MultiSSL offers any benefit at all in the modern day.
|
| 54 |
53 |
# https://github.com/curl/curl/commit/65ece771f4602107d9cdd339dff4b420280a2c2e
|
| 55 |
54 |
REQUIRED_USE="
|
| 56 |
|
ech? ( rustls )
|
|
55 |
ech? (
|
|
56 |
|| (
|
|
57 |
openssl
|
|
58 |
rustls
|
|
59 |
)
|
|
60 |
)
|
| 57 |
61 |
httpsrr? ( adns )
|
| 58 |
62 |
quic? (
|
| 59 |
63 |
^^ (
|
| ... | ... | |
| 85 |
89 |
# - https://github.com/curl/curl/blob/master/docs/INTERNALS.md (core dependencies + minimum versions)
|
| 86 |
90 |
# - https://github.com/curl/curl/blob/master/docs/HTTP3.md (example of a feature that moves quickly)
|
| 87 |
91 |
# - https://github.com/curl/curl/blob/master/.github/workflows/http3-linux.yml (CI/CD for TCP/2)
|
|
92 |
# - https://curl.se/dev/deprecate.html - good source of deprecation timelines, e.g. for OpenSSL 1.1.1
|
| 88 |
93 |
# However 'supported' vs 'works' are two entirely different things; be sane but
|
| 89 |
94 |
# don't be afraid to require a later version.
|
| 90 |
95 |
# ngtcp2 = https://bugs.gentoo.org/912029 - can only build with one tls backend at a time.
|
| ... | ... | |
| 102 |
107 |
gnutls? ( >=net-libs/ngtcp2-1.20.0-r1[gnutls,ssl,${MULTILIB_USEDEP}] )
|
| 103 |
108 |
openssl? ( >=net-libs/ngtcp2-1.20.0-r1[openssl,ssl,${MULTILIB_USEDEP}] )
|
| 104 |
109 |
)
|
| 105 |
|
rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
|
| 106 |
110 |
ssh? ( >=net-libs/libssh2-1.2.8[${MULTILIB_USEDEP}] )
|
| 107 |
111 |
sasl-scram? ( >=net-misc/gsasl-2.2.0[static-libs?,${MULTILIB_USEDEP}] )
|
| 108 |
112 |
ssl? (
|
| ... | ... | |
| 116 |
120 |
net-libs/mbedtls:3=[${MULTILIB_USEDEP}]
|
| 117 |
121 |
)
|
| 118 |
122 |
openssl? (
|
| 119 |
|
>=dev-libs/openssl-1.0.2:=[static-libs?,${MULTILIB_USEDEP}]
|
|
123 |
ech? ( >=dev-libs/openssl-4.0.0_beta1:=[static-libs?,${MULTILIB_USEDEP}] )
|
|
124 |
>=dev-libs/openssl-3.0.0:=[static-libs?,${MULTILIB_USEDEP}]
|
| 120 |
125 |
)
|
| 121 |
126 |
rustls? (
|
| 122 |
127 |
>=net-libs/rustls-ffi-0.15.0:=[${MULTILIB_USEDEP}]
|
| ... | ... | |
| 165 |
170 |
PATCHES=(
|
| 166 |
171 |
"${FILESDIR}/${PN}-prefix-6.patch"
|
| 167 |
172 |
"${FILESDIR}/${PN}-respect-cflags-3.patch"
|
| 168 |
|
"${FILESDIR}/${PN}-8.18.0-restore-heimdal.patch"
|
| 169 |
173 |
)
|
| 170 |
174 |
|
| 171 |
175 |
src_prepare() {
|
| ... | ... | |
| 259 |
263 |
$(use_enable ldap ldaps)
|
| 260 |
264 |
$(use_enable ldap)
|
| 261 |
265 |
$(use_enable pop3)
|
| 262 |
|
$(use_enable samba smb)
|
|
266 |
--disable-smb # Removed upstream in late 2026
|
| 263 |
267 |
$(use_with ssh libssh2) # enables scp/sftp
|
| 264 |
|
$(use_with rtmp librtmp)
|
| 265 |
268 |
--enable-rtsp
|
| 266 |
269 |
$(use_enable smtp)
|
| 267 |
270 |
$(use_enable telnet)
|
| ... | ... | |
| 300 |
303 |
--enable-mime
|
| 301 |
304 |
--enable-negotiate-auth
|
| 302 |
305 |
--enable-netrc
|
| 303 |
|
--enable-ntlm
|
|
306 |
--disable-ntlm # To be removed late 2026
|
| 304 |
307 |
--enable-progress-meter
|
| 305 |
308 |
--enable-proxy
|
| 306 |
309 |
--enable-rt
|
| ... | ... | |
| 390 |
393 |
# -k: keep test files after completion
|
| 391 |
394 |
# -am: automake style TAP output
|
| 392 |
395 |
# -p: print logs if test fails
|
|
396 |
# --retry: retry any failing tests up to 3 times; this is a band-aid for timing-dependent flakiness.
|
| 393 |
397 |
# Note: if needed, we can skip specific tests. See e.g. Fedora's packaging
|
| 394 |
398 |
# or just read https://github.com/curl/curl/tree/master/tests#run.
|
| 395 |
399 |
# Note: we don't run the testsuite for cross-compilation.
|
| ... | ... | |
| 397 |
401 |
# this ends up breaking when nproc is huge (like -j80).
|
| 398 |
402 |
# The network sandbox causes tests 241 and 1083 to fail; these are typically skipped
|
| 399 |
403 |
# as most gentoo users don't have an 'ip6-localhost'
|
| 400 |
|
multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p -j$((2*$(get_makeopts_jobs))) !241 !1083"
|
|
404 |
multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p -j$((2*$(get_makeopts_jobs))) --retry=3 !241 !1083"
|
|
405 |
# TODO: enable python tests (make pytest).
|
| 401 |
406 |
}
|
| 402 |
407 |
|
| 403 |
408 |
multilib_src_install() {
|