[83162] trunk/dports/net/vde2

ryandesign at macports.org ryandesign at macports.org
Fri Aug 26 12:17:26 PDT 2011


Revision: 83162
          http://trac.macports.org/changeset/83162
Author:   ryandesign at macports.org
Date:     2011-08-26 12:17:26 -0700 (Fri, 26 Aug 2011)
Log Message:
-----------
vde2: fix problems with some variants; add experimental variant; see #29319

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

Added Paths:
-----------
    trunk/dports/net/vde2/files/
    trunk/dports/net/vde2/files/patch-configure.ac.diff

Modified: trunk/dports/net/vde2/Portfile
===================================================================
--- trunk/dports/net/vde2/Portfile	2011-08-26 18:55:45 UTC (rev 83161)
+++ trunk/dports/net/vde2/Portfile	2011-08-26 19:17:26 UTC (rev 83162)
@@ -5,6 +5,7 @@
 
 name                vde2
 version             2.3.1
+revision            1
 categories          net
 platforms           darwin
 maintainers         nomaintainer
@@ -24,7 +25,16 @@
 
 depends_lib         port:openssl
 
+patchfiles          patch-configure.ac.diff
+
+post-patch {
+    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/configure.ac
+}
+
+use_autoreconf      yes
+
 configure.args      --disable-kernel-switch \
+                    --disable-experimental \
                     --disable-tuntap \
                     --disable-pcap \
                     --enable-cryptcab
@@ -60,5 +70,9 @@
     configure.args-replace  "s|--disable-pcap|--enable-pcap|"
 }
 
+variant experimental description {Enable support for experimental features} {
+    configure.args-replace  "s|--disable-experimental|--enable-experimental|"
+}
+
 livecheck.type      sourceforge
 livecheck.regex     "${name}-(\\d+\\.\\d+(\\.\\d+)?)${extract.suffix}"

Added: trunk/dports/net/vde2/files/patch-configure.ac.diff
===================================================================
--- trunk/dports/net/vde2/files/patch-configure.ac.diff	                        (rev 0)
+++ trunk/dports/net/vde2/files/patch-configure.ac.diff	2011-08-26 19:17:26 UTC (rev 83162)
@@ -0,0 +1,85 @@
+--- configure.ac.orig
++++ configure.ac
+@@ -119,54 +119,44 @@
+ # Check of tuntap device
+ AC_ARG_ENABLE([tuntap],
+     AS_HELP_STRING([--disable-tuntap],
+-      [Disable tuntap compilation]), [:],
+-	[case "$build_os" in
+-		linux*)
+-			AC_CHECK_HEADER([linux/if_tun.h],
+-				[AC_DEFINE([HAVE_TUNTAP], 1, [If defined, tuntap support is compiled in])],
+-				[warn_tuntap=yes])
+-			can_make_libvdetap=yes
+-			can_make_vdetunctl=yes
+-			;;
+-		darwin*)
+-			# I don't use AC_CHECK_FILES because I need test -e and not test -r
+-			for i in /dev/tap0 /Library/Extensions/tap.kext ; do
+-				AC_MSG_CHECKING([for $i])
+-				if test -e "$i" ; then
++      [Disable tuntap compilation]),
++      [if test $enableval = "yes"; then
++	       case "$build_os" in
++			linux*)
++				AC_CHECK_HEADER([linux/if_tun.h],
++					[AC_DEFINE([HAVE_TUNTAP], 1, [If defined, tuntap support is compiled in])],
++					[warn_tuntap=yes])
++				can_make_libvdetap=yes
++				can_make_vdetunctl=yes
++				;;
++			darwin*)
++				# I don't use AC_CHECK_FILES because I need test -e and not test -r
++				AC_MSG_CHECKING([for tap kext])
++				if test -e "@PREFIX@/Library/Extensions/tap.kext" ; then
+ 					AC_MSG_RESULT([yes])
+-					definename="`echo "$i" | tr "a-z*" "A-ZP" | tr -c "0-9A-Z" "_"`"
+-					AC_DEFINE_UNQUOTED([HAVE_$definename])
+-					eval HAVE_$definename=yes
++					AC_DEFINE([HAVE_TUNTAP], 1, [If defined, tuntap support is compiled in])
+ 				else
+ 					AC_MSG_RESULT([no])
+ 					warn_tuntap=yes
+ 				fi
+-			done
+-			
+-			if test "$HAVE__DEV_TAP0_" ; then
+-				AC_DEFINE([HAVE_TUNTAP], 1, [If defined, tuntap support is compiled in])
+-				if ! test "$HAVE__LIBRARY_EXTENSIONS_TAP_KEXT_" -o "$HAVE__SYSTEM_LIBRARY_EXTENSIONS_TAP_KEXT_" ; then
+-					AC_MSG_WARN([/dev/tap0 exists, but the kext cannot be found. Let's hope your
+-configuration does work...])
+-				fi
+-			else
+-				warn_tuntap=yes
+-				AC_MSG_WARN([You do not have tuntap support. You can get it here:
+-http://tuntaposx.sourceforge.net/])
+-			fi
+-			;;
+-		freebsd*)
+-			AC_CHECK_HEADER([net/if_tun.h],
+-				[AC_DEFINE([HAVE_TUNTAP], 1, [If defined, tuntap support is compiled in])],
+-				[warn_tuntap=yes])
+-			;;
+-	esac])
++				
++				;;
++			freebsd*)
++				AC_CHECK_HEADER([net/if_tun.h],
++					[AC_DEFINE([HAVE_TUNTAP], 1, [If defined, tuntap support is compiled in])],
++					[warn_tuntap=yes])
++				;;
++		esac
++	else
++		warn_tuntap=yes
++	fi])
+ 
++
+ # Disable pcap support (pdump)? (depends on libpcap, maybe unwanted)
+ AC_ARG_ENABLE([pcap],
+ 	AS_HELP_STRING([--disable-pcap],
+ 		[Disable pcap support (pdump plugin)]),
+-	[if test $enableval = "no" ; then add_pcap=no ; warn_pcap=no ; fi])
++	[if test $enableval = "no" ; then add_pcap=no ; warn_pcap=yes ; fi])
+ 
+ AC_ARG_ENABLE([kernel-switch],
+ 	AS_HELP_STRING([--enable-kernel-switch],
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110826/6d044b40/attachment.html>


More information about the macports-changes mailing list