exherbo-denkn/packages/net-misc/gnurl/gnurl-7.37.0.exheres-0

96 lines
3 KiB
Bash
Raw Normal View History

# 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 easy-multibuild
PLATFORMS="~amd64 ~arm ~x86"
MYOPTIONS="
ares [[ description = [ Enabled c-ares posix-threaded dns support, disables curl's own threaded resolver ] ]]
gnutls
idn
multibuild_c: 32 64
"
DEPENDENCIES="
build:
dev-lang/perl:*
sys-apps/diffutils
virtual/pkg-config
build+run:
app-misc/ca-certificates
sys-libs/zlib[multibuild_c:*(-)?]
ares? ( net-dns/c-ares[>=1.6.0][multibuild_c:*(-)?] )
dev-libs/gnutls[>=2.12.14][multibuild_c:*(-)?]
dev-libs/nettle[multibuild_c:*(-)?]
idn? ( net-dns/libidn[multibuild_c:*(-)?] )
"
#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_one_multibuild() {
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"
}
install_one_multibuild() {
default
#edo mv "${IMAGE}"/usr/include/gnurl/curlbuild{,-${MULTIBUILD_TARGET}}.h
}
src_install() {
easy-multibuild_src_install
#insinto /usr/share/aclocal
#doins docs/libgnurl/libgnurl.m4
#insinto /usr/include/gnurl
#doins "${FILES}"/curlbuild.h
}