ports/87024: [patch] net/xboxproxy does not build on FreeBSD 4.x
Antony Mawer
gnats at mawer.org
Fri Oct 7 01:50:18 UTC 2005
>Number: 87024
>Category: ports
>Synopsis: [patch] net/xboxproxy does not build on FreeBSD 4.x
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Fri Oct 07 01:50:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Antony Mawer
>Release: FreeBSD 6.0-BETA2 i386
>Organization:
GP Technology Solutions
>Environment:
System: FreeBSD scooby.enchanted.net 6.0-BETA2 FreeBSD 6.0-BETA2 #1: Mon Aug 8 09:56:30 EST 2005 root at scooby.enchanted.net:/usr/obj/usr/src/sys/SCOOBY i386
>Description:
The net/xboxproxy port I recently submitted was marked BROKEN on 4.x
as it did not build on there. This was due to it requiring the port
version of libpcap on 4.x, and a code incompatibility with gcc 2.95.
The attached patch makes the port depend on net/libpcap on 4.x, as
well as including a patch to allow it to build with gcc 2.95. The
patch has been submitted back to the author for inclusion in future
releases.
I'm not 100% sure that the way I've set it to pickup the port pcap
library in preference to the base system one is correct; if someone
could rubber stamp that it would be appreciated!
>How-To-Repeat:
Attempt to build net/xboxproxy on FreeBSD 4.x; observe it is marked
BROKEN.
>Fix:
--- xboxproxy.patch begins here ---
--- Makefile Thu Oct 6 21:50:34 2005
+++ Makefile Fri Oct 7 11:06:23 2005
@@ -17,14 +17,17 @@
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --program-prefix=xbox
-USE_GMAKE= yes
PLIST_FILES= bin/xboxproxy
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
-BROKEN= "Doesn't build on FreeBSD < 5.x"
+# FreeBSD 4.x requires the libpcap port
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libpcap.a:${PORTSDIR}/net/libpcap
+# Without this, configure picks up the pcap lib in /usr/lib
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I/usr/include" LDFLAGS="-L${LOCALBASE}/lib -L/usr/lib"
+CONFIGURE_ARGS+= --with-libpcap=${LOCALBASE}
.endif
.include <bsd.port.post.mk>
--- files/patch-main.c Thu Jan 1 10:00:00 1970
+++ files/patch-main.c Fri Oct 7 11:06:23 2005
@@ -0,0 +1,29 @@
+--- src/main.c Thu Sep 22 01:16:07 2005
++++ src/main.c Fri Oct 7 10:52:40 2005
+@@ -519,9 +519,9 @@
+ int size = sizeof(struct sockaddr_in); /* sizeof(srcaddr) */
+ int sel;
+ struct timeval timeout;
++ struct fd_set proxycopy;
+ timeout.tv_sec = 10;
+ timeout.tv_usec = 0;
+- fd_set proxycopy;
+
+ /* Some sort of select() thing here */
+
+@@ -735,6 +735,7 @@
+ char errbuf[PCAP_ERRBUF_SIZE];
+ //int *pthread_return;
+ char ch;
++ pthread_t pcapthread, proxythread;
+
+ progname = argv[0];
+
+@@ -743,7 +744,6 @@
+ proxies = hash_create(HASHSIZE, compareip, haship);
+ set_log_level(0);
+
+- pthread_t pcapthread, proxythread;
+
+ /* Argument Processing */
+ while ((ch = getopt(argc, argv, "B:bxmus:i:d:h?p:f:")) != -1) {
--- xboxproxy.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list