# $Id: Portfile 36185 2008-04-21 14:22:38Z nox@macports.org $ PortSystem 1.0 name avahi version 0.6.22 categories net devel maintainers nomaintainer platforms darwin description A system which facilitates service discovery on a local network long_description \ Avahi is a system which facilitates service discovery on a local \ network. This means that you can plug your laptop or computer into \ a network and instantly be able to view other people who you can \ chat with, find printers to print to or find files being shared. \ This kind of technology is already found in Mac OS X (branded \ Rendezvous, Bonjour and sometimes Zeroconf) and is very convenient. \ Avahi is mainly based on Lennart Poettering's flexmdns mDNS \ implementation for Linux which has been discontinued in favour \ of Avahi. homepage http://avahi.org/ master_sites ${homepage}download/ checksums md5 c84b1a8a23126e188426728710414dc8 \ sha1 2863bae55a991facc93138ca4660d5b55c846bd1 \ rmd160 fad35f473a9109c8648e43b0f6f547c32b18e32f patchfiles patch-avahi-utils-Makefile.in-nls.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 } depends_run port:pkgconfig \ port:intltool depends_lib port:libdaemon \ port:glib2 \ port:gtk2 \ port:libglade2 \ port:python25 \ port:dbus \ port:dbus-glib \ port:dbus-python25 \ port:expat \ port:gdbm \ port:py25-gdbm \ port:py25-gtk \ port:gettext \ port:libiconv configure.args --disable-autoipd \ --disable-qt3 \ --disable-qt4 \ --disable-mono \ --disable-monodoc \ --with-libiconv-prefix=${prefix} \ --with-libintl-prefix=${prefix} \ --with-distro=darwin \ --enable-compat-libdns_sd configure.cppflags-append -L${prefix}/lib configure.python ${prefix}/bin/python2.5 test.run yes test.target check pre-test { if {![variant_isset test]} { error "test variant must be enabled to run the tests." } } pre-activate { addgroup avahi adduser avahi gid=[existsgroup avahi] 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_build-append port:monodoc depends_lib-append port:mono \ port:gtk-sharp2 configure.args-delete --disable-mono \ --disable-monodoc 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-append --enable-tests }