# -*- 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 # $Id$ PortSystem 1.0 PortGroup active_variants 1.1 PortGroup gobject_introspection 1.0 name avahi version 0.6.31 revision 13 categories net devel maintainers nomaintainer license LGPL-2.1+ platforms darwin description Avahi is an Implementation of the DNS Service Discovery and Multicast DNS \ specifications for Zeroconf Networking. long_description ${description} It uses D-Bus for communication between user applications and a \ system daemon. The daemon is used to coordinate application efforts in caching \ replies, necessary to minimize the traffic imposed on networks. homepage http://avahi.org/ master_sites ${homepage}download/ checksums rmd160 122f553ee2d43cdd0185540a63a8e1f587bdb08e \ sha256 8372719b24e2dd75de6f59bb1315e600db4fd092805bd1201ed0cb651a2dab48 patch.pre_args -p1 patchfiles patch-avahi-daemon-Makefile.in.diff \ patch-avahi-dnsconfd-Makefile.in.diff \ patch-avahi-utils-Makefile.in.diff \ patch-configure.diff \ patch-initscript-darwin-org.freedesktop.avahi-daemon.plist.in.diff \ patch-initscript-darwin-org.freedesktop.avahi-dnsconfd.plist.in.diff post-patch { # This preprocessor macro causes a lot of things to be undefined inside netinet/in.h system header. reinplace "s/-D_XOPEN_SOURCE=500//" ${worksrcpath}/configure reinplace "s|/System|${destroot}|g" ${worksrcpath}/initscript/darwin/Makefile.in # Let avahi build with newer gtk reinplace "s|-DG_DISABLE_DEPRECATED=1||" \ ${worksrcpath}/avahi-ui/Makefile.am \ ${worksrcpath}/avahi-ui/Makefile.in reinplace "s|-DGDK_DISABLE_DEPRECATED=1||" \ ${worksrcpath}/avahi-ui/Makefile.am \ ${worksrcpath}/avahi-ui/Makefile.in reinplace "s|-DGTK_DISABLE_DEPRECATED=1||" \ ${worksrcpath}/avahi-ui/Makefile.am \ ${worksrcpath}/avahi-ui/Makefile.in } depends_build port:pkgconfig \ port:intltool depends_lib port:expat \ port:gdbm \ port:gettext \ port:libdaemon gobject_introspection yes set avahiuser avahi configure.args --disable-autoipd \ --disable-qt3 \ --disable-qt4 \ --disable-mono \ --disable-monodoc \ --with-distro=darwin \ --enable-compat-libdns_sd \ --disable-gtk3 \ --disable-xmltoman \ --disable-gtk \ --disable-pygtk \ --disable-tests \ --with-avahi-priv-access-group=${avahiuser} # __APPLE_USE_RFC_2292 should be removed once avhi is updated to support RFC 3542 configure.cppflags-append -L${prefix}/lib -D__APPLE_USE_RFC_2292 post-destroot { xinstall -d -m 0755 ${destroot}${prefix}/etc/LaunchDaemons eval move [glob ${destroot}/Library/LaunchDaemons/*] \ ${destroot}${prefix}/etc/LaunchDaemons/ # The startupitem.install keyword does not exist in MacPorts < 2.1. if {![info exists startupitem.install]} { set startupitem.install yes } if { ${startupitem.install} != "no" } { xinstall -d -m 0755 ${destroot}/LaunchDaemons ln -s ${prefix}/etc/LaunchDaemons/org.freedesktop.avahi-daemon.plist \ ${destroot}/Library/LaunchDaemons/ ln -s ${prefix}/etc/LaunchDaemons/org.freedesktop.avahi-dnsconfd.plist \ ${destroot}/Library/LaunchDaemons/ } } add_users ${avahiuser} group=${avahiuser} realname=Avahi\ Service post-activate { if {[file exists /System/Library/LaunchDaemons/org.freedesktop.avahi-dnsconfd.plist]} { ui_debug "Removing cruft from versions prior to 0.6.17_2..." delete \ /System/Library/LaunchDaemons/org.freedesktop.avahi-dnsconfd.plist \ /System/Library/LaunchDaemons/org.freedesktop.avahi-daemon.plist } } variant mono description {Enable Mono support} { depends_lib-append port:mono \ port:gtk-sharp2 configure.args-delete --disable-mono post-patch { reinplace {s/\.so\.0/.0.dylib/} ${worksrcpath}/avahi-ui-sharp/avahi-ui-sharp.dll.config.in } post-build { # TODO This shouldn't be needed, we need to fix Mono dllmap library path. reinplace -E "s|(target=\")|\\1${prefix}/lib/|" \ ${worksrcpath}/avahi-sharp/avahi-sharp.dll.config \ ${worksrcpath}/avahi-ui-sharp/avahi-ui-sharp.dll.config } } variant test description {Build tests} { configure.args-delete --disable-tests configure.args-append --enable-tests test.run yes test.target check } variant gtk description {Build with GTK2} { depends_lib-append port:libglade2 configure.args-delete --disable-gtk } variant gtk3 description {Build with GTK3} { depends_lib-append port:gtk3 configure.args-delete --disable-gtk3 } default_variants +gtk +gtk3 variant qt4 description {Build with Qt4} { PortGroup qt4 1.0 configure.args-delete --disable-qt4 } # just use python27 with no python variants configure.python ${prefix}/bin/python2.7 depends_lib-append port:dbus-python27 \ port:py27-gdbm if [variant_isset gtk] { depends_lib-append port:py27-pygtk configure.args-delete --disable-pygtk } variant x11 { require_active_variants gtk2 x11 quartz } variant quartz { require_active_variants gtk2 quartz x11 } catch { if {[active_variants gtk2 quartz x11]} { default_variants-append +quartz } } if {![variant_isset quartz]} { default_variants-append +x11 } livecheck.type regex livecheck.url [lindex ${master_sites} 0] livecheck.regex ${name}-(\[0-9.\]+)\\.tar