diff options
Diffstat (limited to 'devel/dbus')
-rw-r--r-- | devel/dbus/Makefile | 6 | ||||
-rw-r--r-- | devel/dbus/files/dbus.in | 7 | ||||
-rw-r--r-- | devel/dbus/files/dbus.sh | 7 | ||||
-rw-r--r-- | devel/dbus/files/patch-configure | 20 | ||||
-rw-r--r-- | devel/dbus/files/patch-dbus_dbus-sysdeps.c | 29 | ||||
-rw-r--r-- | devel/dbus/pkg-install | 36 |
6 files changed, 103 insertions, 2 deletions
diff --git a/devel/dbus/Makefile b/devel/dbus/Makefile index bd9a42532d57..d60f0b38dde0 100644 --- a/devel/dbus/Makefile +++ b/devel/dbus/Makefile @@ -7,6 +7,7 @@ PORTNAME= dbus PORTVERSION= 0.21 +PORTREVISION= 1 CATEGORIES= devel gnome MASTER_SITES= http://freedesktop.org/Software/dbus/releases/ @@ -26,7 +27,7 @@ CONFIGURE_ARGS= --enable-gtk \ --disable-gcj \ --disable-mono \ --with-system-pid-file=/var/run/dbus.pid \ - --with-system-socket=/var/run \ + --with-system-socket=/var/run/dbus \ --with-session-socket-dir=/var/tmp \ --disable-doxygen-docs \ --disable-xml-docs @@ -56,6 +57,9 @@ post-patch: ${FILESDIR}/dbus.sh > ${WRKSRC}/dbus.sh 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 .include <bsd.port.post.mk> diff --git a/devel/dbus/files/dbus.in b/devel/dbus/files/dbus.in index 0e310f0188c5..b65a2106285d 100644 --- a/devel/dbus/files/dbus.in +++ b/devel/dbus/files/dbus.in @@ -19,6 +19,13 @@ rcvar=`set_rcvar` command="%%PREFIX%%/bin/dbus-daemon-1" pidfile="/var/run/${name}.pid" +stop_postcmd=stop_postcmd + +stop_postcmd() +{ + rm -f $pidfile +} + [ -z "$dbus_enable" ] && dbus_enable="NO" [ -z "$dbus_flags" ] && dbus_flags="--system" diff --git a/devel/dbus/files/dbus.sh b/devel/dbus/files/dbus.sh index 0e310f0188c5..b65a2106285d 100644 --- a/devel/dbus/files/dbus.sh +++ b/devel/dbus/files/dbus.sh @@ -19,6 +19,13 @@ rcvar=`set_rcvar` command="%%PREFIX%%/bin/dbus-daemon-1" pidfile="/var/run/${name}.pid" +stop_postcmd=stop_postcmd + +stop_postcmd() +{ + rm -f $pidfile +} + [ -z "$dbus_enable" ] && dbus_enable="NO" [ -z "$dbus_flags" ] && dbus_flags="--system" diff --git a/devel/dbus/files/patch-configure b/devel/dbus/files/patch-configure new file mode 100644 index 000000000000..67be44b5b33b --- /dev/null +++ b/devel/dbus/files/patch-configure @@ -0,0 +1,20 @@ +--- configure.orig Thu Jul 22 01:12:36 2004 ++++ configure Thu Jul 22 01:13:22 2004 +@@ -24198,14 +24198,14 @@ + echo "${ECHO_T}not found" >&6 + fi + +-if (! kde-config >& /dev/null); then ++if (! kde-config > /dev/null 2>&1); then + have_qt=no + else + kdelibs=`kde-config --install lib --expandvars 2>/dev/null` +- if test -z $kdelibs -o ! -f $kdelibs/libkdecore.la; then ++ if test -z $kdelibs -o ! -f $kdelibs/libkdecore.so; then + have_qt=no + else +- DBUS_QT_LIBS="$kdelibs/libkdecore.la" ++ DBUS_QT_LIBS="$kdelibs/libkdecore.so" + fi + fi + diff --git a/devel/dbus/files/patch-dbus_dbus-sysdeps.c b/devel/dbus/files/patch-dbus_dbus-sysdeps.c index 73c512b9770c..54a13fb64d7d 100644 --- a/devel/dbus/files/patch-dbus_dbus-sysdeps.c +++ b/devel/dbus/files/patch-dbus_dbus-sysdeps.c @@ -1,5 +1,5 @@ --- dbus/dbus-sysdeps.c.orig Wed Mar 17 17:08:09 2004 -+++ dbus/dbus-sysdeps.c Tue Jun 22 15:41:42 2004 ++++ dbus/dbus-sysdeps.c Thu Jul 22 01:25:51 2004 @@ -740,12 +740,38 @@ { int bytes_written; @@ -49,3 +49,30 @@ _dbus_verbose ("Message from recvmsg() was not SCM_CREDS\n"); return FALSE; } +@@ -3421,21 +3448,21 @@ + exit (1); + } + +- _dbus_string_init_const (&str, "0xff"); ++ _dbus_string_init_const (&str, "255"); + if (!_dbus_string_parse_double (&str, + 0, &val, &pos)) + { + _dbus_warn ("Failed to parse double"); + exit (1); + } +- if (val != 0xff) ++ if (val != 255) + { +- _dbus_warn ("Failed to parse 0xff correctly, got: %f", val); ++ _dbus_warn ("Failed to parse 255 correctly, got: %f", val); + exit (1); + } +- if (pos != 4) ++ if (pos != 3) + { +- _dbus_warn ("_dbus_string_parse_double of \"0xff\" returned wrong position %d", pos); ++ _dbus_warn ("_dbus_string_parse_double of \"255\" returned wrong position %d", pos); + exit (1); + } + diff --git a/devel/dbus/pkg-install b/devel/dbus/pkg-install new file mode 100644 index 000000000000..f6cb61f297be --- /dev/null +++ b/devel/dbus/pkg-install @@ -0,0 +1,36 @@ +#!/bin/sh + +case $2 in +POST-INSTALL) + USER=messagebus + GROUP=${USER} + UID=556 + GID=${UID} + PW=/usr/sbin/pw + + if ${PW} group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if ${PW} groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if ${PW} user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -d "/nonexistent" -s /sbin/nologin -c "D-BUS Daemon User" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + exit 0 + ;; +esac |