commit:     8c7794d8efcacfe78973cccb663afb2c8f51c623
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 29 06:33:31 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Sep 29 07:03:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c7794d8

net-libs/miniupnpc: Bump to 2.2.3

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 net-libs/miniupnpc/Manifest                        |  2 +
 .../miniupnpc/files/miniupnpc-2.2.3-makefile.patch | 54 +++++++++++++++++++
 net-libs/miniupnpc/miniupnpc-2.2.3.ebuild          | 63 ++++++++++++++++++++++
 3 files changed, 119 insertions(+)

diff --git a/net-libs/miniupnpc/Manifest b/net-libs/miniupnpc/Manifest
index 3f976d74b72..05cde009b8f 100644
--- a/net-libs/miniupnpc/Manifest
+++ b/net-libs/miniupnpc/Manifest
@@ -2,3 +2,5 @@ DIST miniupnpc-2.2.1.tar.gz 99595 BLAKE2B 
07736eb15a985096178273c4578bb3f0cbf32a
 DIST miniupnpc-2.2.1.tar.gz.sig 543 BLAKE2B 
19da35662cf75d47de9cd16d3d8f767119e3dc04370801bf8893a17cd0af47072456b75bc3415b587371972a7c5c36623665391bbf4b9c655d1da3c0e5b8beb7
 SHA512 
8b5d41556c66e6330673a63eb3be2397cb057c37f648d950e8dfa0bb00e646f343cfbcbd11a6547198d4fa6b1ca2a82b46724e284ce76e96d96ad6b3b5b41c3f
 DIST miniupnpc-2.2.2.tar.gz 100008 BLAKE2B 
76bd18ad455be91a2b7680f59f59828a592077f3694ea5ed0f42222370d9e3d0e328dac1a6d530abcf28586384369d7c858c32fc3105f79cacad762ac5bc70fc
 SHA512 
d322ae2a99faf01bee52f50a40d4bc2150c67a2f7e15b6078fe92faf2aecfe7ce10bd98cef3d94a77f6f7d1f7d8451cf4cdbf6fe11c9e7c1854ee066300b0116
 DIST miniupnpc-2.2.2.tar.gz.sig 543 BLAKE2B 
e1089a0c3d937cb4e52b511ed0cc7b43a686a6c08df5ce5e008f1f5ec892b6a4f9f1c45ad4eb252c2aa57fd932a5c5dd4300adfdcee145f27cae51469f244179
 SHA512 
525f4b5c60ca1375df8a05cfffec3cf8e99ae070510621de2871926b6e84faec28cceb4feb983380e12b7271880872083ea4f4080c74572697476bb7ae795cf7
+DIST miniupnpc-2.2.3.tar.gz 101360 BLAKE2B 
d2a7f64d56be524c5c4aadfecd40da4e1ad040fd7eab64be5b5716cb06047e86e3ed6a9c17f697fd3210af0fb0a6ae032b6ef0a5c1f0d96a2e185db97b0d06e8
 SHA512 
8b9555d336d5dfe8017a16727f964cddacb3f2bf3528fe3dd2416480da5763b24e1740345e470f2123c170d79d88444e41dbbce4536e6069590925e4805bc5ee
+DIST miniupnpc-2.2.3.tar.gz.sig 543 BLAKE2B 
d10bcb765e0d7a1eb68dc6269080b71535fced443e801a09677872bc498c866a02f22d851db963fb126331f28d2314542507713f514560d9d6eca2262287dc8b
 SHA512 
636ad425b430629ee91b2755b543e9754aa88e243972f47839a2ad958757a12ff598f962e9328e5ad0fa3e0b2f895854c9cb3ca099048e7c132c8ce27806986e

diff --git a/net-libs/miniupnpc/files/miniupnpc-2.2.3-makefile.patch 
b/net-libs/miniupnpc/files/miniupnpc-2.2.3-makefile.patch
new file mode 100644
index 00000000000..7578bc3f881
--- /dev/null
+++ b/net-libs/miniupnpc/files/miniupnpc-2.2.3-makefile.patch
@@ -0,0 +1,54 @@
+From ed1dc4bb5cdc4a53963f3eb01089289e30acc5a3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]>
+Date: Wed, 29 Sep 2021 08:28:27 +0200
+Subject: [PATCH] Makefile: fix install rules to account for $(BUILD)
+
+Fix missing references to $(BUILD) in the install rules, as well
+as incorrect shared library symlink name.  Otherwise, the 'install'
+phase fails either being unable to find files:
+
+    make: *** No rule to make target 'miniupnpc.pc', needed by 'install'.  
Stop.
+
+or trying to create the symlink in the wrong subdirectory:
+
+    ln: failed to create symbolic link '/tmp/z/usr/lib/build/libminiupnpc.so': 
No such file or directory
+---
+ miniupnpc/Makefile | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/miniupnpc/Makefile b/miniupnpc/Makefile
+index 4563b28..11a17f9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -162,7 +162,7 @@ PKGCONFIGDIR = $(INSTALLDIRLIB)/pkgconfig
+ 
+ FILESTOINSTALL = $(LIBRARY) $(EXECUTABLES)
+ ifeq (, $(findstring amiga, $(OS)))
+-FILESTOINSTALL += $(SHAREDLIBRARY) miniupnpc.pc
++FILESTOINSTALL += $(SHAREDLIBRARY) $(BUILD)/miniupnpc.pc
+ endif
+ 
+ 
+@@ -251,15 +251,15 @@ install: updateversion $(FILESTOINSTALL)
+       $(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(INSTALLDIRLIB)
+ ifeq (, $(findstring amiga, $(OS)))
+       $(INSTALL) -m 644 $(SHAREDLIBRARY) $(DESTDIR)$(INSTALLDIRLIB)/$(SONAME)
+-      ln -fs $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(SHAREDLIBRARY)
++      ln -fs $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(notdir $(SHAREDLIBRARY))
+       $(INSTALL) -d $(DESTDIR)$(PKGCONFIGDIR)
+-      $(INSTALL) -m 644 miniupnpc.pc $(DESTDIR)$(PKGCONFIGDIR)
++      $(INSTALL) -m 644 $(BUILD)/miniupnpc.pc $(DESTDIR)$(PKGCONFIGDIR)
+ endif
+       $(INSTALL) -d $(DESTDIR)$(INSTALLDIRBIN)
+ ifneq (, $(findstring amiga, $(OS)))
+-      $(INSTALL) -m 755 upnpc-static $(DESTDIR)$(INSTALLDIRBIN)/upnpc
++      $(INSTALL) -m 755 $(BUILD)/upnpc-static $(DESTDIR)$(INSTALLDIRBIN)/upnpc
+ else
+-      $(INSTALL) -m 755 upnpc-shared $(DESTDIR)$(INSTALLDIRBIN)/upnpc
++      $(INSTALL) -m 755 $(BUILD)/upnpc-shared $(DESTDIR)$(INSTALLDIRBIN)/upnpc
+ endif
+       $(INSTALL) -m 755 external-ip.sh $(DESTDIR)$(INSTALLDIRBIN)/external-ip
+ ifeq (, $(findstring amiga, $(OS)))
+-- 
+2.33.0
+

diff --git a/net-libs/miniupnpc/miniupnpc-2.2.3.ebuild 
b/net-libs/miniupnpc/miniupnpc-2.2.3.ebuild
new file mode 100644
index 00000000000..d7358d0677d
--- /dev/null
+++ b/net-libs/miniupnpc/miniupnpc-2.2.3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2021 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 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="ipv6 kernel_linux"
+
+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() {
+       local PATCHES=(
+               "${FILESDIR}"/${P}-makefile.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
+}

Reply via email to