diff options
-rw-r--r-- | net/hanstunnel/Makefile | 25 | ||||
-rw-r--r-- | net/hanstunnel/files/patch-tun.cpp | 19 |
2 files changed, 25 insertions, 19 deletions
diff --git a/net/hanstunnel/Makefile b/net/hanstunnel/Makefile index 9202f38d0d94..29921e0e6944 100644 --- a/net/hanstunnel/Makefile +++ b/net/hanstunnel/Makefile @@ -3,6 +3,7 @@ PORTNAME= hans PORTVERSION= 0.4.1 +PORTREVISION= 1 CATEGORIES= net security MASTER_SITES= SF/hanstunnel/source @@ -21,30 +22,22 @@ PLIST_FILES= bin/hans SUB_FILES= pkg-message -NO_STAGE= yes .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MCLANG} -.if ${OSVERSION} < 1000000 -CC=clang -CXX=clang++ -.if ${OSVERSION} < 900033 -BUILD_DEPENDS+= clang:${PORTSDIR}/lang/clang -.endif +.if ${OSVERSION} >= 900033 && exists(/usr/bin/clang) +CC= clang +CXX= clang++ +.else +BUILD_DEPENDS+= clang33:${PORTSDIR}/lang/clang33 +CC= clang33 +CXX= clang++33 .endif .else USE_GCC=4.2+ -CC=gcc -CXX=g++ -CPP=gcpp .endif do-install: - @${INSTALL_PROGRAM} ${WRKSRC}/hans ${LOCALBASE}/bin - -post-install: .SILENT - ${ECHO_MSG} - ${CAT} ${PKGMESSAGE} - ${ECHO_MSG} + ${INSTALL_PROGRAM} ${WRKSRC}/hans ${STAGEDIR}${LOCALBASE}/bin .include <bsd.port.mk> diff --git a/net/hanstunnel/files/patch-tun.cpp b/net/hanstunnel/files/patch-tun.cpp index b97e93709373..6e070926010f 100644 --- a/net/hanstunnel/files/patch-tun.cpp +++ b/net/hanstunnel/files/patch-tun.cpp @@ -1,6 +1,19 @@ ---- tun.cpp.orig 2010-02-17 17:30:21.000000000 +0200 -+++ tun.cpp 2013-04-04 16:55:39.802818893 +0300 -@@ -68,23 +68,17 @@ + +$FreeBSD$ + +--- tun.cpp.orig ++++ tun.cpp +@@ -41,8 +41,7 @@ + + if (device != NULL) + { +- strncpy(this->device, device, VTUN_DEV_LEN); +- this->device[VTUN_DEV_LEN] = 0; ++ strlcpy(this->device, device, VTUN_DEV_LEN); + } + else + this->device[0] = 0; +@@ -68,23 +67,17 @@ string ips = Utility::formatIp(ip); string destIps = Utility::formatIp(destIp); |