source: trunk/dports/net/avahi/Portfile @ 36185

Last change on this file since 36185 was 36185, checked in by nox@…, 11 years ago

avahi:

  • Fixed mono variant (closes #14606).
  • Relinquished maintainership.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1# $Id: Portfile 36185 2008-04-21 14:22:38Z nox@macports.org $
2
3PortSystem      1.0
4
5name            avahi
6version         0.6.22
7categories      net devel
8maintainers     nomaintainer
9platforms       darwin
10description     A system which facilitates service discovery on a local network
11
12long_description \
13    Avahi is a system which facilitates service discovery on a local \
14    network. This means that you can plug your laptop or computer into \
15    a network and instantly be able to view other people who you can \
16    chat with, find printers to print to or find files being shared. \
17    This kind of technology is already found in Mac OS X (branded \
18    Rendezvous, Bonjour and sometimes Zeroconf) and is very convenient. \
19    Avahi is mainly based on Lennart Poettering's flexmdns mDNS \
20    implementation for Linux which has been discontinued in favour \
21    of Avahi.
22
23homepage        http://avahi.org/
24master_sites    ${homepage}download/
25
26checksums       md5 c84b1a8a23126e188426728710414dc8 \
27                sha1 2863bae55a991facc93138ca4660d5b55c846bd1 \
28                rmd160 fad35f473a9109c8648e43b0f6f547c32b18e32f
29
30patchfiles      patch-avahi-utils-Makefile.in-nls.diff
31
32post-patch {
33    # This preprocessor macro causes a lot of things to be undefined inside netinet/in.h system header.
34    reinplace "s/-D_XOPEN_SOURCE=500//" ${worksrcpath}/configure
35
36    reinplace "s|/System|${destroot}|g" ${worksrcpath}/initscript/darwin/Makefile.in
37}
38
39depends_run     port:pkgconfig \
40                port:intltool
41
42depends_lib     port:libdaemon \
43                port:glib2 \
44                port:gtk2 \
45                port:libglade2 \
46                port:python25 \
47                port:dbus \
48                port:dbus-glib \
49                port:dbus-python25 \
50                port:expat \
51                port:gdbm \
52                port:py25-gdbm \
53                port:py25-gtk \
54                port:gettext \
55                port:libiconv
56
57configure.args  --disable-autoipd \
58                --disable-qt3 \
59                --disable-qt4 \
60                --disable-mono \
61                --disable-monodoc \
62                --with-libiconv-prefix=${prefix} \
63                --with-libintl-prefix=${prefix} \
64                --with-distro=darwin \
65                --enable-compat-libdns_sd
66
67configure.cppflags-append   -L${prefix}/lib
68configure.python            ${prefix}/bin/python2.5
69
70test.run        yes
71test.target     check
72
73pre-test {
74    if {![variant_isset test]} {
75        error "test variant must be enabled to run the tests."
76    }
77}
78
79pre-activate {
80    addgroup avahi
81    adduser avahi gid=[existsgroup avahi] realname=Avahi Service
82}
83
84post-activate {
85    if {[file exists /System/Library/LaunchDaemons/org.freedesktop.avahi-dnsconfd.plist]} {
86        ui_debug "Removing cruft from versions prior to 0.6.17_2..."
87        delete \
88            /System/Library/LaunchDaemons/org.freedesktop.avahi-dnsconfd.plist \
89            /System/Library/LaunchDaemons/org.freedesktop.avahi-daemon.plist
90    }
91}
92
93variant mono description {Enable Mono support} {
94    depends_build-append    port:monodoc
95
96    depends_lib-append      port:mono \
97                            port:gtk-sharp2
98
99    configure.args-delete   --disable-mono \
100                            --disable-monodoc
101
102    post-patch {
103        reinplace {s/\.so\.0/.0.dylib/} ${worksrcpath}/avahi-ui-sharp/avahi-ui-sharp.dll.config.in
104    }
105
106    post-build {
107        # TODO This shouldn't be needed, we need to fix Mono dllmap library path.
108        reinplace -E "s|(target=\")|\\1${prefix}/lib/|" \
109            ${worksrcpath}/avahi-sharp/avahi-sharp.dll.config \
110            ${worksrcpath}/avahi-ui-sharp/avahi-ui-sharp.dll.config
111    }
112}
113
114variant test description {Build tests} {
115    configure.args-append   --enable-tests
116}
Note: See TracBrowser for help on using the repository browser.