# $Id $ PortSystem 1.0 name tuntaposx version 20080804 revision 1 categories net maintainers febeling openmaintainer description Tun and tap virtual devices. long_description Unix-style tun and tap virtual network interfaces for Mac OS X. \ You typically use these for VPN and OS virtualization. homepage http://tuntaposx.sourceforge.net/ platforms darwin master_sites sourceforge distname tuntap_${version}_src worksrcdir tuntap checksums sha1 2315388ac0e7e090c0e5322fbffb3a9b044e55f5 destroot.violate_mtree yes destroot.args BASE=${destroot}${prefix} patchfiles patch-src__tap__Makefile patch-src__tun__Makefile # doesn't build 64-bit configure.universal_archs-delete x86_64 ppc64 configure { reinplace "s|CCP = g++|CCP = ${configure.cxx}|" ${worksrcpath}/src/tun/Makefile \ ${worksrcpath}/src/tap/Makefile reinplace "s|CC = gcc|CC = ${configure.cc}|" ${worksrcpath}/src/tun/Makefile \ ${worksrcpath}/src/tap/Makefile reinplace "s|__CFLAGS__|${configure.cflags}|" ${worksrcpath}/src/tun/Makefile \ ${worksrcpath}/src/tap/Makefile } startupitem.create yes startupitem.pidfile none set kext_dir ${prefix}/Library/Extensions startupitem.start "kextload ${kext_dir}/tap.kext ; kextload ${kext_dir}/tun.kext" startupitem.stop "kextunload ${kext_dir}/tap.kext ; kextunload ${kext_dir}/tun.kext" post-destroot { set docs ${destroot}${prefix}/share/doc/${name}-${version} xinstall -m 755 -d ${docs} xinstall -m 644 -W ${worksrcpath} README Changelog ${docs} } post-activate { set tap_loaded [expr [string length [exec kextstat -lb foo.tap]] > 0] set tun_loaded [expr [string length [exec kextstat -lb foo.tun]] > 0] if {${tap_loaded} || ${tun_loaded}} { ui_msg "**********************************************************************" ui_msg "* Warning: tuntaposx virtual device kernel extension loaded already. *" ui_msg "* Maybe you have installed the tuntaposx package already without *" ui_msg "* using MacPorts, e.g. by installing Tunnelblick openvpn GUI. See *" ui_msg "* kextstat(8), kextload(8) and kextunload(8) for manual handling. *" ui_msg "**********************************************************************" } }