source: trunk/dports/net/tuntaposx/Portfile

Last change on this file was 90486, checked in by ryandesign@…, 6 years ago

tuntaposx: update to 20111101 (#33498); use an unversioned docdir

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