aboutsummaryrefslogtreecommitdiff
path: root/net/libnatpmp
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2014-04-17 13:37:39 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2014-04-17 13:37:39 +0000
commit24a0a79c6143ad7fa836fba9063cf0fac0c73657 (patch)
treeb34a10de212a197a4725fd0127ed0d9a9e28cb99 /net/libnatpmp
parentc853fbecdef410cbc01ecbdc6d482dea9d3c5ffe (diff)
downloadports-24a0a79c6143ad7fa836fba9063cf0fac0c73657.tar.gz
ports-24a0a79c6143ad7fa836fba9063cf0fac0c73657.zip
Notes
Diffstat (limited to 'net/libnatpmp')
-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))