exherbo-denkn/packages/net-misc/gnurl/gnurl-7.40.0.exheres-0
2015-10-01 23:38:25 +02:00

79 lines
2.5 KiB
Bash

# Copyright 2014 Denis Knauf <denis@denkn.at>
# Based on:
# 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
require gnurl
PLATFORMS="~amd64 ~arm ~x86"
MYOPTIONS="
ares [[ description = [ Enabled c-ares posix-threaded dns support, disables curl's own threaded resolver ] ]]
gnutls
idn
"
DEPENDENCIES="
build:
dev-lang/perl:*
sys-apps/diffutils
virtual/pkg-config
build+run:
app-misc/ca-certificates
sys-libs/zlib
ares? ( net-dns/c-ares[>=1.6.0] )
dev-libs/gnutls[>=2.12.14]
dev-libs/nettle
idn? ( net-dns/libidn )
"
#DEFAULT_SRC_CONFIGURE_PARAMS=(
# --enable-{cookies,crypto-auth,largefile,manual,proxy,tls-srp}
# --enable-{dict,file,ftp,gopher,http,ipv6,imap,pop3,rtsp,smtp,telnet,tftp}
# --disable-static
# --disable-werror
# --with-zlib
# --without-{axtls,ca-bundle,cyassl,gssapi,libmetalink,libssh2,librtmp,nghttp2,nss,polarssl}
#)
#DEFAULT_SRC_CONFIGURE_OPTION_ENABLES=( ares '!ares threaded-resolver' )
#DEFAULT_SRC_CONFIGURE_OPTION_WITHS=(
# 'idn libidn'
# '!gnutls ssl' '!gnutls ca-path /etc/ssl/certs'
# gnutls 'gnutls ca-bundle /etc/ssl/certs/ca-certificates.crt'
#)
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
}
test() {
cat <<-EOF >> tests/data/DISABLED
# Work around broken DNS servers, Exherbo #207
20
507
# Fails with too many open files
537
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 )
test_args+=( '!'{600..641} )
emake test-full TEST_F="${test_args[*]}" # SSH tests hang
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"
}