diff options
author | tijl <tijl@FreeBSD.org> | 2017-01-11 23:07:53 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2017-01-11 23:07:53 +0800 |
commit | 1616525b553ec7d940c079fa402df33afa261f94 (patch) | |
tree | b564e0e2e050185c851d6d3923ed61c19c0fe37b | |
parent | c41ae266ae1c9ff91016c64b5619b1eeed5fbe0d (diff) | |
download | freebsd-ports-gnome-1616525b553ec7d940c079fa402df33afa261f94.tar.gz freebsd-ports-gnome-1616525b553ec7d940c079fa402df33afa261f94.tar.zst freebsd-ports-gnome-1616525b553ec7d940c079fa402df33afa261f94.zip |
- Remove --localstatedir=/var, already added by bsd.port.mk.
- Use default locations for system pidfile, system socket and session
sockets so Linux programs can find these too.
- Adjust rc.d script to eliminate gnome-subr dependency.
- Move examples to EXAMPLESDIR and add EXAMPLES option.
- Move /var/db/dbus/machine-id to default /var/lib/dbus/machine-id so Linux
programs can find this file. Add a postexec command to pkg-plist to copy
this file to the new location on installation so the id is preserved. The
old file cannot be removed from pkg-plist because currently running
processes might still need it. Remove the old file from the rc.d script
instead.
- Sort pkg-plist.
PR: 215174
Approved by: maintainer timeout (4 weeks)
-rw-r--r-- | devel/dbus/Makefile | 26 | ||||
-rw-r--r-- | devel/dbus/files/dbus.in | 15 | ||||
-rw-r--r-- | devel/dbus/files/patch-doc_Makefile.in | 13 | ||||
-rw-r--r-- | devel/dbus/pkg-plist | 16 |
4 files changed, 22 insertions, 48 deletions
diff --git a/devel/dbus/Makefile b/devel/dbus/Makefile index 76c0bb99f0dd..d9b8e854ef79 100644 --- a/devel/dbus/Makefile +++ b/devel/dbus/Makefile @@ -3,6 +3,7 @@ PORTNAME= dbus PORTVERSION= 1.10.14 +PORTREVISION= 1 CATEGORIES= devel gnome MASTER_SITES= http://dbus.freedesktop.org/releases/dbus/ @@ -15,15 +16,10 @@ LIB_DEPENDS= libexpat.so:textproc/expat2 PORTSCOUT= limitw:1,even -USE_GNOME= # empty but we need it for USE_GNOME_SUBR USES= cpe gmake libtool localbase pathfix GNU_CONFIGURE= yes USE_LDCONFIG= yes -CONFIGURE_ARGS= --localstatedir=/var \ - --with-test-socket-dir=${WRKDIR} \ - --with-system-pid-file=/var/run/dbus/dbus.pid \ - --with-system-socket=/var/run/dbus/system_bus_socket \ - --with-session-socket-dir=/tmp \ +CONFIGURE_ARGS= --with-test-socket-dir=${WRKDIR} \ --disable-doxygen-docs \ --disable-selinux \ --disable-apparmor \ @@ -34,16 +30,15 @@ CPE_VENDOR= d-bus_project CPE_PRODUCT= d-bus USE_RC_SUBR= dbus -USE_GNOME_SUBR= yes USERS= messagebus GROUPS= messagebus PLIST_SUB= VERSION="1.0" GROUPS=${GROUPS} -OPTIONS_SUB= yes -OPTIONS_DEFINE= MANPAGES X11 +OPTIONS_DEFINE= EXAMPLES MANPAGES X11 OPTIONS_DEFAULT=MANPAGES X11 +OPTIONS_SUB= yes X11_DESC= Support X11 Desktop Environments MANPAGES_CONFIGURE_ENV= XMLTO=${LOCALBASE}/bin/minixmlto @@ -55,16 +50,11 @@ X11_CONFIGURE_WITH= x post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/dbus/dbus-sysdeps-unix.c - @${REINPLACE_CMD} -e 's|/lib/dbus/machine-id|/db/dbus/machine-id|g' \ - ${WRKSRC}/doc/dbus-uuidgen.1.xml.in \ - ${WRKSRC}/dbus/Makefile.in \ - ${WRKSRC}/tools/Makefile.in - @${REINPLACE_CMD} '/^SUBDIRS/,/^$$/ s|test||g' ${WRKSRC}/Makefile.in + @${REINPLACE_CMD} '/^SUBDIRS =/s|test||' ${WRKSRC}/Makefile.in post-install: - @${MKDIR} ${STAGEDIR}${PREFIX}/share/dbus-1/interfaces - @${MKDIR} ${STAGEDIR}/var/run/dbus - @${MKDIR} ${STAGEDIR}/var/db/dbus - @${RMDIR} ${STAGEDIR}/var/lib/dbus ${STAGEDIR}/var/lib + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${MV} ${STAGEDIR}${DOCSDIR}/examples/* ${STAGEDIR}${EXAMPLESDIR} + ${RM} -r ${STAGEDIR}${DOCSDIR} .include <bsd.port.mk> diff --git a/devel/dbus/files/dbus.in b/devel/dbus/files/dbus.in index f084de8522e7..85eb64cbc7c6 100644 --- a/devel/dbus/files/dbus.in +++ b/devel/dbus/files/dbus.in @@ -11,35 +11,30 @@ # . /etc/rc.subr -. %%GNOME_SUBR%% -dbus_enable=${dbus_enable-${gnome_enable}} -dbus_flags=${dbus_flags-"--system"} +: ${dbus_enable=${gnome_enable-NO}} ${dbus_flags="--system"} name=dbus rcvar=dbus_enable command="%%PREFIX%%/bin/dbus-daemon" -pidfile="/var/run/dbus/${name}.pid" +pidfile="/var/run/dbus/pid" start_precmd="dbus_prestart" stop_postcmd="dbus_poststop" dbus_prestart() { - if [ ! -d /var/db/dbus ]; then - mkdir -p /var/db/dbus - fi %%PREFIX%%/bin/dbus-uuidgen --ensure - - mkdir -p $(dirname $pidfile) } dbus_poststop() { rm -f $pidfile +# The following two lines may be removed after 2018-01-01 + rm -f /var/db/dbus/machine-id + [ ! -d /var/db/dbus ] || rmdir /var/db/dbus } - load_rc_config ${name} run_rc_command "$1" diff --git a/devel/dbus/files/patch-doc_Makefile.in b/devel/dbus/files/patch-doc_Makefile.in deleted file mode 100644 index 50f0039300a3..000000000000 --- a/devel/dbus/files/patch-doc_Makefile.in +++ /dev/null @@ -1,13 +0,0 @@ ---- doc/Makefile.in.orig 2011-08-14 11:28:23.000000000 +0200 -+++ doc/Makefile.in 2011-08-14 11:28:47.000000000 +0200 -@@ -604,8 +604,8 @@ info: info-am - - info-am: - --install-data-am: install-data-local install-dist_docDATA \ -- install-dist_htmlDATA install-htmlDATA install-man -+install-data-am: install-data-local \ -+ install-man - - install-dvi: install-dvi-am - diff --git a/devel/dbus/pkg-plist b/devel/dbus/pkg-plist index d4538325ba33..04c8500c19c6 100644 --- a/devel/dbus/pkg-plist +++ b/devel/dbus/pkg-plist @@ -9,8 +9,6 @@ bin/dbus-update-activation-environment bin/dbus-uuidgen etc/dbus-1/session.conf etc/dbus-1/system.conf -share/dbus-1/session.conf -share/dbus-1/system.conf include/dbus-%%VERSION%%/dbus/dbus-address.h include/dbus-%%VERSION%%/dbus/dbus-bus.h include/dbus-%%VERSION%%/dbus/dbus-connection.h @@ -35,9 +33,6 @@ lib/libdbus-1.so.3 lib/libdbus-1.so.3.14.9 libdata/pkgconfig/dbus-1.pc @(,%%GROUPS%%,4750) libexec/dbus-daemon-launch-helper -share/doc/dbus/examples/GetAllMatchRules.py -share/doc/dbus/examples/example-session-disable-stats.conf -share/doc/dbus/examples/example-system-enable-stats.conf %%MANPAGES%%man/man1/dbus-cleanup-sockets.1.gz %%MANPAGES%%man/man1/dbus-daemon.1.gz %%MANPAGES%%man/man1/dbus-launch.1.gz @@ -47,10 +42,17 @@ share/doc/dbus/examples/example-system-enable-stats.conf %%MANPAGES%%man/man1/dbus-test-tool.1.gz %%MANPAGES%%man/man1/dbus-update-activation-environment.1.gz %%MANPAGES%%man/man1/dbus-uuidgen.1.gz +share/dbus-1/session.conf +share/dbus-1/system.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/GetAllMatchRules.py +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-session-disable-stats.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-system-enable-stats.conf @dir share/dbus-1/system-services -@dir share/dbus-1/interfaces @dir share/dbus-1/services @dir share/dbus-1/session.d @dir share/dbus-1/system.d -@dir /var/db/dbus +@dir /var/lib/dbus +@dir /var/lib @dir /var/run/dbus +@comment The following line may be removed after 2018-01-01 +@postexec [ -f /var/lib/dbus/machine-id -o ! -f /var/db/dbus/machine-id ] || cp -p /var/db/dbus/machine-id /var/lib/dbus/ |