4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
6 |
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/danielstenberg.asc
|
7 |
|
inherit autotools multilib-minimal prefix verify-sig
|
|
7 |
inherit autotools multilib-minimal multiprocessing prefix toolchain-funcs verify-sig
|
8 |
8 |
|
9 |
9 |
DESCRIPTION="A Client that groks URLs"
|
10 |
10 |
HOMEPAGE="https://curl.se/"
|
... | ... | |
17 |
17 |
https://curl.se/download/${P}.tar.xz
|
18 |
18 |
verify-sig? ( https://curl.se/download/${P}.tar.xz.asc )
|
19 |
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"
|
|
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 |
21 |
fi
|
22 |
22 |
|
23 |
23 |
LICENSE="BSD curl ISC test? ( BSD-4 )"
|
... | ... | |
30 |
30 |
|
31 |
31 |
# Only one default ssl provider can be enabled
|
32 |
32 |
# The default ssl provider needs its USE satisfied
|
|
33 |
# nghttp3 = https://bugs.gentoo.org/912029
|
33 |
34 |
REQUIRED_USE="
|
34 |
35 |
ssl? (
|
35 |
36 |
^^ (
|
... | ... | |
45 |
46 |
curl_ssl_nss? ( nss )
|
46 |
47 |
curl_ssl_openssl? ( openssl )
|
47 |
48 |
curl_ssl_rustls? ( rustls )
|
|
49 |
nghttp3? ( !openssl )
|
48 |
50 |
"
|
49 |
51 |
|
50 |
52 |
RDEPEND="
|
... | ... | |
56 |
58 |
kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
|
57 |
59 |
ldap? ( net-nds/openldap:=[static-libs?,${MULTILIB_USEDEP}] )
|
58 |
60 |
nghttp3? (
|
59 |
|
>=net-libs/nghttp3-0.11.0[${MULTILIB_USEDEP}]
|
60 |
|
>=net-libs/ngtcp2-0.15.0[gnutls,ssl,-openssl,${MULTILIB_USEDEP}]
|
|
61 |
>=net-libs/nghttp3-0.13.0[${MULTILIB_USEDEP}]
|
|
62 |
>=net-libs/ngtcp2-0.17.0[gnutls,ssl,-openssl,${MULTILIB_USEDEP}]
|
61 |
63 |
)
|
62 |
64 |
rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
|
63 |
65 |
ssh? ( net-libs/libssh2[${MULTILIB_USEDEP}] )
|
... | ... | |
85 |
87 |
)
|
86 |
88 |
zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
|
87 |
89 |
"
|
|
90 |
|
88 |
91 |
DEPEND="${RDEPEND}"
|
89 |
92 |
BDEPEND="
|
90 |
93 |
dev-lang/perl
|
91 |
94 |
virtual/pkgconfig
|
92 |
95 |
test? (
|
93 |
96 |
sys-apps/diffutils
|
94 |
|
http2? ( net-libs/nghttp2:=[utils,${MULTILIB_USEDEP}] )
|
|
97 |
http2? ( >=net-libs/nghttp2-1.15.0:=[utils,${MULTILIB_USEDEP}] )
|
95 |
98 |
nghttp3? ( net-libs/nghttp2:=[utils,${MULTILIB_USEDEP}] )
|
96 |
99 |
)
|
97 |
100 |
verify-sig? ( sec-keys/openpgp-keys-danielstenberg )
|
... | ... | |
137 |
140 |
local myconf=()
|
138 |
141 |
|
139 |
142 |
myconf+=( --without-ca-fallback --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
|
140 |
|
if use ssl ; then
|
|
143 |
if use ssl; then
|
141 |
144 |
myconf+=( --without-gnutls --without-mbedtls --without-nss --without-rustls )
|
142 |
145 |
|
143 |
146 |
if use gnutls; then
|
... | ... | |
177 |
180 |
myconf+=( --with-default-ssl-backend=rustls )
|
178 |
181 |
else
|
179 |
182 |
eerror "We can't be here because of REQUIRED_USE."
|
|
183 |
die "Please file a bug, hit impossible condition w/ USE=ssl handling."
|
180 |
184 |
fi
|
181 |
185 |
|
182 |
186 |
else
|
... | ... | |
241 |
245 |
--without-amissl
|
242 |
246 |
--without-bearssl
|
243 |
247 |
$(use_with brotli)
|
244 |
|
--without-fish-functions-dir
|
|
248 |
--with-fish-functions-dir="${EPREFIX}"/usr/share/fish/vendor_completions.d
|
245 |
249 |
$(use_with http2 nghttp2)
|
246 |
250 |
--without-hyper
|
247 |
251 |
$(use_with idn libidn2)
|
... | ... | |
263 |
267 |
--without-wolfssl
|
264 |
268 |
--with-zlib
|
265 |
269 |
$(use_with zstd)
|
|
270 |
--with-zsh-functions-dir="${EPREFIX}"/usr/share/zsh/site-functions
|
266 |
271 |
)
|
267 |
272 |
|
268 |
273 |
if use test && multilib_is_native_abi && ( use http2 || use nghttp3 ); then
|
... | ... | |
271 |
276 |
)
|
272 |
277 |
fi
|
273 |
278 |
|
|
279 |
if [[ ${CHOST} == *mingw* ]] ; then
|
|
280 |
myconf+=(
|
|
281 |
--disable-pthreads
|
|
282 |
)
|
|
283 |
fi
|
|
284 |
|
274 |
285 |
ECONF_SOURCE="${S}" econf "${myconf[@]}"
|
275 |
286 |
|
276 |
287 |
if ! multilib_is_native_abi; then
|
... | ... | |
305 |
316 |
echo "Requires.private: ${priv[*]}" >> libcurl.pc || die
|
306 |
317 |
}
|
307 |
318 |
|
|
319 |
multilib_src_compile() {
|
|
320 |
default
|
|
321 |
|
|
322 |
if multilib_is_native_abi; then
|
|
323 |
# Shell completions
|
|
324 |
! tc-is-cross-compiler && emake -C scripts
|
|
325 |
fi
|
|
326 |
}
|
|
327 |
|
308 |
328 |
# There is also a pytest harness that tests for bugs in some very specific
|
309 |
329 |
# situations; we can rely on upstream for this rather than adding additional test deps.
|
310 |
330 |
multilib_src_test() {
|
... | ... | |
318 |
338 |
# Note: if needed, we can skip specific tests. See e.g. Fedora's packaging
|
319 |
339 |
# or just read https://github.com/curl/curl/tree/master/tests#run.
|
320 |
340 |
# Note: we don't run the testsuite for cross-compilation.
|
|
341 |
# Upstream recommend 7*nproc as a starting point for parallel tests.
|
321 |
342 |
# The network sandbox causes tests 241 and 1083 to fail; these are typically skipped
|
322 |
343 |
# 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"
|
|
344 |
multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p -j$((7*$(makeopts_jobs))) !241 !1083"
|
|
345 |
}
|
|
346 |
|
|
347 |
multilib_src_install() {
|
|
348 |
emake DESTDIR="${D}" install
|
|
349 |
|
|
350 |
if multilib_is_native_abi; then
|
|
351 |
# Shell completions
|
|
352 |
! tc-is-cross-compiler && emake -C scripts DESTDIR="${D}" install
|
|
353 |
fi
|
324 |
354 |
}
|
325 |
355 |
|
326 |
356 |
multilib_src_install_all() {
|