1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7} )
8 inherit flag-o-matic python-any-r1 toolchain-funcs
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.gz"
16 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
17 IUSE="cookie_check debug gnutls idn ipv6 libressl metalink nls ntlm pcre +ssl static test uuid zlib"
18 REQUIRED_USE=" ntlm? ( !gnutls ssl ) gnutls? ( ssl )"
19 RESTRICT="!test? ( test )"
21 # Force a newer libidn2 to avoid libunistring deps. #612498
23 cookie_check? ( net-libs/libpsl )
24 idn? ( >=net-dns/libidn2-0.14:=[static-libs(+)] )
25 metalink? ( media-libs/libmetalink )
26 pcre? ( dev-libs/libpcre2[static-libs(+)] )
28 gnutls? ( net-libs/gnutls:0=[static-libs(+)] )
30 !libressl? ( dev-libs/openssl:0=[static-libs(+)] )
31 libressl? ( dev-libs/libressl:0=[static-libs(+)] )
34 uuid? ( sys-apps/util-linux[static-libs(+)] )
35 zlib? ( sys-libs/zlib[static-libs(+)] )
37 RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
40 static? ( ${LIB_DEPEND} )
46 dev-perl/IO-Socket-SSL
52 nls? ( sys-devel/gettext )
55 DOCS=( AUTHORS MAILING-LIST NEWS README doc/sample.wgetrc )
58 use test && python-any-r1_pkg_setup
64 # revert some hack that breaks linking, bug #585924
65 if [[ ${CHOST} == *-darwin* ]] \
66 || [[ ${CHOST} == *-solaris* ]] \
67 || [[ ${CHOST} == *-uclibc* ]] \
68 || [[ ${CHOST} == *-cygwin* ]] \
71 -e 's/^ LIBICONV=$/:/' \
77 # fix compilation on Solaris, we need filio.h for FIONBIO as used in
78 # the included gnutls -- force ioctl.h to include this header
79 [[ ${CHOST} == *-solaris* ]] && append-cppflags -DBSD_COMP=1
82 append-ldflags -static
84 PKG_CONFIG+=" --static"
87 # There is no flag that controls this. libunistring-prefix only
88 # controls the search path (which is why we turn it off below).
89 # Further, libunistring is only needed w/older libidn2 installs,
90 # and since we force the latest, we can force off libunistring. #612498
95 --without-included-libunistring
96 --without-libunistring-prefix
102 $(use_enable pcre pcre2)
103 $(use_enable ssl digest)
104 $(use_enable ssl opie)
105 $(use_with cookie_check libpsl)
106 $(use_with idn libidn)
108 $(use_with ssl ssl $(usex gnutls gnutls openssl))
109 $(use_with uuid libuuid)
112 ac_cv_libunistring=no \
113 econf "${myeconfargs[@]}"
120 -e "s:/usr/local/etc:${EPREFIX}/etc:g" \
122 "${ED}"/usr/share/man/man1/wget.1 \
123 "${ED}"/usr/share/info/wget.info \