mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-29 17:41:05 +02:00
net-misc/curl: Sync with Gentoo
It's from Gentoo commit 49bf70035d505816abbb3b3d24d696bbd8da17d7.
This commit is contained in:
parent
8f875845a5
commit
761587f15d
@ -4,3 +4,5 @@ DIST curl-7.83.1.tar.xz 2474940 BLAKE2B 491427b12f082c2246ef6cb2a129340079db28bd
|
||||
DIST curl-7.83.1.tar.xz.asc 488 BLAKE2B 78f7a6d9a32cab97e9ce26430eb2be2bc4e20552cf8c59238f30f127e9d7af5b4f9808c3fe0846c18c8f7a67b49f2f75d865d17b7760bb664872934799949441 SHA512 f0d29de315488c844eb81ed5a89ed6334910970224c8cac43e7e6f2d58c35ad0064c0b6122e69b3a34ce91f4b56873c63e2e8aea1c602ef40711bfd62a01b191
|
||||
DIST curl-7.84.0.tar.xz 2477944 BLAKE2B 811a63285f39a598bc4fd73ae4b8e23e5146b93dcf3eea805345792b7dddd85bbd54240d9871a0dc9f058d58fd7ea7f4efbcb82727218e8afaaae3600bad55e1 SHA512 86231866a35593a1637fbc0c6af3b6761bdfd99fb35580cc52970c36f19604f93dce59fea67a1d5bb4b455f719307599c7916c77d14f2b661f6bf7fb1ca716ce
|
||||
DIST curl-7.84.0.tar.xz.asc 488 BLAKE2B d74dea89fa89b6ed0a928e01987669f7dde0bcbb30423ea0f3af9f31eea1e059d458629d80455d772264d744fab236d4f506545afa1bfbd6ded7e2b27192a7c8 SHA512 80ff5274277ad97448fa53511bab6e8a1c302bcb25fc0916d78b8dc6c6af43d944c37c4ed46668b651cc639ec4964780725117ca0e85168ea66ad7cc98d29702
|
||||
DIST curl-7.85.0.tar.xz 2480648 BLAKE2B 7d0e0212541c05352040391b400e0314e0d38a96b199dfd70ccaaca3fd7f809b7ed96b877c4663c06fc05c483468521458255dcf025226f1bdf4d6c9dd9b8873 SHA512 b57cc31649a4f47cc4b482f56a85c86c8e8aaeaf01bc1b51b065fdb9145a9092bc52535e52a85a66432eb163605b2edbf5bc5c33ea6e40e50f26a69ad1365cbd
|
||||
DIST curl-7.85.0.tar.xz.asc 488 BLAKE2B 8fb84955ee458af7f2cecef4b48c5375db2e8179e5c17a5215a4a92e28e5ec7dd59a9dc057563643016c683e547a04c494276e16d113dbd498f94b7a7183e1e3 SHA512 7022daf84b330b24112d595edee715cdeb881a4ba8a4fa7eec23aed28292e5d943af778f03aadd036d44d875f9e226096ea142d18afe516b6bdbd475fcd3aca6
|
||||
|
287
sdk_container/src/third_party/portage-stable/net-misc/curl/curl-7.85.0-r2.ebuild
vendored
Normal file
287
sdk_container/src/third_party/portage-stable/net-misc/curl/curl-7.85.0-r2.ebuild
vendored
Normal file
@ -0,0 +1,287 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="8"
|
||||
|
||||
inherit autotools prefix multilib-minimal verify-sig
|
||||
|
||||
DESCRIPTION="A Client that groks URLs"
|
||||
HOMEPAGE="https://curl.haxx.se/"
|
||||
SRC_URI="https://curl.haxx.se/download/${P}.tar.xz
|
||||
verify-sig? ( https://curl.haxx.se/download/${P}.tar.xz.asc )"
|
||||
|
||||
LICENSE="curl"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE="+adns alt-svc brotli +ftp gnutls gopher hsts +http2 idn +imap ipv6 kerberos ldap mbedtls nss +openssl +pop3 +progress-meter rtmp samba +smtp ssh ssl sslv3 static-libs test telnet +tftp zstd"
|
||||
IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls curl_ssl_nss +curl_ssl_openssl"
|
||||
IUSE+=" nghttp3 quiche"
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/danielstenberg.asc
|
||||
|
||||
# Only one default ssl provider can be enabled
|
||||
REQUIRED_USE="
|
||||
ssl? (
|
||||
^^ (
|
||||
curl_ssl_gnutls
|
||||
curl_ssl_mbedtls
|
||||
curl_ssl_nss
|
||||
curl_ssl_openssl
|
||||
)
|
||||
)"
|
||||
|
||||
# lead to lots of false negatives, bug #285669
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
|
||||
brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] )
|
||||
ssl? (
|
||||
gnutls? (
|
||||
net-libs/gnutls:0=[static-libs?,${MULTILIB_USEDEP}]
|
||||
dev-libs/nettle:0=[${MULTILIB_USEDEP}]
|
||||
app-misc/ca-certificates
|
||||
)
|
||||
mbedtls? (
|
||||
net-libs/mbedtls:0=[${MULTILIB_USEDEP}]
|
||||
app-misc/ca-certificates
|
||||
)
|
||||
openssl? (
|
||||
dev-libs/openssl:0=[sslv3(-)=,static-libs?,${MULTILIB_USEDEP}]
|
||||
)
|
||||
nss? (
|
||||
dev-libs/nss:0[${MULTILIB_USEDEP}]
|
||||
dev-libs/nss-pem
|
||||
app-misc/ca-certificates
|
||||
)
|
||||
)
|
||||
http2? ( net-libs/nghttp2:=[${MULTILIB_USEDEP}] )
|
||||
nghttp3? (
|
||||
net-libs/nghttp3[${MULTILIB_USEDEP}]
|
||||
net-libs/ngtcp2[ssl,${MULTILIB_USEDEP}]
|
||||
)
|
||||
quiche? ( >=net-libs/quiche-0.3.0[${MULTILIB_USEDEP}] )
|
||||
idn? ( net-dns/libidn2:0=[static-libs?,${MULTILIB_USEDEP}] )
|
||||
adns? ( net-dns/c-ares:0=[${MULTILIB_USEDEP}] )
|
||||
kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
|
||||
rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
|
||||
ssh? ( net-libs/libssh2[${MULTILIB_USEDEP}] )
|
||||
sys-libs/zlib[${MULTILIB_USEDEP}]
|
||||
zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )"
|
||||
|
||||
# Do we need to enforce the same ssl backend for curl and rtmpdump? Bug #423303
|
||||
# rtmp? (
|
||||
# media-video/rtmpdump
|
||||
# curl_ssl_gnutls? ( media-video/rtmpdump[gnutls] )
|
||||
# curl_ssl_openssl? ( media-video/rtmpdump[-gnutls,ssl] )
|
||||
# )
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="dev-lang/perl
|
||||
virtual/pkgconfig
|
||||
test? (
|
||||
sys-apps/diffutils
|
||||
)
|
||||
verify-sig? ( sec-keys/openpgp-keys-danielstenberg )"
|
||||
|
||||
DOCS=( CHANGES README docs/{FEATURES.md,INTERNALS.md,FAQ,BUGS.md,CONTRIBUTE.md} )
|
||||
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
/usr/include/curl/curlbuild.h
|
||||
)
|
||||
|
||||
MULTILIB_CHOST_TOOLS=(
|
||||
/usr/bin/curl-config
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-7.30.0-prefix.patch
|
||||
"${FILESDIR}"/${PN}-respect-cflags-3.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eprefixify curl-config.in
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
# 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-gnutls --without-mbedtls --without-nss --without-ssl )
|
||||
myconf+=( --without-ca-fallback --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt )
|
||||
#myconf+=( --without-default-ssl-backend )
|
||||
if use ssl ; then
|
||||
if use gnutls || use curl_ssl_gnutls; then
|
||||
einfo "SSL provided by gnutls"
|
||||
myconf+=( --with-gnutls --with-nettle )
|
||||
fi
|
||||
if use mbedtls || use curl_ssl_mbedtls; then
|
||||
einfo "SSL provided by mbedtls"
|
||||
myconf+=( --with-mbedtls )
|
||||
fi
|
||||
if use nss || use curl_ssl_nss; then
|
||||
einfo "SSL provided by nss"
|
||||
myconf+=( --with-nss --with-nss-deprecated )
|
||||
fi
|
||||
if use openssl || use curl_ssl_openssl; then
|
||||
einfo "SSL provided by openssl"
|
||||
myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs )
|
||||
fi
|
||||
|
||||
if use curl_ssl_gnutls; then
|
||||
einfo "Default SSL provided by gnutls"
|
||||
myconf+=( --with-default-ssl-backend=gnutls )
|
||||
elif use curl_ssl_mbedtls; then
|
||||
einfo "Default SSL provided by mbedtls"
|
||||
myconf+=( --with-default-ssl-backend=mbedtls )
|
||||
elif use curl_ssl_nss; then
|
||||
einfo "Default SSL provided by nss"
|
||||
myconf+=( --with-default-ssl-backend=nss )
|
||||
elif use curl_ssl_openssl; then
|
||||
einfo "Default SSL provided by openssl"
|
||||
myconf+=( --with-default-ssl-backend=openssl )
|
||||
else
|
||||
eerror "We can't be here because of REQUIRED_USE."
|
||||
fi
|
||||
|
||||
else
|
||||
einfo "SSL disabled"
|
||||
fi
|
||||
|
||||
# These configuration options are organized alphabetically
|
||||
# within each category. This should make it easier if we
|
||||
# ever decide to make any of them contingent on USE flags:
|
||||
# 1) protocols first. To see them all do
|
||||
# 'grep SUPPORT_PROTOCOLS configure.ac'
|
||||
# 2) --enable/disable options second.
|
||||
# 'grep -- --enable configure | grep Check | awk '{ print $4 }' | sort
|
||||
# 3) --with/without options third.
|
||||
# grep -- --with configure | grep Check | awk '{ print $4 }' | sort
|
||||
|
||||
myconf+=(
|
||||
$(use_enable alt-svc)
|
||||
--enable-crypto-auth
|
||||
--enable-dict
|
||||
--disable-ech
|
||||
--enable-file
|
||||
$(use_enable ftp)
|
||||
$(use_enable gopher)
|
||||
$(use_enable hsts)
|
||||
--enable-http
|
||||
$(use_enable imap)
|
||||
$(use_enable ldap)
|
||||
$(use_enable ldap ldaps)
|
||||
--enable-ntlm
|
||||
--disable-ntlm-wb
|
||||
$(use_enable pop3)
|
||||
--enable-rt
|
||||
--enable-rtsp
|
||||
$(use_enable samba smb)
|
||||
$(use_with ssh libssh2)
|
||||
$(use_enable smtp)
|
||||
$(use_enable telnet)
|
||||
$(use_enable tftp)
|
||||
--enable-tls-srp
|
||||
$(use_enable adns ares)
|
||||
--enable-cookies
|
||||
--enable-dateparse
|
||||
--enable-dnsshuffle
|
||||
--enable-doh
|
||||
--enable-symbol-hiding
|
||||
--enable-http-auth
|
||||
$(use_enable ipv6)
|
||||
--enable-largefile
|
||||
--enable-manual
|
||||
--enable-mime
|
||||
--enable-netrc
|
||||
$(use_enable progress-meter)
|
||||
--enable-proxy
|
||||
--disable-sspi
|
||||
$(use_enable static-libs static)
|
||||
--enable-pthreads
|
||||
--enable-threaded-resolver
|
||||
--disable-versioned-symbols
|
||||
--without-amissl
|
||||
--without-bearssl
|
||||
$(use_with brotli)
|
||||
--without-fish-functions-dir
|
||||
$(use_with http2 nghttp2)
|
||||
--without-hyper
|
||||
$(use_with idn libidn2)
|
||||
$(use_with kerberos gssapi "${EPREFIX}"/usr)
|
||||
--without-libgsasl
|
||||
--without-libpsl
|
||||
--without-msh3
|
||||
$(use_with nghttp3)
|
||||
$(use_with nghttp3 ngtcp2)
|
||||
$(use_with quiche)
|
||||
$(use_with rtmp librtmp)
|
||||
--without-rustls
|
||||
--without-schannel
|
||||
--without-secure-transport
|
||||
--without-winidn
|
||||
--without-wolfssl
|
||||
--with-zlib
|
||||
$(use_with zstd)
|
||||
)
|
||||
|
||||
ECONF_SOURCE="${S}" \
|
||||
econf "${myconf[@]}"
|
||||
|
||||
if ! multilib_is_native_abi; then
|
||||
# avoid building the client
|
||||
sed -i -e '/SUBDIRS/s:src::' Makefile || die
|
||||
sed -i -e '/SUBDIRS/s:scripts::' Makefile || die
|
||||
fi
|
||||
|
||||
# Fix up the pkg-config file to be more robust.
|
||||
# https://github.com/curl/curl/issues/864
|
||||
local priv=() libs=()
|
||||
# We always enable zlib.
|
||||
libs+=( "-lz" )
|
||||
priv+=( "zlib" )
|
||||
if use http2; then
|
||||
libs+=( "-lnghttp2" )
|
||||
priv+=( "libnghttp2" )
|
||||
fi
|
||||
if use quiche; then
|
||||
libs+=( "-lquiche" )
|
||||
priv+=( "quiche" )
|
||||
fi
|
||||
if use nghttp3; then
|
||||
libs+=( "-lnghttp3" "-lngtcp2" )
|
||||
priv+=( "libnghttp3" "-libtcp2" )
|
||||
fi
|
||||
if use ssl && use curl_ssl_openssl; then
|
||||
libs+=( "-lssl" "-lcrypto" )
|
||||
priv+=( "openssl" )
|
||||
fi
|
||||
grep -q Requires.private libcurl.pc && die "need to update ebuild"
|
||||
libs=$(printf '|%s' "${libs[@]}")
|
||||
sed -i -r \
|
||||
-e "/^Libs.private/s:(${libs#|})( |$)::g" \
|
||||
libcurl.pc || die
|
||||
echo "Requires.private: ${priv[*]}" >> libcurl.pc
|
||||
}
|
||||
|
||||
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 which 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 disable tests. See e.g. Fedora's packaging
|
||||
# or just read https://github.com/curl/curl/tree/master/tests#run.
|
||||
multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p"
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
find "${ED}" -type f -name '*.la' -delete || die
|
||||
rm -rf "${ED}"/etc/ || die
|
||||
}
|
@ -36,5 +36,6 @@
|
||||
<remote-id type="cpe">cpe:/a:curl:libcurl</remote-id>
|
||||
<remote-id type="cpe">cpe:/a:haxx:curl</remote-id>
|
||||
<remote-id type="cpe">cpe:/a:haxx:libcurl</remote-id>
|
||||
<remote-id type="github">curl/curl</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
Loading…
x
Reference in New Issue
Block a user