net-misc/wget: Sync with Gentoo

It's from Gentoo commit ac21ccbb4e4c8780efa3d5981e172a69124c6126.
This commit is contained in:
Flatcar Buildbot 2023-05-22 07:15:10 +00:00 committed by Krzesimir Nowak
parent c8f4493492
commit cfd801baf2
2 changed files with 112 additions and 0 deletions

View File

@ -1,2 +1,4 @@
DIST wget-1.21.3.tar.gz 5079864 BLAKE2B 4ff40a30cb3be82ea492d0eae324a9d43de30a0169d3b219ce25f3d667915f90c7eb1559760d1605340f112e96e028613265e0be73aaba7935c69cc06a4ae4f6 SHA512 29889ecbf590dff0f39183d9e0621741d731a554d990e5c995a4644725dca62e8e19601d40db0ef7d62ebf54e5457c7409965e4832b6e60e4ccbc9c8caa30718
DIST wget-1.21.3.tar.gz.sig 854 BLAKE2B 71f69492397ae9e36284be9acdd1c94da34a7397c14a6de1a867c0d1e807bf961f8a2e098ab5629425691ce595227fb08f046416245fda2a6025929079f2d7c2 SHA512 b9f41496e0083545bc703c97b0758500f337527647cdc422152d7855d05351e3a62685269238c78300eafdbfaed8afecaeb988901a3d8a6b002e9fb3d70efe4f
DIST wget-1.21.4.tar.gz 5059591 BLAKE2B ced6fb9a20343d41e4d8e0c8f171c60535847504fa4c32abc81d104a1594dc7b7c97b5b301836e31dacc7a0f2155c0a2e70e42ff60dc3fa471deb1dad33ba736 SHA512 7a1539045174f6b97ab6980811c2ac1799edc20db72987b5ba9b1710cffb19669a7736813d15c8da3aa2d4a384246ff946b77ecb0baeb6fd3e12ae591f1bf6a3
DIST wget-1.21.4.tar.gz.sig 854 BLAKE2B 162c4f358e781bbfb0fa73910191c29dd411f48c9b2c8e8fe00a12741153e624955393d769aa7311b03115d04b6b946a84b636f643d7cdc8c8cd81387b9cf143 SHA512 72603493c2d799dca08700175a2010d8736fd6d3cb9bea3987db8814e9f133ab0fbd1477892115f7fbbd1a7d4d416ec370bdbff6dbe8f00d1eea84f0c4f8d84b

View File

@ -0,0 +1,110 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..11} )
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/wget.asc
inherit flag-o-matic python-any-r1 toolchain-funcs verify-sig
DESCRIPTION="Network utility to retrieve files from the WWW"
HOMEPAGE="https://www.gnu.org/software/wget/"
SRC_URI="mirror://gnu/wget/${P}.tar.gz"
SRC_URI+=" verify-sig? ( mirror://gnu/wget/${P}.tar.gz.sig )"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="cookie-check debug gnutls idn ipv6 metalink nls ntlm pcre +ssl static test uuid zlib"
REQUIRED_USE="ntlm? ( !gnutls ssl ) gnutls? ( ssl )"
RESTRICT="!test? ( test )"
# * Force a newer libidn2 to avoid libunistring deps. #bug #612498
# * Metalink can use gpgme automagically (so let's always depend on it)
# for signed metalink resources.
LIB_DEPEND="
cookie-check? ( net-libs/libpsl )
idn? ( >=net-dns/libidn2-0.14:=[static-libs(+)] )
metalink? (
app-crypt/gpgme
media-libs/libmetalink
)
pcre? ( dev-libs/libpcre2[static-libs(+)] )
ssl? (
gnutls? ( net-libs/gnutls:=[static-libs(+)] )
!gnutls? ( dev-libs/openssl:=[static-libs(+)] )
)
uuid? ( sys-apps/util-linux[static-libs(+)] )
zlib? ( sys-libs/zlib[static-libs(+)] )
"
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
DEPEND="
${RDEPEND}
static? ( ${LIB_DEPEND} )
"
BDEPEND="
app-arch/xz-utils
dev-lang/perl
sys-apps/texinfo
virtual/pkgconfig
nls? ( sys-devel/gettext )
test? (
${PYTHON_DEPS}
>=dev-perl/HTTP-Daemon-6.60.0
dev-perl/HTTP-Message
dev-perl/IO-Socket-SSL
)
verify-sig? ( >=sec-keys/openpgp-keys-wget-20230511 )
"
DOCS=( AUTHORS MAILING-LIST NEWS README )
pkg_setup() {
use test && python-any-r1_pkg_setup
}
src_prepare() {
default
sed -i -e "s:/usr/local/etc:${EPREFIX}/etc:g" doc/{sample.wgetrc,wget.texi} || die
}
src_configure() {
# fix compilation on Solaris, we need filio.h for FIONBIO as used in
# the included gnutls -- force ioctl.h to include this header
[[ ${CHOST} == *-solaris* ]] && append-cppflags -DBSD_COMP=1
if use static ; then
append-ldflags -static
tc-export PKG_CONFIG
PKG_CONFIG+=" --static"
fi
# There is no flag that controls this. libunistring-prefix only
# controls the search path (which is why we turn it off below).
# Further, libunistring is only needed w/older libidn2 installs,
# and since we force the latest, we can force off libunistring. # bug #612498
local myeconfargs=(
ac_cv_libunistring=no
--disable-assert
--disable-pcre
--disable-rpath
--without-included-libunistring
--without-libunistring-prefix
$(use_enable debug)
$(use_enable idn iri)
$(use_enable ipv6)
$(use_enable nls)
$(use_enable ntlm)
$(use_enable pcre pcre2)
$(use_enable ssl digest)
$(use_enable ssl opie)
$(use_with cookie-check libpsl)
$(use_enable idn iri)
$(use_with metalink)
$(use_with ssl ssl $(usex gnutls gnutls openssl))
$(use_with uuid libuuid)
$(use_with zlib)
)
econf "${myeconfargs[@]}"
}