From 03748f96080c86d679731666235e7c2073e5ed14 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Wed, 15 Feb 2006 04:29:02 +0000 Subject: * Fix creation of the dbus system socket * Update for the new USE_RC_SUBR world order --- devel/dbus/Makefile | 26 +++++++++++++++++++------- devel/dbus/files/dbus.sh | 33 --------------------------------- devel/dbus/pkg-plist | 1 - 3 files changed, 19 insertions(+), 41 deletions(-) delete mode 100644 devel/dbus/files/dbus.sh (limited to 'devel/dbus') diff --git a/devel/dbus/Makefile b/devel/dbus/Makefile index 0996ae34b731..b71843ef91d0 100644 --- a/devel/dbus/Makefile +++ b/devel/dbus/Makefile @@ -7,7 +7,7 @@ PORTNAME= dbus PORTVERSION= 0.60 -PORTREVISION?= 2 +PORTREVISION?= 3 CATEGORIES?= devel gnome MASTER_SITES= http://dbus.freedesktop.org/releases/ @@ -21,7 +21,7 @@ USE_GNOME?= gnomehack glib20 libxml2 USE_GMAKE= yes USE_AUTOTOOLS= libtool:15 INSTALLS_SHLIB= yes -USE_RC_SUBR= yes +USE_RC_SUBR= dbus USE_REINPLACE= yes CONFIGURE_ARGS?=--disable-gtk \ --disable-python \ @@ -31,7 +31,7 @@ CONFIGURE_ARGS?=--disable-gtk \ --disable-mono-docs \ --localstatedir=/var \ --with-system-pid-file=/var/run/dbus.pid \ - --with-system-socket=/var/run/dbus \ + --with-system-socket=/var/run/dbus.pipe \ --with-session-socket-dir=/var/tmp \ --disable-doxygen-docs \ --disable-xml-docs @@ -42,7 +42,6 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ OPTIONS= QT "Enable Qt client support" off PLIST_SUB= VERSION="1.0" -RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} MAN1= dbus-cleanup-sockets.1 dbus-daemon.1 dbus-launch.1 \ dbus-monitor.1 dbus-send.1 @@ -61,18 +60,31 @@ PLIST_SUB+= QT="@comment " .endif post-patch: - @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${FILESDIR}/dbus.sh > ${WRKSRC}/dbus.sh @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ ${WRKSRC}/tools/run-with-tmp-session-bus.sh @${REINPLACE_CMD} -e 's|%%X11BASE%%|${X11BASE}|' \ ${WRKSRC}/bus/session.conf.in +.if !defined(DBUS_SLAVE) +pre-su-install: + @for i in 15 9 ; do \ + if [ -f /var/run/dbus.pid ]; then \ + kill -$${i} $$(${CAT} /var/run/dbus.pid) 2>/dev/null || ${TRUE} ; \ + sleep 3 ; \ + fi ; \ + done + @if [ -f /var/run/dbus.pid ]; then \ + ${RM} -f /var/run/dbus.pid ; \ + fi + @if [ -S /var/run/dbus ]; then \ + ${RM} -f /var/run/dbus ; \ + fi +.endif + post-install: .if !defined(PACKAGE_BUILDING) @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif - ${INSTALL_SCRIPT} ${WRKSRC}/dbus.sh ${PREFIX}/etc/rc.d ${MKDIR} ${X11BASE}/share/dbus-1/services .else .if defined(PKGNAMEPREFIX) diff --git a/devel/dbus/files/dbus.sh b/devel/dbus/files/dbus.sh deleted file mode 100644 index 704cb1d7eb92..000000000000 --- a/devel/dbus/files/dbus.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# PROVIDE: dbus -# REQUIRE: DAEMON -# -# Add the following lines to /etc/rc.conf to enable the D-BUS messaging system: -# -# dbus_enable="YES" -# - -dbus_enable=${dbus_enable-"NO"} -dbus_flags=${dbus_flags-"--system"} - -. %%RC_SUBR%% - -name=dbus -rcvar=`set_rcvar` - -command="%%PREFIX%%/bin/dbus-daemon" -pidfile="/var/run/${name}.pid" - -stop_postcmd=stop_postcmd - -stop_postcmd() -{ - rm -f $pidfile -} - - -load_rc_config ${name} -run_rc_command "$1" diff --git a/devel/dbus/pkg-plist b/devel/dbus/pkg-plist index 5883f6ddff10..840e1cd183b5 100644 --- a/devel/dbus/pkg-plist +++ b/devel/dbus/pkg-plist @@ -6,7 +6,6 @@ bin/dbus-monitor bin/dbus-send etc/dbus-1/session.conf etc/dbus-1/system.conf -etc/rc.d/dbus.sh %%QT%%include/dbus-%%VERSION%%/dbus/connection.h include/dbus-%%VERSION%%/dbus/dbus-address.h include/dbus-%%VERSION%%/dbus/dbus-bus.h -- cgit v1.2.3