diff options
-rw-r--r-- | net/vtun/Makefile | 14 | ||||
-rw-r--r-- | net/vtun/distinfo | 5 | ||||
-rw-r--r-- | net/vtun/files/extra-cfg_file.y | 11 | ||||
-rw-r--r-- | net/vtun/files/patch-main.c | 70 |
4 files changed, 25 insertions, 75 deletions
diff --git a/net/vtun/Makefile b/net/vtun/Makefile index 36b045a2d299..a5095b723375 100644 --- a/net/vtun/Makefile +++ b/net/vtun/Makefile @@ -2,18 +2,19 @@ # $FreeBSD$ PORTNAME= vtun -PORTVERSION= 3.0.3 -PORTREVISION= 1 +PORTVERSION= 3.0.4 CATEGORIES= net MASTER_SITES= SF MAINTAINER= cy@FreeBSD.org COMMENT= Virtual Tunnels over TCP/IP networks with traffic shaping +LICENSE= GPLv2 + LIB_DEPENDS= liblzo2.so:archivers/lzo2 CFLAGS+= -ansi -Wno-pointer-sign -I${LOCALBASE}/include -USE_OPENSSL= yes +USES= ssl GNU_CONFIGURE= yes CONFIGURE_ARGS= --localstatedir=/var \ --with-ssl-headers=${OPENSSLINC} \ @@ -32,10 +33,6 @@ OPTIONS_DEFINE= DOCS .include <bsd.port.pre.mk> -.if ${CC} == "clang" || ${CXX} == "clang++" || (${OPSYS} == FreeBSD && ${OSVERSION} >= 1000026) -EXTRA_PATCHES+= ${FILESDIR}/extra-cfg_file.y -.endif - .if defined(VTUN_EXTENDED_MODE) # Obtained from http://home.jp.FreeBSD.org/~simokawa/vtun-v6.html EXTRA_PATCHES+= ${FILESDIR}/extra-tun_dev.c @@ -54,6 +51,7 @@ post-install: .for doc in ${DOCS} @${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR} .endfor - @${LN} -s ${PREFIX}/man/man8/vtund.8 ${STAGEDIR}${PREFIX}/man/man1/vtun.1 + @cd ${STAGEDIR}${PREFIX}/man/man1/ && \ + ${LN} -s vtund.8 ../man1/vtun.1 .include <bsd.port.post.mk> diff --git a/net/vtun/distinfo b/net/vtun/distinfo index 6b76563498cb..6189aa5e6a05 100644 --- a/net/vtun/distinfo +++ b/net/vtun/distinfo @@ -1,2 +1,3 @@ -SHA256 (vtun-3.0.3.tar.gz) = 69dcbe4f8c5ce7d91b4150a6309e536d03b61841169746ca5788413ac7edb9cb -SIZE (vtun-3.0.3.tar.gz) = 130051 +TIMESTAMP = 1474289088 +SHA256 (vtun-3.0.4.tar.gz) = 79d9ccfec98bb13b19523c483f2192e6db7d0c24af8382506f80cc335c643085 +SIZE (vtun-3.0.4.tar.gz) = 130877 diff --git a/net/vtun/files/extra-cfg_file.y b/net/vtun/files/extra-cfg_file.y deleted file mode 100644 index ce727b16e65a..000000000000 --- a/net/vtun/files/extra-cfg_file.y +++ /dev/null @@ -1,11 +0,0 @@ ---- cfg_file.y.orig 2012-07-09 09:01:08.000000000 +0800 -+++ cfg_file.y 2013-02-12 11:33:52.000000000 +0800 -@@ -609,7 +609,7 @@ - } - - /* Clear the VTUN_NAT_HACK flag which are not relevant to the current operation mode */ --inline void clear_nat_hack_flags(int svr) -+void clear_nat_hack_flags(int svr) - { - if (svr) - llist_trav(&host_list,clear_nat_hack_server,NULL); diff --git a/net/vtun/files/patch-main.c b/net/vtun/files/patch-main.c index 5ab2ffb176e0..2596ad1de7e8 100644 --- a/net/vtun/files/patch-main.c +++ b/net/vtun/files/patch-main.c @@ -1,6 +1,15 @@ ---- main.c.orig 2012-07-07 22:32:57.000000000 -0700 -+++ main.c 2012-09-26 13:37:53.331700962 -0700 -@@ -50,12 +50,14 @@ +--- main.c.orig 2013-07-07 13:31:22.000000000 -0700 ++++ main.c 2016-09-19 18:44:42.369746000 -0700 +@@ -41,7 +41,7 @@ + + #define OPTSTRING "mif:P:L:t:npq" + #ifdef HAVE_WORKING_FORK +-# define SERVOPT_STRING "s" ++# define SERVOPT_STRING "sz:" + #else + # define SERVOPT_STRING "" + #endif +@@ -57,6 +57,8 @@ extern int optind,opterr,optopt; extern char *optarg; @@ -9,54 +18,19 @@ /* for the NATHack bit. Is our UDP session connected? */ int is_rmt_fd_connected=1; - int main(int argc, char *argv[], char *env[]) - { -- int svr, daemon, sock, dofork, fd, opt; -+ int svr, daemon, sock, dofork, fd, opt, has_pid = 0; - struct vtun_host *host = NULL; - struct sigaction sa; - char *hst; -@@ -92,7 +94,7 @@ - /* Start logging to syslog and stderr */ - openlog("vtund", LOG_PID | LOG_NDELAY | LOG_PERROR, LOG_DAEMON); - -- while( (opt=getopt(argc,argv,"misf:P:L:t:npq")) != EOF ){ -+ while( (opt=getopt(argc,argv,"misf:P:L:t:npz:")) != EOF ){ - switch(opt){ - case 'm': - if (mlockall(MCL_CURRENT | MCL_FUTURE) < 0) { -@@ -126,6 +128,10 @@ +@@ -141,6 +143,11 @@ case 'q': vtun.quiet = 1; break; ++#ifdef HAVE_WORKING_FORK + case 'z': + pidfile = strdup(optarg); -+ has_pid = 1; + break; ++#endif default: usage(); exit(1); -@@ -200,12 +206,19 @@ - - init_title(argc,argv,env,"vtund[s]: "); - -+ if ( has_pid ) -+ write_pid(); -+ - if( vtun.svr_type == VTUN_STAND_ALONE ) - write_pid(); - - server(sock); - } else { - init_title(argc,argv,env,"vtund[c]: "); -+ -+ if ( has_pid ) -+ write_pid(); -+ - client(host); - } - -@@ -222,7 +235,7 @@ +@@ -250,7 +257,7 @@ { FILE *f; @@ -65,15 +39,3 @@ vtun_syslog(LOG_ERR,"Can't write PID file"); return; } -@@ -244,9 +257,9 @@ - printf("VTun ver %s\n", VTUN_VER); - printf("Usage: \n"); - printf(" Server:\n"); -- printf("\tvtund <-s> [-f file] [-P port] [-L local address]\n"); -+ printf("\tvtund <-s> [-f file] [-P port] [-L local address] [-z pidfile]\n"); - printf(" Client:\n"); - /* I don't think these work. I'm disabling the suggestion - bish 20050601*/ - printf("\tvtund [-f file] " /* [-P port] [-L local address] */ -- "[-p] [-m] [-t timeout] <host profile> <server address>\n"); -+ "[-p] [-m] [-t timeout] [-z pidfile] <host profile> <server address>\n"); - } |