summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2014-06-02 16:39:39 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2014-06-02 16:39:39 +0000
commitb443b4b83dbaf9fca36e4548e417949b0f6eabd8 (patch)
treebbecb7e0ecf27d187317874d6fcd97ce300370c6 /xfce-base/xfce4-session
parentold (diff)
downloadhistorical-b443b4b83dbaf9fca36e4548e417949b0f6eabd8.tar.gz
historical-b443b4b83dbaf9fca36e4548e417949b0f6eabd8.tar.bz2
historical-b443b4b83dbaf9fca36e4548e417949b0f6eabd8.zip
Use Fedora patch to introduce power management support using systemd to 4.10 series. Fix missing sys-power/pm-utils dependency in 4.11 (pre-4.12) series.
Package-Manager: portage-2.2.10/cvs/Linux x86_64 Manifest-Sign-Key: 0x4868F14D
Diffstat (limited to 'xfce-base/xfce4-session')
-rw-r--r--xfce-base/xfce4-session/ChangeLog10
-rw-r--r--xfce-base/xfce4-session/Manifest20
-rw-r--r--xfce-base/xfce4-session/files/xfce4-session-4.10.1-systemd.patch400
-rw-r--r--xfce-base/xfce4-session/xfce4-session-4.10.1-r2.ebuild71
-rw-r--r--xfce-base/xfce4-session/xfce4-session-4.11.0-r1.ebuild3
5 files changed, 493 insertions, 11 deletions
diff --git a/xfce-base/xfce4-session/ChangeLog b/xfce-base/xfce4-session/ChangeLog
index 1c9deefa2a1d..2c449d991e19 100644
--- a/xfce-base/xfce4-session/ChangeLog
+++ b/xfce-base/xfce4-session/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for xfce-base/xfce4-session
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfce4-session/ChangeLog,v 1.208 2014/06/02 07:07:44 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfce4-session/ChangeLog,v 1.209 2014/06/02 16:39:34 ssuominen Exp $
+
+*xfce4-session-4.10.1-r2 (02 Jun 2014)
+
+ 02 Jun 2014; Samuli Suominen <ssuominen@gentoo.org>
+ +files/xfce4-session-4.10.1-systemd.patch, +xfce4-session-4.10.1-r2.ebuild,
+ xfce4-session-4.11.0-r1.ebuild:
+ Use Fedora patch to introduce power management support using systemd to 4.10
+ series. Fix missing sys-power/pm-utils dependency in 4.11 (pre-4.12) series.
02 Jun 2014; Samuli Suominen <ssuominen@gentoo.org>
xfce4-session-4.11.0-r1.ebuild:
diff --git a/xfce-base/xfce4-session/Manifest b/xfce-base/xfce4-session/Manifest
index bea4d5cfe360..b6eed3398b1b 100644
--- a/xfce-base/xfce4-session/Manifest
+++ b/xfce-base/xfce4-session/Manifest
@@ -2,22 +2,24 @@
Hash: SHA256
AUX xfce4-session-4.10.1-alock_support_to_xflock4.patch 367 SHA256 2be32b49b268649e509b99e8d93a3d4e57665cbe8e03693bc85f88ea088e0650 SHA512 8ee765241997cbf32c08e9597d42ee666400fb27792a8716f59aa91daba7476e1de679e4c9254653cf9b14d95fc293f22d02e99ef3288287113a72407e513975 WHIRLPOOL b4b440c393c6175c9555d4df5d3eb4e730512c41fd83d291df2817206225efabc8db752887bd3316ae7fc915158a513202fa592536b78d52c4c40bbff7aa7ae8
+AUX xfce4-session-4.10.1-systemd.patch 12922 SHA256 0e90469248180390ce7736a5621a5c52a3444261768a959bb0d8b8cb68791980 SHA512 43f737b583bec96aae5a2da61124b5e2a6351117494af8cbe6d776e6cb066f778e01ff873ae26e7e44464c10128713d04b0521fbe16a8529833a4f5cf2dab23d WHIRLPOOL d9e15858cbbc72a487dde757844640b7d495e5c253b57b42fcf4694ff8d4168da8f9ca754da1d7947b95361cec90f21abc2257782748a636b90bf020b4febc43
AUX xfce4-session-4.11.0-upower-0.99.patch 11987 SHA256 babd6f01c39165c3f178708096695745b3e3d8a7434c8bc762c2ee4a0883c028 SHA512 962e33bac39cea783651ff2b6b89cdaa66b4af06752acf91e6270ade3b3a2947ac903da044330d268042be9a3aa5c2508226cd21969e65bc44cda3afcc664421 WHIRLPOOL d140fc8de712f1d0c527fca4edb6df73da49bbce68d5a5ea425bef8abd9463426b90a9ca5c97c51ab9358ffc02524e6381df137926607ffbbfdbb3cdc32eb3f1
DIST xfce4-session-4.10.1.tar.bz2 1273015 SHA256 0154fabdc398798c3445374ccc52a2f5bcb2d867fc94bc54114395b24f9cfc83 SHA512 4c6931c350957107fc13f244748287141d524a0e954f48935b5dac2c46a8125af702e1164af98414644f9ea51f5a952db6c57a96fe2a51cab21b616381aac015 WHIRLPOOL fb6193b4d769fb0cd5461a925538bbfa9224b31209d3d16b8bef2f81cbf29aa4cf1c56373335b27326cc2a9f8905a11eec975ee7bc2068168b39e06cd08e64fa
DIST xfce4-session-4.11.0.tar.bz2 1213569 SHA256 c68905b5124382e30e90f7e4f080fd7e24d58a065991eba9cfcb99e5d59a7c8e SHA512 cbb574117acdefb4781ecb16f7e4681c4c31e624eea2976c88199d3bba883c9a1f114d8b88eebfdd1f5e2c298a672ebf6171ee2b0a117dc54cb675ebd38db90e WHIRLPOOL fa14aa5e321339903460df8471b59b018d34c8453f639f8726e6961d88383aded6319448704d08f74be53ca08c03625dc76857ee328b19cfbaeffadce160d1fe
EBUILD xfce4-session-4.10.1-r1.ebuild 1767 SHA256 ff110abecc8a14df6cc49a30455de2c3ae747e65d7e6a90b81bee3666e8527dd SHA512 8b01527cc1f76bd8ad5ddffa8e9158581eb3c67e307a2578cfe561f2db15ccc25ebad62b8442e8c5f6eae53b5842858ba0083df690a8fc88069e5b1b5c18f3fd WHIRLPOOL 85febc5aa20fb062488ae4d810d4396dfb6c0d1b849c7058166e9ab97b2c48f42e0da5d36d178b926cd3858b54bf5fa471f4a250c237728b29621685d72b6279
-EBUILD xfce4-session-4.11.0-r1.ebuild 1895 SHA256 b58c19052b0890a0e93d6b962b901cfa018ccf9296be88c746fa983cd4b15e98 SHA512 7eed369212ad50859fe4f39682280e7ff72899ec31f2c03430b7acf8480c0eacdaefc44b2d4a76fc8ba69bfac6b21c12cb88df9029a3172512b4db744fecab77 WHIRLPOOL d561eb59dfce61864656fb8084510036bd9c68fa04106e53c2dcf7c24f84f62dacc09f8a48c36ca64c900595ec5fb8e8f9f8bccee179a52026fa0e7d3b1f58be
+EBUILD xfce4-session-4.10.1-r2.ebuild 1920 SHA256 2c5dcd96d2de4ce4b3225910fa9ea3d59430ef7aeb89d35839d0fe8011c98f83 SHA512 a22831757392f94d658d2330372ab202eeb15a688ba06140425a13a762a6df026f27af168033e68a0f22ee77a17a5d4934aa7e7d085bb12d642e319ff5ba0c08 WHIRLPOOL 67f4d0068c76f09e3ffec8bf346e27332ad5acfb8d49caf238d3cc43b9cc9d52b15c62143a673cc3e2c3ec42008d6e8e6d877db2766b0049e9a4d3f1ba99296a
+EBUILD xfce4-session-4.11.0-r1.ebuild 1939 SHA256 f4a6f46a7f0db83110b6575324a48e7915bcbc4dea42eafab5e1ae5fa8333a41 SHA512 b48a819c2d4a9fd64932d6ba2e590c9a1871806291d99fee3c32b515b6a0e8b0dae69810bb455ebaeb8b4ea11e7c6fa9a6cbaecc82b4f31d86936ad98bee0d9a WHIRLPOOL 142a45303b8702ac2cd60e7a691637a24ad407373c1bec4150d49ef697f8bfcaeeb7f5f0c4b6ba0f392b64dc6aede2a2e1aadcfc8952178b3f2f8495e63171e1
EBUILD xfce4-session-4.11.0.ebuild 1778 SHA256 e60306ef6c9c7ebd0cab525374020b1e70078c97e0938864dc70020ce2f62c0a SHA512 15636397caa50269767e720b48dca86238a5f7461104867a4e6625c224ffe3ceb65da0c44c1be8043ac802c3c310434e0ec01cecacac90c4109b8f510d20261a WHIRLPOOL a217bfa16b5a22822545a2e893df1f4c918065871e3b6a637d2a22c7020d8eb1a5ed50533d26130fa2ae0880036b037b69c62b24592f96aa074aadbc564fde85
-MISC ChangeLog 28497 SHA256 f636f81e0546d6c3e60c1777bd2301048df8dfec27a2233a1716786568d65298 SHA512 0f51b03b0c3cc3e0c4d98a4ba7042e8f70247124a6a57bc697e654f202797bdc11594e3279a954a2d65dcedb01cc1236b1727fe8e8410078ef1de484217ef77c WHIRLPOOL e621476affa18420fc6fcad36d7df9a4331f31edcee6698aca9c251926bdb18d792f2b6883ce39181602d62b7f8359b909dd21990b4ca90c451a39dbc6cc1955
+MISC ChangeLog 28862 SHA256 96f9fd5fd03d8b37c43f495cc8f6f3741a2a6267072d6832b15014c187a51986 SHA512 2c7dd1d6984c0d1db2a4ed1c9e0a85e11e506019b2c0499eb6806b9ddf0eaf3cfc18f21004f2a632d007ead78a7a2b8b7d32a8951acb5961265b75ac561c2af8 WHIRLPOOL 96cedc6c580e24477c1f070f1e51f21f7a754f31eabc17ce98d0a56681f1389cd2138a32cbeae61877bdcd85cd546beabcd727a07609a8818ca0ac2718e8b758
MISC metadata.xml 159 SHA256 900ea49b6703fce452e205b85226bf1f994725963e5840da501182e7487d0e63 SHA512 000eb10e453390fb27843585adf354d725e77d881553d97a1a242bf06578a402ee4a924d9d8205a3fa687a59e2402bc9f3e1c227e448e05026354c196cf0a4f3 WHIRLPOOL 6f01aa01b8124d752be8e6c550ffdfc9093d45b206771c924ce25ce3f0daf006a669721d1385ff1bc803df342322d1c264f2905d3ccc44686c937deae8308ec3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iQEcBAEBCAAGBQJTjCI+AAoJEEdUh39IaPFNnYcH/18XbowUYXTASN/qCAY4UI6l
-hI1IZIXV2e+XFoVsTbevlfXtEAseJyy47OMxlqv122ago+C7+RL0aUC8ZTARURJK
-pcL5MEwR7FdmcHmDTcw2LU2yQxOepmXMf+q8Rs7mjzI9vEkW82+VyixsQ+58fjZV
-J71Qld9F07S35o3dzfI+7ZVMfJbUFqBbuY4Ln6l6Nh9z/eWc/q9CUof1xpKZqiMf
-lylBChITmxUyq5C3YQm97U3bxjmrEyoQSjjR6Dx7e+9f6Jm1Fu77RokMi47sADAA
-dz2oCXMr+stuMD1f+/JLif1fwDHAisBXkFwRQCor+YGu3pqxYm8FH3N+bDJMzwg=
-=bn++
+iQEcBAEBCAAGBQJTjKhCAAoJEEdUh39IaPFN1A0H/0prlExZMjoFgxVGw+1MhENC
+W9lla1NY9sGK7ZU8UgXMqgMOFLVMk+wMWj9W7vVLuZRJ3SDJQq4kjQPivi0wmSEi
+2q7QWXsN6w2y8AeLnw6XaY7IF/CaOKfi8dfkEyICJI0jNkUymxSELV5mHj6/TOml
+U2uEN619dDRoIn/7EYcX0YYh3QJo0UlLz5XZdmQhrTGQqc9jN5jxKjEJYfWaWgKA
+8HH7/EzT/ujRmuWnNrzdMiPEbOpJMsLI7reaUdnGt64D4MgkIPsGfbn5YMbijmUw
+/fzG3uv0XskDKkImO3plGnY/OD0gZZ/Y7rgavTvnYdYURPWX2TU2pZxHVNKza8k=
+=jNZ7
-----END PGP SIGNATURE-----
diff --git a/xfce-base/xfce4-session/files/xfce4-session-4.10.1-systemd.patch b/xfce-base/xfce4-session/files/xfce4-session-4.10.1-systemd.patch
new file mode 100644
index 000000000000..e174e40d0355
--- /dev/null
+++ b/xfce-base/xfce4-session/files/xfce4-session-4.10.1-systemd.patch
@@ -0,0 +1,400 @@
+http://pkgs.fedoraproject.org/cgit/xfce4-session.git/commit/xfce4-session-4.10.1-systemd.patch?id=9e8af8b3ee7e8e91817d087e80de29b1af6d4943
+
+diff --git a/configure.ac b/configure.ac
+index 46ff366..8feee0b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -98,7 +98,7 @@ XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0])
+
+ dnl Check for polkit / systemd integration
+ XDT_CHECK_OPTIONAL_PACKAGE([SYSTEMD], [polkit-gobject-1], [0.100],
+- [systemd], [Systemd support (through polit)])
++ [systemd], [Systemd support (through polkit)])
+
+ dnl Check for debugging support
+ XDT_FEATURE_DEBUG([xfsm_debug_default])
+@@ -202,10 +202,10 @@ echo " * Legacy session management: yes"
+ else
+ echo " * Legacy session management: no"
+ fi
+-if test x"$GNOME_KEYRING_FOUND" = x"yes"; then
+-echo " * Gnome Keyring support: yes"
++if test x"$SYSTEMD_FOUND" = x"yes"; then
++echo " * Systemd support (through polkit): yes"
+ else
+-echo " * Gnome Keyring support: no"
++echo " * Systemd support (through polkit): no"
+ fi
+
+ echo
+diff --git a/xfce4-session/Makefile.am b/xfce4-session/Makefile.am
+index 5472b33..ea706fd 100644
+--- a/xfce4-session/Makefile.am
++++ b/xfce4-session/Makefile.am
+@@ -38,6 +38,8 @@ xfce4_session_SOURCES = \
+ xfsm-compat-gnome.h \
+ xfsm-compat-kde.c \
+ xfsm-compat-kde.h \
++ xfsm-consolekit.c \
++ xfsm-consolekit.h \
+ xfsm-dns.c \
+ xfsm-dns.h \
+ xfsm-error.c \
+@@ -67,10 +69,6 @@ if HAVE_SYSTEMD
+ xfce4_session_SOURCES += \
+ xfsm-systemd.c \
+ xfsm-systemd.h
+-else
+-xfce4_session_SOURCES += \
+- xfsm-consolekit.c \
+- xfsm-consolekit.h
+ endif
+
+ xfce4_session_CFLAGS = \
+diff --git a/xfce4-session/xfsm-shutdown.c b/xfce4-session/xfsm-shutdown.c
+index 4c483a7..329c4f6 100644
+--- a/xfce4-session/xfsm-shutdown.c
++++ b/xfce4-session/xfsm-shutdown.c
+@@ -63,6 +63,7 @@
+ #include <xfce4-session/xfsm-shutdown.h>
+ #include <xfce4-session/xfsm-compat-gnome.h>
+ #include <xfce4-session/xfsm-compat-kde.h>
++#include <xfce4-session/xfsm-consolekit.h>
+ #include <xfce4-session/xfsm-fadeout.h>
+ #include <xfce4-session/xfsm-global.h>
+ #include <xfce4-session/xfsm-legacy.h>
+@@ -70,8 +71,6 @@
+
+ #ifdef HAVE_SYSTEMD
+ #include <xfce4-session/xfsm-systemd.h>
+-#else
+-#include <xfce4-session/xfsm-consolekit.h>
+ #endif
+
+ static void xfsm_shutdown_finalize (GObject *object);
+@@ -98,9 +97,8 @@ struct _XfsmShutdown
+
+ #ifdef HAVE_SYSTEMD
+ XfsmSystemd *systemd;
+-#else
+- XfsmConsolekit *consolekit;
+ #endif
++ XfsmConsolekit *consolekit;
+ XfsmUPower *upower;
+
+ /* kiosk settings */
+@@ -139,10 +137,14 @@ xfsm_shutdown_init (XfsmShutdown *shutdown)
+ XfceKiosk *kiosk;
+
+ #ifdef HAVE_SYSTEMD
+- shutdown->systemd = xfsm_systemd_get ();
+-#else
+- shutdown->consolekit = xfsm_consolekit_get ();
++ shutdown->consolekit = NULL;
++ shutdown->systemd = NULL;
++ if (LOGIND_RUNNING())
++ shutdown->systemd = xfsm_systemd_get ();
++ else
+ #endif
++ shutdown->consolekit = xfsm_consolekit_get ();
++
+ shutdown->upower = xfsm_upower_get ();
+ shutdown->helper_state = SUDO_NOT_INITIAZED;
+ shutdown->helper_require_password = FALSE;
+@@ -162,10 +164,11 @@ xfsm_shutdown_finalize (GObject *object)
+ XfsmShutdown *shutdown = XFSM_SHUTDOWN (object);
+
+ #ifdef HAVE_SYSTEMD
+- g_object_unref (G_OBJECT (shutdown->systemd));
+-#else
+- g_object_unref (G_OBJECT (shutdown->consolekit));
++ if (shutdown->systemd != NULL)
++ g_object_unref (G_OBJECT (shutdown->systemd));
+ #endif
++ if (shutdown->consolekit != NULL)
++ g_object_unref (G_OBJECT (shutdown->consolekit));
+ g_object_unref (G_OBJECT (shutdown->upower));
+
+ /* close down helper */
+@@ -657,10 +660,11 @@ xfsm_shutdown_try_restart (XfsmShutdown *shutdown,
+ return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_RESTART, error);
+ else
+ #ifdef HAVE_SYSTEMD
+- return xfsm_systemd_try_restart (shutdown->systemd, error);
+-#else
+- return xfsm_consolekit_try_restart (shutdown->consolekit, error);
++ if (shutdown->systemd != NULL)
++ return xfsm_systemd_try_restart (shutdown->systemd, error);
++ else
+ #endif
++ return xfsm_consolekit_try_restart (shutdown->consolekit, error);
+ }
+
+
+@@ -678,10 +682,11 @@ xfsm_shutdown_try_shutdown (XfsmShutdown *shutdown,
+ return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_SHUTDOWN, error);
+ else
+ #ifdef HAVE_SYSTEMD
+- return xfsm_systemd_try_shutdown (shutdown->systemd, error);
+-#else
+- return xfsm_consolekit_try_shutdown (shutdown->consolekit, error);
++ if (shutdown->systemd != NULL)
++ return xfsm_systemd_try_shutdown (shutdown->systemd, error);
++ else
+ #endif
++ return xfsm_consolekit_try_shutdown (shutdown->consolekit, error);
+ }
+
+
+@@ -692,6 +697,11 @@ xfsm_shutdown_try_suspend (XfsmShutdown *shutdown,
+ {
+ g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
+
++#ifdef HAVE_SYSTEMD
++ if (shutdown->systemd != NULL)
++ return xfsm_systemd_try_suspend (shutdown->systemd, error);
++ else
++#endif
+ return xfsm_upower_try_suspend (shutdown->upower, error);
+ }
+
+@@ -703,6 +713,11 @@ xfsm_shutdown_try_hibernate (XfsmShutdown *shutdown,
+ {
+ g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
+
++#ifdef HAVE_SYSTEMD
++ if (shutdown->systemd != NULL)
++ return xfsm_systemd_try_hibernate (shutdown->systemd, error);
++ else
++#endif
+ return xfsm_upower_try_hibernate (shutdown->upower, error);
+ }
+
+@@ -722,10 +737,14 @@ xfsm_shutdown_can_restart (XfsmShutdown *shutdown,
+ }
+
+ #ifdef HAVE_SYSTEMD
+- if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error))
+-#else
+- if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error))
++ if (shutdown->systemd != NULL)
++ {
++ if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error))
++ return TRUE;
++ }
++ else
+ #endif
++ if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error))
+ return TRUE;
+
+ if (xfsm_shutdown_sudo_init (shutdown, error))
+@@ -753,10 +772,14 @@ xfsm_shutdown_can_shutdown (XfsmShutdown *shutdown,
+ }
+
+ #ifdef HAVE_SYSTEMD
+- if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error))
+-#else
+- if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error))
++ if (shutdown->systemd != NULL)
++ {
++ if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error))
++ return TRUE;
++ }
++ else
+ #endif
++ if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error))
+ return TRUE;
+
+ if (xfsm_shutdown_sudo_init (shutdown, error))
+@@ -784,6 +807,12 @@ xfsm_shutdown_can_suspend (XfsmShutdown *shutdown,
+ return TRUE;
+ }
+
++#ifdef HAVE_SYSTEMD
++ if (shutdown->systemd != NULL)
++ return xfsm_systemd_can_suspend (shutdown->systemd, can_suspend,
++ auth_suspend, error);
++ else
++#endif
+ return xfsm_upower_can_suspend (shutdown->upower, can_suspend,
+ auth_suspend, error);
+ }
+@@ -804,6 +833,12 @@ xfsm_shutdown_can_hibernate (XfsmShutdown *shutdown,
+ return TRUE;
+ }
+
++#ifdef HAVE_SYSTEMD
++ if (shutdown->systemd != NULL)
++ return xfsm_systemd_can_hibernate (shutdown->systemd, can_hibernate,
++ auth_hibernate, error);
++ else
++#endif
+ return xfsm_upower_can_hibernate (shutdown->upower, can_hibernate,
+ auth_hibernate, error);
+ }
+diff --git a/xfce4-session/xfsm-systemd.c b/xfce4-session/xfsm-systemd.c
+index 7bdd39d..f18fbf7 100644
+--- a/xfce4-session/xfsm-systemd.c
++++ b/xfce4-session/xfsm-systemd.c
+@@ -24,6 +24,7 @@
+ #include <dbus/dbus-glib.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+
++#include <libxfsm/xfsm-util.h>
+ #include <xfce4-session/xfsm-systemd.h>
+
+
+@@ -33,8 +34,12 @@
+ #define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
+ #define SYSTEMD_REBOOT_ACTION "Reboot"
+ #define SYSTEMD_POWEROFF_ACTION "PowerOff"
++#define SYSTEMD_SUSPEND_ACTION "Suspend"
++#define SYSTEMD_HIBERNATE_ACTION "Hibernate"
+ #define SYSTEMD_REBOOT_TEST "org.freedesktop.login1.reboot"
+ #define SYSTEMD_POWEROFF_TEST "org.freedesktop.login1.power-off"
++#define SYSTEMD_SUSPEND_TEST "org.freedesktop.login1.suspend"
++#define SYSTEMD_HIBERNATE_TEST "org.freedesktop.login1.hibernate"
+
+
+
+@@ -93,6 +98,22 @@ xfsm_systemd_finalize (GObject *object)
+ }
+
+
++
++static gboolean
++xfsm_systemd_lock_screen (GError **error)
++{
++ XfconfChannel *channel;
++ gboolean ret = TRUE;
++
++ channel = xfsm_open_config ();
++ if (xfconf_channel_get_bool (channel, "/shutdown/LockScreen", FALSE))
++ ret = g_spawn_command_line_async ("xflock4", error);
++
++ return ret;
++}
++
++
++
+ static gboolean
+ xfsm_systemd_can_method (XfsmSystemd *systemd,
+ gboolean *can_method,
+@@ -205,6 +226,34 @@ xfsm_systemd_try_shutdown (XfsmSystemd *systemd,
+
+
+ gboolean
++xfsm_systemd_try_suspend (XfsmSystemd *systemd,
++ GError **error)
++{
++ if (!xfsm_systemd_lock_screen (error))
++ return FALSE;
++
++ return xfsm_systemd_try_method (systemd,
++ SYSTEMD_SUSPEND_ACTION,
++ error);
++}
++
++
++
++gboolean
++xfsm_systemd_try_hibernate (XfsmSystemd *systemd,
++ GError **error)
++{
++ if (!xfsm_systemd_lock_screen (error))
++ return FALSE;
++
++ return xfsm_systemd_try_method (systemd,
++ SYSTEMD_HIBERNATE_ACTION,
++ error);
++}
++
++
++
++gboolean
+ xfsm_systemd_can_restart (XfsmSystemd *systemd,
+ gboolean *can_restart,
+ GError **error)
+@@ -227,3 +276,39 @@ xfsm_systemd_can_shutdown (XfsmSystemd *systemd,
+ SYSTEMD_POWEROFF_TEST,
+ error);
+ }
++
++
++
++gboolean
++xfsm_systemd_can_suspend (XfsmSystemd *systemd,
++ gboolean *can_suspend,
++ gboolean *auth_suspend,
++ GError **error)
++{
++ gboolean ret = FALSE;
++
++ ret = xfsm_systemd_can_method (systemd,
++ can_suspend,
++ SYSTEMD_SUSPEND_TEST,
++ error);
++ *auth_suspend = *can_suspend;
++ return ret;
++}
++
++
++
++gboolean
++xfsm_systemd_can_hibernate (XfsmSystemd *systemd,
++ gboolean *can_hibernate,
++ gboolean *auth_hibernate,
++ GError **error)
++{
++ gboolean ret = FALSE;
++
++ ret = xfsm_systemd_can_method (systemd,
++ can_hibernate,
++ SYSTEMD_HIBERNATE_TEST,
++ error);
++ *auth_hibernate = *can_hibernate;
++ return ret;
++}
+diff --git a/xfce4-session/xfsm-systemd.h b/xfce4-session/xfsm-systemd.h
+index 8223622..c5e74b5 100644
+--- a/xfce4-session/xfsm-systemd.h
++++ b/xfce4-session/xfsm-systemd.h
+@@ -22,6 +22,8 @@
+ #ifndef __XFSM_SYSTEMD_H__
+ #define __XFSM_SYSTEMD_H__
+
++#define LOGIND_RUNNING() (access ("/run/systemd/seats/", F_OK) >= 0)
++
+ typedef struct _XfsmSystemdClass XfsmSystemdClass;
+ typedef struct _XfsmSystemd XfsmSystemd;
+
+@@ -42,6 +44,12 @@ gboolean xfsm_systemd_try_restart (XfsmSystemd *systemd,
+ gboolean xfsm_systemd_try_shutdown (XfsmSystemd *systemd,
+ GError **error);
+
++gboolean xfsm_systemd_try_suspend (XfsmSystemd *systemd,
++ GError **error);
++
++gboolean xfsm_systemd_try_hibernate (XfsmSystemd *systemd,
++ GError **error);
++
+ gboolean xfsm_systemd_can_restart (XfsmSystemd *systemd,
+ gboolean *can_restart,
+ GError **error);
+@@ -50,6 +58,16 @@ gboolean xfsm_systemd_can_shutdown (XfsmSystemd *systemd,
+ gboolean *can_shutdown,
+ GError **error);
+
++gboolean xfsm_systemd_can_suspend (XfsmSystemd *systemd,
++ gboolean *can_suspend,
++ gboolean *auth_suspend,
++ GError **error);
++
++gboolean xfsm_systemd_can_hibernate (XfsmSystemd *systemd,
++ gboolean *can_hibernate,
++ gboolean *auth_hibernate,
++ GError **error);
++
+ G_END_DECLS
+
+ #endif /* __XFSM_SYSTEMD_H__ */
diff --git a/xfce-base/xfce4-session/xfce4-session-4.10.1-r2.ebuild b/xfce-base/xfce4-session/xfce4-session-4.10.1-r2.ebuild
new file mode 100644
index 000000000000..302138299024
--- /dev/null
+++ b/xfce-base/xfce4-session/xfce4-session-4.10.1-r2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfce4-session/xfce4-session-4.10.1-r2.ebuild,v 1.1 2014/06/02 16:39:34 ssuominen Exp $
+
+EAPI=5
+EAUTORECONF=1
+inherit xfconf
+
+DESCRIPTION="A session manager for the Xfce desktop environment"
+HOMEPAGE="http://docs.xfce.org/xfce/xfce4-session/start"
+SRC_URI="mirror://xfce/src/xfce/${PN}/${PV%.*}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="debug nls systemd udev +xscreensaver"
+
+COMMON_DEPEND=">=dev-libs/dbus-glib-0.100
+ x11-apps/iceauth
+ x11-libs/libSM
+ >=x11-libs/libwnck-2.30:1
+ x11-libs/libX11
+ >=xfce-base/libxfce4util-4.10.1
+ >=xfce-base/libxfce4ui-4.10
+ >=xfce-base/xfconf-4.10
+ !xfce-base/xfce-utils
+ systemd? ( >=sys-auth/polkit-0.100 )"
+RDEPEND="${COMMON_DEPEND}
+ x11-apps/xrdb
+ nls? ( x11-misc/xdg-user-dirs )
+ udev? (
+ systemd? ( || ( >=sys-power/upower-0.9.23 sys-power/upower-pm-utils ) )
+ !systemd? ( || ( <sys-power/upower-0.99 sys-power/upower-pm-utils ) )
+ )
+ xscreensaver? ( || (
+ >=x11-misc/xscreensaver-5.26
+ gnome-extra/gnome-screensaver
+ >=x11-misc/xlockmore-5.43
+ x11-misc/slock
+ x11-misc/alock[pam]
+ ) )"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+pkg_setup() {
+ PATCHES=(
+ "${FILESDIR}"/${P}-alock_support_to_xflock4.patch
+ "${FILESDIR}"/${P}-systemd.patch
+ )
+
+ XFCONF=(
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ $(use_enable systemd)
+ --with-xsession-prefix="${EPREFIX}"/usr
+ $(xfconf_use_debug)
+ )
+
+ DOCS=( AUTHORS BUGS ChangeLog NEWS README TODO )
+}
+
+src_install() {
+ xfconf_src_install
+
+ local sessiondir=/etc/X11/Sessions
+ echo startxfce4 > "${T}"/Xfce4
+ exeinto ${sessiondir}
+ doexe "${T}"/Xfce4
+ dosym Xfce4 ${sessiondir}/Xfce
+}
diff --git a/xfce-base/xfce4-session/xfce4-session-4.11.0-r1.ebuild b/xfce-base/xfce4-session/xfce4-session-4.11.0-r1.ebuild
index 3f2bc372abbf..4c4eccd35c3d 100644
--- a/xfce-base/xfce4-session/xfce4-session-4.11.0-r1.ebuild
+++ b/xfce-base/xfce4-session/xfce4-session-4.11.0-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfce4-session/xfce4-session-4.11.0-r1.ebuild,v 1.2 2014/06/02 07:07:44 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfce4-session/xfce4-session-4.11.0-r1.ebuild,v 1.3 2014/06/02 16:39:34 ssuominen Exp $
EAPI=5
EAUTORECONF=1
@@ -29,6 +29,7 @@ COMMON_DEPEND=">=dev-libs/dbus-glib-0.100
RDEPEND="${COMMON_DEPEND}
x11-apps/xrdb
nls? ( x11-misc/xdg-user-dirs )
+ !systemd? ( udev? ( sys-power/pm-utils ) )
xscreensaver? ( || (
>=x11-misc/xscreensaver-5.26
gnome-extra/gnome-screensaver