[Midnightbsd-cvs] CVS Commit: net/avahi: Update avahi

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue Aug 14 16:51:55 EDT 2007


Log Message:
-----------
Update avahi

Modified Files:
--------------
    mports/net/avahi:
        Makefile (r1.2 -> r1.3)
        distinfo (r1.1 -> r1.2)
        pkg-plist (r1.1 -> r1.2)
    mports/net/avahi/files:
        patch-Makefile.in (r1.1 -> r1.2)
        patch-configure (r1.1 -> r1.2)

Added Files:
-----------
    mports/net/avahi/files:
        patch-avahi-core_fdutil.c (r1.1)
        patch-avahi-daemon_main.c (r1.1)
        patch-avahi-qt3.pc.in (r1.1)
        patch-avahi-qt_Makefile.in (r1.1)
        patch-avahi-ui_avahi-ui.c (r1.1)
        patch-man_Makefile.in (r1.1)

Removed Files:
-------------
    mports/net/avahi/files:
        patch-avahi-core_dns.c

-------------- next part --------------
Index: pkg-plist
===================================================================
RCS file: /home/cvs/mports/net/avahi/pkg-plist,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lnet/avahi/pkg-plist -Lnet/avahi/pkg-plist -u -r1.1 -r1.2
--- net/avahi/pkg-plist
+++ net/avahi/pkg-plist
@@ -8,6 +8,8 @@
 bin/avahi-resolve-address
 bin/avahi-resolve-host-name
 bin/avahi-set-host-name
+%%GTK%%bin/bssh
+%%GTK%%bin/bvnc
 etc/avahi/avahi-daemon.conf
 etc/avahi/avahi-dnsconfd.action
 etc/avahi/hosts
@@ -61,6 +63,7 @@
 include/avahi-core/rr.h
 include/avahi-glib/glib-malloc.h
 include/avahi-glib/glib-watch.h
+%%GTK%%include/avahi-ui/avahi-ui.h
 lib/libavahi-client.a
 lib/libavahi-client.la
 lib/libavahi-client.so
@@ -77,6 +80,10 @@
 lib/libavahi-glib.la
 lib/libavahi-glib.so
 lib/libavahi-glib.so.1
+%%GTK%%lib/libavahi-ui.a
+%%GTK%%lib/libavahi-ui.la
+%%GTK%%lib/libavahi-ui.so
+%%GTK%%lib/libavahi-ui.so.0
 %%LIBDNS%%lib/libdns_sd.a
 %%LIBDNS%%lib/libdns_sd.la
 %%LIBDNS%%lib/libdns_sd.so
@@ -90,8 +97,11 @@
 %%LIBDNS%%libdata/pkgconfig/avahi-compat-libdns_sd.pc
 libdata/pkgconfig/avahi-core.pc
 libdata/pkgconfig/avahi-glib.pc
+%%GTK%%libdata/pkgconfig/avahi-ui.pc
 sbin/avahi-daemon
 sbin/avahi-dnsconfd
+%%GTK%%share/applications/bssh.desktop
+%%GTK%%share/applications/bvnc.desktop
 %%DATADIR%%/avahi-service.dtd
 %%GTK%%%%DATADIR%%/interfaces/avahi-discover.glade
 %%DATADIR%%/introspection/AddressResolver.introspect
@@ -107,6 +117,8 @@
 @dirrm %%DATADIR%%/introspection
 %%GTK%%@dirrm %%DATADIR%%/interfaces
 @dirrm %%DATADIR%%
+ at dirrmtry share/applications
+%%GTK%%@dirrm include/avahi-ui
 @dirrm include/avahi-glib
 @dirrm include/avahi-core
 %%LIBDNS%%@dirrm include/avahi-compat-libdns_sd
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/net/avahi/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lnet/avahi/Makefile -Lnet/avahi/Makefile -u -r1.2 -r1.3
--- net/avahi/Makefile
+++ net/avahi/Makefile
@@ -7,7 +7,7 @@
 #    $MCom: ports/net/avahi/Makefile,v 1.19 2006/10/12 16:44:41 marcus Exp $
 
 PORTNAME=	avahi
-PORTVERSION=	0.6.17
+PORTVERSION=	0.6.20
 PORTREVISION?=	0
 CATEGORIES=	net dns
 MASTER_SITES=	http://www.avahi.org/download/
@@ -16,7 +16,7 @@
 COMMENT?=	Service discovery on a local network
 
 LIB_DEPENDS?=	expat.6:${PORTSDIR}/textproc/expat2 \
-		daemon.2:${PORTSDIR}/devel/libdaemon \
+		daemon.0:${PORTSDIR}/devel/libdaemon \
 		dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \
 		gdbm.3:${PORTSDIR}/databases/gdbm
 
@@ -40,7 +40,7 @@
 		--enable-compat-howl \
 		--disable-autoipd \
 		--mandir=${PREFIX}/man
-CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
+CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include -DHAVE_KQUEUE" \
 		LDFLAGS="-L${LOCALBASE}/lib" \
 		PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
 		PTHREAD_LIBS="${PTHREAD_LIBS}"
@@ -54,7 +54,7 @@
 MAN5=	avahi-daemon.conf.5 avahi.service.5 avahi.hosts.5
 MAN8=	avahi-daemon.8 avahi-dnsconfd.8 avahi-dnsconfd.action.8
 
-OPTIONS=	GTK2 "Build a GTK+ 2 browser utility" off \
+OPTIONS=	GTK2 "Build a GTK+ 2 browser utility and other tools" off \
 		LIBDNS "Enable mDNSResponder compatibility" off
 .endif
 
Index: distinfo
===================================================================
RCS file: /home/cvs/mports/net/avahi/distinfo,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lnet/avahi/distinfo -Lnet/avahi/distinfo -u -r1.1 -r1.2
--- net/avahi/distinfo
+++ net/avahi/distinfo
@@ -1,3 +1,3 @@
-MD5 (avahi-0.6.17.tar.gz) = 29ebb2181958d5721ee5fc45f035a77c
-SHA256 (avahi-0.6.17.tar.gz) = 2cb6a15a9fff56c0d24f3a95b7f67c52436a88716e640c7f7afd48c9a5cbd740
-SIZE (avahi-0.6.17.tar.gz) = 927202
+MD5 (avahi-0.6.20.tar.gz) = 6acdff79afa2631f765f3bbbc3e25a74
+SHA256 (avahi-0.6.20.tar.gz) = 89ae5fd08018679b80cee201e1c1350d86db73bdcf6718aabb4bd3ea86f93ec9
+SIZE (avahi-0.6.20.tar.gz) = 974209
--- /dev/null
+++ net/avahi/files/patch-avahi-qt3.pc.in
@@ -0,0 +1,10 @@
+--- avahi-qt3.pc.in.orig	Thu Apr 12 00:18:53 2007
++++ avahi-qt3.pc.in	Thu Apr 12 00:19:20 2007
+@@ -7,5 +7,5 @@ Name: avahi-qt3
+ Description: Avahi Multicast DNS Responder (QT3 Support)
+ Version: @PACKAGE_VERSION@
+ Requires.private: qt-mt >= 3.0.0
+-Libs: -L${libdir} -lavahi-qt3
+-Cflags: -D_REENTRANT -I${includedir}
++Libs: -L${libdir} -lavahi-qt3 @PTHREAD_LIBS@
++Cflags: -D_REENTRANT @PTHREAD_CFLAGS@ -I${includedir}
--- /dev/null
+++ net/avahi/files/patch-avahi-daemon_main.c
@@ -0,0 +1,161 @@
+--- avahi-daemon/main.c.orig	Wed May  9 09:09:19 2007
++++ avahi-daemon/main.c	Sat Jun  9 13:56:02 2007
+@@ -50,6 +50,12 @@
+ #endif
+ #endif
+ 
++#ifdef HAVE_KQUEUE
++#include <sys/types.h>
++#include <sys/event.h>
++#include <unistd.h>
++#endif
++
+ #include <libdaemon/dfork.h>
+ #include <libdaemon/dsignal.h>
+ #include <libdaemon/dlog.h>
+@@ -691,6 +697,53 @@ static void add_inotify_watches(void) {
+ 
+ #endif
+ 
++#ifdef HAVE_KQUEUE
++
++#define NUM_WATCHES 2
++
++static int kq = -1;
++static int kfds[NUM_WATCHES];
++static int num_kfds = 0;
++
++static void add_kqueue_watch(const char *dir);
++
++static void add_kqueue_watches(void) {
++	int c = 0;
++
++#ifdef ENABLE_CHROOT
++	c = config.use_chroot;
++#endif
++
++	add_kqueue_watch(c ? "/" : AVAHI_CONFIG_DIR);
++	add_kqueue_watch(c ? "/services" : AVAHI_SERVICE_DIR);
++}
++
++static void add_kqueue_watch(const char *dir) {
++	int fd;
++	struct kevent ev;
++
++	if (kq < 0)
++		return;
++
++	if (num_kfds >= NUM_WATCHES)
++		return;
++
++	fd = open(dir, O_RDONLY);
++	if (fd < 0)
++		return;
++	EV_SET(&ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR,
++			NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_RENAME,
++			0, 0);
++	if (kevent(kq, &ev, 1, NULL, 0, NULL) == -1) {
++		close(fd);
++		return;
++	}
++
++	kfds[num_kfds++] = fd;
++}
++
++#endif
++
+ static void reload_config(void) {
+ 
+ #ifdef HAVE_INOTIFY
+@@ -698,6 +751,10 @@ static void reload_config(void) {
+     add_inotify_watches();
+ #endif
+ 
++#ifdef HAVE_KQUEUE
++    add_kqueue_watches();
++#endif
++
+ #ifdef ENABLE_CHROOT
+     static_service_load(config.use_chroot);
+     static_hosts_load(config.use_chroot);
+@@ -746,6 +803,31 @@ static void inotify_callback(AvahiWatch 
+ 
+ #endif
+ 
++#ifdef HAVE_KQUEUE
++
++static void kqueue_callback(AvahiWatch *watch, int fd, AVAHI_GCC_UNUSED AvahiWatchEvent event, AVAHI_GCC_UNUSED void *userdata) {
++	struct kevent ev;
++	struct timespec nullts = { 0, 0 };
++	int res;
++
++	assert(fd == kq);
++	assert(watch);
++
++	res = kevent(kq, NULL, 0, &ev, 1, &nullts);
++
++	if (res > 0) {
++		/* Sleep for a half-second to avoid potential races
++		 * during install/uninstall. */
++		usleep(500000);
++		avahi_log_info("Files changed, reloading.");
++		reload_config();
++	} else {
++		avahi_log_error("Failed to read kqueue event: %s", avahi_strerror(errno));
++	}
++}
++
++#endif
++
+ static void signal_callback(AvahiWatch *watch, AVAHI_GCC_UNUSED int fd, AVAHI_GCC_UNUSED AvahiWatchEvent event, AVAHI_GCC_UNUSED void *userdata) {
+     int sig;
+     const AvahiPoll *poll_api;
+@@ -801,6 +883,10 @@ static int run_server(DaemonConfig *c) {
+ #ifdef HAVE_INOTIFY
+     AvahiWatch *inotify_watch = NULL;
+ #endif
++#ifdef HAVE_KQUEUE
++    int i;
++    AvahiWatch *kqueue_watch = NULL;
++#endif
+ 
+     assert(c);
+ 
+@@ -876,6 +962,19 @@ static int run_server(DaemonConfig *c) {
+     }
+ #endif
+ 
++#ifdef HAVE_KQUEUE
++    if ((kq = kqueue()) < 0)
++	    avahi_log_warn( "Failed to initialize kqueue: %s", strerror(errno));
++    else {
++	    add_kqueue_watches();
++
++	    if (!(kqueue_watch = poll_api->watch_new(poll_api, kq, AVAHI_WATCH_IN, kqueue_callback, NULL))) {
++		    avahi_log_error( "Failed to create kqueue watcher");
++		    goto finish;
++	    }
++    }
++#endif
++
+     load_resolv_conf();
+ #ifdef ENABLE_CHROOT
+     static_service_load(config.use_chroot);
+@@ -944,6 +1043,17 @@ finish:
+         poll_api->watch_free(inotify_watch);
+     if (inotify_fd >= 0)
+         close(inotify_fd);
++#endif
++
++#ifdef HAVE_KQUEUE
++    if (kqueue_watch)
++	poll_api->watch_free(kqueue_watch);
++    if (kq >= 0)
++	close(kq);
++    for (i = 0; i < num_kfds; i++) {
++	if (kfds[i] >= 0)
++	    close(kfds[i]);
++    }
+ #endif
+     
+     if (simple_poll_api) {
Index: patch-configure
===================================================================
RCS file: /home/cvs/mports/net/avahi/files/patch-configure,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lnet/avahi/files/patch-configure -Lnet/avahi/files/patch-configure -u -r1.1 -r1.2
--- net/avahi/files/patch-configure
+++ net/avahi/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig	Sun Sep  3 12:31:45 2006
-+++ configure	Sun Sep  3 12:32:34 2006
-@@ -20559,6 +20559,7 @@ echo $ECHO_N "checking whether to check 
+--- configure.orig	Sat Jun 23 02:05:47 2007
++++ configure	Sat Jun 23 02:13:52 2007
+@@ -20338,6 +20338,7 @@ echo $ECHO_N "checking whether to check 
     check_inconsistencies=yes
     case "${host_cpu}-${host_os}" in
       *-darwin*) check_inconsistencies=no ;;
@@ -8,3 +8,11 @@
     esac
     if test x"$GCC" != xyes -o "x$check_inconsistencies" != xyes ; then
        { echo "$as_me:$LINENO: result: no" >&5
+@@ -22442,6 +22443,7 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+ $ac_includes_default
++#include <sys/socket.h>
+ int
+ main ()
+ {
--- net/avahi/files/patch-avahi-core_dns.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- avahi-core/dns.c.orig	Thu Oct 12 12:43:19 2006
-+++ avahi-core/dns.c	Thu Oct 12 12:43:31 2006
-@@ -28,6 +28,7 @@
- #include <stdio.h>
- #include <assert.h>
- 
-+#include <sys/types.h>
- #include <netinet/in.h>
- 
- #include <avahi-common/defs.h>
Index: patch-Makefile.in
===================================================================
RCS file: /home/cvs/mports/net/avahi/files/patch-Makefile.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lnet/avahi/files/patch-Makefile.in -Lnet/avahi/files/patch-Makefile.in -u -r1.1 -r1.2
--- net/avahi/files/patch-Makefile.in
+++ net/avahi/files/patch-Makefile.in
@@ -30,7 +30,7 @@
  @ENABLE_COMPAT_LIBDNS_SD_TRUE@@HAVE_DBUS_TRUE@	    -e 's, at PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
  
  @HAVE_DBUS_TRUE@@HAVE_MONO_TRUE at avahi-sharp.pc: avahi-sharp.pc.in
-@@ -1082,6 +1089,8 @@ avahi-core.pc: avahi-core.pc.in
+@@ -1096,6 +1104,8 @@
  @HAVE_GLIB_TRUE at avahi-glib.pc: avahi-glib.pc.in
  @HAVE_GLIB_TRUE@	sed -e 's, at prefix\@,$(prefix),g' \
  @HAVE_GLIB_TRUE@	    -e 's, at libdir\@,$(libdir),g' \
@@ -38,4 +38,13 @@
 + at HAVE_GLIB_TRUE@	    -e 's, at PTHREAD_LIBS\@,$(PTHREAD_LIBS),g' \
  @HAVE_GLIB_TRUE@	    -e 's, at PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
  
+ @HAVE_DBUS_TRUE@@HAVE_GTK_TRUE at avahi-ui.pc: avahi-ui.pc.in
+@@ -1106,6 +1116,8 @@
  @HAVE_QT3_TRUE at avahi-qt3.pc: avahi-qt3.pc.in
+ @HAVE_QT3_TRUE@	sed -e 's, at prefix\@,$(prefix),g' \
+ @HAVE_QT3_TRUE@	    -e 's, at libdir\@,$(libdir),g' \
++ at HAVE_QT3_TRUE@	    -e 's, at PTHREAD_CFLAGS\@,$(PTHREAD_CFLAGS),g' \
++ at HAVE_QT3_TRUE@	    -e 's, at PTHREAD_LIBS\@,$(PTHREAD_LIBS),g' \
+ @HAVE_QT3_TRUE@	    -e 's, at PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
+ 
+ @HAVE_QT4_TRUE at avahi-qt4.pc: avahi-qt4.pc.in
--- /dev/null
+++ net/avahi/files/patch-avahi-ui_avahi-ui.c
@@ -0,0 +1,11 @@
+--- avahi-ui/avahi-ui.c.orig	Fri Apr 20 20:07:43 2007
++++ avahi-ui/avahi-ui.c	Fri Apr 20 20:09:03 2007
+@@ -23,6 +23,8 @@
+ #include <config.h>
+ #endif
+ 
++#include <sys/types.h>
++#include <sys/socket.h>
+ #include <string.h>
+ #include <stdarg.h>
+ #include <net/if.h>
--- /dev/null
+++ net/avahi/files/patch-man_Makefile.in
@@ -0,0 +1,11 @@
+--- man/Makefile.in.orig	Sat Jun  9 14:04:44 2007
++++ man/Makefile.in	Sat Jun  9 14:05:41 2007
+@@ -861,7 +861,7 @@ uninstall-man: uninstall-man1 uninstall-
+ @HAVE_DBUS_TRUE@		$(LN_S) avahi-browse.1 avahi-browse-domains.1 && \
+ @HAVE_DBUS_TRUE@		$(LN_S) avahi-publish.1 avahi-publish-address.1 && \
+ @HAVE_DBUS_TRUE@                $(LN_S) avahi-publish.1 avahi-publish-service.1 && \
+- at HAVE_DBUS_TRUE@                $(LN_S) bssh.1 bvnc.1
++ at HAVE_DBUS_TRUE@@HAVE_GTK_TRUE@                $(LN_S) bssh.1 bvnc.1
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
--- /dev/null
+++ net/avahi/files/patch-avahi-qt_Makefile.in
@@ -0,0 +1,36 @@
+--- avahi-qt/Makefile.in.orig	Thu Apr 12 00:16:01 2007
++++ avahi-qt/Makefile.in	Thu Apr 12 00:17:25 2007
+@@ -90,7 +90,6 @@ libLTLIBRARIES_INSTALL = $(INSTALL)
+ LTLIBRARIES = $(lib_LTLIBRARIES)
+ am__DEPENDENCIES_1 =
+ @HAVE_QT3_TRUE at libavahi_qt3_la_DEPENDENCIES =  \
+- at HAVE_QT3_TRUE@	../avahi-common/libavahi-common.la \
+ @HAVE_QT3_TRUE@	$(am__DEPENDENCIES_1)
+ am__libavahi_qt3_la_SOURCES_DIST = qt-watch.cpp
+ @HAVE_QT3_TRUE at am_libavahi_qt3_la_OBJECTS =  \
+@@ -98,7 +97,6 @@ am__libavahi_qt3_la_SOURCES_DIST = qt-wa
+ libavahi_qt3_la_OBJECTS = $(am_libavahi_qt3_la_OBJECTS)
+ @HAVE_QT3_TRUE at am_libavahi_qt3_la_rpath = -rpath $(libdir)
+ @HAVE_QT4_TRUE at libavahi_qt4_la_DEPENDENCIES =  \
+- at HAVE_QT4_TRUE@	../avahi-common/libavahi-common.la \
+ @HAVE_QT4_TRUE@	$(am__DEPENDENCIES_1)
+ am__libavahi_qt4_la_SOURCES_DIST = qt-watch.cpp
+ @HAVE_QT4_TRUE at am_libavahi_qt4_la_OBJECTS =  \
+@@ -418,7 +416,7 @@ BUILT_SOURCES = $(am__append_2) $(am__ap
+ @HAVE_QT3_TRUE@	qt-watch.cpp 
+ 
+ @HAVE_QT3_TRUE at libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS)
+- at HAVE_QT3_TRUE@libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS)
++ at HAVE_QT3_TRUE@libavahi_qt3_la_LIBADD = $(AM_LDADD) -lavahi-common $(QT3_LIBS)
+ @HAVE_QT3_TRUE at libavahi_qt3_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_QT3_VERSION_INFO)
+ @HAVE_QT4_TRUE at avahiqt4includedir = $(includedir)/avahi-qt4
+ @HAVE_QT4_TRUE at avahiqt4include_HEADERS = \
+@@ -428,7 +426,7 @@ BUILT_SOURCES = $(am__append_2) $(am__ap
+ @HAVE_QT4_TRUE@	qt-watch.cpp 
+ 
+ @HAVE_QT4_TRUE at libavahi_qt4_la_CPPFLAGS = $(AM_CFLAGS) $(QT4_CFLAGS) -DQT4
+- at HAVE_QT4_TRUE@libavahi_qt4_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT4_LIBS)
++ at HAVE_QT4_TRUE@libavahi_qt4_la_LIBADD = $(AM_LDADD) -lavahi-common $(QT4_LIBS)
+ @HAVE_QT4_TRUE at libavahi_qt4_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_QT4_VERSION_INFO)
+ CLEANFILES = $(BUILT_SOURCES)
+ all: $(BUILT_SOURCES)
--- /dev/null
+++ net/avahi/files/patch-avahi-core_fdutil.c
@@ -0,0 +1,10 @@
+--- avahi-core/fdutil.c.orig	Sat Jun 23 02:09:02 2007
++++ avahi-core/fdutil.c	Sat Jun 23 02:09:37 2007
+@@ -23,6 +23,7 @@
+ #include <config.h>
+ #endif
+ 
++#include <sys/select.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <assert.h>


More information about the Midnightbsd-cvs mailing list