# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
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/
master_sites sourceforge:project/tuntaposx/tuntap/${version}
distname tuntap_${version}_src
checksums rmd160 bfdd394e10a982728c4867b2536b337ab78831e1 \
sha256 f01fe7a3dd0f2f64c13606ff0230696d3995f2eeae19f0cdeb778650db9f37ba
destroot.violate_mtree yes
destroot.args BASE=${destroot}${prefix}
patchfiles patch-src-tap-Makefile.diff \
patch-src-tun-Makefile.diff
set f ${worksrcpath}/src/${d}/Makefile
reinplace "s|@CC@|${configure.cc}|g" ${f}
reinplace "s|@CXX@|${configure.cxx}|g" ${f}
reinplace "s|@ARCHFLAGS@|[get_canonical_archflags cc]|" ${f}
# This patch and reinplace should be integrated with the above patches
# once it can be confirmed that all the different systems correctly use the SDK
# path, and that the <= 9 patches also still apply cleanly as well
patchfiles-append patch-mojave.diff
set f ${worksrcpath}/src/${d}/Makefile
reinplace "s|@SDKROOT@|${configure.sdkroot}|" ${f}
if { ${os.platform} eq "darwin" && ${os.major} <= 9} {
ui_error "${name} ${version} does not presently install on MacOSX 10.5 or earlier."
return -code error "Unsupported platform"
# Kernel can be 32-bit or 64-bit, so build both
default_variants +universal