mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 12:16:41 +02:00
net-misc/curl: Sync with Gentoo
It's from Gentoo commit 9a21ae20ab40c422c0af714be209dc23d8613854. Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
parent
0758ee425b
commit
d65592d783
@ -4,5 +4,7 @@ DIST curl-8.16.0.tar.xz 2788632 BLAKE2B 573d56779481abf0b7d20225bba4f068cb726f23
|
||||
DIST curl-8.16.0.tar.xz.asc 488 BLAKE2B d213bd447c668118b49b7356dc99e710de927b93f81325802bae5e286b61481da6ed30f23c7f4f3cfb0f01222db88602ff4e510f4a1401e98511eb0c72ac6abb SHA512 591568e997c0d955a00152ce5bdfb4586d84b42f5c1e15df503514fb4eb4bf289a98b1ebdad23913119c67c27d51a6e6f4065ee6f7657b971c3a581c928a0d82
|
||||
DIST curl-8.17.0.tar.xz 2797000 BLAKE2B a7a804afe058f323b40177bcb4ffc523decde92da3da0a051f2dc1b566131250a96afe1ebf2bebc071993c893bddeef883ef33ddc0a9bee86d4e54402a546fba SHA512 fc6349def40c3c259de2a568631507df17dff83e78a2edbb93f069586dce594439fdc88bef7ce2bed7491f35800b8c0c181c8c88e6ef656cc3c18f9834681eca
|
||||
DIST curl-8.17.0.tar.xz.asc 488 BLAKE2B 88b72cb9c0acd8a06956eca31047dfadfe110dc07290adbe50b9451a71d4282acaa05c8a149787d71cf13cf1b42e8df9594d0e8a2b1cadbfca5eb50550f32609 SHA512 e77d4cb1f4961aa0df3d76f1a8c55a0b9005ed557adf745f3ab24d33cee2d0e4bd06cecb9d911e76409852e7755129873cc7d24936c846ff1b854903c0f086b2
|
||||
DIST curl-8.18.0-rc3.tar.xz 2797608 BLAKE2B 5259ab4d8efeb155ecbb0d49be991e52f510aeef297b47881f28171a26064fa4a38b83039e358511fb38d23e5f12756870fb8e3bb96ef4df4fb070fe0d44de10 SHA512 1139b79a6c4356fdf6f368812402c2f9bafcbaec6323c367aef85c4d00ffda9541a87ef476ce9a099142ef6f824b562c9dc840878add60a616f0e441fef44801
|
||||
DIST curl-8.18.0-rc3.tar.xz.asc 488 BLAKE2B cd56a5433797612daded8ffeb05d3d84e4ff2f6d9320fa745b5c27ce057405bdf3596b2cfdff83ca18daffde530a46161d2d277053ac0b5178d0b8bbe056c17d SHA512 fac23b293cec82596ddd7757c0984e3977259c5116ddef719fad2a39a3723cf7cb5d85d12c5c5b2542f34a5411aa6f42f4fb08729fde6c564cd3567f2a3f0434
|
||||
DIST curl-8.18.0.tar.xz 2801444 BLAKE2B 16e1539616c1800dfa08a5bd3e38ff75d2906a4a574b1541509c69200aebe680b0a5efdf1b1e0c89f3cccb6001bfe1c1459b9fd815053c964e1a1434be1e2e0e SHA512 50c7a7b0528e0019697b0c59b3e56abb2578c71d77e4c085b56797276094b5611718c0a9cb2b14db7f8ab502fcf8f42a364297a3387fae3870a4d281484ba21c
|
||||
DIST curl-8.18.0.tar.xz.asc 488 BLAKE2B 68c2ce9777ba51962139e70e48c4b24d404682a6ad530843791cc188b2656dc26a19f0757f97ead2ff492f7b8a4e4116707df901e81bf8efb28658ff4df99ae0 SHA512 07e08d1bb3f8bf20b3d22f37fbc19c49c0d9ee4ea9d92da76fa8a9de343023e1b5d416ccc6535a4ff98b08b30eb9334fd856227e37564f6bcd542aa81bced152
|
||||
DIST curl-8.19.0-rc2.tar.xz 2782276 BLAKE2B 28ca64b9c42ba14b6ae73260822e2c7b59b16f6a1bf186ec8ee696a2f7f4d6f23d6a18ba580092f8d9e513b8b7eb5523f22cf03a414441a7dcb4932b8b77c252 SHA512 ad3fff8477dbf3487d7978ac1bef9622203a477ab30592923c18009a5292e9df83d8653c84cc4b1a0448891e9b9c9135e60a7524982809da7dd656272ecc76b7
|
||||
DIST curl-8.19.0-rc2.tar.xz.asc 488 BLAKE2B cc8e16325a3ecbd5ce95df0df4a8f73d2622daa6e3162ba3bd2cec044ac1d38b392d8bccb1be017d0ae494e278a7b974130663af7d670f01e89946034c5500f0 SHA512 593109ecad8e420416e7debec254ee3e29eaffaaefdbd5aa63f90e960eb479ac424b28e82075344744517560f4e74bb7a45d991c15363972b57e4634693ebac3
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@ -8,7 +8,7 @@ EAPI=8
|
||||
# https://lists.haxx.se/listinfo/curl-distros
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/danielstenberg.asc
|
||||
inherit autotools multilib-minimal multiprocessing prefix toolchain-funcs verify-sig
|
||||
inherit dot-a autotools multilib-minimal multiprocessing prefix toolchain-funcs verify-sig
|
||||
|
||||
DESCRIPTION="A Client that groks URLs"
|
||||
HOMEPAGE="https://curl.se/"
|
||||
@ -237,6 +237,7 @@ _get_curl_tls_configure_opts() {
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
use static-libs && lto-guarantee-fat
|
||||
# We make use of the fact that later flags override earlier ones
|
||||
# So start with all ssl providers off until proven otherwise
|
||||
# TODO: in the future, we may want to add wolfssl (https://www.wolfssl.com/)
|
||||
@ -429,6 +430,9 @@ multilib_src_install() {
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
find "${ED}" -type f -name '*.la' -delete || die
|
||||
|
||||
use static-libs && strip-lto-bytecode
|
||||
|
||||
rm -rf "${ED}"/etc/ || die
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@ -8,7 +8,7 @@ EAPI=8
|
||||
# https://lists.haxx.se/listinfo/curl-distros
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/danielstenberg.asc
|
||||
inherit autotools multilib-minimal multiprocessing prefix toolchain-funcs verify-sig
|
||||
inherit dot-a autotools multilib-minimal multiprocessing prefix toolchain-funcs verify-sig
|
||||
|
||||
DESCRIPTION="A Client that groks URLs"
|
||||
HOMEPAGE="https://curl.se/"
|
||||
@ -241,6 +241,8 @@ _get_curl_tls_configure_opts() {
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
use static-libs && lto-guarantee-fat
|
||||
|
||||
# We make use of the fact that later flags override earlier ones
|
||||
# So start with all ssl providers off until proven otherwise
|
||||
# TODO: in the future, we may want to add wolfssl (https://www.wolfssl.com/)
|
||||
@ -433,6 +435,9 @@ multilib_src_install() {
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
find "${ED}" -type f -name '*.la' -delete || die
|
||||
|
||||
use static-libs && strip-lto-bytecode
|
||||
|
||||
rm -rf "${ED}"/etc/ || die
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ EAPI=8
|
||||
# https://lists.haxx.se/listinfo/curl-distros
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/danielstenberg.asc
|
||||
inherit autotools multilib-minimal multiprocessing prefix toolchain-funcs verify-sig
|
||||
inherit dot-a autotools multilib-minimal multiprocessing prefix toolchain-funcs verify-sig
|
||||
|
||||
DESCRIPTION="A Client that groks URLs"
|
||||
HOMEPAGE="https://curl.se/"
|
||||
@ -22,7 +22,7 @@ else
|
||||
S="${WORKDIR}/${P//_/-}"
|
||||
else
|
||||
CURL_URI="https://curl.se/download/"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
||||
fi
|
||||
SRC_URI="
|
||||
${CURL_URI}${P//_/-}.tar.xz
|
||||
@ -238,6 +238,7 @@ _get_curl_tls_configure_opts() {
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
use static-libs && lto-guarantee-fat
|
||||
# We make use of the fact that later flags override earlier ones
|
||||
# So start with all ssl providers off until proven otherwise
|
||||
# TODO: in the future, we may want to add wolfssl (https://www.wolfssl.com/)
|
||||
@ -430,6 +431,9 @@ multilib_src_install() {
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
find "${ED}" -type f -name '*.la' -delete || die
|
||||
|
||||
use static-libs && strip-lto-bytecode
|
||||
|
||||
rm -rf "${ED}"/etc/ || die
|
||||
}
|
||||
|
||||
427
sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.19.0_rc2.ebuild
vendored
Normal file
427
sdk_container/src/third_party/portage-stable/net-misc/curl/curl-8.19.0_rc2.ebuild
vendored
Normal file
@ -0,0 +1,427 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# Maintainers should subscribe to the 'curl-distros' ML for backports etc
|
||||
# https://daniel.haxx.se/blog/2024/03/25/curl-distro-report/
|
||||
# https://lists.haxx.se/listinfo/curl-distros
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/danielstenberg.asc
|
||||
inherit dot-a autotools multilib-minimal multiprocessing prefix toolchain-funcs verify-sig
|
||||
|
||||
DESCRIPTION="A Client that groks URLs"
|
||||
HOMEPAGE="https://curl.se/"
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/curl/curl.git"
|
||||
else
|
||||
if [[ ${P} == *rc* ]]; then
|
||||
CURL_URI="https://curl.se/rc/"
|
||||
S="${WORKDIR}/${P//_/-}"
|
||||
else
|
||||
CURL_URI="https://curl.se/download/"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
||||
fi
|
||||
SRC_URI="
|
||||
${CURL_URI}${P//_/-}.tar.xz
|
||||
verify-sig? ( ${CURL_URI}${P//_/-}.tar.xz.asc )
|
||||
"
|
||||
fi
|
||||
|
||||
LICENSE="BSD curl ISC test? ( BSD-4 )"
|
||||
SLOT="0"
|
||||
IUSE="+adns +alt-svc brotli debug ech +ftp gnutls gopher +hsts +http2 +http3 +httpsrr idn +imap kerberos ldap"
|
||||
IUSE+=" mbedtls +openssl +pop3 +psl +quic rtmp rustls samba sasl-scram +smtp ssh ssl static-libs test"
|
||||
IUSE+=" telnet +tftp +websockets zstd"
|
||||
# These select the default tls implementation / which quic impl to use
|
||||
IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# HTTPS RR is technically usable with the threaded resolver, but it still uses c-ares to
|
||||
# ask for the HTTPS RR record type; if DoH is in use the HTTPS record will be requested
|
||||
# in addition to A and AAAA records.
|
||||
|
||||
# To simplify dependency management in the ebuild we'll require c-ares for HTTPS RR (for now?).
|
||||
# HTTPS RR in cURL is a dependency for:
|
||||
# - ECH (requires patched openssl or gnutls currently, enabled with rustls)
|
||||
# - Fetching the ALPN list which should provide a better HTTP/3 experience.
|
||||
|
||||
# Only one default ssl / quic provider can be enabled
|
||||
# The default provider needs its USE satisfied
|
||||
# HTTP/3 and MultiSSL are mutually exclusive; it's not clear if MultiSSL offers any benefit at all in the modern day.
|
||||
# https://github.com/curl/curl/commit/65ece771f4602107d9cdd339dff4b420280a2c2e
|
||||
REQUIRED_USE="
|
||||
ech? ( rustls )
|
||||
httpsrr? ( adns )
|
||||
quic? (
|
||||
^^ (
|
||||
openssl
|
||||
gnutls
|
||||
)
|
||||
!gnutls
|
||||
!mbedtls
|
||||
!rustls
|
||||
http3
|
||||
ssl
|
||||
)
|
||||
ssl? (
|
||||
^^ (
|
||||
curl_ssl_gnutls
|
||||
curl_ssl_mbedtls
|
||||
curl_ssl_openssl
|
||||
curl_ssl_rustls
|
||||
)
|
||||
)
|
||||
curl_ssl_gnutls? ( gnutls )
|
||||
curl_ssl_mbedtls? ( mbedtls )
|
||||
curl_ssl_openssl? ( openssl )
|
||||
curl_ssl_rustls? ( rustls )
|
||||
http3? ( alt-svc httpsrr quic )
|
||||
"
|
||||
|
||||
# cURL's docs and CI/CD are great resources for confirming supported versions
|
||||
# particulary for fast-moving targets like HTTP/2 and TCP/2 e.g.:
|
||||
# - https://github.com/curl/curl/blob/master/docs/INTERNALS.md (core dependencies + minimum versions)
|
||||
# - https://github.com/curl/curl/blob/master/docs/HTTP3.md (example of a feature that moves quickly)
|
||||
# - https://github.com/curl/curl/blob/master/.github/workflows/http3-linux.yml (CI/CD for TCP/2)
|
||||
# However 'supported' vs 'works' are two entirely different things; be sane but
|
||||
# don't be afraid to require a later version.
|
||||
# ngtcp2 = https://bugs.gentoo.org/912029 - can only build with one tls backend at a time.
|
||||
RDEPEND="
|
||||
>=virtual/zlib-1.2.5:=[${MULTILIB_USEDEP}]
|
||||
adns? ( >=net-dns/c-ares-1.16.0:=[${MULTILIB_USEDEP}] )
|
||||
brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] )
|
||||
http2? ( >=net-libs/nghttp2-1.15.0:=[${MULTILIB_USEDEP}] )
|
||||
http3? ( >=net-libs/nghttp3-1.1.0[${MULTILIB_USEDEP}] )
|
||||
idn? ( >=net-dns/libidn2-2.0.0:=[static-libs?,${MULTILIB_USEDEP}] )
|
||||
kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
|
||||
ldap? ( >=net-nds/openldap-2.0.0:=[static-libs?,${MULTILIB_USEDEP}] )
|
||||
psl? ( net-libs/libpsl[${MULTILIB_USEDEP}] )
|
||||
quic? (
|
||||
gnutls? ( >=net-libs/ngtcp2-1.20.0-r1[gnutls,ssl,${MULTILIB_USEDEP}] )
|
||||
openssl? ( >=net-libs/ngtcp2-1.20.0-r1[openssl,ssl,${MULTILIB_USEDEP}] )
|
||||
)
|
||||
rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
|
||||
ssh? ( >=net-libs/libssh2-1.2.8[${MULTILIB_USEDEP}] )
|
||||
sasl-scram? ( >=net-misc/gsasl-2.2.0[static-libs?,${MULTILIB_USEDEP}] )
|
||||
ssl? (
|
||||
gnutls? (
|
||||
app-misc/ca-certificates
|
||||
>=net-libs/gnutls-3.1.10:=[static-libs?,${MULTILIB_USEDEP}]
|
||||
dev-libs/nettle:=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
mbedtls? (
|
||||
app-misc/ca-certificates
|
||||
net-libs/mbedtls:3=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
openssl? (
|
||||
>=dev-libs/openssl-1.0.2:=[static-libs?,${MULTILIB_USEDEP}]
|
||||
)
|
||||
rustls? (
|
||||
>=net-libs/rustls-ffi-0.15.0:=[${MULTILIB_USEDEP}]
|
||||
)
|
||||
)
|
||||
zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
BDEPEND="
|
||||
dev-lang/perl
|
||||
virtual/pkgconfig
|
||||
test? (
|
||||
sys-apps/diffutils
|
||||
http2? ( >=net-libs/nghttp2-1.15.0:=[utils,${MULTILIB_USEDEP}] )
|
||||
http3? ( net-libs/nghttp2:=[utils,${MULTILIB_USEDEP}] )
|
||||
)
|
||||
verify-sig? ( sec-keys/openpgp-keys-danielstenberg )
|
||||
"
|
||||
|
||||
DOCS=( README docs/{FEATURES.md,INTERNALS.md,FAQ.md,BUGS.md,CONTRIBUTE.md} )
|
||||
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
/usr/include/curl/curlbuild.h
|
||||
)
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/curl-config
|
||||
)
|
||||
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
__builtin_available
|
||||
closesocket
|
||||
CloseSocket
|
||||
getpass_r
|
||||
ioctlsocket
|
||||
IoctlSocket
|
||||
mach_absolute_time
|
||||
setmode
|
||||
_fseeki64
|
||||
# custom AC_LINK_IFELSE code fails to link even without -Werror
|
||||
OSSL_QUIC_client_method
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-prefix-6.patch"
|
||||
"${FILESDIR}/${PN}-respect-cflags-3.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eprefixify curl-config.in
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
# Generates TLS-related configure options based on USE flags.
|
||||
# Outputs options suitable for appending to a configure options array.
|
||||
_get_curl_tls_configure_opts() {
|
||||
local tls_opts=()
|
||||
|
||||
local backend flag_name
|
||||
for backend in gnutls mbedtls openssl rustls; do
|
||||
if [[ "$backend" == "openssl" ]]; then
|
||||
flag_name="ssl"
|
||||
tls_opts+=( "--with-ca-path=${EPREFIX}/etc/ssl/certs")
|
||||
else
|
||||
flag_name="$backend"
|
||||
fi
|
||||
|
||||
if use "$backend"; then
|
||||
tls_opts+=( "--with-${flag_name}" )
|
||||
else
|
||||
# If a single backend is enabled, 'ssl' is required, openssl is the default / fallback
|
||||
if ! [[ "$backend" == "openssl" ]]; then
|
||||
tls_opts+=( "--without-${flag_name}" )
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if use curl_ssl_gnutls; then
|
||||
multilib_is_native_abi && einfo "Default TLS backend: gnutls"
|
||||
tls_opts+=( "--with-default-ssl-backend=gnutls" )
|
||||
elif use curl_ssl_mbedtls; then
|
||||
multilib_is_native_abi && einfo "Default TLS backend: mbedtls"
|
||||
tls_opts+=( "--with-default-ssl-backend=mbedtls" )
|
||||
elif use curl_ssl_openssl; then
|
||||
multilib_is_native_abi && einfo "Default TLS backend: openssl"
|
||||
tls_opts+=( "--with-default-ssl-backend=openssl" )
|
||||
elif use curl_ssl_rustls; then
|
||||
multilib_is_native_abi && einfo "Default TLS backend: rustls"
|
||||
tls_opts+=( "--with-default-ssl-backend=rustls" )
|
||||
else
|
||||
eerror "We can't be here because of REQUIRED_USE."
|
||||
die "Please file a bug, hit impossible condition w/ USE=ssl handling."
|
||||
fi
|
||||
|
||||
# Explicitly Disable unimplemented backends
|
||||
tls_opts+=(
|
||||
--without-amissl
|
||||
--without-wolfssl
|
||||
)
|
||||
|
||||
printf "%s\n" "${tls_opts[@]}"
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
use static-libs && lto-guarantee-fat
|
||||
# We make use of the fact that later flags override earlier ones
|
||||
# So start with all ssl providers off until proven otherwise
|
||||
# TODO: in the future, we may want to add wolfssl (https://www.wolfssl.com/)
|
||||
local myconf=()
|
||||
|
||||
myconf+=( --without-ca-fallback --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
|
||||
if use ssl; then
|
||||
local -a tls_backend_opts
|
||||
readarray -t tls_backend_opts < <(_get_curl_tls_configure_opts)
|
||||
myconf+=(
|
||||
"${tls_backend_opts[@]}"
|
||||
$(use_with quic ngtcp2)
|
||||
)
|
||||
else
|
||||
myconf+=( --without-ssl )
|
||||
einfo "SSL disabled"
|
||||
fi
|
||||
|
||||
# These configuration options are organised alphabetically by category/type
|
||||
|
||||
# Protocols
|
||||
# `grep SUPPORT_PROTOCOLS=\" configure.ac | awk '{ print substr($2, 1, length($2)-1)}' | sort`
|
||||
# Assume that anything omitted (that is not new!) is enabled by default with no deps
|
||||
myconf+=(
|
||||
--enable-file
|
||||
$(use_enable ftp)
|
||||
$(use_enable gopher)
|
||||
--enable-http
|
||||
$(use_enable imap) # Automatic IMAPS if TLS is enabled
|
||||
$(use_enable ldap ldaps)
|
||||
$(use_enable ldap)
|
||||
$(use_enable pop3)
|
||||
$(use_enable samba smb)
|
||||
$(use_with ssh libssh2) # enables scp/sftp
|
||||
$(use_with rtmp librtmp)
|
||||
--enable-rtsp
|
||||
$(use_enable smtp)
|
||||
$(use_enable telnet)
|
||||
$(use_enable tftp)
|
||||
$(use_enable websockets)
|
||||
)
|
||||
|
||||
# Keep various 'HTTP-flavoured' options together
|
||||
myconf+=(
|
||||
$(use_enable alt-svc)
|
||||
$(use_enable hsts)
|
||||
$(use_enable httpsrr)
|
||||
$(use_with http2 nghttp2)
|
||||
$(use_with http3 nghttp3)
|
||||
)
|
||||
|
||||
# --enable/disable options
|
||||
# `grep -- --enable configure | grep Check | awk '{ print $4 }' | sort`
|
||||
myconf+=(
|
||||
$(use_enable adns ares)
|
||||
--enable-aws
|
||||
--enable-basic-auth
|
||||
--enable-bearer-auth
|
||||
--enable-cookies
|
||||
--enable-dateparse
|
||||
--enable-dict
|
||||
--enable-digest-auth
|
||||
--enable-dnsshuffle
|
||||
--enable-doh
|
||||
$(use_enable ech)
|
||||
--enable-http-auth
|
||||
--enable-ipv6
|
||||
--enable-kerberos-auth
|
||||
--enable-largefile
|
||||
--enable-manual
|
||||
--enable-mime
|
||||
--enable-negotiate-auth
|
||||
--enable-netrc
|
||||
--enable-ntlm
|
||||
--enable-progress-meter
|
||||
--enable-proxy
|
||||
--enable-rt
|
||||
--enable-socketpair
|
||||
--disable-sspi
|
||||
$(use_enable static-libs static)
|
||||
--enable-symbol-hiding
|
||||
--enable-tls-srp
|
||||
--disable-versioned-symbols
|
||||
)
|
||||
|
||||
# --with/without options
|
||||
# `grep -- --with configure | grep Check | awk '{ print $4 }' | sort`
|
||||
myconf+=(
|
||||
$(use_with brotli)
|
||||
--with-fish-functions-dir="${EPREFIX}"/usr/share/fish/vendor_completions.d
|
||||
$(use_with idn libidn2)
|
||||
$(use_with kerberos gssapi "${EPREFIX}"/usr)
|
||||
$(use_with sasl-scram libgsasl)
|
||||
$(use_with psl libpsl)
|
||||
--without-quiche
|
||||
--without-schannel
|
||||
--without-winidn
|
||||
--with-zlib
|
||||
--with-zsh-functions-dir="${EPREFIX}"/usr/share/zsh/site-functions
|
||||
$(use_with zstd)
|
||||
)
|
||||
|
||||
# Test deps (disabled)
|
||||
myconf+=(
|
||||
--without-test-caddy
|
||||
--without-test-httpd
|
||||
--without-test-nghttpx
|
||||
)
|
||||
|
||||
if use debug; then
|
||||
myconf+=(
|
||||
--enable-debug
|
||||
)
|
||||
fi
|
||||
|
||||
if use test && multilib_is_native_abi && ( use http2 || use http3 ); then
|
||||
myconf+=(
|
||||
--with-test-nghttpx="${BROOT}/usr/bin/nghttpx"
|
||||
)
|
||||
fi
|
||||
|
||||
# Since 8.12.0 adns/c-ares and the threaded resolver are mutually exclusive
|
||||
# This is in support of some work to enable `httpsrr` to use adns and the rest
|
||||
# of curl to use the threaded resolver; for us `httpsrr` is conditional on adns.
|
||||
if use adns; then
|
||||
myconf+=(
|
||||
--disable-threaded-resolver
|
||||
)
|
||||
else
|
||||
myconf+=(
|
||||
--enable-threaded-resolver
|
||||
)
|
||||
fi
|
||||
|
||||
ECONF_SOURCE="${S}" econf "${myconf[@]}"
|
||||
|
||||
if ! multilib_is_native_abi; then
|
||||
# Avoid building the client (we just want libcurl for multilib)
|
||||
sed -i -e '/SUBDIRS/s:src::' Makefile || die
|
||||
sed -i -e '/SUBDIRS/s:scripts::' Makefile || die
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
default
|
||||
|
||||
if multilib_is_native_abi; then
|
||||
# Shell completions
|
||||
! tc-is-cross-compiler && emake -C scripts
|
||||
fi
|
||||
}
|
||||
|
||||
# There is also a pytest harness that tests for bugs in some very specific
|
||||
# situations; we can rely on upstream for this rather than adding additional test deps.
|
||||
multilib_src_test() {
|
||||
# See https://github.com/curl/curl/blob/master/tests/runtests.pl#L5721
|
||||
# -n: no valgrind (unreliable in sandbox and doesn't work correctly on all arches)
|
||||
# -v: verbose
|
||||
# -a: keep going on failure (so we see everything that breaks, not just 1st test)
|
||||
# -k: keep test files after completion
|
||||
# -am: automake style TAP output
|
||||
# -p: print logs if test fails
|
||||
# Note: if needed, we can skip specific tests. See e.g. Fedora's packaging
|
||||
# or just read https://github.com/curl/curl/tree/master/tests#run.
|
||||
# Note: we don't run the testsuite for cross-compilation.
|
||||
# Upstream recommend 7*nproc as a starting point for parallel tests, but
|
||||
# this ends up breaking when nproc is huge (like -j80).
|
||||
# The network sandbox causes tests 241 and 1083 to fail; these are typically skipped
|
||||
# as most gentoo users don't have an 'ip6-localhost'
|
||||
multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p -j$((2*$(makeopts_jobs))) !241 !1083"
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
if multilib_is_native_abi; then
|
||||
# Shell completions
|
||||
! tc-is-cross-compiler && emake -C scripts DESTDIR="${D}" install
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
find "${ED}" -type f -name '*.la' -delete || die
|
||||
|
||||
use static-libs && strip-lto-bytecode
|
||||
|
||||
rm -rf "${ED}"/etc/ || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use debug; then
|
||||
ewarn "USE=debug has been selected, enabling debug codepaths and making cURL extra verbose."
|
||||
ewarn "Use this _only_ for testing. Debug builds should _not_ be used in anger."
|
||||
ewarn "hic sunt dracones; you have been warned."
|
||||
fi
|
||||
}
|
||||
@ -8,7 +8,7 @@ EAPI=8
|
||||
# https://lists.haxx.se/listinfo/curl-distros
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/danielstenberg.asc
|
||||
inherit autotools multilib-minimal multiprocessing prefix toolchain-funcs verify-sig
|
||||
inherit dot-a autotools multilib-minimal multiprocessing prefix toolchain-funcs verify-sig
|
||||
|
||||
DESCRIPTION="A Client that groks URLs"
|
||||
HOMEPAGE="https://curl.se/"
|
||||
@ -36,7 +36,7 @@ IUSE="+adns +alt-svc brotli debug ech +ftp gnutls gopher +hsts +http2 +http3 +ht
|
||||
IUSE+=" mbedtls +openssl +pop3 +psl +quic rtmp rustls samba sasl-scram +smtp ssh ssl static-libs test"
|
||||
IUSE+=" telnet +tftp +websockets zstd"
|
||||
# These select the default tls implementation / which quic impl to use
|
||||
IUSE+=" +curl_quic_openssl curl_quic_ngtcp2 curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
|
||||
IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls +curl_ssl_openssl curl_ssl_rustls"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# HTTPS RR is technically usable with the threaded resolver, but it still uses c-ares to
|
||||
@ -57,9 +57,12 @@ REQUIRED_USE="
|
||||
httpsrr? ( adns )
|
||||
quic? (
|
||||
^^ (
|
||||
curl_quic_openssl
|
||||
curl_quic_ngtcp2
|
||||
openssl
|
||||
gnutls
|
||||
)
|
||||
!gnutls
|
||||
!mbedtls
|
||||
!rustls
|
||||
http3
|
||||
ssl
|
||||
)
|
||||
@ -71,18 +74,6 @@ REQUIRED_USE="
|
||||
curl_ssl_rustls
|
||||
)
|
||||
)
|
||||
curl_quic_openssl? (
|
||||
curl_ssl_openssl
|
||||
!gnutls
|
||||
!mbedtls
|
||||
!rustls
|
||||
)
|
||||
curl_quic_ngtcp2? (
|
||||
curl_ssl_gnutls
|
||||
!mbedtls
|
||||
!openssl
|
||||
!rustls
|
||||
)
|
||||
curl_ssl_gnutls? ( gnutls )
|
||||
curl_ssl_mbedtls? ( mbedtls )
|
||||
curl_ssl_openssl? ( openssl )
|
||||
@ -98,9 +89,6 @@ REQUIRED_USE="
|
||||
# However 'supported' vs 'works' are two entirely different things; be sane but
|
||||
# don't be afraid to require a later version.
|
||||
# ngtcp2 = https://bugs.gentoo.org/912029 - can only build with one tls backend at a time.
|
||||
# TODO: OpenSSL-QUIC support is going to be removed in 2026; depend on ngtcp2[{gnutls,openssl}] before that point.
|
||||
# - https://github.com/curl/curl/pull/18820 (Deprecate OpenSSL QUIC support)
|
||||
# - https://github.com/curl/curl/issues/18336 (curl w/ OpenSSL QUIC fails to fetch Google.com)
|
||||
RDEPEND="
|
||||
>=virtual/zlib-1.2.5:=[${MULTILIB_USEDEP}]
|
||||
adns? ( >=net-dns/c-ares-1.16.0:=[${MULTILIB_USEDEP}] )
|
||||
@ -112,8 +100,8 @@ RDEPEND="
|
||||
ldap? ( >=net-nds/openldap-2.0.0:=[static-libs?,${MULTILIB_USEDEP}] )
|
||||
psl? ( net-libs/libpsl[${MULTILIB_USEDEP}] )
|
||||
quic? (
|
||||
curl_quic_openssl? ( >=dev-libs/openssl-3.3.0:=[quic,${MULTILIB_USEDEP}] )
|
||||
curl_quic_ngtcp2? ( >=net-libs/ngtcp2-1.2.0[gnutls,ssl,-openssl,${MULTILIB_USEDEP}] )
|
||||
gnutls? ( >=net-libs/ngtcp2-1.20.0-r1[gnutls,ssl,${MULTILIB_USEDEP}] )
|
||||
openssl? ( >=net-libs/ngtcp2-1.20.0-r1[openssl,ssl,${MULTILIB_USEDEP}] )
|
||||
)
|
||||
rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
|
||||
ssh? ( >=net-libs/libssh2-1.2.8[${MULTILIB_USEDEP}] )
|
||||
@ -151,7 +139,7 @@ BDEPEND="
|
||||
verify-sig? ( sec-keys/openpgp-keys-danielstenberg )
|
||||
"
|
||||
|
||||
DOCS=( README docs/{FEATURES.md,INTERNALS.md,FAQ,BUGS.md,CONTRIBUTE.md} )
|
||||
DOCS=( README docs/{FEATURES.md,INTERNALS.md,FAQ.md,BUGS.md,CONTRIBUTE.md} )
|
||||
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
/usr/include/curl/curlbuild.h
|
||||
@ -176,7 +164,7 @@ QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-prefix-5.patch"
|
||||
"${FILESDIR}/${PN}-prefix-6.patch"
|
||||
"${FILESDIR}/${PN}-respect-cflags-3.patch"
|
||||
)
|
||||
|
||||
@ -238,6 +226,7 @@ _get_curl_tls_configure_opts() {
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
use static-libs && lto-guarantee-fat
|
||||
# We make use of the fact that later flags override earlier ones
|
||||
# So start with all ssl providers off until proven otherwise
|
||||
# TODO: in the future, we may want to add wolfssl (https://www.wolfssl.com/)
|
||||
@ -247,17 +236,10 @@ multilib_src_configure() {
|
||||
if use ssl; then
|
||||
local -a tls_backend_opts
|
||||
readarray -t tls_backend_opts < <(_get_curl_tls_configure_opts)
|
||||
myconf+=("${tls_backend_opts[@]}")
|
||||
if use quic; then
|
||||
myconf+=(
|
||||
$(use_with curl_quic_ngtcp2 ngtcp2)
|
||||
$(use_with curl_quic_openssl openssl-quic)
|
||||
)
|
||||
else
|
||||
# Without a REQUIRED_USE to ensure that QUIC was requested when at least one default backend is
|
||||
# enabled we need ensure that we don't try to build QUIC support
|
||||
myconf+=( --without-ngtcp2 --without-openssl-quic )
|
||||
fi
|
||||
myconf+=(
|
||||
"${tls_backend_opts[@]}"
|
||||
$(use_with quic ngtcp2)
|
||||
)
|
||||
else
|
||||
myconf+=( --without-ssl )
|
||||
einfo "SSL disabled"
|
||||
@ -430,6 +412,9 @@ multilib_src_install() {
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
find "${ED}" -type f -name '*.la' -delete || die
|
||||
|
||||
use static-libs && strip-lto-bytecode
|
||||
|
||||
rm -rf "${ED}"/etc/ || die
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user