2013-07-14 21:17:21 +00:00
|
|
|
# Created by: Joe Marcus Clarke <marcus@FreeBSD.org>
|
2007-10-24 23:37:25 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= avahi
|
2018-08-13 01:49:59 +00:00
|
|
|
PORTVERSION= 0.7
|
2018-11-11 15:38:50 +00:00
|
|
|
PORTREVISION?= 2
|
2007-10-24 23:37:25 +00:00
|
|
|
CATEGORIES?= net dns
|
|
|
|
MASTER_SITES= http://www.avahi.org/download/
|
|
|
|
PKGNAMESUFFIX?= -app
|
|
|
|
|
|
|
|
MAINTAINER?= gnome@FreeBSD.org
|
|
|
|
COMMENT?= Service discovery on a local network
|
|
|
|
|
2017-10-21 04:48:49 +00:00
|
|
|
LICENSE= LGPL21+
|
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
|
2013-07-14 21:17:21 +00:00
|
|
|
AVAHI_SLAVE?= no
|
|
|
|
|
|
|
|
.if ${AVAHI_SLAVE} != header
|
2016-04-01 14:16:16 +00:00
|
|
|
LIB_DEPENDS?= libexpat.so:textproc/expat2 \
|
|
|
|
libdaemon.so:devel/libdaemon \
|
|
|
|
libdbus-glib-1.so:devel/dbus-glib \
|
2018-08-13 01:49:59 +00:00
|
|
|
libdbus-1.so:devel/dbus \
|
2016-04-01 14:16:16 +00:00
|
|
|
libgdbm.so:databases/gdbm
|
2007-10-24 23:37:25 +00:00
|
|
|
|
2012-05-20 16:47:37 +00:00
|
|
|
USERS?= ${PORTNAME}
|
|
|
|
GROUPS?= ${USERS}
|
|
|
|
|
2018-12-22 21:22:56 +00:00
|
|
|
USES+= alias gettext gmake gnome libtool pathfix pkgconfig
|
2014-05-06 20:22:33 +00:00
|
|
|
USE_GNOME+= glib20 intltool introspection
|
2007-10-24 23:37:25 +00:00
|
|
|
USE_GNOME_SUBR= yes
|
|
|
|
USE_LDCONFIG= yes
|
2014-05-06 20:22:33 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2007-10-24 23:37:25 +00:00
|
|
|
CONFIGURE_ARGS?=--with-distro=freebsd \
|
2008-07-03 21:53:55 +00:00
|
|
|
--with-dbus-system-socket=unix:path=/var/run/dbus/system_bus_socket \
|
2007-10-24 23:37:25 +00:00
|
|
|
--disable-monodoc \
|
|
|
|
--disable-doxygen-doc \
|
|
|
|
--disable-doxygen-dot \
|
2013-07-14 21:17:21 +00:00
|
|
|
--disable-qt3 \
|
2007-10-24 23:37:25 +00:00
|
|
|
--localstatedir=/var \
|
2010-11-20 15:37:08 +00:00
|
|
|
--enable-compat-howl
|
2011-09-23 22:26:39 +00:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include -DHAVE_KQUEUE
|
2018-08-13 01:49:59 +00:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib -lintl
|
2014-05-06 20:22:33 +00:00
|
|
|
INSTALL_TARGET= install-strip
|
2007-10-24 23:37:25 +00:00
|
|
|
|
2013-07-14 21:17:21 +00:00
|
|
|
.if ${AVAHI_SLAVE} == no
|
2007-10-24 23:37:25 +00:00
|
|
|
CONFLICTS= howl-[0-9]*
|
|
|
|
|
2009-07-09 03:08:06 +00:00
|
|
|
DAEMON_CONFIG_FILES= hosts avahi-daemon.conf
|
2007-10-24 23:37:25 +00:00
|
|
|
.endif
|
2013-07-14 21:17:21 +00:00
|
|
|
.endif # !avahi-header
|
2007-10-24 23:37:25 +00:00
|
|
|
|
2013-07-14 21:17:21 +00:00
|
|
|
.include <bsd.port.options.mk>
|
2007-10-24 23:37:25 +00:00
|
|
|
|
2013-07-14 21:17:21 +00:00
|
|
|
.if ${AVAHI_SLAVE} != header
|
|
|
|
.if ${AVAHI_SLAVE} == autoipd
|
2007-10-24 23:37:25 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-autoipd
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-autoipd
|
|
|
|
.endif
|
2013-07-14 21:17:21 +00:00
|
|
|
.if ${AVAHI_SLAVE} == gtk
|
2007-10-24 23:37:25 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-gtk
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-gtk
|
|
|
|
.endif
|
2013-07-14 21:17:21 +00:00
|
|
|
.if ${AVAHI_SLAVE} == gtk3
|
2010-11-20 15:37:08 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-gtk3
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-gtk3
|
|
|
|
.endif
|
2013-07-14 21:17:21 +00:00
|
|
|
.if ${AVAHI_SLAVE} == libdns
|
2007-10-24 23:37:25 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-compat-libdns_sd
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-compat-libdns_sd
|
|
|
|
.endif
|
2013-07-14 21:17:21 +00:00
|
|
|
.if ${AVAHI_SLAVE} == python
|
2007-10-24 23:37:25 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-python
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-python
|
|
|
|
.endif
|
2013-07-14 21:17:21 +00:00
|
|
|
.if ${AVAHI_SLAVE} == qt4
|
2007-10-26 19:57:08 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-qt4 \
|
|
|
|
--disable-expat \
|
|
|
|
--disable-gdbm
|
2007-10-24 23:37:25 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-qt4
|
|
|
|
.endif
|
2018-12-22 21:22:56 +00:00
|
|
|
.if ${AVAHI_SLAVE} == qt5
|
|
|
|
CONFIGURE_ARGS+=--enable-qt5 \
|
|
|
|
--disable-expat \
|
|
|
|
--disable-gdbm
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-qt5
|
|
|
|
.endif
|
2013-07-14 21:17:21 +00:00
|
|
|
.if ${AVAHI_SLAVE} == sharp
|
2007-10-24 23:37:25 +00:00
|
|
|
CONFIGURE_ARGS+=--enable-mono
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-mono
|
|
|
|
.endif
|
2014-01-31 17:13:46 +00:00
|
|
|
CONFIGURE_ARGS+=--disable-stack-protector
|
2007-10-24 23:37:25 +00:00
|
|
|
|
|
|
|
post-patch: avahi-post-patch
|
|
|
|
|
|
|
|
avahi-post-patch:
|
2018-08-13 01:49:59 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|avahi_runtime_dir="/run"|avahi_runtime_dir="/var/run"|' \
|
|
|
|
${WRKSRC}/configure
|
2007-10-24 23:37:25 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|' \
|
|
|
|
${WRKSRC}/man/*.*
|
2016-10-21 12:51:40 +00:00
|
|
|
@${RM} ${WRKSRC}/man/*.bak
|
2007-10-24 23:37:25 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|-ldl||g ; s|netdev|network|g' \
|
|
|
|
${WRKSRC}/configure \
|
|
|
|
${WRKSRC}/avahi-client/Makefile.in \
|
|
|
|
${WRKSRC}/avahi-daemon/Makefile.in
|
2012-01-19 17:13:12 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|have_inotify=yes|have_inotify=no|' \
|
|
|
|
${WRKSRC}/configure
|
2009-03-08 16:58:35 +00:00
|
|
|
@${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} \
|
2016-04-01 13:18:17 +00:00
|
|
|
${REINPLACE_CMD} -e 's|(LIBINTL)|(INTLLIBS)|g ; \
|
2009-03-08 16:58:35 +00:00
|
|
|
s|(LIBICONV)|(LTLIBICONV)|g'
|
2010-03-28 18:23:20 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|%%RC_SUBR%%|/etc/rc.subr| ; \
|
2016-04-01 13:18:17 +00:00
|
|
|
s|%%GNOME_SUBR%%|${GNOME_SUBR}|' \
|
2007-10-24 23:37:25 +00:00
|
|
|
${WRKSRC}/initscript/freebsd/avahi-dnsconfd.sh.in \
|
|
|
|
${WRKSRC}/initscript/freebsd/avahi-daemon.sh.in
|
2008-03-24 03:52:36 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|dbus_connection_disconnect|dbus_connection_close|g' \
|
2016-04-01 13:18:17 +00:00
|
|
|
${WRKSRC}/avahi-client/client.c \
|
2008-03-24 03:52:36 +00:00
|
|
|
${WRKSRC}/avahi-daemon/dbus-protocol.c
|
2008-07-03 21:53:55 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|^_||g' \
|
2008-12-16 04:02:03 +00:00
|
|
|
${WRKSRC}/avahi-ui/*.desktop.in.in
|
2013-07-14 21:17:21 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|am: install-avahiincludeHEADERS|am:|g' \
|
|
|
|
${WRKSRC}/avahi-ui/Makefile.in
|
2007-10-24 23:37:25 +00:00
|
|
|
|
|
|
|
post-build: avahi-post-build
|
|
|
|
|
|
|
|
avahi-post-build:
|
|
|
|
.for f in ${AVAHI_PKGCONFIG}
|
2014-05-06 20:22:33 +00:00
|
|
|
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
|
2007-10-24 23:37:25 +00:00
|
|
|
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${f}
|
|
|
|
.endfor
|
|
|
|
|
2007-12-24 18:38:00 +00:00
|
|
|
pre-su-install: avahi-pre-su-install
|
2007-12-20 18:23:33 +00:00
|
|
|
|
2007-12-24 18:38:00 +00:00
|
|
|
avahi-pre-su-install:
|
2007-12-20 18:23:33 +00:00
|
|
|
.if ${AVAHI_SLAVE}=="no"
|
2013-12-14 16:25:21 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/avahi
|
|
|
|
@${TOUCH} -f ${STAGEDIR}${PREFIX}/lib/avahi/.keep
|
2007-12-20 18:23:33 +00:00
|
|
|
.endif
|
|
|
|
|
2007-10-24 23:37:25 +00:00
|
|
|
post-install: avahi-post-install
|
|
|
|
|
|
|
|
avahi-post-install:
|
2013-12-14 16:25:21 +00:00
|
|
|
.if defined(MANPAGES)
|
|
|
|
.for f in ${MANPAGES}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/man/${f} ${STAGEDIR}${PREFIX}/man/man${f:E}/${f}
|
2007-10-24 23:37:25 +00:00
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
.for f in ${AVAHI_PKGCONFIG}
|
2013-12-14 16:25:21 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/libdata/pkgconfig
|
2009-07-09 03:08:06 +00:00
|
|
|
.endfor
|
|
|
|
.for f in ${DAEMON_CONFIG_FILES}
|
2015-10-09 21:09:08 +00:00
|
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/etc/avahi
|
2009-07-09 03:49:40 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/avahi-daemon/${f} \
|
2015-10-09 21:09:08 +00:00
|
|
|
${STAGEDIR}${PREFIX}/etc/avahi/${f}.sample
|
2007-10-24 23:37:25 +00:00
|
|
|
.endfor
|
2013-12-14 16:25:21 +00:00
|
|
|
.if ${AVAHI_SLAVE}==no
|
2018-08-13 01:49:59 +00:00
|
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/share/dbus-1/system-services
|
2010-07-31 08:16:15 +00:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/org.freedesktop.Avahi.service \
|
2013-12-14 16:25:21 +00:00
|
|
|
${STAGEDIR}${PREFIX}/share/dbus-1/system-services
|
2011-03-14 16:05:37 +00:00
|
|
|
.endif
|
2014-05-06 20:22:33 +00:00
|
|
|
.endif # ! avahi-header
|
2007-10-24 23:37:25 +00:00
|
|
|
|
2013-07-14 21:17:21 +00:00
|
|
|
.include <bsd.port.mk>
|