diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2008-05-14 03:50:11 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2008-05-14 03:50:11 +0000 |
commit | bd6055a9e54024380e2dca95dd10137679c775d5 (patch) | |
tree | f9f62ea6f042ae6d9b5bd96e6e3b7b0c0af2da05 /net/freenet6 | |
parent | dd2d5b04cd8cc60227c81bdd36150f4ebf69c10e (diff) | |
download | ports-bd6055a9e54024380e2dca95dd10137679c775d5.tar.gz ports-bd6055a9e54024380e2dca95dd10137679c775d5.zip |
Notes
Diffstat (limited to 'net/freenet6')
-rw-r--r-- | net/freenet6/Makefile | 10 | ||||
-rw-r--r-- | net/freenet6/files/patch7-plstform__freebsd__tsp_local.c | 29 |
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 */ + + |