summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-libs/libnatpmp
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-libs/libnatpmp')
-rw-r--r--net-libs/libnatpmp/Manifest4
-rw-r--r--net-libs/libnatpmp/files/remove-static-lib-20130911.patch74
-rw-r--r--net-libs/libnatpmp/files/remove-static-lib.patch44
-rw-r--r--net-libs/libnatpmp/files/respect-FLAGS-20130911.patch53
-rw-r--r--net-libs/libnatpmp/files/respect-FLAGS-20140401.patch36
-rw-r--r--net-libs/libnatpmp/files/respect-FLAGS.patch40
-rw-r--r--net-libs/libnatpmp/files/respect-libdir-20120821.patch20
-rw-r--r--net-libs/libnatpmp/files/respect-libdir.patch19
-rw-r--r--net-libs/libnatpmp/libnatpmp-20110808-r1.ebuild29
-rw-r--r--net-libs/libnatpmp/libnatpmp-20130911.ebuild29
-rw-r--r--net-libs/libnatpmp/libnatpmp-20140401-r1.ebuild30
-rw-r--r--net-libs/libnatpmp/libnatpmp-20150609.ebuild30
-rw-r--r--net-libs/libnatpmp/metadata.xml8
13 files changed, 416 insertions, 0 deletions
diff --git a/net-libs/libnatpmp/Manifest b/net-libs/libnatpmp/Manifest
new file mode 100644
index 000000000000..943171fdd2f1
--- /dev/null
+++ b/net-libs/libnatpmp/Manifest
@@ -0,0 +1,4 @@
+DIST libnatpmp-20110808.tar.gz 17762 SHA256 2c306719c8f77027c51161e90fb7fa72e1eb22475288ea6867a133316e944a69 SHA512 1bb4304319a0570602f19e4bf5ea42505de259f4f9d659ffc3f54faf67717e2e28563a50b747556bf5ee279fed6fe92ee798cddec233b7d3b97f3aad697729e2 WHIRLPOOL 2751ba8322e6c5f0b518aed544995d5e138b6f2d05772234783afdd828c18d26c63e1aeac166a8dac8615201243c977b2601da2064c0b41c46256a7e10fac578
+DIST libnatpmp-20130911.tar.gz 18744 SHA256 a30d83b9175585cc0f5bff753ce7eb5d83aaecb6222ccac670ed759fea595d7d SHA512 e7dfb3955ccc2c30e7c74c1085bc71bd9318f6171b84fbad2d8ae8bd5a227f7ceed3f60ecb49bd10e6fb838d8be3325bbf467467bf0d04e46883e3a19fa14a2d WHIRLPOOL fafb32c930e21afd8c3e10528638be4b31d03a2bcfdc481b4f2ea682ae4b7fd0cf943f32b8a395f03ceeecf42a41370fcd49a6026bc3cd449b6e4fba39cf191f
+DIST libnatpmp-20140401.tar.gz 23302 SHA256 b2ce5e626a21c795cba2d118f26e54aaa89de29d4611c440fafc49a2a5bedabb SHA512 12616f07b0a096046a35079954b8a34d474e672d7836ddac9da993a47178902aa2d781786ac76c55c5f16cfdf6a7e7258f92fec3850714ad9cd50208d854c4c2 WHIRLPOOL c12bfbc83d1f30f20162c3fddd5452f53d6ef556452845c6303420718a92568c8e8174939a3ef2702045d7c2061f5aff57bfe81c3516452d84172ef6ecf08849
+DIST libnatpmp-20150609.tar.gz 24392 SHA256 e1aa9c4c4219bc06943d6b2130f664daee213fb262fcb94dd355815b8f4536b0 SHA512 e50b1f68ce9254bb2f068ddc37417a3c417b80f7b3fb3d84e3e9af4a144d89e204ab993b54c01657335e855d0124a8fcbbf96ce78db7b9ae0b03b6eb79de2e09 WHIRLPOOL 27243e13e445a8bbe592257e1029264c3535ef1c71ccaf476708e91c8ead39b778a2d07e6bc42500444b910a005d5be092c5a453df225a556975e97f4184b7c7
diff --git a/net-libs/libnatpmp/files/remove-static-lib-20130911.patch b/net-libs/libnatpmp/files/remove-static-lib-20130911.patch
new file mode 100644
index 000000000000..a2c1f516c363
--- /dev/null
+++ b/net-libs/libnatpmp/files/remove-static-lib-20130911.patch
@@ -0,0 +1,74 @@
+diff -Naur libnatpmp-20130911.orig/Makefile libnatpmp-20130911/Makefile
+--- libnatpmp-20130911.orig/Makefile 2013-09-13 07:00:55.874343916 -0400
++++ libnatpmp-20130911/Makefile 2013-09-13 07:03:33.733351101 -0400
+@@ -35,7 +35,6 @@
+
+ OBJS = $(LIBOBJS) testgetgateway.o natpmpc.o natpmp-jni.o
+
+-STATICLIB = libnatpmp.a
+ ifeq ($(OS), Darwin)
+ SHAREDLIB = libnatpmp.dylib
+ JNISHAREDLIB = libjninatpmp.dylib
+@@ -58,7 +57,7 @@
+
+ HEADERS = natpmp.h
+
+-EXECUTABLES = testgetgateway natpmpc-shared natpmpc-static
++EXECUTABLES = testgetgateway natpmpc-shared
+
+ INSTALLPREFIX ?= $(PREFIX)/usr
+ INSTALLDIRINC = $(INSTALLPREFIX)/include
+@@ -72,9 +71,9 @@
+
+ .PHONY: all clean depend install cleaninstall installpythonmodule
+
+-all: $(STATICLIB) $(SHAREDLIB) $(EXECUTABLES)
++all: $(SHAREDLIB) $(EXECUTABLES)
+
+-pythonmodule: $(STATICLIB) libnatpmpmodule.c setup.py
++pythonmodule: libnatpmpmodule.c setup.py
+ python setup.py build
+ touch $@
+
+@@ -82,18 +81,17 @@
+ python setup.py install
+
+ clean:
+- $(RM) $(OBJS) $(EXECUTABLES) $(STATICLIB) $(SHAREDLIB) $(JAVACLASSES) $(JNISHAREDLIB)
++ $(RM) $(OBJS) $(EXECUTABLES) $(SHAREDLIB) $(JAVACLASSES) $(JNISHAREDLIB)
+ $(RM) pythonmodule
+ $(RM) -r build/ dist/ libraries/
+
+ depend:
+ makedepend -f$(MAKEFILE_LIST) -Y $(OBJS:.o=.c) 2>/dev/null
+
+-install: $(HEADERS) $(STATICLIB) $(SHAREDLIB) natpmpc-shared
++install: $(HEADERS) $(SHAREDLIB) natpmpc-shared
+ $(INSTALL) -d $(INSTALLDIRINC)
+ $(INSTALL) -m 644 $(HEADERS) $(INSTALLDIRINC)
+ $(INSTALL) -d $(INSTALLDIRLIB)
+- $(INSTALL) -m 644 $(STATICLIB) $(INSTALLDIRLIB)
+ $(INSTALL) -m 644 $(SHAREDLIB) $(INSTALLDIRLIB)/$(SONAME)
+ $(INSTALL) -d $(INSTALLDIRBIN)
+ $(INSTALL) -m 755 natpmpc-shared $(INSTALLDIRBIN)/natpmpc
+@@ -142,20 +140,13 @@
+ $(RM) $(addprefix $(INSTALLDIRINC), $(HEADERS))
+ $(RM) $(INSTALLDIRLIB)/$(SONAME)
+ $(RM) $(INSTALLDIRLIB)/$(SHAREDLIB)
+- $(RM) $(INSTALLDIRLIB)/$(STATICLIB)
+
+ testgetgateway: testgetgateway.o getgateway.o
+ $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
+
+-natpmpc-static: natpmpc.o $(STATICLIB)
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
+-
+ natpmpc-shared: natpmpc.o $(SHAREDLIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
+
+-$(STATICLIB): $(LIBOBJS)
+- $(AR) crs $@ $?
+-
+ $(SHAREDLIB): $(LIBOBJS)
+ ifeq ($(OS), Darwin)
+ $(CC) $(CFLAGS) $(LDFLAGS) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
diff --git a/net-libs/libnatpmp/files/remove-static-lib.patch b/net-libs/libnatpmp/files/remove-static-lib.patch
new file mode 100644
index 000000000000..dae64601b9cb
--- /dev/null
+++ b/net-libs/libnatpmp/files/remove-static-lib.patch
@@ -0,0 +1,44 @@
+--- libnatpmp-20110715/Makefile
++++ libnatpmp-20110715/Makefile
+@@ -33,7 +32,7 @@
+
+ HEADERS = natpmp.h
+
+-EXECUTABLES = testgetgateway natpmpc-shared natpmpc-static
++EXECUTABLES = testgetgateway natpmpc-shared
+
+ INSTALLPREFIX ?= $(PREFIX)/usr
+ INSTALLDIRINC = $(INSTALLPREFIX)/include
+@@ -45,9 +44,9 @@
+
+ .PHONY: all clean depend install cleaninstall installpythonmodule
+
+-all: $(STATICLIB) $(SHAREDLIB) $(EXECUTABLES)
++all: $(SHAREDLIB) $(EXECUTABLES)
+
+-pythonmodule: $(STATICLIB) libnatpmpmodule.c setup.py
++pythonmodule: libnatpmpmodule.c setup.py
+ python setup.py build
+ touch $@
+
+@@ -55,11 +54,10 @@
+ depend:
+ makedepend -f$(MAKEFILE_LIST) -Y $(OBJS:.o=.c) 2>/dev/null
+
+-install: $(HEADERS) $(STATICLIB) $(SHAREDLIB) natpmpc-shared
++install: $(HEADERS) $(SHAREDLIB) natpmpc-shared
+ $(INSTALL) -d $(INSTALLDIRINC)
+ $(INSTALL) -m 644 $(HEADERS) $(INSTALLDIRINC)
+ $(INSTALL) -d $(INSTALLDIRLIB)
+- $(INSTALL) -m 644 $(STATICLIB) $(INSTALLDIRLIB)
+ $(INSTALL) -m 644 $(SHAREDLIB) $(INSTALLDIRLIB)/$(SONAME)
+ $(INSTALL) -d $(INSTALLDIRBIN)
+ $(INSTALL) -m 755 natpmpc-shared $(INSTALLDIRBIN)/natpmpc
+@@ -76,7 +74,6 @@
+ $(RM) $(addprefix $(INSTALLDIRINC), $(HEADERS))
+ $(RM) $(INSTALLDIRLIB)/$(SONAME)
+ $(RM) $(INSTALLDIRLIB)/$(SHAREDLIB)
+- $(RM) $(INSTALLDIRLIB)/$(STATICLIB)
+
+ testgetgateway: testgetgateway.o getgateway.o
+
diff --git a/net-libs/libnatpmp/files/respect-FLAGS-20130911.patch b/net-libs/libnatpmp/files/respect-FLAGS-20130911.patch
new file mode 100644
index 000000000000..df36e2d4a4a0
--- /dev/null
+++ b/net-libs/libnatpmp/files/respect-FLAGS-20130911.patch
@@ -0,0 +1,53 @@
+diff -Naur libnatpmp-20130911.orig/Makefile libnatpmp-20130911/Makefile
+--- libnatpmp-20130911.orig/Makefile 2013-09-10 16:15:06.000000000 -0400
++++ libnatpmp-20130911/Makefile 2013-09-12 13:20:29.191447842 -0400
+@@ -5,7 +5,7 @@
+ # http://miniupnp.free.fr/libnatpmp.html
+
+ OS = $(shell uname -s)
+-CC = gcc
++CC ?= gcc
+ INSTALL = install
+ VERSION = $(shell cat VERSION)
+
+@@ -22,6 +22,7 @@
+ # APIVERSION is used in soname
+ APIVERSION = 1
+ #LDFLAGS = -Wl,--no-undefined
++GENTOO_CFLAGS := $(CFLAGS)
+ CFLAGS = -Os
+ #CFLAGS = -g -O0
+ CFLAGS += -fPIC
+@@ -52,6 +53,8 @@
+ endif
+ endif
+
++CFLAGS := $(CFLAGS) $(GENTOO_CFLAGS)
++
+ HEADERS = natpmp.h
+
+ EXECUTABLES = testgetgateway natpmpc-shared natpmpc-static
+@@ -144,19 +147,19 @@
+ $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
+
+ natpmpc-static: natpmpc.o $(STATICLIB)
+- $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
+
+ natpmpc-shared: natpmpc.o $(SHAREDLIB)
+- $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
+
+ $(STATICLIB): $(LIBOBJS)
+ $(AR) crs $@ $?
+
+ $(SHAREDLIB): $(LIBOBJS)
+ ifeq ($(OS), Darwin)
+- $(CC) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
+ else
+- $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $^ $(EXTRA_LD)
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $^ $(EXTRA_LD)
+ endif
+
+
diff --git a/net-libs/libnatpmp/files/respect-FLAGS-20140401.patch b/net-libs/libnatpmp/files/respect-FLAGS-20140401.patch
new file mode 100644
index 000000000000..0a007b169a79
--- /dev/null
+++ b/net-libs/libnatpmp/files/respect-FLAGS-20140401.patch
@@ -0,0 +1,36 @@
+diff -Naur libnatpmp-20140401.orig/Makefile libnatpmp-20140401/Makefile
+--- libnatpmp-20140401.orig/Makefile 2013-12-09 15:52:28.000000000 -0500
++++ libnatpmp-20140401/Makefile 2014-04-02 10:03:42.128609226 -0400
+@@ -5,7 +5,7 @@
+ # http://miniupnp.free.fr/libnatpmp.html
+
+ OS = $(shell uname -s)
+-CC = gcc
++CC ?= gcc
+ INSTALL = install -p
+ ARCH = $(shell uname -m | sed -e s/i.86/i686/)
+ VERSION = $(shell cat VERSION)
+@@ -153,19 +153,19 @@
+ $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
+
+ natpmpc-static: natpmpc.o $(STATICLIB)
+- $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
+
+ natpmpc-shared: natpmpc.o $(SHAREDLIB)
+- $(CC) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRA_LD)
+
+ $(STATICLIB): $(LIBOBJS)
+ $(AR) crs $@ $?
+
+ $(SHAREDLIB): $(LIBOBJS)
+ ifeq ($(OS), Darwin)
+- $(CC) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
+ else
+- $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $^ $(EXTRA_LD)
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $^ $(EXTRA_LD)
+ endif
+
+
diff --git a/net-libs/libnatpmp/files/respect-FLAGS.patch b/net-libs/libnatpmp/files/respect-FLAGS.patch
new file mode 100644
index 000000000000..0338d1810e67
--- /dev/null
+++ b/net-libs/libnatpmp/files/respect-FLAGS.patch
@@ -0,0 +1,40 @@
+--- libnatpmp-20110808/Makefile
++++ libnatpmp-20110808/Makefile
+@@ -4,13 +4,12 @@
+ # http://miniupnp.free.fr/libnatpmp.html
+
+ OS = $(shell uname -s)
+-CC = gcc
++CC ?= gcc
+ INSTALL = install
+
+ # APIVERSION is used in soname
+ APIVERSION = 1
+-#LDFLAGS = -Wl,--no-undefined
+-CFLAGS = -O -fPIC -Wall -DENABLE_STRNATPMPERR
++CFLAGS := -Wall -DENABLE_STRNATPMPERR $(CFLAGS)
+
+ LIBOBJS = natpmp.o getgateway.o
+
+@@ -75,16 +75,18 @@
+ testgetgateway: testgetgateway.o getgateway.o
+
+ natpmpc-shared: natpmpc.o $(SHAREDLIB)
+- $(CC) $(LDFLAGS) -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
++
++getgateway.o natpmp.o: CFLAGS += -fPIC
+
+ $(STATICLIB): $(LIBOBJS)
+ $(AR) crs $@ $?
+
+ $(SHAREDLIB): $(LIBOBJS)
+ ifeq ($(OS), Darwin)
+- $(CC) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -dynamiclib -Wl,-install_name,$(SONAME) -o $@ $^
+ else
+- $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(SONAME) -o $@ $^
+ endif
+
+ # DO NOT DELETE
diff --git a/net-libs/libnatpmp/files/respect-libdir-20120821.patch b/net-libs/libnatpmp/files/respect-libdir-20120821.patch
new file mode 100644
index 000000000000..90b7167a1d4f
--- /dev/null
+++ b/net-libs/libnatpmp/files/respect-libdir-20120821.patch
@@ -0,0 +1,20 @@
+diff -Naur libnatpmp-20120821.orig/Makefile libnatpmp-20120821/Makefile
+--- libnatpmp-20120821.orig/Makefile 2012-08-26 20:26:27.000000000 -0400
++++ libnatpmp-20120821/Makefile 2012-08-26 20:27:07.000000000 -0400
+@@ -4,6 +4,7 @@
+ # (c) 2007-2011 Thomas Bernard
+ # http://miniupnp.free.fr/libnatpmp.html
+
++GENTOO_LIBDIR ?= lib
+ OS = $(shell uname -s)
+ CC ?= gcc
+ INSTALL = install
+@@ -41,7 +42,7 @@
+
+ INSTALLPREFIX ?= $(PREFIX)/usr
+ INSTALLDIRINC = $(INSTALLPREFIX)/include
+-INSTALLDIRLIB = $(INSTALLPREFIX)/lib
++INSTALLDIRLIB = $(INSTALLPREFIX)/$(GENTOO_LIBDIR)
+ INSTALLDIRBIN = $(INSTALLPREFIX)/bin
+
+ .PHONY: all clean depend install cleaninstall installpythonmodule
diff --git a/net-libs/libnatpmp/files/respect-libdir.patch b/net-libs/libnatpmp/files/respect-libdir.patch
new file mode 100644
index 000000000000..07f5d87ddf98
--- /dev/null
+++ b/net-libs/libnatpmp/files/respect-libdir.patch
@@ -0,0 +1,19 @@
+--- libnatpmp-20110808/Makefile
++++ libnatpmp-20110808/Makefile
+@@ -6,6 +6,7 @@
+ # (c) 2007-2011 Thomas Bernard
+ # http://miniupnp.free.fr/libnatpmp.html
+
++GENTOO_LIBDIR ?= lib
+ OS = $(shell uname -s)
+ CC ?= gcc
+ INSTALL = install
+@@ -36,7 +37,7 @@
+
+ INSTALLPREFIX ?= $(PREFIX)/usr
+ INSTALLDIRINC = $(INSTALLPREFIX)/include
+-INSTALLDIRLIB = $(INSTALLPREFIX)/lib
++INSTALLDIRLIB = $(INSTALLPREFIX)/$(GENTOO_LIBDIR)
+ INSTALLDIRBIN = $(INSTALLPREFIX)/bin
+
+ .PHONY: all clean depend install cleaninstall installpythonmodule
diff --git a/net-libs/libnatpmp/libnatpmp-20110808-r1.ebuild b/net-libs/libnatpmp/libnatpmp-20110808-r1.ebuild
new file mode 100644
index 000000000000..65ed6c4d5a18
--- /dev/null
+++ b/net-libs/libnatpmp/libnatpmp-20110808-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="An alternative protocol to UPnP IGD specification"
+HOMEPAGE="http://miniupnp.free.fr/libnatpmp.html"
+SRC_URI="http://miniupnp.free.fr/files/download.php?file=${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="sparc"
+IUSE="static-libs"
+
+src_prepare() {
+ epatch "${FILESDIR}"/respect-FLAGS.patch
+ epatch "${FILESDIR}"/respect-libdir.patch
+ use static-libs || epatch "${FILESDIR}"/remove-static-lib.patch
+ tc-export CC
+}
+
+src_install() {
+ emake PREFIX="${D}" GENTOO_LIBDIR="$(get_libdir)" install
+
+ dodoc Changelog.txt README
+ doman natpmpc.1
+}
diff --git a/net-libs/libnatpmp/libnatpmp-20130911.ebuild b/net-libs/libnatpmp/libnatpmp-20130911.ebuild
new file mode 100644
index 000000000000..44178ee6bd7b
--- /dev/null
+++ b/net-libs/libnatpmp/libnatpmp-20130911.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="An alternative protocol to UPnP IGD specification"
+HOMEPAGE="http://miniupnp.free.fr/libnatpmp.html"
+SRC_URI="http://miniupnp.free.fr/files/download.php?file=${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc ppc64 ~sparc x86 ~x86-fbsd"
+IUSE="static-libs"
+
+src_prepare() {
+ epatch "${FILESDIR}"/respect-FLAGS-${PV}.patch
+ epatch "${FILESDIR}"/respect-libdir-20120821.patch
+ use static-libs || epatch "${FILESDIR}"/remove-static-lib-${PV}.patch
+ tc-export CC
+}
+
+src_install() {
+ emake PREFIX="${D}" GENTOO_LIBDIR="$(get_libdir)" install
+
+ dodoc Changelog.txt README
+ doman natpmpc.1
+}
diff --git a/net-libs/libnatpmp/libnatpmp-20140401-r1.ebuild b/net-libs/libnatpmp/libnatpmp-20140401-r1.ebuild
new file mode 100644
index 000000000000..541f829fd7af
--- /dev/null
+++ b/net-libs/libnatpmp/libnatpmp-20140401-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="An alternative protocol to UPnP IGD specification"
+HOMEPAGE="http://miniupnp.free.fr/libnatpmp.html"
+SRC_URI="http://miniupnp.free.fr/files/download.php?file=${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="static-libs"
+
+src_prepare() {
+ epatch "${FILESDIR}"/respect-FLAGS-20140401.patch
+ epatch "${FILESDIR}"/respect-libdir-20120821.patch
+ use static-libs || epatch "${FILESDIR}"/remove-static-lib-20130911.patch
+ tc-export CC
+}
+
+src_install() {
+ # Override HEADERS for missing declspec.h wrt #506832
+ emake HEADERS='declspec.h natpmp.h' PREFIX="${D}" GENTOO_LIBDIR="$(get_libdir)" install
+
+ dodoc Changelog.txt README
+ doman natpmpc.1
+}
diff --git a/net-libs/libnatpmp/libnatpmp-20150609.ebuild b/net-libs/libnatpmp/libnatpmp-20150609.ebuild
new file mode 100644
index 000000000000..207323a88776
--- /dev/null
+++ b/net-libs/libnatpmp/libnatpmp-20150609.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="An alternative protocol to UPnP IGD specification"
+HOMEPAGE="http://miniupnp.free.fr/libnatpmp.html"
+SRC_URI="http://miniupnp.free.fr/files/download.php?file=${P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="static-libs"
+
+src_prepare() {
+ epatch "${FILESDIR}"/respect-FLAGS-20140401.patch
+ epatch "${FILESDIR}"/respect-libdir-20120821.patch
+ use static-libs || epatch "${FILESDIR}"/remove-static-lib-20130911.patch
+ tc-export CC
+}
+
+src_install() {
+ # Override HEADERS for missing declspec.h wrt #506832
+ emake HEADERS='declspec.h natpmp.h' PREFIX="${D}" GENTOO_LIBDIR="$(get_libdir)" install
+
+ dodoc Changelog.txt README
+ doman natpmpc.1
+}
diff --git a/net-libs/libnatpmp/metadata.xml b/net-libs/libnatpmp/metadata.xml
new file mode 100644
index 000000000000..1e7587374fdf
--- /dev/null
+++ b/net-libs/libnatpmp/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+</pkgmetadata>