Ticket #36672: netatalk.diff

File netatalk.diff, 1.6 KB (added by ryandesign (Ryan Carsten Schmidt), 12 years ago)
  • Portfile

     
    44
    55name                    netatalk
    66version                 2.0.5
    7 revision                3
     7revision                4
    88categories              net
    99platforms               darwin
    1010maintainers             rsrc.de:ralph
     
    3333                                path:bin/perl:perl5 \
    3434                                port:libiconv
    3535
    36 variant noat description {Disable Appletalk support} {
    37     patchfiles-append patch-configure
    38     configure.args-append   --disable-ddp
    39 }
    40 
    41 platform darwin 10 {
    42     pre-patch {
    43         # Only used on Mac OS X 10.6.
    44         puts "AppleTalk has been removed from Mac OS X 10.6+."
    45         puts "Building without AppleTalk support."
    46         patchfiles-append patch-configure
    47         configure.args-append --disable-ddp
    48     }
    49 }
    50 
    5136post-patch      {
    5237        reinplace "s|__PREFIX__|${prefix}|g" \
    5338                ${worksrcpath}/include/atalk/paths.h
     
    7560        system "touch ${destroot}${prefix}/var/run/netatalk/afpd"
    7661        destroot.keepdirs ${destroot}${prefix}/var/spool/netatalk
    7762}
     63
     64variant appletalk conflicts noat description {Enable AppleTalk support} {
     65    pre-configure {
     66        if {${os.platform} == "darwin" && ${os.major} >= 10} {
     67            return -code error "AppleTalk support cannot be used on OS X 10.6 or later"
     68        }
     69    }
     70}
     71
     72if {![variant_isset appletalk]} {
     73    patchfiles-append       patch-configure
     74    configure.args-append   --disable-ddp
     75}
     76
     77variant noat conflicts appletalk description {Legacy compatibility variant} {}
     78
     79if {${os.platform} == "darwin" && ${os.major} >= 10 || [variant_isset noat]} {
     80    default_variants -appletalk
     81} else {
     82    default_variants +appletalk
     83}