aboutsummaryrefslogtreecommitdiffstats
path: root/net/freenet6
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2008-05-14 11:50:11 +0800
committeredwin <edwin@FreeBSD.org>2008-05-14 11:50:11 +0800
commit95be3eb4b785796c93e8460894f4bf221ab3ff7d (patch)
treee9319097cc5ee8c080e6c3b23af034299f57cbdf /net/freenet6
parent1563c4c1d13a38926ca94627e3cf2931944f807a (diff)
downloadfreebsd-ports-gnome-95be3eb4b785796c93e8460894f4bf221ab3ff7d.tar.gz
freebsd-ports-gnome-95be3eb4b785796c93e8460894f4bf221ab3ff7d.tar.zst
freebsd-ports-gnome-95be3eb4b785796c93e8460894f4bf221ab3ff7d.zip
Make it work on 7.0
Diffstat (limited to 'net/freenet6')
-rw-r--r--net/freenet6/Makefile10
-rw-r--r--net/freenet6/files/patch7-plstform__freebsd__tsp_local.c29
2 files changed, 37 insertions, 2 deletions
diff --git a/net/freenet6/Makefile b/net/freenet6/Makefile
index e3fc5e10a561..e5b375d4e140 100644
--- a/net/freenet6/Makefile
+++ b/net/freenet6/Makefile
@@ -7,7 +7,7 @@
PORTNAME= freenet6
PORTVERSION= 2.1.1
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= net ipv6
MASTER_SITES= http://www.go6.net/4105/file.asp?file_id=80&foo=/
DISTNAME= tspc-${PORTVERSION}-src
@@ -27,6 +27,12 @@ SUB_FILES= freenet6.sh pkg-message
EXTRA_PATCHES= ${FILESDIR}/patch5-template::freebsd.sh
MAKE_ARGS= target=freebsd installdir=${PREFIX}
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} > 700000
+EXTRA_PATCHES+= patch7-plstform__freebsd__tsp_local.c
+.endif
+
do-install:
@${MKDIR} ${EXAMPLESDIR}
@${INSTALL_DATA} ${WRKSRC}/bin/tspc.conf.sample ${EXAMPLESDIR}
@@ -53,4 +59,4 @@ post-patch:
-e "s|template=linux|template=tspc-freebsd|g" \
${WRKSRC}/man/man5/tspc.conf.5
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net/freenet6/files/patch7-plstform__freebsd__tsp_local.c b/net/freenet6/files/patch7-plstform__freebsd__tsp_local.c
new file mode 100644
index 000000000000..8c282374d68e
--- /dev/null
+++ b/net/freenet6/files/patch7-plstform__freebsd__tsp_local.c
@@ -0,0 +1,29 @@
+diff --unified=5 /usr/gnu/fbsd/ports/net/freenet6/work/tspc2/platform/freebsd/tsp_local.c.\~1\~ /usr/gnu/fbsd/ports/net/freenet6/work/tspc2/platform/freebsd/tsp_local.c
+--- /usr/gnu/fbsd/ports/net/freenet6/work/tspc2/platform/freebsd/tsp_local.c.~1~ 2004-03-30 23:27:35.000000000 +0200
++++ /usr/gnu/fbsd/ports/net/freenet6/work/tspc2/platform/freebsd/tsp_local.c 2007-07-11 13:40:26.000000000 +0200
+@@ -74,21 +74,16 @@
+ /* freebsd specific to setup an env variable */
+
+ void
+ tspSetEnv(char *Variable, char *Value, int Flag)
+ {
+- char *buf;
+ if(Value) {
+- int size=(strlen(Variable) + strlen(Value) + 2);
+- if((buf=malloc(size)) == NULL) {
++ if(setenv(Variable, Value, Flag) == -1) {
+ Display(1, ELError, "SetEnv", "Not enough memory!");
+ return;
+ }
+- snprintf(buf, size, "%s=%s", Variable, Value);
+- putenv(buf);
+- Display(2, ELNotice, "tspSetEnv", "%s", buf);
+- free(buf);
++ Display(2, ELNotice, "tspSetEnv", "%s=%s", Variable, Value);
+ }
+ }
+
+
+ /* tspSetupTunnel() will callback here */
+
+