[67586] trunk/dports/net/tuntaposx

jmr at macports.org jmr at macports.org
Thu May 13 06:31:35 PDT 2010


Revision: 67586
          http://trac.macports.org/changeset/67586
Author:   jmr at macports.org
Date:     2010-05-13 06:31:29 -0700 (Thu, 13 May 2010)
Log Message:
-----------
tuntaposx: fix build on 10.5 (#21762)

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

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

Modified: trunk/dports/net/tuntaposx/Portfile
===================================================================
--- trunk/dports/net/tuntaposx/Portfile	2010-05-13 12:47:46 UTC (rev 67585)
+++ trunk/dports/net/tuntaposx/Portfile	2010-05-13 13:31:29 UTC (rev 67586)
@@ -1,4 +1,4 @@
-# $Id $
+# $Id$
 
 PortSystem 1.0
 
@@ -61,7 +61,11 @@
 	}
 }
 
-if {${os.platform} == "darwin" && ${os.major} == 10} {
+if {${os.major} <= 9} {
+    patchfiles-append patch-leopard.diff
+}
+
+platform darwin 10 {
     # Kernel can be 32-bit or 64-bit, so build both
     default_variants +universal
     configure.universal_archs i386 x86_64

Added: trunk/dports/net/tuntaposx/files/patch-leopard.diff
===================================================================
--- trunk/dports/net/tuntaposx/files/patch-leopard.diff	                        (rev 0)
+++ trunk/dports/net/tuntaposx/files/patch-leopard.diff	2010-05-13 13:31:29 UTC (rev 67586)
@@ -0,0 +1,53 @@
+--- ./src/tap/Makefile.orig	2009-09-09 23:27:04.000000000 +0200
++++ ./src/tap/Makefile	2009-10-02 23:02:00.000000000 +0200
+@@ -25,7 +25,7 @@
+ 	-DKERNEL -D__APPLE__ -DKERNEL_PRIVATE -DTUNTAP_VERSION=\"$(TUNTAP_VERSION)\" \
+ 	-DTAP_KEXT_VERSION=\"$(TAP_KEXT_VERSION)\"
+ CCFLAGS = $(CFLAGS)
+-LDFLAGS = -Wall -mkernel -nostdlib -r -lcc_kext __CFLAGS__ -Xlinker -kext
++LDFLAGS = -Wall -mkernel -nostdlib -r -lcc_kext __CFLAGS__
+ 
+ CCP = g++
+ CC = gcc
+--- ./src/tun/Makefile.orig	2009-09-09 23:26:44.000000000 +0200
++++ ./src/tun/Makefile	2009-10-02 23:02:10.000000000 +0200
+@@ -26,7 +26,7 @@
+ 	-DKERNEL -D__APPLE__ -DKERNEL_PRIVATE -DTUNTAP_VERSION=\"$(TUNTAP_VERSION)\" \
+ 	-DTUN_KEXT_VERSION=\"$(TUN_KEXT_VERSION)\"
+ CCFLAGS = $(CFLAGS)
+-LDFLAGS = -Wall -mkernel -nostdlib -r -lcc_kext __CFLAGS__ -Xlinker -kext
++LDFLAGS = -Wall -mkernel -nostdlib -r -lcc_kext __CFLAGS__
+ 
+ CCP = g++
+ CC = gcc
+--- ./src/tuntap.cc.orig	2009-09-09 22:08:10.000000000 +0200
++++ ./src/tuntap.cc	2009-10-02 23:01:13.000000000 +0200
+@@ -75,7 +75,7 @@
+ }
+ 
+ errno_t
+-tuntap_if_ioctl(ifnet_t ifp, long unsigned int cmd, void *arg)
++tuntap_if_ioctl(ifnet_t ifp, uint32_t cmd, void *arg)
+ {
+ 	if (ifp != NULL) {
+ 		tuntap_interface *ttif = (tuntap_interface *) ifnet_softc(ifp);
+--- ./src/tuntap.h.orig	2009-09-09 22:07:15.000000000 +0200
++++ ./src/tuntap.h	2009-10-02 23:00:55.000000000 +0200
+@@ -54,7 +54,7 @@
+ extern "C" {
+ 
+ errno_t tuntap_if_output(ifnet_t ifp, mbuf_t m);
+-errno_t tuntap_if_ioctl(ifnet_t ifp, long unsigned int cmd, void *arg);
++errno_t tuntap_if_ioctl(ifnet_t ifp, uint32_t cmd, void *arg);
+ errno_t tuntap_if_set_bpf_tap(ifnet_t ifp, bpf_tap_mode mode, int (*cb)(ifnet_t, mbuf_t));
+ errno_t tuntap_if_demux(ifnet_t ifp, mbuf_t m, char *header, protocol_family_t *proto);
+ errno_t tuntap_if_framer(ifnet_t ifp, mbuf_t *m, const struct sockaddr *dest,
+@@ -264,7 +264,7 @@
+ 
+ 		/* interface functions. friends and implementation methods */
+ 		friend errno_t tuntap_if_output(ifnet_t ifp, mbuf_t m);
+-		friend errno_t tuntap_if_ioctl(ifnet_t ifp, long unsigned int cmd, void *arg);
++		friend errno_t tuntap_if_ioctl(ifnet_t ifp, uint32_t cmd, void *arg);
+ 		friend errno_t tuntap_if_set_bpf_tap(ifnet_t ifp, bpf_tap_mode mode,
+ 				int (*cb)(ifnet_t, mbuf_t));
+ 		friend errno_t tuntap_if_demux(ifnet_t ifp, mbuf_t m, char *header,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100513/e759a0c8/attachment-0001.html>


More information about the macports-changes mailing list