diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2010-05-09 11:21:50 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2010-05-09 11:21:50 +0000 |
commit | e9844cd84a6b8b72447caf7f8a52f38cdc04b04d (patch) | |
tree | 91c450ffc7717ae90f42be0f175c4bdf2c5cf901 /net/udpxy | |
parent | 805aa17dee2d3cc1ddd6fec4921ee8dc7940be22 (diff) | |
download | ports-e9844cd84a6b8b72447caf7f8a52f38cdc04b04d.tar.gz ports-e9844cd84a6b8b72447caf7f8a52f38cdc04b04d.zip |
Notes
Diffstat (limited to 'net/udpxy')
-rw-r--r-- | net/udpxy/Makefile | 18 | ||||
-rw-r--r-- | net/udpxy/distinfo | 6 | ||||
-rw-r--r-- | net/udpxy/files/patch-Makefile | 17 | ||||
-rw-r--r-- | net/udpxy/files/patch-ifaddr.c | 149 | ||||
-rw-r--r-- | net/udpxy/files/patch-ifaddr.h | 11 | ||||
-rw-r--r-- | net/udpxy/files/udpxy.in | 6 |
6 files changed, 20 insertions, 187 deletions
diff --git a/net/udpxy/Makefile b/net/udpxy/Makefile index 68194bc5480d..cdb2335ad5c3 100644 --- a/net/udpxy/Makefile +++ b/net/udpxy/Makefile @@ -6,7 +6,7 @@ # PORTNAME= udpxy -PORTVERSION= 1.0.15 +PORTVERSION= 1.0.16 CATEGORIES= net MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${RELEASE_MASCOT}-${PORTVERSION:R} DISTNAME= ${PORTNAME}.${PORTVERSION:R}-${RELEASE_MASCOT}-${PORTVERSION:E} @@ -20,8 +20,9 @@ USE_RC_SUBR= udpxy USE_GMAKE= yes MAKE_JOBS_SAFE= yes RELEASE_MASCOT= Chipmunk -CFLAGS+= -DNDEBUG -OPTIONS= TRACING "Enable tracing (verbose)" off +OPTIONS= RELEASE "No asserts, no debug symbols, verbose mode on" on \ + LEAN "No asserts, no debug symbols, verbose mode off" off \ + DEBUG "Asserts, debug symbols, verbose mode on" off PLIST_FILES= sbin/udpxy \ sbin/udpxrec @@ -32,8 +33,15 @@ do-install: .include <bsd.port.pre.mk> -.ifdef WITH_TRACING -CFLAGS+= -DTRACE_MODULE +.if defined(WITH_RELEASE) && defined(WITHOUT_LEAN) && defined(WITHOUT_DEBUG) +ALL_TARGET=release +.elif defined(WITH_LEAN) && defined(WITHOUT_RELEASE) && defined(WITHOUT_DEBUG) +ALL_TARGET=lean +.elif defined(WITH_DEBUG) && defined(WITHOUT_RELEASE) && defined(WITHOUT_LEAN) +ALL_TARGET=debug +WITH_DEBUG=yes +.else +IGNORE=please run 'make config' again and select one build option .endif .include <bsd.port.post.mk> diff --git a/net/udpxy/distinfo b/net/udpxy/distinfo index 0bb1c772fe86..95e76cc5f500 100644 --- a/net/udpxy/distinfo +++ b/net/udpxy/distinfo @@ -1,3 +1,3 @@ -MD5 (udpxy.1.0-Chipmunk-15.tgz) = ef992c1f2f4622439252968c8e920b20 -SHA256 (udpxy.1.0-Chipmunk-15.tgz) = ca2ded933336c7cd6afe530539a85624b2cd497a11b79dc6cf051be25e91f14c -SIZE (udpxy.1.0-Chipmunk-15.tgz) = 79093 +MD5 (udpxy.1.0-Chipmunk-16.tgz) = 0bba6fd3e0b0065424b198abdf0acb7d +SHA256 (udpxy.1.0-Chipmunk-16.tgz) = d6e9e387e4fb465c8835bb95c6b1488122a20cc47a6991733b814bbcab31c325 +SIZE (udpxy.1.0-Chipmunk-16.tgz) = 79231 diff --git a/net/udpxy/files/patch-Makefile b/net/udpxy/files/patch-Makefile deleted file mode 100644 index 7c5865dab9f4..000000000000 --- a/net/udpxy/files/patch-Makefile +++ /dev/null @@ -1,17 +0,0 @@ ---- Makefile 2009-07-23 19:28:41.000000000 +0000 -+++ Makefile 2010-01-08 23:47:38.630600000 +0000 -@@ -141,4 +141,5 @@ - else - make_deps := HPATH='.' $(MKDEP_TOOL) -- $(SRC) -+$(DEPFILE): $(MKDEP_TOOL) - endif - -@@ -150,6 +151,6 @@ - @ls -l $@ - --$(DEPFILE): $(MKDEP_TOOL) $(SRC) -- $($(MAKE)_deps) > $(DEPFILE) -+$(DEPFILE): $(SRC) -+ $(make_deps) > $(DEPFILE) - - $(EXEC) : $(DEPFILE) $(OBJ) diff --git a/net/udpxy/files/patch-ifaddr.c b/net/udpxy/files/patch-ifaddr.c deleted file mode 100644 index 016bc18fddc4..000000000000 --- a/net/udpxy/files/patch-ifaddr.c +++ /dev/null @@ -1,149 +0,0 @@ ---- ifaddr.c.orig 2010-01-14 23:49:24.515378502 +0300 -+++ ifaddr.c 2010-01-14 23:50:07.723908032 +0300 -@@ -10,6 +10,7 @@ - #include <stdlib.h> - #include <netinet/in.h> - #include <arpa/inet.h> -+#include <ifaddrs.h> - - #include <assert.h> - #include <limits.h> -@@ -21,114 +22,29 @@ - */ - int - if2addr( const char* ifname, -- struct sockaddr *addr, size_t addrlen ) -+ struct sockaddr_in *addr, size_t addrlen ) - { -- int rc, sockfd; -- char *buf, *rec; -- size_t buflen, sa_len; -- int last_len; -- struct ifconf ifc; -- struct ifreq ifr; -- -- static size_t IFC_TABLE_SIZE; -- -- static const size_t IFC_ENTRIES = 32; -- static const size_t MAX_IFCBUF_SIZE = (1024 * 256); -- -- IFC_TABLE_SIZE = sizeof(struct ifreq) * IFC_ENTRIES; -+ int rc = -1; -+ struct ifaddrs *ifr, *ifc; -+ struct sockaddr_in *sin; - - assert( ifname && addr && addrlen ); -- rc = 0; -- -- /* acquire the list of network interfaces */ -- -- sockfd = socket( AF_INET, SOCK_DGRAM, 0 ); -- if( -1 == sockfd ) return -1; -- -- buf = NULL; buflen = IFC_TABLE_SIZE; last_len = 0; -- for( ; buflen < MAX_IFCBUF_SIZE; buflen += IFC_TABLE_SIZE ) { -- if( NULL == (buf = malloc( buflen )) ) { -- rc = -1; -- break; -- } -- -- ifc.ifc_len = buflen; -- ifc.ifc_buf = buf; -- if( ioctl( sockfd, SIOCGIFCONF, &ifc ) < 0 ) { -- if( (EINVAL != errno) || (last_len != 0) ) { -- rc = errno; -- break; -- } -- } -- else { -- if( ifc.ifc_len == last_len ) -- break; -- else -- last_len = ifc.ifc_len; -- } -- -- free( buf ); -- buf = NULL; -- } /* for */ -- -- (void) close( sockfd ); -- if( buflen > MAX_IFCBUF_SIZE ) rc = -1; -- -- if( 0 != rc ) { -- if( NULL != buf ) free( buf ); -- return rc; -- } - -- assert( ifc.ifc_buf ); -+ getifaddrs(&ifr); - -- /* look for ifname in the list */ -- -- for( rec = ifc.ifc_buf; rec < (ifc.ifc_buf + ifc.ifc_len); ) { -- (void) memcpy( &ifr, rec, sizeof(struct ifreq) ); -- -- #ifdef NO_SOCKADDR_SA_LEN -- switch( ifr.ifr_addr.sa_family ) -- { -- case AF_INET: -- sa_len = sizeof(struct sockaddr); break; --#ifndef NO_INET6_SUPPORT -- case AF_INET6: -- sa_len = sizeof(struct sockaddr_in6); break; --#endif -- default: -- rc = -1; break; -- } -- #else -- sa_len = ifr.ifr_addr.sa_len; -- #endif -- if( 0 != rc ) break; -- -- if( ifr.ifr_addr.sa_family != AF_INET ) -+ for (ifc = ifr; ifc != NULL; ifc = ifc->ifa_next) { -+ if (strcmp(ifc->ifa_name, ifname) != 0) - continue; -- -- if( 0 == strncmp(ifname, ifr.ifr_name, sizeof(struct ifreq)) ) { -- if( addrlen < sa_len ) { -- rc = -1; -- break; -- } -- -- (void) memcpy( addr, &(ifr.ifr_addr), sa_len ); -- break; -- } -- else { -- /* rec += (sa_len + sizeof( ifr.ifr_name )); */ -- /**** the above is per R. Stevens' book and not working -- **** on 64-bit Linux */ -- -- rec += sizeof(ifr); -- } -- } /* for */ -- -- if( rec >= (buf + ifc.ifc_len) ) { -- rc = -1; -+ if (ifc->ifa_addr == NULL) -+ continue; -+ sin = (struct sockaddr_in *)ifc->ifa_addr; -+ if (sin->sin_family != AF_INET) -+ continue; -+ memcpy(addr, sin, addrlen); -+ rc = 0; - } - -- free( buf ); -+ freeifaddrs(ifr); - return rc; - } - -@@ -147,7 +63,7 @@ - (void) strncpy( buf, s, len ); - } - else { -- rc = if2addr( s, (struct sockaddr*)&saddr, sizeof(saddr) ); -+ rc = if2addr( s, (struct sockaddr_in *)&saddr, sizeof(saddr) ); - if( 0 != rc ) return rc; - - (void) strncpy( buf, inet_ntoa(saddr.sin_addr), len ); diff --git a/net/udpxy/files/patch-ifaddr.h b/net/udpxy/files/patch-ifaddr.h deleted file mode 100644 index bcec3471de16..000000000000 --- a/net/udpxy/files/patch-ifaddr.h +++ /dev/null @@ -1,11 +0,0 @@ ---- ifaddr.h.orig 2010-01-14 23:49:31.288490434 +0300 -+++ ifaddr.h 2010-01-14 23:49:56.636770433 +0300 -@@ -21,7 +21,7 @@ - */ - int - if2addr( const char* ifname, -- struct sockaddr *addr, size_t addrlen ); -+ struct sockaddr_in *addr, size_t addrlen ); - - - /* convert input parameter into an IPv4-address string diff --git a/net/udpxy/files/udpxy.in b/net/udpxy/files/udpxy.in index e2b69c861456..3fa2055e2907 100644 --- a/net/udpxy/files/udpxy.in +++ b/net/udpxy/files/udpxy.in @@ -23,12 +23,14 @@ name="udpxy" rcvar=$(set_rcvar) +load_rc_config ${name} + udpxy_enable=${udpxy_enable-"NO"} udpxy_port=${udpxy_port-"4022"} udpxy_flags=${udpxy_flags-"-S"} + command="%%PREFIX%%/sbin/${name}" pidfile="/var/run/${name}${udpxy_port}.pid" -command_args="-p ${udpxy_port} ${udpxy_flags}" +udpxy_flags="-p ${udpxy_port} ${udpxy_flags}" -load_rc_config $name run_rc_command "$1" |