diff options
author | marcus <marcus@FreeBSD.org> | 2004-07-22 13:41:15 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2004-07-22 13:41:15 +0800 |
commit | 56ce128e0bb1f777e1568f72ef4990f28fc7bb7b (patch) | |
tree | 1ba7e1bfed43ea86eb92c22c67259ea1039bb5e8 /devel/dbus | |
parent | 9bea2ff34badcd24a2b054e2716d13c6f8496cd0 (diff) | |
download | freebsd-ports-gnome-56ce128e0bb1f777e1568f72ef4990f28fc7bb7b.tar.gz freebsd-ports-gnome-56ce128e0bb1f777e1568f72ef4990f28fc7bb7b.tar.zst freebsd-ports-gnome-56ce128e0bb1f777e1568f72ef4990f28fc7bb7b.zip |
* Fix the path to the dbus socket
* Make sure the messagebus user and group are created, and block out uid/gid
556 for this
* Delete the dbus.pid file as part of a stop_postcmd (dbus doesn't delete its
own pid file)
* Clean up some bash'isms in the KDE detection configure code
* Make the strtod() Call more 4.X friendly by not passing hex to it
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 |