diff options
-rw-r--r-- | net-libs/miniupnpc/Manifest | 2 | ||||
-rw-r--r-- | net-libs/miniupnpc/miniupnpc-2.1.20201016.ebuild | 61 |
2 files changed, 63 insertions, 0 deletions
diff --git a/net-libs/miniupnpc/Manifest b/net-libs/miniupnpc/Manifest index 5341c95b6ff0..be08cc171d73 100644 --- a/net-libs/miniupnpc/Manifest +++ b/net-libs/miniupnpc/Manifest @@ -1,2 +1,4 @@ DIST miniupnpc-2.1.20191224.tar.gz 94740 BLAKE2B 85c0b3eb678685bc7192dbee9440ec5f5be80cbac4d6a4e0a6473662c66f05ef512322cd535a142ffe16d3099a86f78ea70645a7eb2979c373e7a486aeab0cd5 SHA512 d362f914ce9177c1bc46f1f3ae59069c61c0c9c1b6ea7e78003d6b46445d3550835ffc541c2649b5fbc997d035357b461148edb3648135f33d0ce98b54961917 DIST miniupnpc-2.1.20191224.tar.gz.sig 543 BLAKE2B ddbde04faa7bce62fdbb5b555bda9dc9ff69f09cc97442049adc787a03ec91824f14cdddaef6e577cf8d08fa96202fc792333b8dab7e6e8c30847fa9302a35d0 SHA512 b8885d2002259c95ede7ab57aaf82db83c2bd7ace3d0986179efac4245ffd42161049e0167a9ac1ff18de6c8df4d39356f0fb6aa6dada7523a238b4db4838887 +DIST miniupnpc-2.1.20201016.tar.gz 97682 BLAKE2B 2c98f71ff7262a24a69a9a4af411dbeb58c20ec4181bca8bbdd61c628bf5bd49f7e9b763b73ffb5d3508b5b545a0c918828ead2a376b57b8ea5051cd7b8e9c13 SHA512 d619f7e205cac68137020fab31e8bdaeebd09eeaca5e42e1e03a9e0085a64d635ec896862a488b0d57798d1e6ce96e2ba5652f60c0b8df9fc866eea90baea152 +DIST miniupnpc-2.1.20201016.tar.gz.sig 543 BLAKE2B b8ddcadb58e7b8dc4646ea1ac4e10331fe70a5b9a27902dd5ad09ac306605160b63f2e21d96eda4aa0f77485800cb9c5aa110f215dbe3536a9f6ec1c4a5e9ed9 SHA512 fb7886d4198bd2ae1eeff293152ff509e7ebe6ff0f9b3c20d5824f7ca9f65091a61db2bc0a8ac9fb0449994aba594cff3bf6c556876dbb47d593ecf8b7b26d10 diff --git a/net-libs/miniupnpc/miniupnpc-2.1.20201016.ebuild b/net-libs/miniupnpc/miniupnpc-2.1.20201016.ebuild new file mode 100644 index 000000000000..9e79fd0ac53e --- /dev/null +++ b/net-libs/miniupnpc/miniupnpc-2.1.20201016.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="ipv6 kernel_linux static-libs" + +RDEPEND="" +BDEPEND=" + kernel_linux? ( sys-apps/lsb-release sys-apps/which ) + verify-sig? ( app-crypt/openpgp-keys-miniupnp )" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/miniupnp.asc + +src_prepare() { + eapply_user + + # These bins are not installed, upnpc-static requires building static lib + sed -i -e '/EXECUTABLES =/s/ upnpc-static listdevices//' Makefile || die + # Prevent gzipping manpage. + sed -i -e '/gzip/d' Makefile || die + + if ! use static-libs; then + sed -i \ + -e '/FILESTOINSTALL =/s/ $(LIBRARY)//' \ + -e '/$(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(INSTALLDIRLIB)/d' \ + Makefile || die + fi +} + +# 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 upnpc-shared $(usex static-libs upnpc-static '') +} + +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 +} |