source: trunk/dports/net/tuntaposx/Portfile @ 85262

Last change on this file since 85262 was 85262, checked in by jmr@…, 6 years ago

tuntaposx: license

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1# $Id: Portfile 85262 2011-10-12 06:17:37Z jmr@macports.org $
2
3PortSystem 1.0
4
5name                    tuntaposx
6version                 20090913
7revision                1
8categories              net
9license                 BSD
10maintainers             nomaintainer
11description             Tun and tap virtual devices.
12long_description        Unix-style tun and tap virtual network interfaces for Mac OS X. \
13        You typically use these for VPN and OS virtualization.
14homepage                http://tuntaposx.sourceforge.net/
15platforms               darwin
16master_sites            sourceforge
17distname                tuntap_${version}_src
18worksrcdir              tuntap
19checksums               sha1 1a9fb5e077c6d21b7715c8cb26f2ebdcbd681202
20destroot.violate_mtree  yes
21destroot.args           BASE=${destroot}${prefix}
22
23patchfiles              patch-src__tap__Makefile patch-src__tun__Makefile
24
25configure {
26        reinplace "s|CCP = g++|CCP = ${configure.cxx}|" ${worksrcpath}/src/tun/Makefile \
27                                                        ${worksrcpath}/src/tap/Makefile
28        reinplace "s|CC = gcc|CC = ${configure.cc}|" ${worksrcpath}/src/tun/Makefile \
29                                                     ${worksrcpath}/src/tap/Makefile
30        if {[variant_isset universal]} {
31                reinplace "s|__CFLAGS__|${configure.universal_cflags}|" ${worksrcpath}/src/tun/Makefile \
32                                                              ${worksrcpath}/src/tap/Makefile
33        } else {
34                reinplace "s|__CFLAGS__|${configure.cflags}|" ${worksrcpath}/src/tun/Makefile \
35                                                              ${worksrcpath}/src/tap/Makefile
36        }
37}
38
39startupitem.create      yes
40startupitem.pidfile     none
41set kext_dir            ${prefix}/Library/Extensions
42startupitem.start       "kextload ${kext_dir}/tap.kext ; kextload  ${kext_dir}/tun.kext"
43startupitem.stop        "kextunload ${kext_dir}/tap.kext ; kextunload  ${kext_dir}/tun.kext"
44
45post-destroot {
46        set docs ${destroot}${prefix}/share/doc/${name}-${version}
47        xinstall -m 755 -d ${docs}
48        xinstall -m 644 -W ${worksrcpath} README Changelog ${docs}
49}
50
51post-activate {
52        set tap_loaded [expr [string length [exec kextstat -lb foo.tap]] > 0]
53        set tun_loaded [expr [string length [exec kextstat -lb foo.tun]] > 0]
54
55        if {${tap_loaded} || ${tun_loaded}} {
56                ui_msg "**********************************************************************"
57                ui_msg "* Warning: tuntaposx virtual device kernel extension loaded already. *"
58                ui_msg "* Maybe you have installed the tuntaposx package already without     *"
59                ui_msg "* using MacPorts, e.g. by installing Tunnelblick openvpn GUI. See    *"
60                ui_msg "* kextstat(8), kextload(8) and kextunload(8) for manual handling.    *"
61                ui_msg "**********************************************************************"
62        }
63}
64
65if {${os.major} <= 9} {
66    patchfiles-append patch-leopard.diff
67}
68
69platform darwin 10 {
70    # Kernel can be 32-bit or 64-bit, so build both
71    default_variants +universal
72    configure.universal_archs i386 x86_64
73}
Note: See TracBrowser for help on using the repository browser.