aboutsummaryrefslogtreecommitdiffstats
path: root/devel/dbus
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2005-07-01 13:20:13 +0800
committermarcus <marcus@FreeBSD.org>2005-07-01 13:20:13 +0800
commit503ace79a9412dbac07dc885008bc3338afd309e (patch)
tree19c6eafbb836a596a6bfa3081cec5d2dbce32588 /devel/dbus
parent732583c1252db9ffcce26fdd967f144740e065be (diff)
downloadfreebsd-ports-gnome-503ace79a9412dbac07dc885008bc3338afd309e.tar.gz
freebsd-ports-gnome-503ace79a9412dbac07dc885008bc3338afd309e.tar.zst
freebsd-ports-gnome-503ace79a9412dbac07dc885008bc3338afd309e.zip
* Update to 0.34
* Add kqueue support so to dynamically re-read new configuration files
Diffstat (limited to 'devel/dbus')
-rw-r--r--devel/dbus/Makefile4
-rw-r--r--devel/dbus/distinfo4
-rw-r--r--devel/dbus/files/patch-bus_bus.c11
-rw-r--r--devel/dbus/files/patch-bus_dir-watch.c152
-rw-r--r--devel/dbus/files/patch-config.h.in12
-rw-r--r--devel/dbus/files/patch-configure49
-rw-r--r--devel/dbus/files/patch-dbus_dbus-sysdeps-util.c11
-rw-r--r--devel/dbus/files/patch-mono_Makefile.in26
-rw-r--r--devel/dbus/files/patch-tools_Makefile.in11
-rw-r--r--devel/dbus/pkg-plist1
10 files changed, 238 insertions, 43 deletions
diff --git a/devel/dbus/Makefile b/devel/dbus/Makefile
index 816577765efb..1adc8a415c20 100644
--- a/devel/dbus/Makefile
+++ b/devel/dbus/Makefile
@@ -6,8 +6,8 @@
#
PORTNAME= dbus
-PORTVERSION= 0.33
-PORTREVISION?= 2
+PORTVERSION= 0.34
+PORTREVISION?= 0
CATEGORIES?= devel gnome
MASTER_SITES= http://dbus.freedesktop.org/releases/
diff --git a/devel/dbus/distinfo b/devel/dbus/distinfo
index 2c2460f40e47..c559ab2e1bed 100644
--- a/devel/dbus/distinfo
+++ b/devel/dbus/distinfo
@@ -1,2 +1,2 @@
-MD5 (dbus-0.33.tar.gz) = 23db7f95dbb1fcae6e1d43fcc17857aa
-SIZE (dbus-0.33.tar.gz) = 1447582
+MD5 (dbus-0.34.tar.gz) = fd25c4ee2374f6c3ef9e236290667242
+SIZE (dbus-0.34.tar.gz) = 1505592
diff --git a/devel/dbus/files/patch-bus_bus.c b/devel/dbus/files/patch-bus_bus.c
new file mode 100644
index 000000000000..857d6379f738
--- /dev/null
+++ b/devel/dbus/files/patch-bus_bus.c
@@ -0,0 +1,11 @@
+--- bus/bus.c.orig Thu Jun 30 23:55:41 2005
++++ bus/bus.c Thu Jun 30 23:56:04 2005
+@@ -486,7 +486,7 @@ process_config_every_time (BusContext
+
+ _dbus_list_foreach (bus_config_parser_get_conf_dirs (parser),
+ (DBusForeachFunction) bus_watch_directory,
+- NULL);
++ bus_context_get_loop (context));
+
+ _DBUS_ASSERT_ERROR_IS_CLEAR (error);
+ retval = TRUE;
diff --git a/devel/dbus/files/patch-bus_dir-watch.c b/devel/dbus/files/patch-bus_dir-watch.c
new file mode 100644
index 000000000000..497f5addf6d3
--- /dev/null
+++ b/devel/dbus/files/patch-bus_dir-watch.c
@@ -0,0 +1,152 @@
+--- bus/dir-watch.c.orig Tue Jun 14 22:31:38 2005
++++ bus/dir-watch.c Fri Jul 1 01:07:28 2005
+@@ -28,17 +28,25 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <fcntl.h>
++#elif defined(DBUS_BUS_ENABLE_KQUEUE_ON_FREEBSD)
++#include <sys/types.h>
++#include <sys/event.h>
++#include <sys/time.h>
++#include <signal.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include "bus.h"
++#include <dbus/dbus-watch.h>
+ #endif /* DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX */
+
+ #include <dbus/dbus-internals.h>
+ #include "dir-watch.h"
+
++#define MAX_DIRS_TO_WATCH 128
+
+ /* D_NOTIFY is available on Linux 2.4 or greater - the actual SIGIO signal is handled in main.c:signal_handler() */
+ #ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
+
+-#define MAX_DIRS_TO_WATCH 128
+-
+ /* use a static array to avoid handling OOM */
+ static int fds[MAX_DIRS_TO_WATCH];
+ static int num_fds = 0;
+@@ -92,6 +100,121 @@ bus_drop_all_directory_watches (void)
+ }
+ }
+
++ num_fds = 0;
++}
++
++#elif defined(DBUS_BUS_ENABLE_KQUEUE_ON_FREEBSD)
++
++static int kq = -1;
++static int fds[MAX_DIRS_TO_WATCH];
++static int num_fds = 0;
++
++static dbus_bool_t
++_handle_kqueue_watch (DBusWatch *watch, unsigned int flags, void *data)
++{
++ struct kevent ev;
++
++ if (kevent (kq, NULL, 0, &ev, 1, NULL) > 0)
++ {
++ pid_t pid = getpid ();
++ _dbus_verbose ("Sending SIGHUP signal on reception of a kevent\n");
++ (void) kill (pid, SIGHUP);
++ }
++
++ return TRUE;
++}
++
++static dbus_bool_t
++_kqueue_watch_callback (DBusWatch *watch, unsigned int condition, void *data)
++{
++ return dbus_watch_handle (watch, condition);
++}
++
++void
++bus_watch_directory (const char *dir, void *userdata)
++{
++ int fd;
++ struct kevent ev;
++ static struct timespec nullts = { 0, 0 };
++
++ _dbus_assert (dir != NULL);
++
++ if (kq == -1)
++ {
++ DBusWatch *watch;
++ DBusLoop *loop;
++
++ kq = kqueue ();
++ if (kq < 0)
++ {
++ _dbus_warn ("Cannot create kqueue; error '%s'\n", _dbus_strerror (errno));
++ goto out;
++ }
++
++ loop = userdata;
++
++ watch = _dbus_watch_new (kq, DBUS_WATCH_READABLE, TRUE,
++ _handle_kqueue_watch, NULL, NULL);
++
++ if (watch == NULL)
++ {
++ _dbus_warn ("Unable to create kqueue watch\n");
++ goto out;
++ }
++
++ if (!_dbus_loop_add_watch (loop, watch, _kqueue_watch_callback,
++ NULL, NULL))
++ {
++ _dbus_warn ("Unable to add reload watch to main loop");
++ goto out;
++ }
++ }
++
++ if (num_fds >= MAX_DIRS_TO_WATCH )
++ {
++ _dbus_warn ("Cannot watch config directory '%s'. Already watching %d directories\n", dir, MAX_DIRS_TO_WATCH);
++ goto out;
++ }
++
++ fd = open (dir, O_RDONLY);
++ if (fd < 0)
++ {
++ _dbus_warn ("Cannot open directory '%s'; error '%s'\n", dir, _dbus_strerror (errno));
++ goto out;
++ }
++
++ EV_SET (&ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR,
++ NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_LINK | NOTE_RENAME |
++ NOTE_REVOKE, 0, 0);
++ if (kevent (kq, &ev, 1, NULL, 0, &nullts) == -1)
++ {
++ _dbus_warn ("Cannot setup a kevent for '%s'; error '%s'\n", dir, _dbus_strerror (errno));
++ close (fd);
++ goto out;
++ }
++
++ fds[num_fds++] = fd;
++ _dbus_verbose ("Added kqueue watch on config directory '%s'\n", dir);
++
++ out:
++ ;
++}
++
++void
++bus_drop_all_directory_watches (void)
++{
++ int i;
++
++ _dbus_verbose ("Dropping all watches on config directories\n");
++
++ for (i = 0; i < num_fds; i++)
++ {
++ if (close (fds[i]) != 0)
++ {
++ _dbus_verbose ("Error closing fd %d for config directory watch\n", fds[i]);
++ }
++ }
++
+ num_fds = 0;
+ }
+
diff --git a/devel/dbus/files/patch-config.h.in b/devel/dbus/files/patch-config.h.in
new file mode 100644
index 000000000000..479d32470af5
--- /dev/null
+++ b/devel/dbus/files/patch-config.h.in
@@ -0,0 +1,12 @@
+--- config.h.in.orig Fri Jul 1 00:48:36 2005
++++ config.h.in Fri Jul 1 00:48:56 2005
+@@ -9,6 +9,9 @@
+ /* Use dnotify on Linux */
+ #undef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
+
++/* Use kqueue on FreeBSD */
++#undef DBUS_BUS_ENABLE_KQUEUE_ON_FREEBSD
++
+ /* Disable assertion checking */
+ #undef DBUS_DISABLE_ASSERT
+
diff --git a/devel/dbus/files/patch-configure b/devel/dbus/files/patch-configure
index ef1ca83825a3..edb9f8380ac4 100644
--- a/devel/dbus/files/patch-configure
+++ b/devel/dbus/files/patch-configure
@@ -1,6 +1,14 @@
---- configure.orig Mon Jan 24 17:28:13 2005
-+++ configure Mon Jan 24 19:20:14 2005
-@@ -4342,7 +4342,7 @@
+--- configure.orig Fri Jul 1 00:49:18 2005
++++ configure Fri Jul 1 00:52:48 2005
+@@ -1059,6 +1059,7 @@
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --disable-dnotify Disable using dnotify on Linux
++ --disable-kqueue Disable using kqueue on FreeBSD
+
+ Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+@@ -4471,7 +4472,7 @@
case " $CFLAGS " in
*[\ \ ]-Wfloat-equal[\ \ ]*) ;;
@@ -9,7 +17,40 @@
esac
case " $CFLAGS " in
-@@ -26195,14 +26195,14 @@
+@@ -28059,6 +28060,32 @@
+
+ fi
+
++# kqueue checks
++case "${target_os}" in
++ freebsd*)
++ # Check whether --enable-kqueue or --disable-kqueue was given.
++if test "${enable_kqueue+set}" = set; then
++ enableval="$enable_kqueue"
++ case "${enableval}" in
++ yes) kqueue=false ;;
++ no) kqueue=true ;;
++ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-kqueue" >&5
++echo "$as_me: error: bad value ${enableval} for --disable-kqueue" >&2;}
++ { (exit 1); exit 1; }; } ;;
++ esac
++else
++ kqueue=true
++fi;
++;;
++esac
++if test x$kqueue = xtrue; then
++
++cat >>confdefs.h <<\_ACEOF
++#define DBUS_BUS_ENABLE_KQUEUE_ON_FREEBSD 1
++_ACEOF
++
++fi
++
+
+ #### Set up final flags
+ DBUS_CLIENT_CFLAGS=
+@@ -28621,14 +28648,14 @@
echo "${ECHO_T}not found" >&6
fi
diff --git a/devel/dbus/files/patch-dbus_dbus-sysdeps-util.c b/devel/dbus/files/patch-dbus_dbus-sysdeps-util.c
deleted file mode 100644
index 7d726aef87d4..000000000000
--- a/devel/dbus/files/patch-dbus_dbus-sysdeps-util.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- dbus/dbus-sysdeps-util.c.orig Sat Apr 2 15:29:28 2005
-+++ dbus/dbus-sysdeps-util.c Sat Apr 2 15:29:45 2005
-@@ -142,7 +142,7 @@ _dbus_become_daemon (const DBusString *p
- return FALSE;
- }
-
-- if (!_dbus_string_append_int (&pid, _dbus_getpid ()) ||
-+ if (!_dbus_string_append_int (&pid, child_pid) ||
- !_dbus_string_append (&pid, "\n"))
- {
- _dbus_string_free (&pid);
diff --git a/devel/dbus/files/patch-mono_Makefile.in b/devel/dbus/files/patch-mono_Makefile.in
index 532738fbfcff..7f1d7026cf22 100644
--- a/devel/dbus/files/patch-mono_Makefile.in
+++ b/devel/dbus/files/patch-mono_Makefile.in
@@ -1,15 +1,15 @@
---- mono/Makefile.in.orig Fri May 13 02:47:06 2005
-+++ mono/Makefile.in Fri May 13 02:51:15 2005
-@@ -279,7 +279,7 @@
- sharedstatedir = @sharedstatedir@
- sysconfdir = @sysconfdir@
- target_alias = @target_alias@
+--- mono/Makefile.in.orig Thu Jun 30 23:27:19 2005
++++ mono/Makefile.in Thu Jun 30 23:27:43 2005
+@@ -299,7 +299,7 @@
+ target_cpu = @target_cpu@
+ target_os = @target_os@
+ target_vendor = @target_vendor@
-SUBDIRS = . doc example
+SUBDIRS = . example
TARGET = $(ASSEMBLY)
NOINST_EXES = test-dbus-sharp.exe
ASSEMBLY_NAME = dbus-sharp
-@@ -325,6 +325,10 @@
+@@ -345,6 +345,10 @@
$(ASSEMBLY).config.in \
dbus-sharp.snk
@@ -20,7 +20,7 @@
all: all-recursive
.SUFFIXES:
-@@ -371,6 +375,23 @@
+@@ -391,6 +395,23 @@
distclean-libtool:
-rm -f libtool
uninstall-info-am:
@@ -44,7 +44,7 @@
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
-@@ -549,7 +570,7 @@
+@@ -569,7 +590,7 @@
done
check-am: all-am
check: check-recursive
@@ -53,7 +53,7 @@
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
-@@ -594,7 +615,7 @@
+@@ -614,7 +635,7 @@
info-am:
@@ -62,7 +62,7 @@
install-exec-am:
-@@ -620,7 +641,7 @@
+@@ -640,7 +661,7 @@
ps-am:
@@ -71,7 +71,7 @@
uninstall-info: uninstall-info-recursive
-@@ -631,12 +652,13 @@
+@@ -651,12 +672,13 @@
html-am info info-am install install-am install-data \
install-data-am install-data-local install-exec \
install-exec-am install-info install-info-am install-man \
@@ -87,7 +87,7 @@
all-am: $(TARGET)
-@@ -652,14 +674,14 @@
+@@ -672,14 +694,14 @@
install-data-local:
@if test -n '$(TARGET)'; then \
diff --git a/devel/dbus/files/patch-tools_Makefile.in b/devel/dbus/files/patch-tools_Makefile.in
deleted file mode 100644
index c13b0ce17e17..000000000000
--- a/devel/dbus/files/patch-tools_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- tools/Makefile.in.orig Sat Apr 2 14:50:00 2005
-+++ tools/Makefile.in Sat Apr 2 14:50:40 2005
-@@ -335,7 +335,7 @@
- sharedstatedir = @sharedstatedir@
- sysconfdir = @sysconfdir@
- target_alias = @target_alias@
--INCLUDES = -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_X_CFLAGS) $(DBUS_GTK_THREADS_CFLAGS) -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
-+INCLUDES = -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_X_CFLAGS) $(DBUS_GTK_THREADS_CFLAGS) -DDBUS_LOCALEDIR=\"$(prefix)/share/locale\"
- @HAVE_GLIB_FALSE@GLIB_TOOLS =
- @HAVE_GLIB_TRUE@GLIB_TOOLS = dbus-monitor
- @HAVE_GLIB_TRUE@nodist_libdbus_glib_HEADERS = dbus-glib-bindings.h
diff --git a/devel/dbus/pkg-plist b/devel/dbus/pkg-plist
index fc71f783cf4b..61622ebfa1d1 100644
--- a/devel/dbus/pkg-plist
+++ b/devel/dbus/pkg-plist
@@ -17,6 +17,7 @@ include/dbus-%%VERSION%%/dbus/dbus-glib-bindings.h
include/dbus-%%VERSION%%/dbus/dbus-glib-error-enum.h
include/dbus-%%VERSION%%/dbus/dbus-glib-lowlevel.h
include/dbus-%%VERSION%%/dbus/dbus-glib.h
+include/dbus-%%VERSION%%/dbus/dbus-gtype-specialized.h
include/dbus-%%VERSION%%/dbus/dbus-macros.h
include/dbus-%%VERSION%%/dbus/dbus-memory.h
include/dbus-%%VERSION%%/dbus/dbus-message.h