From 720452fca3cdf447b4c65bc3bb363032a983309e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 26 May 2023 09:08:49 +0100 Subject: gentoo auto-resync : 26:05:2023 - 09:08:49 --- net-misc/curl/Manifest | 12 +- net-misc/curl/curl-8.0.1.ebuild | 2 +- net-misc/curl/curl-8.1.0-r1.ebuild | 2 +- net-misc/curl/curl-8.1.1.ebuild | 332 +++++++++++++++++++++ net-misc/curl/curl-9999.ebuild | 326 ++++++++++++++++++++ net-misc/curl/files/curl-7.30.0-prefix.patch | 21 -- .../curl/files/curl-8.1.1-configure-compiler.patch | 73 +++++ net-misc/curl/files/curl-8.1.1-hanging-http2.patch | 36 +++ net-misc/curl/files/curl-prefix.patch | 21 ++ 9 files changed, 799 insertions(+), 26 deletions(-) create mode 100644 net-misc/curl/curl-8.1.1.ebuild create mode 100644 net-misc/curl/curl-9999.ebuild delete mode 100644 net-misc/curl/files/curl-7.30.0-prefix.patch create mode 100644 net-misc/curl/files/curl-8.1.1-configure-compiler.patch create mode 100644 net-misc/curl/files/curl-8.1.1-hanging-http2.patch create mode 100644 net-misc/curl/files/curl-prefix.patch (limited to 'net-misc/curl') diff --git a/net-misc/curl/Manifest b/net-misc/curl/Manifest index fa14ba4f0609..693a91b98490 100644 --- a/net-misc/curl/Manifest +++ b/net-misc/curl/Manifest @@ -1,12 +1,18 @@ -AUX curl-7.30.0-prefix.patch 880 BLAKE2B 5b7552a8339014221864a585d174b02a96ec7dd7fe8762d331d1981834044f8ec4db64d527a4ded3f5f4cccc86f281576668de092439eb19f5477d5fcf8369cf SHA512 c7cd13b9ccbd12ed01ea121ffece9c23b898a5b34698bae59ae1dd23b1cf2445180b84d80c4a640981f16dba5018df944f405dd5c660addab54ca21e0e673b7f AUX curl-8.0.1-onion-resolution.patch 4036 BLAKE2B 7f9a693f5090585c46d596133e915b67cf6a0b0a78ee164f987de166f24fb3d64a968f6263110c119710735363429447d52e5cc52df90d0f3830cf0e10c3673b SHA512 72efe3cd6d594cd2b73a19596e587c88a7ca89ed6f9a7325df98df2e18a1e85f26232ea48e80097d2d1e2f8db2c1cd945896311cd70ee830c8838afbcb7628d9 AUX curl-8.1.0-header-length.patch 2979 BLAKE2B f5028eeec1960abbe05124fa0bcc8e0de039facdf7b0b148abefbbe20b9051d252014e95ef942c0c1ccaab5acc878c69c8ff69ef51d5da7f39be6594eebb8ac5 SHA512 cb6145dc0471ab51bd9e901c3680f7597b2d351d0b6e7149c6436bf01c06945eb58acd6753f9994eccb13adf26794005f0379900bc7efc39aeb5459edd8dfdb2 AUX curl-8.1.0-numeric-hostname.patch 8375 BLAKE2B 3936764975eea8499b699d126f58a8b8ad35a19a563b84c40e8f2031251bd1f7094f1bee975e1d00dde84613045a7a61a3bb9cb85794dfc9a72d0341033f75e2 SHA512 f630dc2ef72b1a918437eb1ab4bf0c64e2787fdf4dd003de215246633518d8cbf555607c5d6ac65215e6a44a678849528ea0961a9a186feff6ed994c530c0ee4 +AUX curl-8.1.1-configure-compiler.patch 2764 BLAKE2B b275f023ffcdc55ec8515470e4d48118321b0039929765f516a43546951aa92c072cb56b4ed746c991fec439c40f947a2b867eb7c2d051b8c44bdef622de24b4 SHA512 45fd81839e1b0bf5c1ffa270966066c4301be9109e87f07ac061a39f3fb7f2ae5a845daf10818524a9467f0d58d18b93f1f99f186fb5de96be80e52e37fb8f45 +AUX curl-8.1.1-hanging-http2.patch 1751 BLAKE2B 4b3cf019a630033897529a6cea985ed4bb3d4b7b205980d231c077d67f7ad3ff99edbd70dfb579236780cdb05cec36d2285c1a4b1fe014bd2b7bf543b407e70e SHA512 a7f1bad5d3d7100c293594f1429cb0d2484e55f9f8b8a73cad6c40ca21f613c75d1ca70fa985a8644230f70ad0fee30dc335de322eb8b18a4e524df99cd6a961 +AUX curl-prefix.patch 880 BLAKE2B 5b7552a8339014221864a585d174b02a96ec7dd7fe8762d331d1981834044f8ec4db64d527a4ded3f5f4cccc86f281576668de092439eb19f5477d5fcf8369cf SHA512 c7cd13b9ccbd12ed01ea121ffece9c23b898a5b34698bae59ae1dd23b1cf2445180b84d80c4a640981f16dba5018df944f405dd5c660addab54ca21e0e673b7f AUX curl-respect-cflags-3.patch 406 BLAKE2B 1b533144858aff5566150c4a2648ad2e48e8ff29849ae285592edfee4b3332d06e750395dea7190ee6a01d2b5ee2c2c42c10400c2e5defa09963a90a1a10417d SHA512 3219e4e67d534e35012909243fc8d69d58989462db44dd507c502e7aaa299f1d9a01392e2c83797cc2bdb53d503470c5d6e7bf94572a6ccc6e5eafcc0466bc54 DIST curl-8.0.1.tar.xz 2575544 BLAKE2B 67d82e9d71f0a351b5c2ed3ad5eab02e367ded872658a295179b935729d5105015f8c29569c396e11cd14036656af894ded85c8838cba260d9f6f1a8dcb5e22b SHA512 3bb777982659ed697ae90f113ff7b65d6ce8ba9fe6a8984cfd6769d2f051a72ba953c911abe234c204ec2cc5a35d68b4d033037fad7fba31bb92a52543f8d13d DIST curl-8.0.1.tar.xz.asc 488 BLAKE2B 452e1bebe1028e7621bbf8829e50cf56e254cd63a8cf2a4c0332176b9f18fb2821304ae556a203996d273c986bddbd04db2218c18fd34dee66e9155861ba50ce SHA512 92c6a0570e9a8a708fe2f717b8b37a68dcb9cd4520ca50c9baafec5891bda103bce2d2dcb67f1387bf11bd7e51e0e64ccd52d196e61d58b598ad3aa1960386cf DIST curl-8.1.0.tar.xz 2612568 BLAKE2B 768a824b8f5f6ddaa073599c4106f07a8134bcbe0e0d666390be1bce16ba25386d85930853bb47bc90b2c8a499a0b2abb9c685042563801e0fe58b9c315ac6cc SHA512 b99926f372ddd715cd1d2b54d8fb96b26b085e6501715e25aa57b6c6a7f8452473506ddb284e2f280f8afdb301b7f0c3bfde7ad7ed393b12c022430a9301096d DIST curl-8.1.0.tar.xz.asc 488 BLAKE2B c1a8e50eddc7dd140af2af29736eb486e96a6d3b67a9161244daa86558f65522527380c92597a5f10e5dad187f0bda6ac5b9cadc29386bef4492bc047c77b423 SHA512 191a74c7a6b6aa78b7f36e1535fda0701bde8b333a61c90343e1f1b2d65cc5097b5febc5fa42b2f373795ef1b34078790deaaa71c8aaa45eed1c753729a45f3d -EBUILD curl-8.0.1.ebuild 8709 BLAKE2B 24eff374e16a7dd2891baba181aaf264f645233ffd8300852b0325a25cdddde9ecc55178e2eaec2c0d964c99332e025ad9e966ad39f69fa5d557cf909b9340a8 SHA512 cf8c6ecbb989ab75538f05504948972712ba5c80b13e7d5052713e646a3f0de083b6c127e47ed67e7857a1fdcac40b35cf0d67196b612df17454899d917205ef -EBUILD curl-8.1.0-r1.ebuild 8999 BLAKE2B a2d91ed22db0f05307bbb24004d7850390d141c4c7ce63daca5563bd1d62333e6b559a636fef3a2a046b44059b197f02d0785e47b072cf2418baebedba513a78 SHA512 9501fd61fd104e39364e8de8dfb17168252480f0aea547a3f1f1d11bf23da818cbb4d6652012fa98548d3bed18753bccaa95e5e450526a84316a320066d62615 +DIST curl-8.1.1.tar.xz 2613348 BLAKE2B 465a3237335e73665086ac43f5c66cfbab7e9b163e1ae0e2345da82f9c736d87fccf4d76369cc069abc29621f10db7ddbf22d0337db9ca85042bb12438d4aaed SHA512 d034b1ab9c00e8a0acf7ba6c6344734945d45666b4f38394f5456fcd9b22623146a897270861b7411412ca25c912e1bbf24eb139a6dfc1a8c00d098b3b925399 +DIST curl-8.1.1.tar.xz.asc 488 BLAKE2B c92017d0fe4933d6c27d833944c231967263607a7871a658e0cbb9de46f7df8dfbec141e269296caf17ced004fb2b237b8311ec9f7bf98f03fb405b5755950fc SHA512 6a71c18d67de8c340b5d80c7452a82c00f7ef466f690eec12edcd6123aee6866e8a0e757e1cc6c9af87a63fdeaafbc9fc1b1a4e2e0fd8a75b5952d4738fd0b27 +EBUILD curl-8.0.1.ebuild 8702 BLAKE2B 24aee27a611d96a824f461384089730f6bc51500dc50d3a2dfc287e6cf76b31f6c072de757c2ff0686158c934f3be69732560c905691bf159da26b31bc005141 SHA512 b33fe3010a94e0db79b8aa1f5367a7ad9b6caaa84a89119bff24ee889cb046c4ce0d84b2e67f08cba31ac9f632ea337a851091437f4b5c89a2ecf942d958681b +EBUILD curl-8.1.0-r1.ebuild 8992 BLAKE2B e352ed1acb4fc59d954352f58c3c7ad32f755c890f9fad1e02f19c7d653e59ca8ee31adc278b64d6f39fd39e8cb4bbc600adb4b5099d03cd14eca244ee15f35f SHA512 efcabd0989a7789a5d233db80de31cb5fab0aa0185e20dc06632d08a82dd3c7102279a6b3211b11025be67bd7757a97d970138836f35d8e261aa237405952493 +EBUILD curl-8.1.1.ebuild 9205 BLAKE2B 426550389f2d4c9b623ad54580fb5b64cc00f74632b834e5e9a0fddbeaf662ab03461275e3e486d3a5ba0dfc7729c2f855dc531483f540646e8257859674a403 SHA512 c6141ecfbc2b372adeeab6bf28b4b3853d32fc0e6ada54459dd6ee2bed0bd3907fcea5fb0a4fbff5d2e1a44589194865352c4de908176bff572dac112d0f86fe +EBUILD curl-9999.ebuild 8953 BLAKE2B f8d892a07b16d077632ee47b327950519f80bcaab66a3a17d938143be2655f86a5cd63608ef8914ca428a2f80d881befea46097c7e286b4a60224f8f7f6623bc SHA512 2ab0676b0df54356fd26a26d37185d9dc8bce577c8a1eb76cfefbbd6150df85100916dfc42ab4b0399f7a6b113b8f3f5efdfe350b69ad1f28e057c02f15d2a27 MISC metadata.xml 2203 BLAKE2B 939a2ec06ec2155b88d510abdfaa00eafcd5a7e5f6f7983e456ccfc7cf4179d58adbcc7f282a11bb74d217640c93896fb5038206f7c76ea2c2e2543fe0db378e SHA512 c81d7159c0851dab0ae099c7129d965d3d3bd5cc7f7f3240052a4afab0eaa1e15efbf79265bbad5f2d257cc14b5d30daacd3aa5c3099c2ac264560e23ec797f1 diff --git a/net-misc/curl/curl-8.0.1.ebuild b/net-misc/curl/curl-8.0.1.ebuild index 4b4b1f3aac45..4f21364a91e4 100644 --- a/net-misc/curl/curl-8.0.1.ebuild +++ b/net-misc/curl/curl-8.0.1.ebuild @@ -106,7 +106,7 @@ QA_CONFIG_IMPL_DECL_SKIP=( ) PATCHES=( - "${FILESDIR}"/${PN}-7.30.0-prefix.patch + "${FILESDIR}"/${PN}-prefix.patch "${FILESDIR}"/${PN}-respect-cflags-3.patch # Backports diff --git a/net-misc/curl/curl-8.1.0-r1.ebuild b/net-misc/curl/curl-8.1.0-r1.ebuild index 1121646ce126..cf964b638bcd 100644 --- a/net-misc/curl/curl-8.1.0-r1.ebuild +++ b/net-misc/curl/curl-8.1.0-r1.ebuild @@ -106,7 +106,7 @@ QA_CONFIG_IMPL_DECL_SKIP=( ) PATCHES=( - "${FILESDIR}"/${PN}-7.30.0-prefix.patch + "${FILESDIR}"/${PN}-prefix.patch "${FILESDIR}"/${PN}-respect-cflags-3.patch ### Backports "${FILESDIR}"/${P}-numeric-hostname.patch diff --git a/net-misc/curl/curl-8.1.1.ebuild b/net-misc/curl/curl-8.1.1.ebuild new file mode 100644 index 000000000000..1240b566e376 --- /dev/null +++ b/net-misc/curl/curl-8.1.1.ebuild @@ -0,0 +1,332 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/danielstenberg.asc +inherit autotools multilib-minimal prefix 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 + SRC_URI=" + https://curl.se/download/${P}.tar.xz + verify-sig? ( https://curl.se/download/${P}.tar.xz.asc ) + " + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="curl" +SLOT="0" +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" +# These select the default SSL implementation +IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls curl_ssl_nss +curl_ssl_openssl curl_ssl_rustls" +IUSE+=" nghttp3" +RESTRICT="!test? ( test )" + +# Only one default ssl provider can be enabled +# The default ssl provider needs its USE satisfied +REQUIRED_USE=" + ssl? ( + ^^ ( + curl_ssl_gnutls + curl_ssl_mbedtls + curl_ssl_nss + curl_ssl_openssl + curl_ssl_rustls + ) + ) + curl_ssl_gnutls? ( gnutls ) + curl_ssl_mbedtls? ( mbedtls ) + curl_ssl_nss? ( nss ) + curl_ssl_openssl? ( openssl ) + curl_ssl_rustls? ( rustls ) +" + +RDEPEND=" + sys-libs/zlib[${MULTILIB_USEDEP}] + adns? ( net-dns/c-ares:=[${MULTILIB_USEDEP}] ) + brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] ) + http2? ( net-libs/nghttp2:=[${MULTILIB_USEDEP}] ) + idn? ( net-dns/libidn2:=[static-libs?,${MULTILIB_USEDEP}] ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) + nghttp3? ( + net-libs/nghttp3[${MULTILIB_USEDEP}] + net-libs/ngtcp2[ssl,${MULTILIB_USEDEP}] + ) + rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] ) + ssh? ( net-libs/libssh2[${MULTILIB_USEDEP}] ) + ssl? ( + gnutls? ( + app-misc/ca-certificates + net-libs/gnutls:=[static-libs?,${MULTILIB_USEDEP}] + dev-libs/nettle:=[${MULTILIB_USEDEP}] + ) + mbedtls? ( + app-misc/ca-certificates + net-libs/mbedtls:=[${MULTILIB_USEDEP}] + ) + nss? ( + app-misc/ca-certificates + dev-libs/nss[${MULTILIB_USEDEP}] + dev-libs/nss-pem + ) + openssl? ( + dev-libs/openssl:=[sslv3(-)=,static-libs?,${MULTILIB_USEDEP}] + ) + rustls? ( + net-libs/rustls-ffi:=[${MULTILIB_USEDEP}] + ) + ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-lang/perl + virtual/pkgconfig + test? ( + sys-apps/diffutils + http2? ( net-libs/nghttp2:=[utils,${MULTILIB_USEDEP}] ) + nghttp3? ( net-libs/nghttp2:=[utils,${MULTILIB_USEDEP}] ) + ) + 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 +) + +QA_CONFIG_IMPL_DECL_SKIP=( + __builtin_available + closesocket + CloseSocket + getpass_r + ioctlsocket + IoctlSocket + mach_absolute_time + setmode +) + +PATCHES=( + "${FILESDIR}"/${PN}-prefix.patch + "${FILESDIR}"/${PN}-respect-cflags-3.patch + + ### Backports + "${FILESDIR}"/${P}-hanging-http2.patch + "${FILESDIR}"/${P}-configure-compiler.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-ca-fallback --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt ) + if use ssl ; then + myconf+=( --without-gnutls --without-mbedtls --without-nss --without-rustls ) + + if use gnutls; then + einfo "SSL provided by gnutls" + myconf+=( --with-gnutls ) + fi + if use mbedtls; then + einfo "SSL provided by mbedtls" + myconf+=( --with-mbedtls ) + fi + if use nss; then + einfo "SSL provided by nss" + myconf+=( --with-nss --with-nss-deprecated ) + fi + if use openssl; then + einfo "SSL provided by openssl" + myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs ) + fi + if use rustls; then + einfo "SSL provided by rustls" + myconf+=( --with-rustls ) + 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 ) + elif use curl_ssl_rustls; then + einfo "Default SSL provided by rustls" + myconf+=( --with-default-ssl-backend=rustls ) + else + eerror "We can't be here because of REQUIRED_USE." + fi + + else + myconf+=( --without-ssl ) + 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 + --enable-ipv6 + --enable-largefile + --enable-manual + --enable-mime + --enable-netrc + $(use_enable progress-meter) + --enable-proxy + --enable-socketpair + --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) + --without-quiche + $(use_with rtmp librtmp) + --without-schannel + --without-secure-transport + --without-test-caddy + --without-test-httpd + --without-test-nghttpx + $(use_enable websockets) + --without-winidn + --without-wolfssl + --with-zlib + $(use_with zstd) + ) + + if use test && multilib_is_native_abi && ( use http2 || use nghttp3 ); then + myconf+=( + --with-test-nghttpx="${BROOT}/usr/bin/nghttpx" + ) + 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 + + # 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 nghttp3; then + libs+=( "-lnghttp3" "-lngtcp2" ) + priv+=( "libnghttp3" "libngtcp2" ) + 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 || die +} + +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 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. + # 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 !241 !1083" +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -type f -name '*.la' -delete || die + rm -rf "${ED}"/etc/ || die +} diff --git a/net-misc/curl/curl-9999.ebuild b/net-misc/curl/curl-9999.ebuild new file mode 100644 index 000000000000..780b2f6446f1 --- /dev/null +++ b/net-misc/curl/curl-9999.ebuild @@ -0,0 +1,326 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/danielstenberg.asc +inherit autotools multilib-minimal prefix 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 + SRC_URI=" + https://curl.se/download/${P}.tar.xz + verify-sig? ( https://curl.se/download/${P}.tar.xz.asc ) + " + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +LICENSE="curl" +SLOT="0" +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" +# These select the default SSL implementation +IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls curl_ssl_nss +curl_ssl_openssl curl_ssl_rustls" +IUSE+=" nghttp3" +RESTRICT="!test? ( test )" + +# Only one default ssl provider can be enabled +# The default ssl provider needs its USE satisfied +REQUIRED_USE=" + ssl? ( + ^^ ( + curl_ssl_gnutls + curl_ssl_mbedtls + curl_ssl_nss + curl_ssl_openssl + curl_ssl_rustls + ) + ) + curl_ssl_gnutls? ( gnutls ) + curl_ssl_mbedtls? ( mbedtls ) + curl_ssl_nss? ( nss ) + curl_ssl_openssl? ( openssl ) + curl_ssl_rustls? ( rustls ) +" + +RDEPEND=" + sys-libs/zlib[${MULTILIB_USEDEP}] + adns? ( net-dns/c-ares:=[${MULTILIB_USEDEP}] ) + brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] ) + http2? ( net-libs/nghttp2:=[${MULTILIB_USEDEP}] ) + idn? ( net-dns/libidn2:=[static-libs?,${MULTILIB_USEDEP}] ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) + nghttp3? ( + net-libs/nghttp3[${MULTILIB_USEDEP}] + net-libs/ngtcp2[ssl,${MULTILIB_USEDEP}] + ) + rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] ) + ssh? ( net-libs/libssh2[${MULTILIB_USEDEP}] ) + ssl? ( + gnutls? ( + app-misc/ca-certificates + net-libs/gnutls:=[static-libs?,${MULTILIB_USEDEP}] + dev-libs/nettle:=[${MULTILIB_USEDEP}] + ) + mbedtls? ( + app-misc/ca-certificates + net-libs/mbedtls:=[${MULTILIB_USEDEP}] + ) + nss? ( + app-misc/ca-certificates + dev-libs/nss[${MULTILIB_USEDEP}] + dev-libs/nss-pem + ) + openssl? ( + dev-libs/openssl:=[sslv3(-)=,static-libs?,${MULTILIB_USEDEP}] + ) + rustls? ( + net-libs/rustls-ffi:=[${MULTILIB_USEDEP}] + ) + ) + zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-lang/perl + virtual/pkgconfig + test? ( + sys-apps/diffutils + http2? ( net-libs/nghttp2:=[utils,${MULTILIB_USEDEP}] ) + nghttp3? ( net-libs/nghttp2:=[utils,${MULTILIB_USEDEP}] ) + ) + 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 +) + +QA_CONFIG_IMPL_DECL_SKIP=( + __builtin_available + closesocket + CloseSocket + getpass_r + ioctlsocket + IoctlSocket + mach_absolute_time + setmode +) + +PATCHES=( + "${FILESDIR}"/${PN}-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-ca-fallback --with-ca-bundle="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt ) + if use ssl ; then + myconf+=( --without-gnutls --without-mbedtls --without-nss --without-rustls ) + + if use gnutls; then + einfo "SSL provided by gnutls" + myconf+=( --with-gnutls ) + fi + if use mbedtls; then + einfo "SSL provided by mbedtls" + myconf+=( --with-mbedtls ) + fi + if use nss; then + einfo "SSL provided by nss" + myconf+=( --with-nss --with-nss-deprecated ) + fi + if use openssl; then + einfo "SSL provided by openssl" + myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs ) + fi + if use rustls; then + einfo "SSL provided by rustls" + myconf+=( --with-rustls ) + 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 ) + elif use curl_ssl_rustls; then + einfo "Default SSL provided by rustls" + myconf+=( --with-default-ssl-backend=rustls ) + else + eerror "We can't be here because of REQUIRED_USE." + fi + + else + myconf+=( --without-ssl ) + 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 + --enable-ipv6 + --enable-largefile + --enable-manual + --enable-mime + --enable-netrc + $(use_enable progress-meter) + --enable-proxy + --enable-socketpair + --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) + --without-quiche + $(use_with rtmp librtmp) + --without-schannel + --without-secure-transport + --without-test-caddy + --without-test-httpd + --without-test-nghttpx + $(use_enable websockets) + --without-winidn + --without-wolfssl + --with-zlib + $(use_with zstd) + ) + + if use test && multilib_is_native_abi && ( use http2 || use nghttp3 ); then + myconf+=( + --with-test-nghttpx="${BROOT}/usr/bin/nghttpx" + ) + 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 + + # 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 nghttp3; then + libs+=( "-lnghttp3" "-lngtcp2" ) + priv+=( "libnghttp3" "libngtcp2" ) + 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 || die +} + +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 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. + 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 +} diff --git a/net-misc/curl/files/curl-7.30.0-prefix.patch b/net-misc/curl/files/curl-7.30.0-prefix.patch deleted file mode 100644 index fd495c49b132..000000000000 --- a/net-misc/curl/files/curl-7.30.0-prefix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur curl-7.30.0.orig/curl-config.in curl-7.30.0/curl-config.in ---- curl-7.30.0.orig/curl-config.in 2013-02-06 09:44:37.000000000 -0500 -+++ curl-7.30.0/curl-config.in 2013-04-17 18:43:56.000000000 -0400 -@@ -134,7 +134,7 @@ - else - CPPFLAG_CURL_STATICLIB="" - fi -- if test "X@includedir@" = "X/usr/include"; then -+ if test "X@includedir@" = "X@GENTOO_PORTAGE_EPREFIX@/usr/include"; then - echo "$CPPFLAG_CURL_STATICLIB" - else - echo "${CPPFLAG_CURL_STATICLIB}-I@includedir@" -@@ -142,7 +142,7 @@ - ;; - - --libs) -- if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then -+ if test "X@libdir@" != "X@GENTOO_PORTAGE_EPREFIX@/usr/lib" -a "X@libdir@" != "X@GENTOO_PORTAGE_EPREFIX@/usr/lib64"; then - CURLLIBDIR="-L@libdir@ " - else - CURLLIBDIR="" diff --git a/net-misc/curl/files/curl-8.1.1-configure-compiler.patch b/net-misc/curl/files/curl-8.1.1-configure-compiler.patch new file mode 100644 index 000000000000..f769b35880cf --- /dev/null +++ b/net-misc/curl/files/curl-8.1.1-configure-compiler.patch @@ -0,0 +1,73 @@ +The check for "basic compiler options" hangs otherwise. + +https://github.com/curl/curl/commit/471dab2da0c6b2b08ca2b96a1da0a4825e2c3c36 +https://github.com/curl/curl/commit/c4a019603b82a08c3572591a9393df0818ee02f6 + +From 471dab2da0c6b2b08ca2b96a1da0a4825e2c3c36 Mon Sep 17 00:00:00 2001 +From: Christian Hesse +Date: Tue, 23 May 2023 09:40:18 +0200 +Subject: [PATCH] configure: quote the assignments for run-compiler + +Building for multilib failed, as the compiler command contains an +extra argument. That needs quoting. + +Regression from b78ca50cb3dda361f9c1 + +Fixes #11179 +Closes #11180 +--- a/configure.ac ++++ b/configure.ac +@@ -193,8 +193,8 @@ dnl something different but only have that affect the execution of the results + dnl of the compile, not change the libraries for the compiler itself. + dnl + compilersh="run-compiler" +-echo "CC=$CC" > $compilersh +-echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $compilersh ++echo "CC=\"$CC\"" > $compilersh ++echo "LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\"" >> $compilersh + echo 'exec $CC $@' >> $compilersh + + dnl ********************************************************************** + +From c4a019603b82a08c3572591a9393df0818ee02f6 Mon Sep 17 00:00:00 2001 +From: Emanuele Torre +Date: Tue, 23 May 2023 11:59:59 +0200 +Subject: [PATCH] configure: fix build with arbitrary CC and LD_LIBRARY_PATH + +Since ./configure and processes that inherit its environment variables +are the only callers of the run-compiler script, we can just save the +current value of the LD_LIBRARY_PATH and CC variables to another pair of +environment variables, and make run-compiler a static script that +simply restores CC and LD_LIBRARY_PATH to the saved value, and before +running the compiler. + +This avoids having to inject the values of the variables in the script, +possibly causing problems if they contains spaces, quotes, and other +special characters. + +Also add exports in the script just in case LD_LIBRARY_PATH and CC are +not already in the environment. + +follow-up from 471dab2 + +Closes #11182 +--- a/configure.ac ++++ b/configure.ac +@@ -193,9 +193,13 @@ dnl something different but only have that affect the execution of the results + dnl of the compile, not change the libraries for the compiler itself. + dnl + compilersh="run-compiler" +-echo "CC=\"$CC\"" > $compilersh +-echo "LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\"" >> $compilersh +-echo 'exec $CC $@' >> $compilersh ++export "CURL_SAVED_CC=$CC" ++export "CURL_SAVED_LD_LIBRARY_PATH=$LD_LIBRARY_PATH" ++cat <<\EOF > "$compilersh" ++export "CC=$CURL_SAVED_CC" ++export "LD_LIBRARY_PATH=$CURL_SAVED_LD_LIBRARY_PATH" ++exec $CC "$@" ++EOF + + dnl ********************************************************************** + dnl See which TLS backend(s) that are requested. Just do all the + diff --git a/net-misc/curl/files/curl-8.1.1-hanging-http2.patch b/net-misc/curl/files/curl-8.1.1-hanging-http2.patch new file mode 100644 index 000000000000..4777c4dd35ed --- /dev/null +++ b/net-misc/curl/files/curl-8.1.1-hanging-http2.patch @@ -0,0 +1,36 @@ +https://github.com/curl/curl/commit/5c58cb0212bcf63cce33a974906bf9905948b4bb +From: Stefan Eissing +Date: Wed, 24 May 2023 18:48:16 +0200 +Subject: [PATCH] http2: fix EOF handling on uploads with auth negotiation + +- doing a POST with `--digest` does an override on the initial request + with `Content-Length: 0`, but the http2 filter was unaware of that + and expected the originally request body. It did therefore not + send a final DATA frame with EOF flag to the server. +- The fix overrides any initial notion of post size when the `done_send` + event is triggered by the transfer loop, leading to the EOF that + is necessary. +- refs #11194. The fault did not happen in testing, as Apache httpd + never tries to read the request body of the initial request, + sends the 401 reply and closes the stream. The server used in the + reported issue however tried to read the EOF and timed out on the + request. + +Reported-by: Aleksander Mazur +Fixes #11194 +Cloes #11200 +--- a/lib/http2.c ++++ b/lib/http2.c +@@ -1527,10 +1527,8 @@ static CURLcode http2_data_done_send(struct Curl_cfilter *cf, + if(!stream->send_closed) { + stream->send_closed = TRUE; + if(stream->upload_left) { +- /* If we operated with unknown length, we now know that everything +- * that is buffered is all we have to send. */ +- if(stream->upload_left == -1) +- stream->upload_left = Curl_bufq_len(&stream->sendbuf); ++ /* we now know that everything that is buffered is all there is. */ ++ stream->upload_left = Curl_bufq_len(&stream->sendbuf); + /* resume sending here to trigger the callback to get called again so + that it can signal EOF to nghttp2 */ + (void)nghttp2_session_resume_data(ctx->h2, stream->id); diff --git a/net-misc/curl/files/curl-prefix.patch b/net-misc/curl/files/curl-prefix.patch new file mode 100644 index 000000000000..fd495c49b132 --- /dev/null +++ b/net-misc/curl/files/curl-prefix.patch @@ -0,0 +1,21 @@ +diff -Naur curl-7.30.0.orig/curl-config.in curl-7.30.0/curl-config.in +--- curl-7.30.0.orig/curl-config.in 2013-02-06 09:44:37.000000000 -0500 ++++ curl-7.30.0/curl-config.in 2013-04-17 18:43:56.000000000 -0400 +@@ -134,7 +134,7 @@ + else + CPPFLAG_CURL_STATICLIB="" + fi +- if test "X@includedir@" = "X/usr/include"; then ++ if test "X@includedir@" = "X@GENTOO_PORTAGE_EPREFIX@/usr/include"; then + echo "$CPPFLAG_CURL_STATICLIB" + else + echo "${CPPFLAG_CURL_STATICLIB}-I@includedir@" +@@ -142,7 +142,7 @@ + ;; + + --libs) +- if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then ++ if test "X@libdir@" != "X@GENTOO_PORTAGE_EPREFIX@/usr/lib" -a "X@libdir@" != "X@GENTOO_PORTAGE_EPREFIX@/usr/lib64"; then + CURLLIBDIR="-L@libdir@ " + else + CURLLIBDIR="" -- cgit v1.2.3