summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2011-04-04 14:52:08 +0000
committerGilles Dartiguelongue <eva@gentoo.org>2011-04-04 14:52:08 +0000
commit3ecac0b8fc4fe5b600ae8b85af0c0d03245163f5 (patch)
tree0ff2a317d6efc5d517cd220454d416be75d2a45f /gnome-base/gnome-session
parentBump to the final release, d'oh. (diff)
downloadgentoo-2-3ecac0b8fc4fe5b600ae8b85af0c0d03245163f5.tar.gz
gentoo-2-3ecac0b8fc4fe5b600ae8b85af0c0d03245163f5.tar.bz2
gentoo-2-3ecac0b8fc4fe5b600ae8b85af0c0d03245163f5.zip
Add support for GNOME 3 conditions, thanks to Nirbheek, bug #361025.
(Portage version: 2.2.0_alpha29/cvs/Linux x86_64, RepoMan options: --force)
Diffstat (limited to 'gnome-base/gnome-session')
-rw-r--r--gnome-base/gnome-session/ChangeLog9
-rw-r--r--gnome-base/gnome-session/files/gnome-session-2.32.1-gnome3-conditions.patch107
-rw-r--r--gnome-base/gnome-session/gnome-session-2.32.1-r2.ebuild83
3 files changed, 198 insertions, 1 deletions
diff --git a/gnome-base/gnome-session/ChangeLog b/gnome-base/gnome-session/ChangeLog
index 5bf816b668b5..77ce00b061da 100644
--- a/gnome-base/gnome-session/ChangeLog
+++ b/gnome-base/gnome-session/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for gnome-base/gnome-session
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-session/ChangeLog,v 1.286 2011/03/27 12:37:51 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-session/ChangeLog,v 1.287 2011/04/04 14:52:08 eva Exp $
+
+*gnome-session-2.32.1-r2 (04 Apr 2011)
+
+ 04 Apr 2011; Gilles Dartiguelongue <eva@gentoo.org>
+ +gnome-session-2.32.1-r2.ebuild,
+ +files/gnome-session-2.32.1-gnome3-conditions.patch:
+ Add support for GNOME 3 conditions, thanks to Nirbheek, bug #361025.
*gnome-session-2.32.1-r1 (27 Mar 2011)
diff --git a/gnome-base/gnome-session/files/gnome-session-2.32.1-gnome3-conditions.patch b/gnome-base/gnome-session/files/gnome-session-2.32.1-gnome3-conditions.patch
new file mode 100644
index 000000000000..a4c220732503
--- /dev/null
+++ b/gnome-base/gnome-session/files/gnome-session-2.32.1-gnome3-conditions.patch
@@ -0,0 +1,107 @@
+From d27c9dfb07e0d69ff37d029e5647bd68e7db7e95 Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek@gentoo.org>
+Date: Mon, 4 Apr 2011 18:07:09 +0530
+Subject: [PATCH] Don't reject GNOME 3 session autostart conditions
+
+gnome-session-3.0 introduced a new AutostartCondition=GNOME3 directive.
+See commit 58ebdfac for details on that.
+
+This commit adds detection for that directive instead of disabling .desktop
+files with that. Now, apps are autostarted if they contain:
+
+ AutostartCondition=GNOME3 is-session gnome-fallback
+or
+ AutostartCondition=GNOME3 unless-session [something other than gnome-fallback]
+
+And are disabled for all other cases.
+---
+ gnome-session/gsm-autostart-app.c | 45 +++++++++++++++++++++++++++++++-----
+ 1 files changed, 38 insertions(+), 7 deletions(-)
+
+diff --git a/gnome-session/gsm-autostart-app.c b/gnome-session/gsm-autostart-app.c
+index 529a346..abc918f 100644
+--- a/gnome-session/gsm-autostart-app.c
++++ b/gnome-session/gsm-autostart-app.c
+@@ -40,11 +40,14 @@ enum {
+ };
+
+ enum {
+- GSM_CONDITION_NONE = 0,
+- GSM_CONDITION_IF_EXISTS = 1,
+- GSM_CONDITION_UNLESS_EXISTS = 2,
+- GSM_CONDITION_GNOME = 3,
+- GSM_CONDITION_UNKNOWN = 4
++ GSM_CONDITION_NONE = 0,
++ GSM_CONDITION_IF_EXISTS = 1,
++ GSM_CONDITION_UNLESS_EXISTS = 2,
++ GSM_CONDITION_GNOME = 3,
++ GSM_CONDITION_GSETTINGS = 4,
++ GSM_CONDITION_IF_SESSION = 5,
++ GSM_CONDITION_UNLESS_SESSION = 6,
++ GSM_CONDITION_UNKNOWN = 7
+ };
+
+ #define GSM_SESSION_CLIENT_DBUS_INTERFACE "org.gnome.SessionClient"
+@@ -153,15 +156,31 @@ parse_condition_string (const char *condition_string,
+ key++;
+ }
+
++ kind = GSM_CONDITION_UNKNOWN;
++
+ if (!g_ascii_strncasecmp (condition_string, "if-exists", len) && key) {
+ kind = GSM_CONDITION_IF_EXISTS;
+ } else if (!g_ascii_strncasecmp (condition_string, "unless-exists", len) && key) {
+ kind = GSM_CONDITION_UNLESS_EXISTS;
+ } else if (!g_ascii_strncasecmp (condition_string, "GNOME", len)) {
+ kind = GSM_CONDITION_GNOME;
+- } else {
++ } else if (!g_ascii_strncasecmp (condition_string, "GNOME3", len)) {
++ condition_string = key;
++ space = condition_string + strcspn (condition_string, " ");
++ len = space - condition_string;
++ key = space;
++ while (isspace ((unsigned char)*key)) {
++ key++;
++ }
++ if (!g_ascii_strncasecmp (condition_string, "if-session", len) && key) {
++ kind = GSM_CONDITION_IF_SESSION;
++ } else if (!g_ascii_strncasecmp (condition_string, "unless-session", len) && key) {
++ kind = GSM_CONDITION_UNLESS_SESSION;
++ }
++ }
++
++ if (kind == GSM_CONDITION_UNKNOWN) {
+ key = NULL;
+- kind = GSM_CONDITION_UNKNOWN;
+ }
+
+ if (keyp != NULL) {
+@@ -364,6 +383,12 @@ setup_condition_monitor (GsmAutostartApp *app)
+ gconf_condition_cb,
+ app, NULL, NULL);
+ g_object_unref (client);
++ } else if (kind == GSM_CONDITION_IF_SESSION) {
++ /* We treat GNOME 2.32 as the same as gnome-fallback */
++ disabled = strcmp ("gnome-fallback", key) != 0;
++ } else if (kind == GSM_CONDITION_UNLESS_SESSION) {
++ /* We treat GNOME 2.32 as the same as gnome-fallback */
++ disabled = strcmp ("gnome-fallback", key) == 0;
+ } else {
+ disabled = TRUE;
+ }
+@@ -647,6 +672,12 @@ is_conditionally_disabled (GsmApp *app)
+ g_assert (GCONF_IS_CLIENT (client));
+ disabled = !gconf_client_get_bool (client, key, NULL);
+ g_object_unref (client);
++ } else if (kind == GSM_CONDITION_IF_SESSION) {
++ /* We treat GNOME 2.32 as the same as gnome-fallback */
++ disabled = strcmp ("gnome-fallback", key) != 0;
++ } else if (kind == GSM_CONDITION_UNLESS_SESSION) {
++ /* We treat GNOME 2.32 as the same as gnome-fallback */
++ disabled = strcmp ("gnome-fallback", key) == 0;
+ } else {
+ disabled = TRUE;
+ }
+--
+1.7.3.4
+
diff --git a/gnome-base/gnome-session/gnome-session-2.32.1-r2.ebuild b/gnome-base/gnome-session/gnome-session-2.32.1-r2.ebuild
new file mode 100644
index 000000000000..3a32f2ee038a
--- /dev/null
+++ b/gnome-base/gnome-session/gnome-session-2.32.1-r2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-session/gnome-session-2.32.1-r2.ebuild,v 1.1 2011/04/04 14:52:08 eva Exp $
+
+EAPI="3"
+GCONF_DEBUG="yes"
+
+inherit autotools eutils gnome2
+
+DESCRIPTION="Gnome session manager"
+HOMEPAGE="http://www.gnome.org/"
+
+LICENSE="GPL-2 LGPL-2 FDL-1.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
+
+IUSE="doc ipv6 elibc_FreeBSD"
+
+RDEPEND=">=dev-libs/glib-2.16:2
+ >=x11-libs/gtk+-2.22.0:2
+ >=dev-libs/dbus-glib-0.76
+ >=gnome-base/gconf-2:2
+ >=sys-power/upower-0.9.0
+ elibc_FreeBSD? ( dev-libs/libexecinfo )
+
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXtst
+ x11-apps/xdpyinfo"
+DEPEND="${RDEPEND}
+ >=dev-lang/perl-5
+ >=sys-devel/gettext-0.10.40
+ >=dev-util/pkgconfig-0.17
+ >=dev-util/intltool-0.40
+ gnome-base/gnome-common
+ !<gnome-base/gdm-2.20.4
+ doc? (
+ app-text/xmlto
+ dev-libs/libxslt )"
+# gnome-common needed for eautoreconf
+# gnome-base/gdm does not provide gnome.desktop anymore
+
+pkg_setup() {
+ # TODO: convert libnotify to a configure option
+ G2CONF="${G2CONF}
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --with-default-wm=gnome-wm
+ --with-gtk=2.0
+ $(use_enable doc docbook-docs)
+ $(use_enable ipv6)"
+ DOCS="AUTHORS ChangeLog NEWS README"
+}
+
+src_prepare() {
+ gnome2_src_prepare
+
+ # Add "session saving" button back, upstream bug #575544
+ epatch "${FILESDIR}/${PN}-2.32.0-session-saving-button.patch"
+
+ # Fix support for GNOME3 conditions, bug #XXXXXX
+ epatch "${FILESDIR}/${PN}-2.32.1-gnome3-conditions.patch"
+
+ intltoolize --force --copy --automake || die "intltoolize failed"
+ eautoreconf
+}
+
+src_install() {
+ gnome2_src_install
+
+ dodir /etc/X11/Sessions || die "dodir failed"
+ exeinto /etc/X11/Sessions
+ doexe "${FILESDIR}/Gnome" || die "doexe failed"
+
+ dodir /usr/share/gnome/applications/ || die
+ insinto /usr/share/gnome/applications/
+ doins "${FILESDIR}/defaults.list" || die
+
+ dodir /etc/X11/xinit/xinitrc.d/ || die
+ exeinto /etc/X11/xinit/xinitrc.d/
+ doexe "${FILESDIR}/15-xdg-data-gnome" || die
+}