1 |
# Copyright 1999-2014 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/wget/wget-1.15-r1.ebuild,v 1.1 2014/05/16 10:59:20 polynomial-c Exp $ |
4 |
|
5 |
EAPI="4" |
6 |
|
7 |
inherit flag-o-matic toolchain-funcs autotools |
8 |
|
9 |
DESCRIPTION="Network utility to retrieve files from the WWW" |
10 |
HOMEPAGE="http://www.gnu.org/software/wget/" |
11 |
SRC_URI="mirror://gnu/wget/${P}.tar.xz" |
12 |
|
13 |
LICENSE="GPL-3" |
14 |
SLOT="0" |
15 |
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" |
16 |
IUSE="debug gnutls idn ipv6 nls ntlm pcre +ssl static uuid zlib" |
17 |
|
18 |
LIB_DEPEND="idn? ( net-dns/libidn[static-libs(+)] ) |
19 |
pcre? ( dev-libs/libpcre[static-libs(+)] ) |
20 |
ssl? ( |
21 |
gnutls? ( net-libs/gnutls[static-libs(+)] ) |
22 |
!gnutls? ( dev-libs/openssl:0[static-libs(+)] ) |
23 |
) |
24 |
uuid? ( sys-apps/util-linux[static-libs(+)] ) |
25 |
zlib? ( sys-libs/zlib[static-libs(+)] )" |
26 |
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" |
27 |
DEPEND="${RDEPEND} |
28 |
app-arch/xz-utils |
29 |
virtual/pkgconfig |
30 |
static? ( ${LIB_DEPEND} ) |
31 |
nls? ( sys-devel/gettext )" |
32 |
|
33 |
REQUIRED_USE="ntlm? ( !gnutls ssl ) gnutls? ( ssl )" |
34 |
|
35 |
DOCS=( AUTHORS MAILING-LIST NEWS README doc/sample.wgetrc ) |
36 |
|
37 |
src_prepare() { |
38 |
epatch "${FILESDIR}"/${PN}-1.15-pkg-config.patch \ |
39 |
"${FILESDIR}"/${PN}-1.15-test_fix.patch |
40 |
eautoreconf |
41 |
} |
42 |
|
43 |
src_configure() { |
44 |
# openssl-0.9.8 now builds with -pthread on the BSD's |
45 |
use elibc_FreeBSD && use ssl && append-ldflags -pthread |
46 |
# fix compilation on Solaris, we need filio.h for FIONBIO as used in |
47 |
# the included gnutls -- force ioctl.h to include this header |
48 |
[[ ${CHOST} == *-solaris* ]] && append-flags -DBSD_COMP=1 |
49 |
|
50 |
if use static ; then |
51 |
append-ldflags -static |
52 |
tc-export PKG_CONFIG |
53 |
PKG_CONFIG+=" --static" |
54 |
fi |
55 |
econf \ |
56 |
--disable-rpath \ |
57 |
$(use_with ssl ssl $(usex gnutls gnutls openssl)) \ |
58 |
$(use_enable ssl opie) \ |
59 |
$(use_enable ssl digest) \ |
60 |
$(use_enable idn iri) \ |
61 |
$(use_enable ipv6) \ |
62 |
$(use_enable nls) \ |
63 |
$(use_enable ntlm) \ |
64 |
$(use_enable pcre) \ |
65 |
$(use_enable debug) \ |
66 |
$(use_with uuid libuuid) \ |
67 |
$(use_with zlib) |
68 |
} |
69 |
|
70 |
src_install() { |
71 |
default |
72 |
|
73 |
sed -i \ |
74 |
-e "s:/usr/local/etc:${EPREFIX}/etc:g" \ |
75 |
"${ED}"/etc/wgetrc \ |
76 |
"${ED}"/usr/share/man/man1/wget.1 \ |
77 |
"${ED}"/usr/share/info/wget.info |
78 |
} |