diff options
Diffstat (limited to 'packages/net-misc/curl/curl-7.73.0.exheres-0')
-rw-r--r-- | packages/net-misc/curl/curl-7.73.0.exheres-0 | 231 |
1 files changed, 231 insertions, 0 deletions
diff --git a/packages/net-misc/curl/curl-7.73.0.exheres-0 b/packages/net-misc/curl/curl-7.73.0.exheres-0 new file mode 100644 index 000000000..bd3fe8fb8 --- /dev/null +++ b/packages/net-misc/curl/curl-7.73.0.exheres-0 @@ -0,0 +1,231 @@ +# Copyright 2008, 2009, 2010, 2011, 2014 Ingmar Vanhassel <ingmar@exherbo.org> +# Based in part upon previous work copyrighted to Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 + +SUMMARY="A Client that groks URLs" +HOMEPAGE="https://${PN}.haxx.se" +DOWNLOADS="${HOMEPAGE}/download/${PNV}.tar.xz" + +UPSTREAM_RELEASE_NOTES="${HOMEPAGE}/changes.html" + +LICENCES="MIT" +SLOT="0" +PLATFORMS="~amd64 ~arm ~armv7 ~armv8 ~x86" +MYOPTIONS=" + ares [[ description = [ Prefer c-ares posix-threaded DNS resolver over curl's own threaded resolver ] ]] + brotli [[ description = [ Brotli compression format support ] ]] + http2 + idn + kerberos + ldap + rtmp + zsh-completion + zstd [[ description = [ Zstandard compression format support ] ]] + kerberos? ( ( providers: heimdal krb5 ) [[ number-selected = exactly-one ]] ) + ( providers: gnutls libressl mbedtls openssl ) [[ number-selected = exactly-one ]] +" + +DEPENDENCIES=" + build: + dev-lang/perl:* + sys-apps/diffutils + virtual/pkg-config + build+run: + app-misc/ca-certificates + net-libs/libssh2[>=1.2.8] + sys-libs/zlib + ares? ( net-dns/c-ares[>=1.6.0] ) + brotli? ( app-arch/brotli[>=0.6.0] ) + http2? ( net-libs/nghttp2[>=1.12.0] ) + idn? ( net-dns/libidn2:= ) + kerberos? ( + providers:heimdal? ( app-crypt/heimdal ) + providers:krb5? ( app-crypt/krb5 ) + ) + ldap? ( net-directory/openldap ) + rtmp? ( media-video/rtmpdump ) + providers:gnutls? ( + dev-libs/gnutls[>=2.12.14] + dev-libs/nettle:= + ) + providers:libressl? ( dev-libs/libressl:= ) + providers:mbedtls? ( dev-libs/mbedtls ) + providers:openssl? ( dev-libs/openssl ) + zstd? ( app-arch/zstd ) + run: + zsh-completion? ( app-shells/zsh ) +" + +DEFAULT_SRC_INSTALL_EXTRA_PREFIXES=( docs/ ) +DEFAULT_SRC_INSTALL_EXTRA_DOCS=( BINDINGS DISTRO FEATURES INTERNALS MANUAL RESOURCES TheArtOfHttpScripting ) + +src_prepare() { + # Reason: Binding to 0.0.0.0 creates access violations under sydbox. + edo sed -e '/s_addr =/s:INADDR_ANY:htonl(INADDR_LOOPBACK):' -i tests/server/*.c + + # Use `whoami` instead of $USER; + # sshserver.pl will refuse to run as root (which $USER might claim ever if we're not) + edo sed -e 's/\$ENV{USER}/`whoami`/' -i tests/*.pl + + default +} + +src_configure() { + econf_params=( + --enable-cookies + --enable-crypto-auth + --enable-dateparse + --enable-dnsshuffle + --enable-doh + --enable-get-easy-options + --enable-http-auth + --enable-largefile + --enable-manual + --enable-mime + --enable-netrc + --enable-progress-meter + --enable-proxy + --enable-pthreads + --enable-rt + --enable-socketpair + --enable-threaded-resolver + --enable-tls-srp + --enable-unix-sockets + --enable-{dict,file,ftp,gopher,http,ipv6,imap,pop3,rtsp,smb,smtp,telnet,tftp} + --disable-alt-svc + --disable-mqtt + --disable-sspi + --disable-static + --disable-werror + --with-libssh2 + --with-zlib + --without-amissl + --without-bearssl + --without-ca-bundle + --without-libmetalink + --without-libpsl + --without-libssh + --without-mbedtls + --without-mesalink + --without-nghttp3 + --without-ngtcp2 + --without-nss + --without-quiche + --without-schannel + --without-secure-transport + --without-wolfssl + --without-default-ssl-backend + --without-fish-functions-dir + ) + + econf_option_enables=( + ares + ldap + 'ldap ldaps' + ) + + econf_option_withs=( + brotli + 'http2 nghttp2' + 'idn libidn2' + 'kerberos gssapi' + 'rtmp librtmp' + 'zsh-completion zsh-functions-dir /usr/share/zsh/site-functions' + zstd + ) + + for opt in providers:{gnutls,libressl,mbedtls,openssl};do + optionq "${opt}" && ssl_provider="${opt##*:}" && break + done + + case "${ssl_provider}" in + gnutls) + econf_params+=( + --disable-ech + --with-gnutls --without-mbedtls --without-ssl + --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt + ) + ;; + mbedtls) + econf_params+=( + --disable-ech + --with-mbedtls --without-gnutls --without-ssl + --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt + ) + ;; + libressl|openssl) + econf_params+=( + # https://github.com/openssl/openssl/issues/7482 + --disable-ech + --enable-openssl-auto-load-config + --with-ssl --without-mbedtls --without-gnutls + --with-ca-path=/etc/ssl/certs + ) + ;; + esac + + econf \ + "${econf_params[@]}" \ + $(for opt in "${econf_option_enables[@]}"; do + option_enable ${opt} + done) \ + $(for opt in "${econf_option_withs[@]}"; do + option_with ${opt} + done) +} + +src_test() { + cat <<-EOF >> tests/data/DISABLED +# Work around broken DNS servers, Exherbo #207 +20 +507 +# Fails with too many open files +537 +# Can't open perl script "./manpage-scan.pl": No such file or directory +1139 +1140 +EOF + esandbox allow_net --connect "inet:127.0.0.1@9011" + esandbox allow_net --connect "inet:127.0.0.1@60000" + esandbox allow_net --connect "inet6:::1@8999" + + # Default TEST_F is -a -p -r; we add -n (no valgrind) -v (verbose) and remove -r (run time statistics) + local test_args=( -a -p -n -v ) + # SCP/SFTP tests hang/fail + test_args+=( '!'{582,{600..699}} ) + # Fail (last checked: 7.41.0) + test_args+=( '!'1135 ) + # Fail (last checked: 7.50.2) + test_args+=( '!'2032 ) + # Fail (last checked: 7.51.0) + test_args+=( '!'{165,1034,1035,2046,2047} ) + # Fail (last checked: 7.54.1) + test_args+=( '!'1446 ) + # Hang/Fail (last checked 7.55.1) + test_args+=( '!'{1061,1119,1148} ) + # Fail (last checked: 7.56.0) + test_args+=( '!'1453 ) + # Wants to use 0.0.0.0, last checked 7.60.0 + test_args+=( '!'1455 ) + # Fail (last checked: 7.72.0) + test_args+=( '!'{320,321,322,324} ) + + emake -j1 test-full TEST_F="${test_args[*]}" + + esandbox disallow_net --connect "inet:127.0.0.1@9011" + esandbox disallow_net --connect "inet:127.0.0.1@60000" + esandbox disallow_net --connect "inet6:::1@8999" +} + +src_install() { + default + + # curl installs zsh completion file to /_curl if disabled! + if [[ -f "${IMAGE}"/_curl ]] && ! option zsh-completion;then + edo rm -f "${IMAGE}"/_curl + fi + + insinto /usr/share/aclocal + doins "${WORK}"/docs/libcurl/libcurl.m4 +} + |