summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2009-10-29 23:33:46 +0000
committerGilles Dartiguelongue <eva@gentoo.org>2009-10-29 23:33:46 +0000
commit8ea748a4d928b501e84a7d724000c992ee09be86 (patch)
tree3b389e2f7bb7c0c80802a4e82e39e6ae5bb8b300 /sys-auth
parentNew version for GNOME 2.28. (diff)
downloadgentoo-2-8ea748a4d928b501e84a7d724000c992ee09be86.tar.gz
gentoo-2-8ea748a4d928b501e84a7d724000c992ee09be86.tar.bz2
gentoo-2-8ea748a4d928b501e84a7d724000c992ee09be86.zip
New version for GNOME 2.28. Clean up old revision. Fix xinitrc script.
(Portage version: 2.2_rc46/cvs/Linux x86_64)
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/consolekit/ChangeLog12
-rw-r--r--sys-auth/consolekit/consolekit-0.2.10-r1.ebuild93
-rw-r--r--sys-auth/consolekit/consolekit-0.2.10.ebuild63
-rw-r--r--sys-auth/consolekit/consolekit-0.2.3.ebuild71
-rw-r--r--sys-auth/consolekit/consolekit-0.4.1.ebuild (renamed from sys-auth/consolekit/consolekit-0.3.0.ebuild)38
-rw-r--r--sys-auth/consolekit/files/90-consolekit2
-rw-r--r--sys-auth/consolekit/files/consolekit-0.2.3-freebsd.patch107
-rw-r--r--sys-auth/consolekit/files/consolekit-0.4.0-multilib.patch120
-rw-r--r--sys-auth/consolekit/files/consolekit-0.4.0-polkit-automagic.patch31
-rw-r--r--sys-auth/consolekit/files/consolekit-0.4.1-shutdown-reboot-without-policies.patch35
10 files changed, 215 insertions, 357 deletions
diff --git a/sys-auth/consolekit/ChangeLog b/sys-auth/consolekit/ChangeLog
index 9e43e3a41387..bc15100b1fd1 100644
--- a/sys-auth/consolekit/ChangeLog
+++ b/sys-auth/consolekit/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-auth/consolekit
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/ChangeLog,v 1.57 2009/10/28 18:20:50 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/ChangeLog,v 1.58 2009/10/29 23:33:46 eva Exp $
+
+*consolekit-0.4.1 (29 Oct 2009)
+
+ 29 Oct 2009; Gilles Dartiguelongue <eva@gentoo.org> files/90-consolekit,
+ -consolekit-0.2.3.ebuild, -files/consolekit-0.2.3-freebsd.patch,
+ -consolekit-0.2.10.ebuild, -consolekit-0.2.10-r1.ebuild,
+ -consolekit-0.3.0.ebuild, +files/consolekit-0.4.0-multilib.patch,
+ +files/consolekit-0.4.0-polkit-automagic.patch, +consolekit-0.4.1.ebuild,
+ +files/consolekit-0.4.1-shutdown-reboot-without-policies.patch:
+ New version for GNOME 2.28. Clean up old revision. Fix xinitrc script.
28 Oct 2009; Raúl Porcel <armin76@gentoo.org> consolekit-0.3.0-r2.ebuild:
ia64/m68k/s390/sh/sparc stable wrt #278181
diff --git a/sys-auth/consolekit/consolekit-0.2.10-r1.ebuild b/sys-auth/consolekit/consolekit-0.2.10-r1.ebuild
deleted file mode 100644
index 012ce85db251..000000000000
--- a/sys-auth/consolekit/consolekit-0.2.10-r1.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/consolekit-0.2.10-r1.ebuild,v 1.2 2009/03/17 22:48:43 loki_val Exp $
-
-EAPI="2"
-
-inherit autotools eutils multilib pam
-
-MY_PN="ConsoleKit"
-MY_PV="${PV//_pre*/}"
-
-DESCRIPTION="Framework for defining and tracking users, login sessions and seats."
-HOMEPAGE="http://www.freedesktop.org/wiki/Software/ConsoleKit"
-SRC_URI="http://people.freedesktop.org/~mccann/dist/${MY_PN}-${PV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
-IUSE="debug pam"
-
-RDEPEND=">=dev-libs/glib-2.16
- >=dev-libs/dbus-glib-0.61
- >=x11-libs/libX11-1.0.0
- pam? ( virtual/pam )
- elibc_glibc? ( !=sys-libs/glibc-2.4* )"
-DEPEND="${RDEPEND}
- dev-util/pkgconfig"
-
-S="${WORKDIR}/${MY_PN}-${MY_PV}"
-
-src_prepare() {
- # Fix directory leaks, bug #258685
- epatch "${FILESDIR}/${P}-directory-leak.patch"
-
- # Clean up at_console compat files, bug #257761
- epatch "${FILESDIR}/${P}-cleanup_console_tags.patch"
-
- # Add nox11 option to no interfere with Xsession script, bug #257763
- epatch "${FILESDIR}/${P}-pam-add-nox11.patch"
-
- # Fix automagic dependency on policykit
- epatch "${FILESDIR}/${P}-polkit-automagic.patch"
-
- eautoreconf
-}
-
-src_configure() {
- econf \
- $(use_enable debug) \
- $(use_enable pam pam-module) \
- --disable-polkit \
- --with-pam-module-dir=/$(getpam_mod_dir) \
- --with-pid-file=/var/run/consolekit.pid \
- --with-dbus-services=/usr/share/dbus-1/services/ \
- --localstatedir=/var
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
-
- # crappy Redhat init script
- rm -f "${D}/etc/rc.d/init.d/ConsoleKit"
-
- # Portage barfs on .la files
- rm -f "${D}/$(get_libdir)/security/pam_ck_connector.la"
-
- # Gentoo style init script
- newinitd "${FILESDIR}"/${PN}-0.1.rc consolekit
-
- # Some PM drop empty dirs, bug #257164
- keepdir /usr/$(get_libdir)/ConsoleKit/run-session.d
- keepdir /etc/ConsoleKit/run-session.d
- keepdir /var/run/ConsoleKit
- keepdir /var/log/ConsoleKit
-
- insinto /etc/X11/xinit/xinitrc.d/
- doins "${FILESDIR}/90-consolekit" || die "doins failed"
-
- exeinto /usr/$(get_libdir)/ConsoleKit/run-session.d/
- doexe "${FILESDIR}/pam-foreground-compat.ck" || die "doexe failed"
-}
-
-pkg_postinst() {
- ewarn
- ewarn "You need to restart ConsoleKit to get the new features."
- ewarn "This can be done with /etc/init.d/consolekit restart"
- ewarn "but make sure you do this and then restart your session"
- ewarn "otherwise you will get access denied for certain actions"
-
- ewarn
- ewarn "You need to chmod +x /etc/X11/xinit/xinitrc.d/90-consolekit"
- ewarn "to benefit of consolekit if you are not using gdm or pam integration."
-}
diff --git a/sys-auth/consolekit/consolekit-0.2.10.ebuild b/sys-auth/consolekit/consolekit-0.2.10.ebuild
deleted file mode 100644
index dd518fd53734..000000000000
--- a/sys-auth/consolekit/consolekit-0.2.10.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/consolekit-0.2.10.ebuild,v 1.11 2009/05/17 01:02:38 vapier Exp $
-
-inherit eutils autotools multilib pam
-
-MY_PN="ConsoleKit"
-MY_PV="${PV//_pre*/}"
-
-DESCRIPTION="Framework for defining and tracking users, login sessions and seats."
-HOMEPAGE="http://www.freedesktop.org/wiki/Software/ConsoleKit"
-SRC_URI="http://people.freedesktop.org/~mccann/dist/${MY_PN}-${PV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
-IUSE="debug pam"
-
-# Not parallel make safe
-MAKEOPTS="$MAKEOPTS -j1"
-
-RDEPEND=">=dev-libs/glib-2.16
- >=dev-libs/dbus-glib-0.61
- >=x11-libs/libX11-1.0.0
- pam? ( virtual/pam )
- elibc_glibc? ( !=sys-libs/glibc-2.4* )"
-DEPEND="${RDEPEND}
- dev-util/pkgconfig"
-
-S="${WORKDIR}/${MY_PN}-${MY_PV}"
-
-src_compile() {
- econf $(use_enable debug) \
- $(use_enable pam pam-module) \
- --with-pam-module-dir=/$(getpam_mod_dir) \
- --with-pid-file=/var/run/consolekit.pid \
- --with-dbus-services=/usr/share/dbus-1/services/ \
- || die "econf failed"
- emake || die "emake failed"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
-
- #crappy Redhat init script
- rm -f "${D}/etc/rc.d/init.d/ConsoleKit"
- rm -r "${D}/etc/rc.d/"
-
- #Portage barfs on .la files
- rm -f "${D}/$(get_libdir)/security/pam_ck_connector.la"
-
- # Gentoo style init script
- newinitd "${FILESDIR}"/${PN}-0.1.rc consolekit
-}
-
-pkg_postinst() {
- ewarn
- ewarn "You need to restart ConsoleKit to get the new features."
- ewarn "This can be done with /etc/init.d/consolekit restart"
- ewarn "but make sure you do this and then restart your session"
- ewarn "otherwise you will get access denied for certain actions"
- ewarn
-}
diff --git a/sys-auth/consolekit/consolekit-0.2.3.ebuild b/sys-auth/consolekit/consolekit-0.2.3.ebuild
deleted file mode 100644
index 9c4c6d019536..000000000000
--- a/sys-auth/consolekit/consolekit-0.2.3.ebuild
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/consolekit-0.2.3.ebuild,v 1.13 2008/03/29 02:50:32 vapier Exp $
-
-inherit eutils autotools multilib pam
-
-MY_PN="ConsoleKit"
-MY_PV="${PV//_pre*/}"
-
-DESCRIPTION="Framework for defining and tracking users, login sessions and seats."
-HOMEPAGE="http://www.freedesktop.org/wiki/Software/ConsoleKit"
-SRC_URI="http://people.freedesktop.org/~mccann/dist/${MY_PN}-${PV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
-IUSE="debug pam"
-
-# Not parallel make safe
-MAKEOPTS="$MAKEOPTS -j1"
-
-RDEPEND=">=dev-libs/glib-2.7
- >=dev-libs/dbus-glib-0.61
- >=x11-libs/libX11-1.0.0
- pam? ( virtual/pam )
- elibc_glibc? ( !=sys-libs/glibc-2.4* )"
-DEPEND="${RDEPEND}
- dev-util/pkgconfig"
-
-S="${WORKDIR}/${MY_PN}-${MY_PV}"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- # Work around an apparent FreeBSD kernel bug
- use x86-fbsd && epatch "${FILESDIR}/${P}"-freebsd.patch
-}
-
-src_compile() {
- econf $(use_enable debug) \
- $(use_enable pam pam-module) \
- --with-pam-module-dir=/$(getpam_mod_dir) \
- --with-pid-file=/var/run/consolekit.pid \
- --with-dbus-services=/usr/share/dbus-1/services/ \
- || die "econf failed"
- emake || die "emake failed"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
-
- #crappy Redhat init script
- rm -f "${D}/etc/rc.d/init.d/ConsoleKit"
- rm -r "${D}/etc/rc.d/"
-
- #Portage barfs on .la files
- rm -f "${D}/$(get_libdir)/security/pam_ck_connector.la"
-
- # Gentoo style init script
- newinitd "${FILESDIR}"/${PN}-0.1.rc consolekit
-}
-
-pkg_postinst() {
- ewarn
- ewarn "You need to restart ConsoleKit to get the new features."
- ewarn "This can be done with /etc/init.d/consolekit restart"
- ewarn "but make sure you do this and then restart your session"
- ewarn "otherwise you will get access denied for certain actions"
- ewarn
-}
diff --git a/sys-auth/consolekit/consolekit-0.3.0.ebuild b/sys-auth/consolekit/consolekit-0.4.1.ebuild
index 64d2d42b95ba..807477727021 100644
--- a/sys-auth/consolekit/consolekit-0.3.0.ebuild
+++ b/sys-auth/consolekit/consolekit-0.4.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/consolekit-0.3.0.ebuild,v 1.2 2009/03/17 22:48:43 loki_val Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/consolekit/consolekit-0.4.1.ebuild,v 1.1 2009/10/29 23:33:46 eva Exp $
EAPI="2"
@@ -8,21 +8,23 @@ inherit autotools eutils multilib pam
MY_PN="ConsoleKit"
MY_PV="${PV//_pre*/}"
+MY_P="${MY_PN}-${MY_PV}"
+# FIXME: Report on upstream for patch about policies ? (probably upstream devs wanted this behaviour as default...)
DESCRIPTION="Framework for defining and tracking users, login sessions and seats."
HOMEPAGE="http://www.freedesktop.org/wiki/Software/ConsoleKit"
-SRC_URI="http://people.freedesktop.org/~mccann/dist/${MY_PN}-${PV}.tar.bz2"
+SRC_URI="http://www.freedesktop.org/software/${MY_PN}/dist/${MY_P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+KEYWORDS="~amd64 ~x86"
IUSE="debug doc pam policykit"
RDEPEND=">=dev-libs/glib-2.16
>=dev-libs/dbus-glib-0.61
>=x11-libs/libX11-1.0.0
pam? ( virtual/pam )
- policykit? ( >=sys-auth/policykit-0.7 )
+ policykit? ( >=sys-auth/polkit-0.92 )
elibc_glibc? ( !=sys-libs/glibc-2.4* )
sys-libs/zlib"
DEPEND="${RDEPEND}
@@ -30,29 +32,27 @@ DEPEND="${RDEPEND}
dev-libs/libxslt
doc? ( app-text/xmlto )"
-S="${WORKDIR}/${MY_PN}-${MY_PV}"
+S=${WORKDIR}/${MY_PN}-${MY_PV}
src_prepare() {
- # Fix directory leaks, bug #258685
- epatch "${FILESDIR}/${PN}-0.2.10-directory-leak.patch"
-
# Clean up at_console compat files, bug #257761
epatch "${FILESDIR}/${PN}-0.2.10-cleanup_console_tags.patch"
- # Add nox11 option to no interfere with Xsession script, bug #257763
- epatch "${FILESDIR}/${PN}-0.2.10-pam-add-nox11.patch"
-
# Fix automagic dependency on policykit
- epatch "${FILESDIR}/${PN}-0.2.10-polkit-automagic.patch"
+ epatch "${FILESDIR}/${PN}-0.4.0-polkit-automagic.patch"
+
+ # Fix multilib support
+ epatch "${FILESDIR}/${PN}-0.4.0-multilib.patch"
- # Fix inability to shutdown/restart
- epatch "${FILESDIR}/${P}-shutdown.patch"
+ # Be able to shutdown or reboot even without polkit or RBAC supports
+ epatch "${FILESDIR}/${P}-shutdown-reboot-without-policies.patch"
eautoreconf
}
src_configure() {
econf \
+ XMLTO_FLAGS="--skip-validation" \
$(use_enable debug) \
$(use_enable doc docbook-docs) \
$(use_enable pam pam-module) \
@@ -80,11 +80,11 @@ src_install() {
keepdir /var/run/ConsoleKit
keepdir /var/log/ConsoleKit
- insinto /etc/X11/xinit/xinitrc.d/
- doins "${FILESDIR}/90-consolekit" || die "doins failed"
+ exeinto /etc/X11/xinit/xinitrc.d/
+ doexe "${FILESDIR}/90-consolekit" || die "doexe failed"
exeinto /usr/$(get_libdir)/ConsoleKit/run-session.d/
- doexe "${FILESDIR}/pam-foreground-compat.ck" || die "doexe failed"
+ doexe "${FILESDIR}/pam-foreground-compat.ck" || die "doexe failed"
}
pkg_postinst() {
@@ -93,8 +93,4 @@ pkg_postinst() {
ewarn "This can be done with /etc/init.d/consolekit restart"
ewarn "but make sure you do this and then restart your session"
ewarn "otherwise you will get access denied for certain actions"
-
- ewarn
- ewarn "You need to chmod +x /etc/X11/xinit/xinitrc.d/90-consolekit"
- ewarn "to benefit of consolekit if you are not using gdm or pam integration."
}
diff --git a/sys-auth/consolekit/files/90-consolekit b/sys-auth/consolekit/files/90-consolekit
index c25e8b49cfbc..309471498e48 100644
--- a/sys-auth/consolekit/files/90-consolekit
+++ b/sys-auth/consolekit/files/90-consolekit
@@ -7,6 +7,6 @@
CK_LAUNCH_SESSION=/usr/bin/ck-launch-session
if [ -z "$XDG_SESSION_COOKIE" ] && [ -x "$CK_LAUNCH_SESSION" ]; then
- STARTUP="$CK_LAUNCH_SESSION $STARTUP"
+ command="$CK_LAUNCH_SESSION $command"
fi
diff --git a/sys-auth/consolekit/files/consolekit-0.2.3-freebsd.patch b/sys-auth/consolekit/files/consolekit-0.2.3-freebsd.patch
deleted file mode 100644
index 2e5744092817..000000000000
--- a/sys-auth/consolekit/files/consolekit-0.2.3-freebsd.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-diff --git a/src/ck-sysdeps-unix.c b/src/ck-sysdeps-unix.c
-index 0001b6b..bcdfb21 100644
---- a/src/ck-sysdeps-unix.c
-+++ b/src/ck-sysdeps-unix.c
-@@ -267,7 +267,13 @@ ck_wait_for_active_console_num (int console_fd,
- g_debug ("Interrupted waiting for native console %d activation: %s",
- num,
- errmsg);
-+#if !defined(__FreeBSD__)
-+ /* We don't want to retry on FreeBSD since getting
-+ * EINTR means we are terminating, and we don't want
-+ * to keep restarting our active VT check.
-+ */
- goto again;
-+#endif
- } else {
- g_warning ("Error waiting for native console %d activation: %s",
- num,
-diff --git a/src/main.c b/src/main.c
-index 11b6f2e..af2998b 100644
---- a/src/main.c
-+++ b/src/main.c
-@@ -245,6 +245,27 @@ setup_debug_log_signals (void)
- }
-
- static void
-+terminate (int sig __unused)
-+{
-+ return;
-+}
-+
-+static void
-+setup_termination_signals (void)
-+{
-+ struct sigaction sa;
-+
-+ sa.sa_handler = terminate;
-+ sigemptyset (&sa.sa_mask);
-+ sa.sa_flags = 0;
-+
-+ sigaction (SIGTERM, &sa, NULL);
-+ sigaction (SIGQUIT, &sa, NULL);
-+ sigaction (SIGINT, &sa, NULL);
-+ sigaction (SIGHUP, &sa, NULL);
-+}
-+
-+static void
- setup_debug_log (gboolean debug)
- {
- ck_log_init ();
-@@ -300,6 +321,8 @@ main (int argc,
-
- setup_debug_log (debug);
-
-+ setup_termination_signals ();
-+
- connection = get_system_bus ();
- if (connection == NULL) {
- goto out;
-diff --git a/src/test-vt-monitor.c b/src/test-vt-monitor.c
-index c445865..e31b24e 100644
---- a/src/test-vt-monitor.c
-+++ b/src/test-vt-monitor.c
-@@ -30,6 +30,7 @@
- #include <fcntl.h>
- #include <pwd.h>
- #include <string.h>
-+#include <signal.h>
- #include <errno.h>
-
- #include <locale.h>
-@@ -47,6 +48,12 @@ activated_cb (CkVtMonitor *monitor,
- g_message ("VT %u activated", num);
- }
-
-+static void
-+terminate (int sig __unused)
-+{
-+ return;
-+}
-+
- int
- main (int argc, char **argv)
- {
-@@ -55,12 +62,22 @@ main (int argc, char **argv)
- GError *error;
- guint num;
- gboolean res;
-+ struct sigaction sa;
-
- if (! g_thread_supported ()) {
- g_thread_init (NULL);
- }
- g_type_init ();
-
-+ sa.sa_handler = terminate;
-+ sigemptyset (&sa.sa_mask);
-+ sa.sa_flags = 0;
-+
-+ sigaction (SIGINT, &sa, NULL);
-+ sigaction (SIGTERM, &sa, NULL);
-+ sigaction (SIGQUIT, &sa, NULL);
-+ sigaction (SIGHUP, &sa, NULL);
-+
- if (! ck_is_root_user ()) {
- g_warning ("Must be run as root");
- exit (1);
diff --git a/sys-auth/consolekit/files/consolekit-0.4.0-multilib.patch b/sys-auth/consolekit/files/consolekit-0.4.0-multilib.patch
new file mode 100644
index 000000000000..b898353d8f2e
--- /dev/null
+++ b/sys-auth/consolekit/files/consolekit-0.4.0-multilib.patch
@@ -0,0 +1,120 @@
+From c4ba8b276bf95faf2f643e42988709ed6cb0b2f0 Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Sun, 18 Oct 2009 23:30:36 +0200
+Subject: [PATCH] respect multilib
+
+---
+ src/Makefile.am | 4 ++--
+ src/ck-manager.c | 4 ++--
+ src/ck-seat.c | 2 +-
+ src/ck-session.c | 2 +-
+ tools/freebsd/Makefile.am | 2 +-
+ tools/linux/Makefile.am | 2 +-
+ tools/solaris/Makefile.am | 2 +-
+ 7 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 6ab05c8..d6fb810 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -204,8 +204,8 @@ MAINTAINERCLEANFILES = \
+
+ install-data-local:
+ -mkdir -p $(DESTDIR)$(sysconfdir)/ConsoleKit/run-session.d
+- -mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-session.d
++ -mkdir -p $(DESTDIR)$(libdir)/ConsoleKit/run-session.d
+ -mkdir -p $(DESTDIR)$(sysconfdir)/ConsoleKit/run-seat.d
+- -mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d
++ -mkdir -p $(DESTDIR)$(libdir)/ConsoleKit/run-seat.d
+ -mkdir -p $(DESTDIR)$(localstatedir)/run/ConsoleKit
+ -mkdir -p $(DESTDIR)$(localstatedir)/log/ConsoleKit
+diff --git a/src/ck-manager.c b/src/ck-manager.c
+index 99693a3..e65e25b 100644
+--- a/src/ck-manager.c
++++ b/src/ck-manager.c
+@@ -1083,7 +1083,7 @@ do_restart (CkManager *manager,
+ log_system_restart_event (manager);
+
+ error = NULL;
+- res = g_spawn_command_line_async (PREFIX "/lib/ConsoleKit/scripts/ck-system-restart",
++ res = g_spawn_command_line_async (LIBDIR "/ConsoleKit/scripts/ck-system-restart",
+ &error);
+ if (! res) {
+ GError *new_error;
+@@ -1164,7 +1164,7 @@ do_stop (CkManager *manager,
+ log_system_stop_event (manager);
+
+ error = NULL;
+- res = g_spawn_command_line_async (PREFIX "/lib/ConsoleKit/scripts/ck-system-stop",
++ res = g_spawn_command_line_async (LIBDIR "/ConsoleKit/scripts/ck-system-stop",
+ &error);
+ if (! res) {
+ GError *new_error;
+diff --git a/src/ck-seat.c b/src/ck-seat.c
+index af7db59..d089f29 100644
+--- a/src/ck-seat.c
++++ b/src/ck-seat.c
+@@ -1278,7 +1278,7 @@ ck_seat_run_programs (CkSeat *seat,
+ g_assert(n <= G_N_ELEMENTS(extra_env));
+
+ ck_run_programs (SYSCONFDIR "/ConsoleKit/run-seat.d", action, extra_env);
+- ck_run_programs (PREFIX "/lib/ConsoleKit/run-seat.d", action, extra_env);
++ ck_run_programs (LIBDIR "/ConsoleKit/run-seat.d", action, extra_env);
+
+ for (n = 0; extra_env[n] != NULL; n++) {
+ g_free (extra_env[n]);
+diff --git a/src/ck-session.c b/src/ck-session.c
+index d8db9dd..c2fc320 100644
+--- a/src/ck-session.c
++++ b/src/ck-session.c
+@@ -1287,7 +1287,7 @@ ck_session_run_programs (CkSession *session,
+ g_assert(n <= G_N_ELEMENTS(extra_env));
+
+ ck_run_programs (SYSCONFDIR "/ConsoleKit/run-session.d", action, extra_env);
+- ck_run_programs (PREFIX "/lib/ConsoleKit/run-session.d", action, extra_env);
++ ck_run_programs (LIBDIR "/ConsoleKit/run-session.d", action, extra_env);
+
+ for (n = 0; extra_env[n] != NULL; n++) {
+ g_free (extra_env[n]);
+diff --git a/tools/freebsd/Makefile.am b/tools/freebsd/Makefile.am
+index f668722..d25930e 100644
+--- a/tools/freebsd/Makefile.am
++++ b/tools/freebsd/Makefile.am
+@@ -6,7 +6,7 @@ NULL =
+ SUBDIRS = \
+ $(NULL)
+
+-scriptdir = $(prefix)/lib/ConsoleKit/scripts
++scriptdir = $(libdir)/ConsoleKit/scripts
+ script_SCRIPTS = \
+ ck-system-stop \
+ ck-system-restart \
+diff --git a/tools/linux/Makefile.am b/tools/linux/Makefile.am
+index 5a95942..51196c0 100644
+--- a/tools/linux/Makefile.am
++++ b/tools/linux/Makefile.am
+@@ -6,7 +6,7 @@ NULL =
+ SUBDIRS = \
+ $(NULL)
+
+-scriptdir = $(prefix)/lib/ConsoleKit/scripts
++scriptdir = $(libdir)/ConsoleKit/scripts
+ script_SCRIPTS = \
+ ck-system-stop \
+ ck-system-restart \
+diff --git a/tools/solaris/Makefile.am b/tools/solaris/Makefile.am
+index f668722..d25930e 100644
+--- a/tools/solaris/Makefile.am
++++ b/tools/solaris/Makefile.am
+@@ -6,7 +6,7 @@ NULL =
+ SUBDIRS = \
+ $(NULL)
+
+-scriptdir = $(prefix)/lib/ConsoleKit/scripts
++scriptdir = $(libdir)/ConsoleKit/scripts
+ script_SCRIPTS = \
+ ck-system-stop \
+ ck-system-restart \
+--
+1.6.5.rc1
+
diff --git a/sys-auth/consolekit/files/consolekit-0.4.0-polkit-automagic.patch b/sys-auth/consolekit/files/consolekit-0.4.0-polkit-automagic.patch
new file mode 100644
index 000000000000..d068ca23798d
--- /dev/null
+++ b/sys-auth/consolekit/files/consolekit-0.4.0-polkit-automagic.patch
@@ -0,0 +1,31 @@
+Automagic polkit
+
+---
+--- configure.ac
++++ configure.ac
+@@ -55,10 +55,21 @@
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ )
+
+-PKG_CHECK_MODULES(POLKIT,
+- polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
+- have_polkit=yes,
+- have_polkit=no)
++AC_ARG_ENABLE([polkit],
++ AC_HELP_STRING([--enable-polkit], [Enable PolicyKit support (default auto)]),
++ enable_polkit=$enableval,
++ enable_polkit=auto)
++
++if test "x$enable_polkit" != "xno"; then
++ PKG_CHECK_MODULES(POLKIT,
++ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
++ have_polkit=yes,
++ have_polkit=no)
++ if test "x$enable_polkit" = "xyes" -a "x$have_polkit" = "xno"; then
++ AC_MSG_ERROR([PolicyKit support explicitly requested but dependencies not found])
++ fi
++fi
++
+ if test "x$have_polkit" = "xyes" ; then
+ AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
+ fi
diff --git a/sys-auth/consolekit/files/consolekit-0.4.1-shutdown-reboot-without-policies.patch b/sys-auth/consolekit/files/consolekit-0.4.1-shutdown-reboot-without-policies.patch
new file mode 100644
index 000000000000..3183f11ece08
--- /dev/null
+++ b/sys-auth/consolekit/files/consolekit-0.4.1-shutdown-reboot-without-policies.patch
@@ -0,0 +1,35 @@
+From: Romain Perier <mrpouet@gentoo.org>
+Date: Sat, 24 Oct 2009 18:43:43 +0200
+Subject: [PATCH] Be able to shutdown or reboot even without polkit or RBAC supports
+
+Ck does NOTHING at the origin if its built without polkit or RBAC supports, except
+display a warning using g_warning() (which does not make sense).
+The trick is to to call do_stop()/do_restart() in the #else directive :)
+
+---
+ src/ck-manager.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/src/ck-manager.c b/src/ck-manager.c
+index 99693a3..181df0d 100644
+--- a/src/ck-manager.c
++++ b/src/ck-manager.c
+@@ -1129,6 +1129,7 @@ ck_manager_restart (CkManager *manager,
+ check_rbac_permissions (manager, context, do_restart);
+ #else
+ g_warning ("Compiled without PolicyKit or RBAC support!");
++ do_restart(manager, context);
+ #endif
+
+ return TRUE;
+@@ -1200,6 +1201,7 @@ ck_manager_stop (CkManager *manager,
+ check_rbac_permissions (manager, context, do_stop);
+ #else
+ g_warning ("Compiled without PolicyKit or RBAC support!");
++ do_stop(manager, context);
+ #endif
+
+ return TRUE;
+--
+1.6.5.1
+