Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Sep 2009 16:08:32 +0800
From:      Sagara Wijetunga <sagara@tomahawk.com.sg>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Roland Smith <rsmith@xs4all.nl>, Dimitry Andric <dimitry@andric.com>, freebsd-stable@freebsd.org
Subject:   Re: Avahi compilation help needed
Message-ID:  <4AAA0580.10400@tomahawk.com.sg>
In-Reply-To: <200909101132.43781.jhb@freebsd.org>
References:  <4AA8EBBD.5020709@tomahawk.com.sg> <4AA8EC4D.3080800@andric.com> <4AA90F9F.6080702@tomahawk.com.sg> <200909101132.43781.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:
> The avahi ports can still be useful to look at as they contain patches that 
> you will probably need.  For example, net/avahi-app has a patch against the 
> configure script in files/patch-configure.  In total it seems that 
> net/avahi-app has 21 different patches to the avahi sources (you may not need 
> all of them however).  I would start by looking at those.
>   

Here is the procedure we tried:

    Create system users and groups to handle Avahi daemons:
    - Create "avahid" for running avahi-daemon
    - Create "avahi-autoipd" for running the avahi-autoipd daemon

    Get FreeBSD patches:
    mkdir files
    cd files
    cp -v /sources/avahi/* .
    cd ..

    tar xzf avahi-0.6.25.tar.gz
    cd avahi-0.6.25

    Apply FreeBSD patches:
    patch -Np0 -i ../files/patch-Makefile.in
    patch -Np0 -i ../files/patch-avahi-autoipd_main.c
    patch -Np0 -i ../files/patch-avahi-client.pc.in
    patch -Np0 -i ../files/patch-avahi-compat-howl.pc.in
    patch -Np0 -i ../files/patch-avahi-compat-libdns_sd.pc.in
    patch -Np0 -i ../files/patch-avahi-compat-libdns_sd_Makefile.in
    patch -Np0 -i ../files/patch-avahi-core.pc.in
    patch -Np0 -i ../files/patch-avahi-daemon_Makefile.in
    patch -Np0 -i ../files/patch-avahi-daemon_main.c
    patch -Np0 -i ../files/patch-avahi-discover-standalone_Makefile.in
    patch -Np0 -i ../files/patch-avahi-glib.pc.in
    patch -Np0 -i ../files/patch-avahi-qt4.pc.in
    patch -Np0 -i ../files/patch-avahi-qt_Makefile.in
    patch -Np0 -i ../files/patch-avahi-ui_Makefile.in
    patch -Np0 -i ../files/patch-avahi-utils_Makefile.in
    patch -Np0 -i ../files/patch-configure
    patch -Np0 -i ../files/patch-dnsconfd_Makefile.in
    patch -Np0 -i ../files/patch-initscript_freebsd_Makefile.in

    Check after patching for any rejection:
    find . -name "*.rej" -exec echo {} \;
    No rejections


    sed -i '' -e 's|-ldl||g ; s|netdev|network|g' \
                configure \
                avahi-client/Makefile.in \
                avahi-daemon/Makefile.in

    find . -name Makefile.in | /usr/bin/xargs \
                sed -i '' -e 's|(LIBINTL)|(INTLLIBS)|g ; 
s|(LIBICONV)|(LTLIBICONV)|g'

###        sed -i '' -e 's|%%RC_SUBR%%|${RC_SUBR}| ; \
                s|%%GNOME_SUBR%%|${GNOME_SUBR}|' \
                initscript/freebsd/avahi-dnsconfd.sh.in \
                initscript/freebsd/avahi-daemon.sh.in

    sed -i '' -e 's|dbus_connection_disconnect|dbus_connection_close|g' \
                avahi-client/client.c \
                avahi-daemon/dbus-protocol.c

    sed -i '' -e 's|^_||g' \
                avahi-ui/*.desktop.in.in

    sed -i '' -e 's|-lavahi-common||g' \
    avahi-qt/Makefile.in avahi-qt/Makefile


    CPPFLAGS="-DHAVE_KQUEUE" PTHREAD_CFLAGS="" PTHREAD_LIBS="-pthread" \
    ./configure --prefix=/usr --sysconfdir=/etc \
            --infodir=/usr/share/info --mandir=/usr/share/man 
--localstatedir=/var \
        --with-distro=freebsd --with-dbus-sys=/etc/dbus-1/system.d \
        
--with-dbus-system-socket=unix:path=/var/run/dbus/system_bus_socket \
        --with-avahi-user=avahid --with-avahi-group=avahid \
        --with-avahi-priv-access-group=network --enable-compat-libdns_sd \
        --disable-qt3 --disable-mono --disable-monodoc

    gmake >& avahi-make.log


We appreciate if someone could try and let us know.

Kind regards
Sagara




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AAA0580.10400>