net-misc/wget: add alpha keyword
[gentoo.git] / net-misc / wget / wget-1.16.3-r1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="4"
6 PYTHON_COMPAT=( python{3_3,3_4} )
7
8 inherit flag-o-matic python-any-r1 toolchain-funcs autotools
9
10 DESCRIPTION="Network utility to retrieve files from the WWW"
11 HOMEPAGE="https://www.gnu.org/software/wget/"
12 SRC_URI="mirror://gnu/wget/${P}.tar.xz"
13
14 LICENSE="GPL-3"
15 SLOT="0"
16 KEYWORDS="alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
17 IUSE="debug gnutls idn ipv6 nls ntlm pcre +ssl static test uuid zlib"
18
19 LIB_DEPEND="idn? ( net-dns/libidn[static-libs(+)] )
20         pcre? ( dev-libs/libpcre[static-libs(+)] )
21         ssl? (
22                 gnutls? ( net-libs/gnutls[static-libs(+)] )
23                 !gnutls? ( dev-libs/openssl:0[static-libs(+)] )
24         )
25         uuid? ( sys-apps/util-linux[static-libs(+)] )
26         zlib? ( sys-libs/zlib[static-libs(+)] )"
27 RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
28 DEPEND="${RDEPEND}
29         app-arch/xz-utils
30         virtual/pkgconfig
31         static? ( ${LIB_DEPEND} )
32         test? (
33                 ${PYTHON_DEPS}
34                 dev-lang/perl
35                 dev-perl/HTTP-Daemon
36                 dev-perl/HTTP-Message
37                 dev-perl/IO-Socket-SSL
38         )
39         nls? ( sys-devel/gettext )"
40
41 REQUIRED_USE="ntlm? ( !gnutls ssl ) gnutls? ( ssl )"
42
43 DOCS=( AUTHORS MAILING-LIST NEWS README doc/sample.wgetrc )
44
45 pkg_setup() {
46         use test && python-any-r1_pkg_setup
47 }
48
49 src_prepare() {
50         epatch "${FILESDIR}"/${P}-ftp-pasv-ip.patch #560418
51 }
52
53 src_configure() {
54         # fix compilation on Solaris, we need filio.h for FIONBIO as used in
55         # the included gnutls -- force ioctl.h to include this header
56         [[ ${CHOST} == *-solaris* ]] && append-cppflags -DBSD_COMP=1
57
58         if use static ; then
59                 append-ldflags -static
60                 tc-export PKG_CONFIG
61                 PKG_CONFIG+=" --static"
62         fi
63         econf \
64                 --disable-assert \
65                 --disable-rpath \
66                 $(use_with ssl ssl $(usex gnutls gnutls openssl)) \
67                 $(use_enable ssl opie) \
68                 $(use_enable ssl digest) \
69                 $(use_enable idn iri) \
70                 $(use_enable ipv6) \
71                 $(use_enable nls) \
72                 $(use_enable ntlm) \
73                 $(use_enable pcre) \
74                 $(use_enable debug) \
75                 $(use_with uuid libuuid) \
76                 $(use_with zlib)
77 }
78
79 src_test() {
80         emake check
81 }
82
83 src_install() {
84         default
85
86         sed -i \
87                 -e "s:/usr/local/etc:${EPREFIX}/etc:g" \
88                 "${ED}"/etc/wgetrc \
89                 "${ED}"/usr/share/man/man1/wget.1 \
90                 "${ED}"/usr/share/info/wget.info
91 }