--- /usr/portage/sys-apps/dbus/dbus-1.8.6.ebuild 2014-07-24 06:31:34.000000000 -0600 +++ dbus-1.8.6.ebuild 2014-08-03 09:39:01.836228560 -0600 @@ -101,14 +101,21 @@ --disable-embedded-tests --disable-modular-tests $(use_enable debug stats) - --with-session-socket-dir=/tmp - --with-system-pid-file=/var/run/dbus.pid - --with-system-socket=/var/run/dbus/system_bus_socket + --with-session-socket-dir="${EPRFIX}"/tmp + --with-system-pid-file="${EPRFIX}"/var/run/dbus.pid + --with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket --with-dbus-user=messagebus $(use_with X x) "$(systemd_with_unitdir)" ) + if [[ ${CHOST} == *-darwin* ]]; then + myconf+=( + --enable-launchd + --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents + ) + fi + if multilib_is_native_abi; then docconf=( --enable-xml-docs @@ -222,4 +229,25 @@ # dependencies with hardcoded paths (although the known ones got fixed already) dbus-uuidgen --ensure="${EROOT%/}"/etc/machine-id ln -sf "${EROOT%/}"/etc/machine-id "${EROOT%/}"/var/lib/dbus/machine-id + + if [[ ${CHOST} == *-darwin* ]]; then + local plist="org.freedesktop.dbus-session.plist" + elog + elog + elog "For MacOS/Darwin we now ship launchd support for dbus." + elog "This enables autolaunch of dbus at session login and makes" + elog "dbus usable under MacOS/Darwin." + elog + elog "The launchd plist file ${plist} has been" + elog "installed in ${EPREFIX}/Library/LaunchAgents." + elog "For it to be used, you will have to do all of the following:" + elog " + cd ~/Library/LaunchAgents" + elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}" + elog " + logout and log back in" + elog + elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS" + elog "specified and refused to start otherwise, then export the" + elog "the following to your environment:" + elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\"" + fi }