diff options
author | Sam James <sam@gentoo.org> | 2022-06-20 00:26:21 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-06-20 00:26:30 +0100 |
commit | 417ef81ea857edeacce0be0cc8c9228326356796 (patch) | |
tree | 911f4aab64c5fea8a8cb8a4d385772659dff9294 /net-libs/miniupnpc | |
parent | sys-apps/pciutils: update EAPI 7 -> 8; drop which (diff) | |
download | gentoo-417ef81ea857edeacce0be0cc8c9228326356796.tar.gz gentoo-417ef81ea857edeacce0be0cc8c9228326356796.tar.bz2 gentoo-417ef81ea857edeacce0be0cc8c9228326356796.zip |
net-libs/miniupnpc: drop which dependency
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs/miniupnpc')
-rw-r--r-- | net-libs/miniupnpc/files/miniupnpc-2.2.3-drop-which.patch | 38 | ||||
-rw-r--r-- | net-libs/miniupnpc/miniupnpc-2.2.3-r1.ebuild | 64 |
2 files changed, 102 insertions, 0 deletions
diff --git a/net-libs/miniupnpc/files/miniupnpc-2.2.3-drop-which.patch b/net-libs/miniupnpc/files/miniupnpc-2.2.3-drop-which.patch new file mode 100644 index 000000000000..fc578e5e6147 --- /dev/null +++ b/net-libs/miniupnpc/files/miniupnpc-2.2.3-drop-which.patch @@ -0,0 +1,38 @@ +Not upstream b/c already done in 2.3.0: +https://github.com/miniupnp/miniupnp/commit/c88178650e2551226a88cbc87084014781f81184 +https://github.com/miniupnp/miniupnp/commit/d2f558f659da923144f591be418380a7ff8a8677 +--- a/Makefile ++++ b/Makefile +@@ -15,7 +15,7 @@ VERSION = $(shell cat VERSION) + + ifneq (, $(findstring darwin, $(OS))) + JARSUFFIX=mac +-LIBTOOL ?= $(shell which libtool) ++LIBTOOL ?= $(shell command -v libtool) + endif + ifneq (, $(findstring linux, $(OS))) + JARSUFFIX=linux +--- a/testminiwget.sh ++++ b/testminiwget.sh +@@ -24,8 +24,8 @@ EXPECTEDFILE="${TMPD}/expectedfile" + DOWNLOADEDFILE="${TMPD}/downloadedfile" + PORT= + RET=0 +-IPCONFIG=$(which ifconfig) +-IP=$(which ip) ++IPCONFIG=$(command -v ifconfig) ++IP=$(command -v ip) + if [ "$IP" ] ; then + if ! $IP addr | grep inet6 ; then + HAVE_IPV6=no +--- a/updateminiupnpcstrings.sh ++++ b/updateminiupnpcstrings.sh +@@ -26,7 +26,7 @@ if [ -f /etc/debian_version ]; then + OS_VERSION=`cat /etc/debian_version` + fi + # use lsb_release (Linux Standard Base) when available +-LSB_RELEASE=`which lsb_release` ++LSB_RELEASE=`command -v lsb_release` + if [ 0 -eq $? -a -x "${LSB_RELEASE}" ]; then + OS_NAME=`${LSB_RELEASE} -i -s` + OS_VERSION=`${LSB_RELEASE} -r -s` diff --git a/net-libs/miniupnpc/miniupnpc-2.2.3-r1.ebuild b/net-libs/miniupnpc/miniupnpc-2.2.3-r1.ebuild new file mode 100644 index 000000000000..90a944cd2301 --- /dev/null +++ b/net-libs/miniupnpc/miniupnpc-2.2.3-r1.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs verify-sig + +DESCRIPTION="UPnP client library and a simple UPnP client" +HOMEPAGE="http://miniupnp.free.fr/" +SRC_URI="http://miniupnp.free.fr/files/${P}.tar.gz + verify-sig? ( http://miniupnp.free.fr/files/${P}.tar.gz.sig )" + +LICENSE="BSD" +SLOT="0/17" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="ipv6" + +RDEPEND="" +BDEPEND=" + kernel_linux? ( sys-apps/lsb-release ) + verify-sig? ( sec-keys/openpgp-keys-miniupnp )" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/miniupnp.asc + +src_prepare() { + local PATCHES=( + "${FILESDIR}"/${P}-makefile.patch + "${FILESDIR}"/${P}-drop-which.patch + ) + default + + local exprs=( + # These bins are not installed, upnpc-static requires building static lib + -e '/EXECUTABLES =/s/ upnpc-static listdevices//' + # Prevent gzipping manpage. + -e '/gzip/d' + # Disable installing the static library + -e '/FILESTOINSTALL =/s/ $(LIBRARY)//' + -e '/$(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(INSTALLDIRLIB)/d' + ) + sed -i "${exprs[@]}" Makefile || die +} + +# Upstream cmake causes more trouble than it fixes, +# so we'll just stay with the Makefile for now. + +src_compile() { + tc-export CC AR + emake build/upnpc-shared +} + +src_test() { + emake -j1 HAVE_IPV6=$(usex ipv6) check +} + +src_install() { + emake \ + DESTDIR="${D}" \ + PREFIX="${EPREFIX}/usr" \ + INSTALLDIRLIB="${EPREFIX}/usr/$(get_libdir)" \ + install + + dodoc README Changelog.txt +} |