[33279] trunk/dports/net/avahi/Portfile

nox at macports.org nox at macports.org
Tue Jan 22 07:44:56 PST 2008


Revision: 33279
          http://trac.macosforge.org/projects/macports/changeset/33279
Author:   nox at macports.org
Date:     2008-01-22 07:44:51 -0800 (Tue, 22 Jan 2008)

Log Message:
-----------
avahi:
 * Updated to 0.6.22.
 * Added libdns_sd compatibility layer.
 * Removed darwin platform block as it's the only platform supported
   anyway.
 * Added test support.
 * Added mono variant.

Modified Paths:
--------------
    trunk/dports/net/avahi/Portfile

Modified: trunk/dports/net/avahi/Portfile
===================================================================
--- trunk/dports/net/avahi/Portfile	2008-01-22 12:44:22 UTC (rev 33278)
+++ trunk/dports/net/avahi/Portfile	2008-01-22 15:44:51 UTC (rev 33279)
@@ -3,8 +3,7 @@
 PortSystem      1.0
 
 name            avahi
-version         0.6.17
-revision        2
+version         0.6.22
 categories      net devel
 maintainers     nox
 platforms       darwin
@@ -22,51 +21,95 @@
     of Avahi.
 
 homepage        http://avahi.org/
-master_sites    http://avahi.org/download/
-distname        avahi-${version}
+master_sites    ${homepage}download/
 
-checksums       md5 29ebb2181958d5721ee5fc45f035a77c \
-                sha1 3f7d293b72ca1c5269fa4b1e68b453d8ec3ff8f9 \
-                rmd160 cac51c09730e1faf10bf0e11f091be3fd5f138d8
+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:py25-gtk \
+                port:gettext \
+                port:libiconv
 
-# enable python-dbus once dbus python bindings are correctly ported
-# all other disabled items should be placed in variants qt3/4 & mono
 configure.args  --disable-autoipd \
                 --disable-qt3 \
                 --disable-qt4 \
                 --disable-mono \
-                --disable-monodoc
-        
+                --disable-monodoc \
+                --with-libiconv-prefix=${prefix} \
+                --with-libintl-prefix=${prefix} \
+                --with-distro=darwin \
+                --enable-compat-libdns_sd
+
 configure.cppflags-append   -L${prefix}/lib
-configure.env   PYTHON=${prefix}/bin/python2.5
+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
 }
 
-platform darwin {
-    configure.args-append   --with-distro=darwin
+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
+
+    configure.args-delete   --disable-mono \
+                            --disable-monodoc
+
     post-patch {
-        reinplace "s|/System|${destroot}|g" ${worksrcpath}/initscript/darwin/Makefile.in
+        reinplace {s/\.so\.0/.0.dylib/} ${worksrcpath}/avahi-ui-sharp/avahi-ui-sharp.dll.config.in
     }
 
-    post-activate {
-        # remove cruft from versions < 0.6.17_2
-        if {[file exists /System/Library/LaunchDaemons/org.freedesktop.avahi-dnsconfd.plist]} {
-            delete /System/Library/LaunchDaemons/org.freedesktop.avahi-dnsconfd.plist
-            delete /System/Library/LaunchDaemons/org.freedesktop.avahi-daemon.plist
-        }
+    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
+}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080122/c5f1f246/attachment.html


More information about the macports-changes mailing list