aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorehaupt <ehaupt@FreeBSD.org>2014-04-17 21:37:39 +0800
committerehaupt <ehaupt@FreeBSD.org>2014-04-17 21:37:39 +0800
commit271d61f2450f98d817d99d5ca0062cd955127fdb (patch)
treeb34a10de212a197a4725fd0127ed0d9a9e28cb99
parent3bb7856477350f2d2cda13abd6d8ac1638e97e11 (diff)
downloadfreebsd-ports-gnome-271d61f2450f98d817d99d5ca0062cd955127fdb.tar.gz
freebsd-ports-gnome-271d61f2450f98d817d99d5ca0062cd955127fdb.tar.zst
freebsd-ports-gnome-271d61f2450f98d817d99d5ca0062cd955127fdb.zip
- Support staging
- Strip binary
-rw-r--r--net/libnatpmp/Makefile9
-rw-r--r--net/libnatpmp/files/patch-Makefile27
2 files changed, 32 insertions, 4 deletions
diff --git a/net/libnatpmp/Makefile b/net/libnatpmp/Makefile
index fd19878ea742..f7b16815f127 100644
--- a/net/libnatpmp/Makefile
+++ b/net/libnatpmp/Makefile
@@ -12,9 +12,11 @@ COMMENT= NAT-PMP lightweight library
LICENSE= BSD
USES= gmake
+USE_LDCONFIG= yes
+
MAKE_ENV+= INSTALLPREFIX=${PREFIX}
+
CFLAGS+= -fPIC
-USE_LDCONFIG= yes
PLIST_FILES= bin/natpmpc \
include/natpmp.h \
@@ -22,5 +24,8 @@ PLIST_FILES= bin/natpmpc \
lib/libnatpmp.so \
lib/libnatpmp.so.1
-NO_STAGE= yes
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/natpmpc \
+ ${STAGEDIR}${PREFIX}/lib/libnatpmp.so.1
+
.include <bsd.port.mk>
diff --git a/net/libnatpmp/files/patch-Makefile b/net/libnatpmp/files/patch-Makefile
index d6dbe0b77418..bee078f38b33 100644
--- a/net/libnatpmp/files/patch-Makefile
+++ b/net/libnatpmp/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig 2013-09-20 03:13:32.533531973 +0800
-+++ Makefile 2013-09-20 03:13:40.954532152 +0800
+--- ./Makefile.orig 2012-08-21 19:24:15.000000000 +0200
++++ ./Makefile 2014-04-17 15:33:06.454854016 +0200
@@ -5,7 +5,7 @@
# http://miniupnp.free.fr/libnatpmp.html
@@ -9,3 +9,26 @@
INSTALL = install
# APIVERSION is used in soname
+@@ -61,14 +61,14 @@
+ makedepend -f$(MAKEFILE_LIST) -Y $(OBJS:.o=.c) 2>/dev/null
+
+ install: $(HEADERS) $(STATICLIB) $(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
+- ln -s -f $(SONAME) $(INSTALLDIRLIB)/$(SHAREDLIB)
++ $(INSTALL) -d $(DESTDIR)$(INSTALLDIRINC)
++ $(INSTALL) -m 644 $(HEADERS) $(DESTDIR)$(INSTALLDIRINC)
++ $(INSTALL) -d $(DESTDIR)$(INSTALLDIRLIB)
++ $(INSTALL) -m 644 $(STATICLIB) $(DESTDIR)$(INSTALLDIRLIB)
++ $(INSTALL) -m 644 $(SHAREDLIB) $(DESTDIR)$(INSTALLDIRLIB)/$(SONAME)
++ $(INSTALL) -d $(DESTDIR)$(INSTALLDIRBIN)
++ $(INSTALL) -m 755 natpmpc-shared $(DESTDIR)$(INSTALLDIRBIN)/natpmpc
++ ln -s -f $(SONAME) $(DESTDIR)$(INSTALLDIRLIB)/$(SHAREDLIB)
+
+ cleaninstall:
+ $(RM) $(addprefix $(INSTALLDIRINC), $(HEADERS))