8 |
8 |
|
9 |
9 |
DESCRIPTION="A Client that groks URLs"
|
10 |
10 |
HOMEPAGE="https://curl.se/"
|
11 |
|
SRC_URI="
|
12 |
|
https://curl.se/download/${P}.tar.xz
|
13 |
|
verify-sig? ( https://curl.se/download/${P}.tar.xz.asc )
|
14 |
|
"
|
|
11 |
|
|
12 |
if [[ ${PV} == 9999 ]]; then
|
|
13 |
inherit git-r3
|
|
14 |
EGIT_REPO_URI="https://github.com/curl/curl.git"
|
|
15 |
else
|
|
16 |
SRC_URI="
|
|
17 |
https://curl.se/download/${P}.tar.xz
|
|
18 |
verify-sig? ( https://curl.se/download/${P}.tar.xz.asc )
|
|
19 |
"
|
|
20 |
KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
|
21 |
fi
|
15 |
22 |
|
16 |
23 |
LICENSE="BSD curl ISC test? ( BSD-4 )"
|
17 |
24 |
SLOT="0"
|
18 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
19 |
25 |
IUSE="+adns alt-svc brotli +ftp gnutls gopher hsts +http2 idn +imap kerberos ldap mbedtls nss +openssl +pop3 +progress-meter rtmp rustls samba +smtp ssh ssl sslv3 static-libs test telnet +tftp websockets zstd"
|
|
26 |
# These select the default SSL implementation
|
20 |
27 |
IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls curl_ssl_nss +curl_ssl_openssl curl_ssl_rustls"
|
21 |
28 |
IUSE+=" nghttp3"
|
22 |
29 |
RESTRICT="!test? ( test )"
|
23 |
30 |
|
24 |
31 |
# Only one default ssl provider can be enabled
|
|
32 |
# The default ssl provider needs its USE satisfied
|
25 |
33 |
REQUIRED_USE="
|
26 |
34 |
ssl? (
|
27 |
35 |
^^ (
|
... | ... | |
32 |
40 |
curl_ssl_rustls
|
33 |
41 |
)
|
34 |
42 |
)
|
|
43 |
curl_ssl_gnutls? ( gnutls )
|
|
44 |
curl_ssl_mbedtls? ( mbedtls )
|
|
45 |
curl_ssl_nss? ( nss )
|
|
46 |
curl_ssl_openssl? ( openssl )
|
|
47 |
curl_ssl_rustls? ( rustls )
|
35 |
48 |
"
|
36 |
49 |
|
37 |
50 |
RDEPEND="
|
38 |
51 |
sys-libs/zlib[${MULTILIB_USEDEP}]
|
39 |
52 |
adns? ( net-dns/c-ares:=[${MULTILIB_USEDEP}] )
|
40 |
53 |
brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] )
|
41 |
|
http2? ( net-libs/nghttp2:=[${MULTILIB_USEDEP}] )
|
|
54 |
http2? ( >=net-libs/nghttp2-1.12.0:=[${MULTILIB_USEDEP}] )
|
42 |
55 |
idn? ( net-dns/libidn2:=[static-libs?,${MULTILIB_USEDEP}] )
|
43 |
56 |
kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
|
44 |
|
ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
|
|
57 |
ldap? ( net-nds/openldap:=[static-libs?,${MULTILIB_USEDEP}] )
|
45 |
58 |
nghttp3? (
|
46 |
|
net-libs/nghttp3[${MULTILIB_USEDEP}]
|
47 |
|
net-libs/ngtcp2[ssl,${MULTILIB_USEDEP}]
|
|
59 |
>=net-libs/nghttp3-0.11.0[${MULTILIB_USEDEP}]
|
|
60 |
>=net-libs/ngtcp2-0.15.0[gnutls,ssl,-openssl,${MULTILIB_USEDEP}]
|
48 |
61 |
)
|
49 |
62 |
rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
|
50 |
63 |
ssh? ( net-libs/libssh2[${MULTILIB_USEDEP}] )
|
... | ... | |
108 |
121 |
PATCHES=(
|
109 |
122 |
"${FILESDIR}"/${PN}-prefix.patch
|
110 |
123 |
"${FILESDIR}"/${PN}-respect-cflags-3.patch
|
111 |
|
|
112 |
|
# Backports
|
113 |
|
"${FILESDIR}"/${PN}-8.0.1-onion-resolution.patch
|
114 |
124 |
)
|
115 |
125 |
|
116 |
126 |
src_prepare() {
|
... | ... | |
127 |
137 |
local myconf=()
|
128 |
138 |
|
129 |
139 |
myconf+=( --without-ca-fallback --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
|
130 |
|
#myconf+=( --without-default-ssl-backend )
|
131 |
140 |
if use ssl ; then
|
132 |
141 |
myconf+=( --without-gnutls --without-mbedtls --without-nss --without-rustls )
|
133 |
142 |
|
134 |
|
if use gnutls || use curl_ssl_gnutls; then
|
135 |
|
einfo "SSL provided by gnutls"
|
|
143 |
if use gnutls; then
|
|
144 |
multilib_is_native_abi && einfo "SSL provided by gnutls"
|
136 |
145 |
myconf+=( --with-gnutls )
|
137 |
146 |
fi
|
138 |
|
if use mbedtls || use curl_ssl_mbedtls; then
|
139 |
|
einfo "SSL provided by mbedtls"
|
|
147 |
if use mbedtls; then
|
|
148 |
multilib_is_native_abi && einfo "SSL provided by mbedtls"
|
140 |
149 |
myconf+=( --with-mbedtls )
|
141 |
150 |
fi
|
142 |
|
if use nss || use curl_ssl_nss; then
|
143 |
|
einfo "SSL provided by nss"
|
|
151 |
if use nss; then
|
|
152 |
multilib_is_native_abi && einfo "SSL provided by nss"
|
144 |
153 |
myconf+=( --with-nss --with-nss-deprecated )
|
145 |
154 |
fi
|
146 |
|
if use openssl || use curl_ssl_openssl; then
|
147 |
|
einfo "SSL provided by openssl"
|
|
155 |
if use openssl; then
|
|
156 |
multilib_is_native_abi && einfo "SSL provided by openssl"
|
148 |
157 |
myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs )
|
149 |
158 |
fi
|
150 |
|
if use rustls || use curl_ssl_rustls; then
|
151 |
|
einfo "SSL provided by rustls"
|
|
159 |
if use rustls; then
|
|
160 |
multilib_is_native_abi && einfo "SSL provided by rustls"
|
152 |
161 |
myconf+=( --with-rustls )
|
153 |
162 |
fi
|
154 |
163 |
if use curl_ssl_gnutls; then
|
155 |
|
einfo "Default SSL provided by gnutls"
|
|
164 |
multilib_is_native_abi && einfo "Default SSL provided by gnutls"
|
156 |
165 |
myconf+=( --with-default-ssl-backend=gnutls )
|
157 |
166 |
elif use curl_ssl_mbedtls; then
|
158 |
|
einfo "Default SSL provided by mbedtls"
|
|
167 |
multilib_is_native_abi && einfo "Default SSL provided by mbedtls"
|
159 |
168 |
myconf+=( --with-default-ssl-backend=mbedtls )
|
160 |
169 |
elif use curl_ssl_nss; then
|
161 |
|
einfo "Default SSL provided by nss"
|
|
170 |
multilib_is_native_abi && einfo "Default SSL provided by nss"
|
162 |
171 |
myconf+=( --with-default-ssl-backend=nss )
|
163 |
172 |
elif use curl_ssl_openssl; then
|
164 |
|
einfo "Default SSL provided by openssl"
|
|
173 |
multilib_is_native_abi && einfo "Default SSL provided by openssl"
|
165 |
174 |
myconf+=( --with-default-ssl-backend=openssl )
|
166 |
175 |
elif use curl_ssl_rustls; then
|
167 |
|
einfo "Default SSL provided by rustls"
|
|
176 |
multilib_is_native_abi && einfo "Default SSL provided by rustls"
|
168 |
177 |
myconf+=( --with-default-ssl-backend=rustls )
|
169 |
178 |
else
|
170 |
179 |
eerror "We can't be here because of REQUIRED_USE."
|
... | ... | |
296 |
305 |
echo "Requires.private: ${priv[*]}" >> libcurl.pc || die
|
297 |
306 |
}
|
298 |
307 |
|
|
308 |
# There is also a pytest harness that tests for bugs in some very specific
|
|
309 |
# situations; we can rely on upstream for this rather than adding additional test deps.
|
299 |
310 |
multilib_src_test() {
|
300 |
311 |
# See https://github.com/curl/curl/blob/master/tests/runtests.pl#L5721
|
301 |
312 |
# -n: no valgrind (unreliable in sandbox and doesn't work correctly on all arches)
|
... | ... | |
306 |
317 |
# -p: print logs if test fails
|
307 |
318 |
# Note: if needed, we can skip specific tests. See e.g. Fedora's packaging
|
308 |
319 |
# or just read https://github.com/curl/curl/tree/master/tests#run.
|
309 |
|
multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p"
|
|
320 |
# Note: we don't run the testsuite for cross-compilation.
|
|
321 |
# The network sandbox causes tests 241 and 1083 to fail; these are typically skipped
|
|
322 |
# as most gentoo users don't have an 'ip6-localhost'
|
|
323 |
multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p !241 !1083"
|
310 |
324 |
}
|
311 |
325 |
|
312 |
326 |
multilib_src_install_all() {
|