[78798] trunk/dports/net/tcpproxy

ryandesign at macports.org ryandesign at macports.org
Sun May 22 16:31:55 PDT 2011


Revision: 78798
          http://trac.macports.org/changeset/78798
Author:   ryandesign at macports.org
Date:     2011-05-22 16:31:52 -0700 (Sun, 22 May 2011)
Log Message:
-----------
tcpproxy: update to 2.0.0-beta15, add universal variant and respect build_arch; see #16324

Modified Paths:
--------------
    trunk/dports/net/tcpproxy/Portfile

Added Paths:
-----------
    trunk/dports/net/tcpproxy/files/patch-tcpproxy.diff

Removed Paths:
-------------
    trunk/dports/net/tcpproxy/files/patch-tcpproxy.c.diff

Modified: trunk/dports/net/tcpproxy/Portfile
===================================================================
--- trunk/dports/net/tcpproxy/Portfile	2011-05-22 21:44:10 UTC (rev 78797)
+++ trunk/dports/net/tcpproxy/Portfile	2011-05-22 23:31:52 UTC (rev 78798)
@@ -3,7 +3,7 @@
 PortSystem 1.0
 
 name		tcpproxy
-version		1.1.9
+version             2.0.0-beta15
 categories	net
 platforms	darwin
 maintainers	nomaintainer
@@ -11,20 +11,33 @@
 long_description	${description}
 
 homepage	http://quietsche-entchen.de/cgi-bin/wiki.cgi/proxies/TcpProxy
-master_sites	http://quietsche-entchen.de/download/ \
-		http://www.sourcefiles.org/System/Daemons/Proxy/
-checksums	md5 7ae45da0d1b263bc507be97e35dbb15b
-patchfiles	patch-tcpproxy.c.diff
+master_sites        http://www.quietsche-entchen.de/download/
 
-configure	{
-	reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/tcpproxy.c
+checksums           sha1    81039e5eb1e6a9dfac267c77840a9e2c9a9a98f9 \
+                    rmd160  f4a622a6e94de7cbc08828a8fc7ef5f73ca58ebd
+
+patchfiles          patch-tcpproxy.diff
+
+post-patch {
+    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/tcpproxy.h
 }
 
+use_configure       no
+
+variant universal {}
+if {[variant_isset universal]} {
+    set archflags ${configure.universal_cflags}
+} else {
+    set archflags ${configure.cc_archflags}
+}
+
+build.args          CC="${configure.cc} ${archflags}"
+
 destroot	{
 	xinstall -s -m 755 ${worksrcpath}/tcpproxy ${destroot}${prefix}/sbin
 	xinstall -m 644 ${worksrcpath}/tcpproxy.1 \
 		${destroot}${prefix}/share/man/man1
 	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
-	xinstall -m 644 -W ${worksrcpath} LICENSE README \
+	xinstall -m 644 -W ${worksrcpath} CHANGES LICENSE README \
 		${destroot}${prefix}/share/doc/${name}
 }

Deleted: trunk/dports/net/tcpproxy/files/patch-tcpproxy.c.diff
===================================================================
--- trunk/dports/net/tcpproxy/files/patch-tcpproxy.c.diff	2011-05-22 21:44:10 UTC (rev 78797)
+++ trunk/dports/net/tcpproxy/files/patch-tcpproxy.c.diff	2011-05-22 23:31:52 UTC (rev 78798)
@@ -1,32 +0,0 @@
---- tcpproxy.c	Sun Apr  4 23:30:30 2004
-+++ tcpproxy.c.new	Thu May 27 17:10:28 2004
-@@ -87,7 +87,7 @@
- #include <unistd.h>
- 
- #include <signal.h>
--#include <wait.h>
-+#include <sys/wait.h>
- #include <errno.h>
- #include <ctype.h>
- #include <pwd.h>
-@@ -105,8 +105,9 @@
- #include "ip-lib.h"
- #include "lib.h"
- 
--#define	PIDFILE			"/var/run/tcpproxy.pid"
--#define	ERROR_LOG		"/tmp/tcpproxy-error.log"
-+#define CONFFILE		"__PREFIX__/etc/tcpproxy.conf"
-+#define	PIDFILE			"__PREFIX__/var/run/tcpproxy.pid"
-+#define	ERROR_LOG		"__PREFIX__/var/log/tcpproxy-error.log"
- #define	MAX_PORT		80
- 
- 
-@@ -1212,7 +1213,7 @@
- 	if (*configfile != 0)
- 		read_configuration(configfile, x);
-  	else if (bound == 0  &&  k >= argc) {
--		copy_string(configfile, "/etc/tcpproxy.conf", sizeof(configfile));
-+		copy_string(configfile, CONFFILE, sizeof(configfile));
- 		standalone = 1;
- 
- 		read_configuration(configfile, x);

Copied: trunk/dports/net/tcpproxy/files/patch-tcpproxy.diff (from rev 78784, trunk/dports/net/tcpproxy/files/patch-tcpproxy.c.diff)
===================================================================
--- trunk/dports/net/tcpproxy/files/patch-tcpproxy.diff	                        (rev 0)
+++ trunk/dports/net/tcpproxy/files/patch-tcpproxy.diff	2011-05-22 23:31:52 UTC (rev 78798)
@@ -0,0 +1,85 @@
+--- acp.c.orig	2005-10-28 12:18:03.000000000 -0500
++++ acp.c	2011-05-22 18:27:33.000000000 -0500
+@@ -29,7 +29,7 @@
+ 
+ #include <ctype.h>
+ #include <signal.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ #include <errno.h>
+ #include <time.h>
+ 
+--- procinfo.c.orig	2006-01-07 08:03:13.000000000 -0600
++++ procinfo.c	2011-05-22 18:27:33.000000000 -0500
+@@ -29,7 +29,7 @@
+ 
+ #include <ctype.h>
+ #include <signal.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ #include <errno.h>
+ #include <time.h>
+ 
+--- tcpproxy.c.orig	2007-08-30 04:36:12.000000000 -0500
++++ tcpproxy.c	2011-05-22 18:27:33.000000000 -0500
+@@ -29,7 +29,7 @@
+ 
+ #include <ctype.h>
+ #include <signal.h>
+-#include <wait.h>
++#include <sys/wait.h>
+ #include <errno.h>
+ #include <time.h>
+ 
+@@ -45,7 +45,6 @@
+ #include <syslog.h>
+ #include <sys/time.h>
+ 
+-#include <linux/netfilter_ipv4.h>
+ 
+ 
+ 
+@@ -677,7 +676,7 @@
+ 	if (*configfile != 0)
+ 		read_configuration(config, configfile);
+  	else if (bound == 0  &&  k >= argc) {
+-		copy_string(configfile, "/etc/tcpproxy.conf", sizeof(configfile));
++		copy_string(configfile, CONFFILE, sizeof(configfile));
+ 
+ 		/* This default is the most common cause for tcpproxy installations
+ 		 * to fail initially.
+@@ -1012,15 +1011,18 @@
+ 
+ 
+ 	if (x->redirmode != 0) {
+-		int	rc;
++		//int	rc;
+ 		size_t	socksize;
+ 		struct sockaddr_in sock;
+ 
+ 		socksize = sizeof(sock);
++#if 0
+ 		rc = getsockopt(0, SOL_IP, SO_ORIGINAL_DST, &sock, &socksize);
+ 		if (rc != 0)
+ 			;
+-		else if (strcmp((char *) inet_ntoa(sock.sin_addr), x->sock.ipnum) != 0  ||
++		else 
++#endif
++		if (strcmp((char *) inet_ntoa(sock.sin_addr), x->sock.ipnum) != 0  ||
+ 			 ntohs(sock.sin_port) != x->sock.port) {
+ 
+ 			/*
+--- tcpproxy.h.orig	2006-08-28 13:20:46.000000000 -0500
++++ tcpproxy.h	2011-05-22 18:27:33.000000000 -0500
+@@ -7,8 +7,9 @@
+ 
+ 
+ #define	PROXYNAME		"tcpproxy"
+-#define PIDFILE                 "/var/run/tcpproxy.pid"
+-#define ERROR_LOG               "/tmp/tcpproxy-error.log"
++#define CONFFILE                "__PREFIX__/etc/tcpproxy.conf"
++#define PIDFILE                 "__PREFIX__/var/run/tcpproxy.pid"
++#define ERROR_LOG               "__PREFIX__/var/log/tcpproxy-error.log"
+ #define MAX_PORT                80
+ 
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110522/a1f7d6f5/attachment.html>


More information about the macports-changes mailing list