diff options
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/Manifest.gz | bin | 54481 -> 54474 bytes | |||
-rw-r--r-- | net-misc/curl/Manifest | 10 | ||||
-rw-r--r-- | net-misc/curl/curl-8.1.2.ebuild | 2 | ||||
-rw-r--r-- | net-misc/curl/curl-8.2.1.ebuild | 7 | ||||
-rw-r--r-- | net-misc/curl/curl-8.3.0-r1.ebuild | 361 | ||||
-rw-r--r-- | net-misc/curl/curl-8.3.0.ebuild | 5 | ||||
-rw-r--r-- | net-misc/curl/curl-9999.ebuild | 5 | ||||
-rw-r--r-- | net-misc/curl/files/curl-8.3.0-tests-arm-musl.patch | 115 |
8 files changed, 493 insertions, 12 deletions
diff --git a/net-misc/Manifest.gz b/net-misc/Manifest.gz Binary files differindex 45148ac12a48..f645206dcb34 100644 --- a/net-misc/Manifest.gz +++ b/net-misc/Manifest.gz diff --git a/net-misc/curl/Manifest b/net-misc/curl/Manifest index 5fe61b7c9563..a09332fa6e4c 100644 --- a/net-misc/curl/Manifest +++ b/net-misc/curl/Manifest @@ -1,4 +1,5 @@ AUX curl-8.0.1-onion-resolution.patch 4036 BLAKE2B 7f9a693f5090585c46d596133e915b67cf6a0b0a78ee164f987de166f24fb3d64a968f6263110c119710735363429447d52e5cc52df90d0f3830cf0e10c3673b SHA512 72efe3cd6d594cd2b73a19596e587c88a7ca89ed6f9a7325df98df2e18a1e85f26232ea48e80097d2d1e2f8db2c1cd945896311cd70ee830c8838afbcb7628d9 +AUX curl-8.3.0-tests-arm-musl.patch 3472 BLAKE2B 6722ff38b03191a9c26b90b9a2d4dc9d439cfb0d7227e10f1f100bec4a4d8709878bfab89ef9cfa854955dd44462eef66b8eb3a31db75b4555d9eccaa4457729 SHA512 3beaf54c017c9c13e023bdcaa7e187b1689f988ff2837c2e9a998ed9e7beb850e8baf9dafb0a506b60018b853c8039763d59f2849f1772a8bc8b63843111d769 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 @@ -10,8 +11,9 @@ DIST curl-8.2.1.tar.xz.asc 488 BLAKE2B 569a7c8d338f7175b5035fa281861b57cce7f5327 DIST curl-8.3.0.tar.xz 2641764 BLAKE2B 6875b20e27ed86f9b6ab256210d85e9fb3b39645e8be710b2e6fe29fba40220f870e06bc21e8a92244670fed0a08c7716e4806a267ede49c4ed6d66e03f5fcd4 SHA512 6404b4c74fe1185cb482631ca3a143996cb7298d0d8a76bfafd7696e7729c00559999a069bdba782dee3f3eb273fb678a4438cb27d3deca54022878cdff83a51 DIST curl-8.3.0.tar.xz.asc 488 BLAKE2B ef5a749e579710d45db9f73da0cbcb58d77a9dfe73be622536496997fa792fe5cbd0331a31f01e21cbdb36c6384dca44baa647c9f3d20effabb5bfc275b1b491 SHA512 b7d45722640ac50181b20a6d663168ec6eec6691c5604ddfe9c7177f07da598cb2de688c631043dc428c311774d781ccd16bd1e2fb4f038be651e3bee383aec4 EBUILD curl-8.0.1.ebuild 8726 BLAKE2B 0d9ac7063eb37637fc6d99f092dce9a58c37eb2135319147e24e4aeb1eaca62f352272d963c2122586207d9ce3b7d650e0b317d10cff0811283cedd3993530de SHA512 82c0db5ad5cea9781459da9e3faa296d3a870965b89b4c26881ef950671fe8071b55599910a009e07391e9c42d0794f24369a162d54fe52860fb8a8793027e29 -EBUILD curl-8.1.2.ebuild 9546 BLAKE2B 4fad6e7caad874a48f50982d88996f30082ba849bf5fc8f515091ed5d42006905c0f4e086cef8c95738333845429f5ddd3644ec887e48fd4a6fe9410558f2093 SHA512 40d046a5dca6b96710099a9803549e0ea967e9188b7a9f76f3df767411fa6aa63cc2cd4375d969c2e148b75e70b086a7c7a141855ae11b6896e5719f33cce0b9 -EBUILD curl-8.2.1.ebuild 10348 BLAKE2B 501a9eb37890626ff3aa466ce9aa0c38439cf28d4a173aa967617b1b8d385d1d875e9bc1e7f3c2e1b6e8fd229be18f3d94a18a7661507a3b351e0bb6eebf21c1 SHA512 7e61c6c27e0d0810429d534c955dfcf8bc5b3b89bd3c8cfc6a5502ce943e04885ff8eb8b4f87ffebd36386ea6c4ce3eaceca6562981610f31956f71c7f38fc24 -EBUILD curl-8.3.0.ebuild 10435 BLAKE2B 94b58522704d10409d7297f9d461b1b4beb9dd433afc9a6bab661ddf9045b210ac2b638ce7b9974fa82868e6fea00c48bb5ffe922a6f3e2899dc0fb1caf07c31 SHA512 04b2cdd2539651666dc73540103d5cf7bf52e8452d18ce533cee0f8f5932bbea4c3141c28316d5a7f85010ce30d5b517a543ed1a7bdb29121d492924d3c1e16d -EBUILD curl-9999.ebuild 10435 BLAKE2B 94b58522704d10409d7297f9d461b1b4beb9dd433afc9a6bab661ddf9045b210ac2b638ce7b9974fa82868e6fea00c48bb5ffe922a6f3e2899dc0fb1caf07c31 SHA512 04b2cdd2539651666dc73540103d5cf7bf52e8452d18ce533cee0f8f5932bbea4c3141c28316d5a7f85010ce30d5b517a543ed1a7bdb29121d492924d3c1e16d +EBUILD curl-8.1.2.ebuild 9544 BLAKE2B 1efe0b35a2484ccae2202dc0e4768996a63bb679c0803188975ddde4f96772f53bf8f764e7c02ff3009ac7337b6b5e36efec4fb5fb72823d961852dd680f8e8e SHA512 8a9abf6cf81cbc0e9097ca30bf29f0336a81fce0b82a04ae98ec8f48b7e5dafdf1301df39e842e8ebbcb9c7343fc02a7f1c54f9d3c72788f33dc43b2d7fc0fb4 +EBUILD curl-8.2.1.ebuild 10406 BLAKE2B 5bbf043247882f27a8857825459c20a45d71398089280b5976db602041db57e08e85069413b2b0c9e87b6a7019234d02da42887686a6f0dc0fbd9e0940190d6c SHA512 ad7e8b7fea13c70810f87705b486416f0471605b5a4d5a38d22da2e63532abb8861898e27d00ecfba2b9a1f4c573cb2f4eece82a63966fbea9175c368e998206 +EBUILD curl-8.3.0-r1.ebuild 10537 BLAKE2B 21bd3825750347f7f187fc24f42553d165cf3caaa710ebe872a83f4b46cab95fed2a7a94c2bc18756d35c018e38126ecd2e10dbf0f98a7db1256789c9fb26259 SHA512 4e7cc7ffccc365e5eca140291fcc12b61140dcde4807471931c761031867f9f2cfb7a881b614b5ea309855ace997a9dab6231b1be3b75457c3fc05a48ff6aa4f +EBUILD curl-8.3.0.ebuild 10496 BLAKE2B 66826576bb5eeb4b2117ab45546716c3bae90fa90e6725d81e570e24e42da6a7762d1709ac0891caacab40ffdd6b3dd6dcc561f56105ea1bf704c23aae8afa32 SHA512 2233d6514572c4f5c71d1e1016fb972b51ca7f06ec5523e233aecb053163ad11a25334ce69d617e2a98d3da8d323fd2df68520cc39033d29de5c28b3e43bcacf +EBUILD curl-9999.ebuild 10496 BLAKE2B 66826576bb5eeb4b2117ab45546716c3bae90fa90e6725d81e570e24e42da6a7762d1709ac0891caacab40ffdd6b3dd6dcc561f56105ea1bf704c23aae8afa32 SHA512 2233d6514572c4f5c71d1e1016fb972b51ca7f06ec5523e233aecb053163ad11a25334ce69d617e2a98d3da8d323fd2df68520cc39033d29de5c28b3e43bcacf MISC metadata.xml 2203 BLAKE2B 939a2ec06ec2155b88d510abdfaa00eafcd5a7e5f6f7983e456ccfc7cf4179d58adbcc7f282a11bb74d217640c93896fb5038206f7c76ea2c2e2543fe0db378e SHA512 c81d7159c0851dab0ae099c7129d965d3d3bd5cc7f7f3240052a4afab0eaa1e15efbf79265bbad5f2d257cc14b5d30daacd3aa5c3099c2ac264560e23ec797f1 diff --git a/net-misc/curl/curl-8.1.2.ebuild b/net-misc/curl/curl-8.1.2.ebuild index 95c1c204617f..e0652d4dd34e 100644 --- a/net-misc/curl/curl-8.1.2.ebuild +++ b/net-misc/curl/curl-8.1.2.ebuild @@ -17,7 +17,7 @@ else 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + 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" fi LICENSE="BSD curl ISC test? ( BSD-4 )" diff --git a/net-misc/curl/curl-8.2.1.ebuild b/net-misc/curl/curl-8.2.1.ebuild index e869fa2db24e..664c9c544c61 100644 --- a/net-misc/curl/curl-8.2.1.ebuild +++ b/net-misc/curl/curl-8.2.1.ebuild @@ -17,7 +17,7 @@ else 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + 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" fi LICENSE="BSD curl ISC test? ( BSD-4 )" @@ -338,10 +338,11 @@ multilib_src_test() { # 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. + # 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$((7*$(makeopts_jobs))) !241 !1083" + multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p -j$((2*$(makeopts_jobs))) !241 !1083" } multilib_src_install() { diff --git a/net-misc/curl/curl-8.3.0-r1.ebuild b/net-misc/curl/curl-8.3.0-r1.ebuild new file mode 100644 index 000000000000..9c1c2fbb2ba4 --- /dev/null +++ b/net-misc/curl/curl-8.3.0-r1.ebuild @@ -0,0 +1,361 @@ +# 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 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 + 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +LICENSE="BSD curl ISC test? ( BSD-4 )" +SLOT="0" +IUSE="+adns alt-svc brotli +ftp gnutls gopher hsts +http2 idn +imap kerberos ldap mbedtls +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_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 +# nghttp3 = https://bugs.gentoo.org/912029 +REQUIRED_USE=" + 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 ) + nghttp3? ( !openssl ) +" + +# 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/HTTP3.md +# - https://github.com/curl/curl/blob/master/.github/workflows/quiche-linux.yml +# However 'supported' vs 'works' are two entirely different things; be sane but +# don't be afraid to require a later version. + +RDEPEND=" + sys-libs/zlib[${MULTILIB_USEDEP}] + adns? ( net-dns/c-ares:=[${MULTILIB_USEDEP}] ) + brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] ) + http2? ( >=net-libs/nghttp2-1.12.0:=[${MULTILIB_USEDEP}] ) + idn? ( net-dns/libidn2:=[static-libs?,${MULTILIB_USEDEP}] ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + ldap? ( net-nds/openldap:=[static-libs?,${MULTILIB_USEDEP}] ) + nghttp3? ( + >=net-libs/nghttp3-0.15.0[${MULTILIB_USEDEP}] + >=net-libs/ngtcp2-0.19.1[gnutls,ssl,-openssl,${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}] + ) + 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-1.15.0:=[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 + "${FILESDIR}"/${P}-tests-arm-musl.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-rustls ) + + if use gnutls; then + multilib_is_native_abi && einfo "SSL provided by gnutls" + myconf+=( --with-gnutls ) + fi + if use mbedtls; then + multilib_is_native_abi && einfo "SSL provided by mbedtls" + myconf+=( --with-mbedtls ) + fi + if use openssl; then + multilib_is_native_abi && einfo "SSL provided by openssl" + myconf+=( --with-ssl --with-ca-path="${EPREFIX}"/etc/ssl/certs ) + fi + if use rustls; then + multilib_is_native_abi && einfo "SSL provided by rustls" + myconf+=( --with-rustls ) + fi + if use curl_ssl_gnutls; then + multilib_is_native_abi && einfo "Default SSL provided by gnutls" + myconf+=( --with-default-ssl-backend=gnutls ) + elif use curl_ssl_mbedtls; then + multilib_is_native_abi && einfo "Default SSL provided by mbedtls" + myconf+=( --with-default-ssl-backend=mbedtls ) + elif use curl_ssl_openssl; then + multilib_is_native_abi && einfo "Default SSL provided by openssl" + myconf+=( --with-default-ssl-backend=openssl ) + elif use curl_ssl_rustls; then + multilib_is_native_abi && einfo "Default SSL provided by rustls" + myconf+=( --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 + + 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-basic-auth + --enable-bearer-auth + --enable-digest-auth + --enable-kerberos-auth + --enable-negotiate-auth + --enable-aws + --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) + --with-fish-functions-dir="${EPREFIX}"/usr/share/fish/vendor_completions.d + $(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) + --with-zsh-functions-dir="${EPREFIX}"/usr/share/zsh/site-functions + ) + + if use test && multilib_is_native_abi && ( use http2 || use nghttp3 ); then + myconf+=( + --with-test-nghttpx="${BROOT}/usr/bin/nghttpx" + ) + fi + + if [[ ${CHOST} == *mingw* ]] ; then + myconf+=( + --disable-pthreads + ) + 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_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 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. + # 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 + rm -rf "${ED}"/etc/ || die +} diff --git a/net-misc/curl/curl-8.3.0.ebuild b/net-misc/curl/curl-8.3.0.ebuild index 2761514f73e0..6f07f5578572 100644 --- a/net-misc/curl/curl-8.3.0.ebuild +++ b/net-misc/curl/curl-8.3.0.ebuild @@ -337,10 +337,11 @@ multilib_src_test() { # 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. + # 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$((7*$(makeopts_jobs))) !241 !1083" + multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p -j$((2*$(makeopts_jobs))) !241 !1083" } multilib_src_install() { diff --git a/net-misc/curl/curl-9999.ebuild b/net-misc/curl/curl-9999.ebuild index 2761514f73e0..6f07f5578572 100644 --- a/net-misc/curl/curl-9999.ebuild +++ b/net-misc/curl/curl-9999.ebuild @@ -337,10 +337,11 @@ multilib_src_test() { # 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. + # 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$((7*$(makeopts_jobs))) !241 !1083" + multilib_is_native_abi && emake test TFLAGS="-n -v -a -k -am -p -j$((2*$(makeopts_jobs))) !241 !1083" } multilib_src_install() { diff --git a/net-misc/curl/files/curl-8.3.0-tests-arm-musl.patch b/net-misc/curl/files/curl-8.3.0-tests-arm-musl.patch new file mode 100644 index 000000000000..e07c13a04766 --- /dev/null +++ b/net-misc/curl/files/curl-8.3.0-tests-arm-musl.patch @@ -0,0 +1,115 @@ +https://github.com/curl/curl/issues/11900 +https://github.com/curl/curl/commit/b226bd679a68b8bf94cbb6d58837f00251560e63 +https://github.com/curl/curl/commit/9c7165e96a3a9a2d0b7059c87c699b5ca8cdae93 + +From b226bd679a68b8bf94cbb6d58837f00251560e63 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Mon, 25 Sep 2023 13:03:26 +0200 +Subject: [PATCH] configure: sort AC_CHECK_FUNCS + +No functional changes. +--- + configure.ac | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 2fc9f2f01783c..a6f9066a133a4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3583,8 +3583,10 @@ AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Se + #include <sys/types.h>]]) + + +-AC_CHECK_FUNCS([fnmatch \ ++AC_CHECK_FUNCS([\ ++ arc4random \ + fchmod \ ++ fnmatch \ + fork \ + geteuid \ + getpass_r \ +@@ -3604,7 +3606,6 @@ AC_CHECK_FUNCS([fnmatch \ + snprintf \ + utime \ + utimes \ +- arc4random + ],[ + ],[ + func="$ac_func" + +From 9c7165e96a3a9a2d0b7059c87c699b5ca8cdae93 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Fri, 22 Sep 2023 13:58:49 +0000 +Subject: [PATCH] lib: use wrapper for curl_mime_data fseek callback + +fseek uses long offset which does not match with curl_off_t. This leads +to undefined behavior when calling the callback and caused failure on +arm 32 bit. + +Use a wrapper to solve this and use fseeko which uses off_t instead of +long. + +Thanks to the nice people at Libera IRC #musl for helping finding this +out. + +Fixes #11882 +Fixes #11900 +Closes #11918 +--- + configure.ac | 2 ++ + lib/formdata.c | 17 +++++++++++++++-- + 3 files changed, 20 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index a6f9066a133a4..5fa7c45c47430 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3584,10 +3584,12 @@ AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Se + + + AC_CHECK_FUNCS([\ ++ _fseeki64 \ + arc4random \ + fchmod \ + fnmatch \ + fork \ ++ fseeko \ + geteuid \ + getpass_r \ + getppid \ +diff --git a/lib/formdata.c b/lib/formdata.c +index 8984b63223cc0..f370ce6854b5f 100644 +--- a/lib/formdata.c ++++ b/lib/formdata.c +@@ -789,6 +789,20 @@ static CURLcode setname(curl_mimepart *part, const char *name, size_t len) + return res; + } + ++/* wrap call to fseeko so it matches the calling convetion of callback */ ++static int fseeko_wrapper(void *stream, curl_off_t offset, int whence) ++{ ++#if defined(HAVE_FSEEKO) ++ return fseeko(stream, (off_t)offset, whence); ++#elif defined(HAVE__FSEEKI64) ++ return _fseeki64(stream, (__int64)offset, whence); ++#else ++ if(offset > LONG_MAX) ++ return -1; ++ return fseek(stream, (long)offset, whence); ++#endif ++} ++ + /* + * Curl_getformdata() converts a linked list of "meta data" into a mime + * structure. The input list is in 'post', while the output is stored in +@@ -874,8 +888,7 @@ CURLcode Curl_getformdata(struct Curl_easy *data, + compatibility: use of "-" pseudo file name should be avoided. */ + result = curl_mime_data_cb(part, (curl_off_t) -1, + (curl_read_callback) fread, +- CURLX_FUNCTION_CAST(curl_seek_callback, +- fseek), ++ fseeko_wrapper, + NULL, (void *) stdin); + } + else + |