summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnome-base/gnome-session/ChangeLog13
-rwxr-xr-xgnome-base/gnome-session/files/10-user-dirs-update-gnome-r110
-rw-r--r--gnome-base/gnome-session/files/15-xdg-data-gnome-r19
-rw-r--r--gnome-base/gnome-session/files/gnome-session-3.2.1-kernel-boot-line.patch107
-rw-r--r--gnome-base/gnome-session/gnome-session-3.2.1-r1.ebuild108
5 files changed, 245 insertions, 2 deletions
diff --git a/gnome-base/gnome-session/ChangeLog b/gnome-base/gnome-session/ChangeLog
index fb7d6a262d1e..8df982cf20cf 100644
--- a/gnome-base/gnome-session/ChangeLog
+++ b/gnome-base/gnome-session/ChangeLog
@@ -1,6 +1,15 @@
# 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.307 2011/11/28 06:37:21 tetromino Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-session/ChangeLog,v 1.308 2012/01/25 03:53:57 tetromino Exp $
+
+*gnome-session-3.2.1-r1 (25 Jan 2012)
+
+ 25 Jan 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
+ +files/10-user-dirs-update-gnome-r1, +files/15-xdg-data-gnome-r1,
+ +gnome-session-3.2.1-r1.ebuild,
+ +files/gnome-session-3.2.1-kernel-boot-line.patch:
+ Add patch from gnome-3.3 to respect the gnome.fallback=0/1 kernel boot line,
+ and improve support for gnome-extra/cinnamon.
28 Nov 2011; Alexandre Rostovtsev <tetromino@gentoo.org>
gnome-session-3.2.1.ebuild:
diff --git a/gnome-base/gnome-session/files/10-user-dirs-update-gnome-r1 b/gnome-base/gnome-session/files/10-user-dirs-update-gnome-r1
new file mode 100755
index 000000000000..61fd08c51141
--- /dev/null
+++ b/gnome-base/gnome-session/files/10-user-dirs-update-gnome-r1
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Create various XDG directories, and write ~/.config/user-dirs.dirs, etc.
+# That file is read by glib to get XDG_PICTURES_DIR, etc
+
+if [ "$DESKTOP_SESSION" = "gnome" -o "$DESKTOP_SESSION" = "cinnamon" ]; then
+ if type xdg-user-dirs-update &>/dev/null; then
+ xdg-user-dirs-update
+ fi
+fi
diff --git a/gnome-base/gnome-session/files/15-xdg-data-gnome-r1 b/gnome-base/gnome-session/files/15-xdg-data-gnome-r1
new file mode 100644
index 000000000000..5eaa6985d9dc
--- /dev/null
+++ b/gnome-base/gnome-session/files/15-xdg-data-gnome-r1
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "$DESKTOP_SESSION" = "gnome" -o "$DESKTOP_SESSION" = "cinnamon" ]; then
+ if [ -z "$XDG_DATA_DIRS" ]; then
+ export XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/
+ else
+ export XDG_DATA_DIRS=/usr/share/gnome:"$XDG_DATA_DIRS"
+ fi
+fi
diff --git a/gnome-base/gnome-session/files/gnome-session-3.2.1-kernel-boot-line.patch b/gnome-base/gnome-session/files/gnome-session-3.2.1-kernel-boot-line.patch
new file mode 100644
index 000000000000..fa5678b838d6
--- /dev/null
+++ b/gnome-base/gnome-session/files/gnome-session-3.2.1-kernel-boot-line.patch
@@ -0,0 +1,107 @@
+From a8ccac0ef5074229b562b90dc8dcf183c0440395 Mon Sep 17 00:00:00 2001
+From: Vincent Untz <vuntz@gnome.org>
+Date: Wed, 19 Oct 2011 13:14:50 +0200
+Subject: [PATCH] tools: Look at gnome.fallback argument in kernel boot line
+
+This is a quick way to let users easily force the fallback (or
+non-fallback mode) with gnome.fallback=0/1 on boot.
+---
+ tools/gnome-session-check-accelerated-helper.c | 64 ++++++++++++++++++++++++
+ 1 files changed, 64 insertions(+), 0 deletions(-)
+
+diff --git a/tools/gnome-session-check-accelerated-helper.c b/tools/gnome-session-check-accelerated-helper.c
+index 3f83f76..c1b49e2 100644
+--- a/tools/gnome-session-check-accelerated-helper.c
++++ b/tools/gnome-session-check-accelerated-helper.c
+@@ -70,7 +70,9 @@
+ /* for strcasestr */
+ #define _GNU_SOURCE
+
++#include <ctype.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+
+ #include <X11/Xlib.h>
+@@ -87,6 +89,54 @@ _print_error (const char *str)
+ }
+
+ static int
++_parse_kcmdline (void)
++{
++ FILE *kcmdline;
++ char *line = NULL;
++ size_t line_len = 0;
++ int ret = -1;
++
++ kcmdline = fopen("/proc/cmdline", "r");
++ if (kcmdline == NULL)
++ return ret;
++
++ while (getline (&line, &line_len, kcmdline) != -1) {
++ const char *arg;
++ const char *str;
++ int key_len = strlen ("gnome.fallback=");
++
++ if (line == NULL)
++ break;
++
++ /* don't break if we found the argument once: last mention wins */
++
++ str = line;
++ do {
++ arg = strstr (str, "gnome.fallback=");
++ str = arg + key_len;
++
++ if (arg &&
++ (arg == line || isspace (arg[-1])) && /* gnome.fallback= is really the beginning of an argument */
++ (isdigit (arg[key_len]))) { /* the first character of the value of this argument is an integer */
++ if ((arg[key_len+1] == '\0' || isspace (arg[key_len+1]))) /* the value of this argument is only one character long */
++ ret = arg[key_len] - '0';
++ else /* invalid value */
++ ret = 0xDEAD;
++
++ }
++ } while (arg != NULL);
++
++ free (line);
++ line = NULL;
++ line_len = 0;
++ }
++
++ fclose (kcmdline);
++
++ return ret;
++}
++
++static int
+ _has_composite (Display *display)
+ {
+ int dummy1, dummy2;
+@@ -257,9 +307,23 @@ _is_max_texture_size_big_enough (Display *display)
+ int
+ main (int argc, char **argv)
+ {
++ int kcmdline_parsed;
+ Display *display = NULL;
+ int ret = 1;
+
++ kcmdline_parsed = _parse_kcmdline ();
++ if (kcmdline_parsed >= 0) {
++ if (kcmdline_parsed == 0) {
++ _print_error ("Non-fallback mode forced by kernel command line.");
++ ret = 0;
++ goto out;
++ } else if (kcmdline_parsed == 1) {
++ _print_error ("Fallback mode forced by kernel command line.");
++ goto out;
++ } else
++ _print_error ("Invalid value for gnome.fallback passed in kernel command line.");
++ }
++
+ display = XOpenDisplay (NULL);
+ if (!display) {
+ _print_error ("No X display.");
+--
+1.7.8.4
+
diff --git a/gnome-base/gnome-session/gnome-session-3.2.1-r1.ebuild b/gnome-base/gnome-session/gnome-session-3.2.1-r1.ebuild
new file mode 100644
index 000000000000..68c58facfa8f
--- /dev/null
+++ b/gnome-base/gnome-session/gnome-session-3.2.1-r1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-session/gnome-session-3.2.1-r1.ebuild,v 1.1 2012/01/25 03:53:57 tetromino Exp $
+
+EAPI="4"
+GCONF_DEBUG="no"
+
+inherit eutils gnome2
+
+DESCRIPTION="Gnome session manager"
+HOMEPAGE="http://www.gnome.org/"
+
+LICENSE="GPL-2 LGPL-2 FDL-1.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="doc ipv6 elibc_FreeBSD"
+
+# x11-misc/xdg-user-dirs{,-gtk} are needed to create the various XDG_*_DIRs, and
+# create .config/user-dirs.dirs which is read by glib to get G_USER_DIRECTORY_*
+# xdg-user-dirs-update is run during login (see 10-user-dirs-update-gnome below).
+# gdk-pixbuf used in the inhibit dialog
+COMMON_DEPEND=">=dev-libs/glib-2.28.0:2
+ x11-libs/gdk-pixbuf:2
+ >=x11-libs/gtk+-2.90.7:3
+ >=dev-libs/json-glib-0.10
+ >=dev-libs/dbus-glib-0.76
+ >=gnome-base/gconf-2:2
+ >=sys-power/upower-0.9.0
+ elibc_FreeBSD? ( dev-libs/libexecinfo )
+
+ virtual/opengl
+ x11-libs/libSM
+ x11-libs/libICE
+ x11-libs/libXau
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXext
+ x11-libs/libXrender
+ x11-libs/libXtst
+ x11-misc/xdg-user-dirs
+ x11-misc/xdg-user-dirs-gtk
+ x11-apps/xdpyinfo"
+# Pure-runtime deps from the session files should *NOT* be added here
+# Otherwise, things like gdm pull in gnome-shell
+# gnome-themes-standard is needed for the failwhale dialog themeing
+# sys-apps/dbus[X] is needed for session management
+RDEPEND="${COMMON_DEPEND}
+ gnome-base/gnome-settings-daemon
+ >=gnome-base/gsettings-desktop-schemas-0.1.7
+ >=x11-themes/gnome-themes-standard-2.91.92
+ sys-apps/dbus[X]"
+DEPEND="${COMMON_DEPEND}
+ >=dev-lang/perl-5
+ >=sys-devel/gettext-0.10.40
+ >=dev-util/pkgconfig-0.17
+ >=dev-util/intltool-0.40.6
+ !<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}
+ --disable-deprecation-flags
+ --disable-schemas-compile
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ $(use_enable doc docbook-docs)
+ $(use_enable ipv6)"
+ DOCS="AUTHORS ChangeLog NEWS README"
+}
+
+src_prepare() {
+ # Patch from 3.3 to respect gnome.fallback=0/1 kernel boot line
+ epatch "${FILESDIR}/${P}-kernel-boot-line.patch"
+
+ gnome2_src_prepare
+}
+
+src_install() {
+ gnome2_src_install
+
+ dodir /etc/X11/Sessions
+ exeinto /etc/X11/Sessions
+ doexe "${FILESDIR}/Gnome"
+
+ dodir /usr/share/gnome/applications/
+ insinto /usr/share/gnome/applications/
+ doins "${FILESDIR}/defaults.list"
+
+ dodir /etc/X11/xinit/xinitrc.d/
+ exeinto /etc/X11/xinit/xinitrc.d/
+ newexe "${FILESDIR}/15-xdg-data-gnome-r1" 15-xdg-data-gnome
+
+ # This should be done here as discussed in bug #270852
+ newexe "${FILESDIR}/10-user-dirs-update-gnome-r1" 10-user-dirs-update-gnome
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+
+ if ! has_version gnome-base/gdm && ! has_version kde-base/kdm; then
+ ewarn "If you use a custom .xinitrc for your X session,"
+ ewarn "make sure that the commands in the xinitrc.d scripts are run."
+ fi
+}