diff options
author | Pacho Ramos <pacho@gentoo.org> | 2011-03-07 14:31:25 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2011-03-07 14:31:25 +0000 |
commit | 6c0fad7b7bfa381b68f8dbc6c5eaa79bc7234f57 (patch) | |
tree | ccdbc64c680900d889b9c03317b0bbf60fcf881b /gnome-extra/gnome-screensaver | |
parent | Version bumped. (diff) | |
download | gentoo-2-6c0fad7b7bfa381b68f8dbc6c5eaa79bc7234f57.tar.gz gentoo-2-6c0fad7b7bfa381b68f8dbc6c5eaa79bc7234f57.tar.bz2 gentoo-2-6c0fad7b7bfa381b68f8dbc6c5eaa79bc7234f57.zip |
Revision bump with some fixes: The dialog uses libxklavier directly, so link against it (upstream bug #634949); fix QA warning (upstream bug #637676 by David J Cozatt); fix fading on nvidia setups (upstream bugs #610294 and #618932); don't run twice (upstream bug #642462), don't user name owner proxies for SessionManager (upstream bug #611207).
(Portage version: 2.1.9.42/cvs/Linux x86_64)
Diffstat (limited to 'gnome-extra/gnome-screensaver')
8 files changed, 572 insertions, 1 deletions
diff --git a/gnome-extra/gnome-screensaver/ChangeLog b/gnome-extra/gnome-screensaver/ChangeLog index 4d071024b07b..11d40ebf058a 100644 --- a/gnome-extra/gnome-screensaver/ChangeLog +++ b/gnome-extra/gnome-screensaver/ChangeLog @@ -1,6 +1,22 @@ # ChangeLog for gnome-extra/gnome-screensaver # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-screensaver/ChangeLog,v 1.133 2011/03/07 09:27:50 nirbheek Exp $ +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-screensaver/ChangeLog,v 1.134 2011/03/07 14:31:25 pacho Exp $ + +*gnome-screensaver-2.30.2-r1 (07 Mar 2011) + + 07 Mar 2011; Pacho Ramos <pacho@gentoo.org> + +gnome-screensaver-2.30.2-r1.ebuild, + +files/gnome-screensaver-2.30.2-libxklavier-configure.patch, + +files/gnome-screensaver-2.30.2-name-manager.patch, + +files/gnome-screensaver-2.30.2-nvidia-fade.patch, + +files/gnome-screensaver-2.30.2-nvidia-fade2.patch, + +files/gnome-screensaver-2.30.2-popsquares-header.patch, + +files/gnome-screensaver-2.30.2-prevent-twice.patch: + Revision bump with some fixes: The dialog uses libxklavier directly, so link + against it (upstream bug #634949); fix QA warning (upstream bug #637676 by + David J Cozatt); fix fading on nvidia setups (upstream bugs #610294 and + #618932); don't run twice (upstream bug #642462), don't user name owner + proxies for SessionManager (upstream bug #611207). 07 Mar 2011; Nirbheek Chauhan <nirbheek@gentoo.org> gnome-screensaver-2.30.2.ebuild, diff --git a/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-libxklavier-configure.patch b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-libxklavier-configure.patch new file mode 100644 index 000000000000..3c8d1ffed7bc --- /dev/null +++ b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-libxklavier-configure.patch @@ -0,0 +1,22 @@ +From 1b4c2717763275375967f2279e065a65852967cb Mon Sep 17 00:00:00 2001 +From: Robert Ancell <robert.ancell@canonical.com> +Date: Tue, 16 Nov 2010 22:01:41 +0000 +Subject: The dialog uses libxklavier directly, so link against it + +https://bugzilla.gnome.org/show_bug.cgi?id=634949 +--- +diff --git a/configure.ac b/configure.ac +index a2379f2..a80b92a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -643,7 +643,7 @@ have_libgnomekbdui=no + AC_ARG_WITH(kbd-layout-indicator,[ --without-kbd-layout-indicator disable keyboard layout indicator], + [with_kbd_layout_indicator="$withval"],[with_kbd_layout_indicator=yes]) + if test x$with_kbd_layout_indicator != xno; then +- PKG_CHECK_MODULES(LIBGNOMEKBDUI, libgnomekbdui >= $LIBGNOMEKBDUI_REQUIRED_VERSION, have_libgnomekbdui=yes, have_libgnomekbdui=no) ++ PKG_CHECK_MODULES(LIBGNOMEKBDUI, libgnomekbdui >= $LIBGNOMEKBDUI_REQUIRED_VERSION libxklavier, have_libgnomekbdui=yes, have_libgnomekbdui=no) + fi + if test "x$have_libgnomekbdui" = "xyes"; then + AC_SUBST(LIBGNOMEKBDUI_CFLAGS) +-- +cgit v0.8.3.4 diff --git a/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-name-manager.patch b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-name-manager.patch new file mode 100644 index 000000000000..febffb52594b --- /dev/null +++ b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-name-manager.patch @@ -0,0 +1,203 @@ +From d0b09165b8fb4af6a59308665f38438aa657aae2 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross@linux.intel.com> +Date: Fri, 26 Feb 2010 18:15:39 +0000 +Subject: Don't user name owner proxies for SessionManager + +Using proxies based on the name owner will fail if the name owner changes, for +example if gnome-session is started after the screensaver or if gnome-session is +restarted. + +https://bugzilla.gnome.org/show_bug.cgi?id=611207 +--- +diff --git a/src/gs-watcher-x11.c b/src/gs-watcher-x11.c +index 7145448..ec63552 100644 +--- a/src/gs-watcher-x11.c ++++ b/src/gs-watcher-x11.c +@@ -388,112 +388,94 @@ on_presence_status_text_changed (DBusGProxy *presence_proxy, + set_status_text (watcher, status_text); + } + +-static gboolean ++static void + connect_presence_watcher (GSWatcher *watcher) + { +- DBusGConnection *bus; +- GError *error; +- gboolean ret; +- +- ret = FALSE; ++ DBusGConnection *bus; ++ GError *error; ++ DBusGProxy *proxy; ++ guint status; ++ const char *status_text; ++ GValue value = { 0, }; + + error = NULL; + bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error); + if (bus == NULL) { + g_warning ("Unable to get session bus: %s", error->message); + g_error_free (error); +- goto done; ++ return; + } + ++ watcher->priv->presence_proxy = dbus_g_proxy_new_for_name (bus, ++ "org.gnome.SessionManager", ++ "/org/gnome/SessionManager/Presence", ++ "org.gnome.SessionManager.Presence"); ++ ++ dbus_g_proxy_add_signal (watcher->priv->presence_proxy, ++ "StatusChanged", ++ G_TYPE_UINT, ++ G_TYPE_INVALID); ++ dbus_g_proxy_connect_signal (watcher->priv->presence_proxy, ++ "StatusChanged", ++ G_CALLBACK (on_presence_status_changed), ++ watcher, ++ NULL); ++ dbus_g_proxy_add_signal (watcher->priv->presence_proxy, ++ "StatusTextChanged", ++ G_TYPE_STRING, ++ G_TYPE_INVALID); ++ dbus_g_proxy_connect_signal (watcher->priv->presence_proxy, ++ "StatusTextChanged", ++ G_CALLBACK (on_presence_status_text_changed), ++ watcher, ++ NULL); ++ ++ proxy = dbus_g_proxy_new_from_proxy (watcher->priv->presence_proxy, ++ "org.freedesktop.DBus.Properties", ++ "/org/gnome/SessionManager/Presence"); ++ ++ status = 0; ++ status_text = NULL; ++ + error = NULL; +- watcher->priv->presence_proxy = dbus_g_proxy_new_for_name_owner (bus, +- "org.gnome.SessionManager", +- "/org/gnome/SessionManager/Presence", +- "org.gnome.SessionManager.Presence", +- &error); +- if (watcher->priv->presence_proxy != NULL) { +- DBusGProxy *proxy; +- +- dbus_g_proxy_add_signal (watcher->priv->presence_proxy, +- "StatusChanged", +- G_TYPE_UINT, +- G_TYPE_INVALID); +- dbus_g_proxy_connect_signal (watcher->priv->presence_proxy, +- "StatusChanged", +- G_CALLBACK (on_presence_status_changed), +- watcher, +- NULL); +- dbus_g_proxy_add_signal (watcher->priv->presence_proxy, +- "StatusTextChanged", +- G_TYPE_STRING, +- G_TYPE_INVALID); +- dbus_g_proxy_connect_signal (watcher->priv->presence_proxy, +- "StatusTextChanged", +- G_CALLBACK (on_presence_status_text_changed), +- watcher, +- NULL); +- +- proxy = dbus_g_proxy_new_from_proxy (watcher->priv->presence_proxy, +- "org.freedesktop.DBus.Properties", +- "/org/gnome/SessionManager/Presence"); +- if (proxy != NULL) { +- guint status; +- const char *status_text; +- GValue value = { 0, }; +- +- status = 0; +- status_text = NULL; +- +- error = NULL; +- dbus_g_proxy_call (proxy, +- "Get", +- &error, +- G_TYPE_STRING, "org.gnome.SessionManager.Presence", +- G_TYPE_STRING, "status", +- G_TYPE_INVALID, +- G_TYPE_VALUE, &value, +- G_TYPE_INVALID); +- +- if (error != NULL) { +- g_warning ("Couldn't get presence status: %s", error->message); +- g_error_free (error); +- goto done; +- } else { +- status = g_value_get_uint (&value); +- } +- +- g_value_unset (&value); +- +- error = NULL; +- dbus_g_proxy_call (proxy, +- "Get", +- &error, +- G_TYPE_STRING, "org.gnome.SessionManager.Presence", +- G_TYPE_STRING, "status-text", +- G_TYPE_INVALID, +- G_TYPE_VALUE, &value, +- G_TYPE_INVALID); +- +- if (error != NULL) { +- g_warning ("Couldn't get presence status text: %s", error->message); +- g_error_free (error); +- } else { +- status_text = g_value_get_string (&value); +- } +- +- set_status (watcher, status); +- set_status_text (watcher, status_text); +- } +- } else { +- g_warning ("Failed to get session presence proxy: %s", error->message); ++ dbus_g_proxy_call (proxy, ++ "Get", ++ &error, ++ G_TYPE_STRING, "org.gnome.SessionManager.Presence", ++ G_TYPE_STRING, "status", ++ G_TYPE_INVALID, ++ G_TYPE_VALUE, &value, ++ G_TYPE_INVALID); ++ ++ if (error != NULL) { ++ g_warning ("Couldn't get presence status: %s", error->message); + g_error_free (error); +- goto done; ++ return; ++ } else { ++ status = g_value_get_uint (&value); + } + +- ret = TRUE; ++ g_value_unset (&value); ++ ++ error = NULL; ++ dbus_g_proxy_call (proxy, ++ "Get", ++ &error, ++ G_TYPE_STRING, "org.gnome.SessionManager.Presence", ++ G_TYPE_STRING, "status-text", ++ G_TYPE_INVALID, ++ G_TYPE_VALUE, &value, ++ G_TYPE_INVALID); ++ ++ if (error != NULL) { ++ g_warning ("Couldn't get presence status text: %s", error->message); ++ g_error_free (error); ++ } else { ++ status_text = g_value_get_string (&value); ++ } + +- done: +- return ret; ++ set_status (watcher, status); ++ set_status_text (watcher, status_text); + } + + static void +-- +cgit v0.8.3.4 diff --git a/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-nvidia-fade.patch b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-nvidia-fade.patch new file mode 100644 index 000000000000..240cb162c773 --- /dev/null +++ b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-nvidia-fade.patch @@ -0,0 +1,44 @@ + +++ gnome-screensaver-2.30.2/debian/patches/13_nvidia_gamma_fade_fallback.patch + +Description: Fall back to XF86VM gamma fade if XRANDR gamma fade is not supported +Author: Chris Coulson <chrisccoulson@ubuntu.com> +Bug-Ubuntu: https://bugs.edge.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/522806 +Bug: https://bugzilla.gnome.org/show_bug.cgi?id=610294 +Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=610294 + +Index: gnome-screensaver-2.30.2/src/gs-fade.c +=================================================================== +--- gnome-screensaver-2.30.2.orig/src/gs-fade.c 2010-11-15 17:13:12.730491003 +1100 ++++ gnome-screensaver-2.30.2/src/gs-fade.c 2010-11-15 17:13:16.838491003 +1100 +@@ -572,6 +572,10 @@ + GdkDisplay *display = gdk_display_get_default (); + GdkScreen *screen = gdk_display_get_screen (display, screen_idx); + struct GSFadeScreenPrivate *screen_priv; ++ GnomeRRCrtc **crtcs; ++ GnomeRRCrtc *crtc; ++ gboolean res; ++ int gamma_size; + + screen_priv = &fade->priv->screen_priv[screen_idx]; + +@@ -584,6 +588,19 @@ + return; + } + ++ crtcs = gnome_rr_screen_list_crtcs (screen_priv->rrscreen); ++ ++ while (*crtcs) ++ { ++ crtc = *crtcs; ++ res = gnome_rr_crtc_get_gamma (crtc, &gamma_size, NULL, NULL, NULL); ++ if (res == FALSE || gamma_size == 0) { ++ screen_priv->fade_type = FADE_TYPE_NONE; ++ return; ++ } ++ crtcs++; ++ } ++ + screen_priv->fade_type = FADE_TYPE_XRANDR; + screen_priv->fade_setup = xrandr_fade_setup; + screen_priv->fade_finish = screen_fade_finish; diff --git a/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-nvidia-fade2.patch b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-nvidia-fade2.patch new file mode 100644 index 000000000000..255add876662 --- /dev/null +++ b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-nvidia-fade2.patch @@ -0,0 +1,65 @@ + +++ gnome-screensaver-2.30.2/debian/patches/16_dont_crash_in_kvm.patch + +Description: Don't crash when the XF86VM extension doesn't allow the gamma to be set + On some systems where the XF86VM extension is present, the gamma value + can be read successfully with XF86VidModeGetGamma but attempting to + change the gamma value with XF86VidModeSetGamma will result in a + BadValue error (eg, on KVM). + + Trap this error and abort the fade rather than crashing. +Bug-Ubuntu: https://launchpad.net/bugs/581864 +Bug: https://bugzilla.gnome.org/show_bug.cgi?id=618932 +Forwarded: https://bugzilla.gnome.org/attachment.cgi?id=161276 +Author: Chris Coulson <chris.coulson@canonical.com> + +Index: gnome-screensaver-2.30.2/src/gs-fade.c +=================================================================== +--- gnome-screensaver-2.30.2.orig/src/gs-fade.c 2010-11-15 16:35:43.078663002 +1100 ++++ gnome-screensaver-2.30.2/src/gs-fade.c 2010-11-15 16:37:45.814662558 +1100 +@@ -208,7 +208,13 @@ + g2.blue = XF86_MIN_GAMMA; + } + ++ gdk_error_trap_push (); + status = XF86VidModeSetGamma (GDK_DISPLAY (), screen, &g2); ++ gdk_flush (); ++ if (gdk_error_trap_pop ()) { ++ gs_debug ("Failed to set gamma. Bailing out and aborting fade"); ++ return FALSE; ++ } + } else { + + # ifdef HAVE_XF86VMODE_GAMMA_RAMP +@@ -225,7 +231,13 @@ + b[i] = gamma_info->b[i] * ratio; + } + ++ gdk_error_trap_push (); + status = XF86VidModeSetGammaRamp (GDK_DISPLAY (), screen, gamma_info->size, r, g, b); ++ gdk_flush (); ++ if (gdk_error_trap_pop ()) { ++ gs_debug ("Failed to set gamma. Bailing out and aborting fade"); ++ return FALSE; ++ } + + g_free (r); + g_free (g); +@@ -236,8 +248,6 @@ + # endif /* !HAVE_XF86VMODE_GAMMA_RAMP */ + } + +- gdk_flush (); +- + return status; + } + +@@ -391,7 +401,7 @@ + screen_priv = &fade->priv->screen_priv[screen_idx]; + res = xf86_whack_gamma (screen_idx, screen_priv, alpha); + +- return TRUE; ++ return res; + } + #endif /* HAVE_XF86VMODE_GAMMA */ + diff --git a/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-popsquares-header.patch b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-popsquares-header.patch new file mode 100644 index 000000000000..f6d7d5366b6a --- /dev/null +++ b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-popsquares-header.patch @@ -0,0 +1,13 @@ +Patch for implicit declaration of exit in popsquares.c reported by Gentoo QA +patch generated by David J Cozatt + +--- savers/popsquares.c ++++ savers/popsquares.c +@@ -22,6 +22,7 @@ + #include "config.h" + + #include <string.h> ++#include <stdlib.h> + #include <gdk/gdk.h> + #include <gdk/gdkx.h> + #include <gtk/gtk.h> diff --git a/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-prevent-twice.patch b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-prevent-twice.patch new file mode 100644 index 000000000000..85b58905c836 --- /dev/null +++ b/gnome-extra/gnome-screensaver/files/gnome-screensaver-2.30.2-prevent-twice.patch @@ -0,0 +1,64 @@ +From 85d22a5d784b2b8201054257f8696138de1e1b70 Mon Sep 17 00:00:00 2001 +From: Marc Deslauriers <marc.deslauriers@ubuntu.com> +Date: Wed, 16 Feb 2011 13:40:15 +0000 +Subject: Make sure it cannot be running twice + +It is currently possible to start gnome-screensaver twice because +of a race condition. This change makes sure that we bail out if +we cannot become the primary owner of the bus name. + +https://bugzilla.gnome.org/show_bug.cgi?id=642462 +--- +diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c +index 6d0d4e5..e11c7fc 100644 +--- a/src/gs-listener-dbus.c ++++ b/src/gs-listener-dbus.c +@@ -1169,7 +1169,7 @@ gboolean + gs_listener_acquire (GSListener *listener, + GError **error) + { +- gboolean acquired; ++ int res; + DBusError buserror; + gboolean is_connected; + +@@ -1213,9 +1213,10 @@ gs_listener_acquire (GSListener *listener, + return FALSE; + } + +- acquired = dbus_bus_request_name (listener->priv->connection, +- GS_LISTENER_SERVICE, +- 0, &buserror) != -1; ++ res = dbus_bus_request_name (listener->priv->connection, ++ GS_LISTENER_SERVICE, ++ DBUS_NAME_FLAG_DO_NOT_QUEUE, ++ &buserror); + if (dbus_error_is_set (&buserror)) { + g_set_error (error, + GS_LISTENER_ERROR, +@@ -1223,6 +1224,14 @@ gs_listener_acquire (GSListener *listener, + "%s", + buserror.message); + } ++ if (res == DBUS_REQUEST_NAME_REPLY_EXISTS) { ++ g_set_error (error, ++ GS_LISTENER_ERROR, ++ GS_LISTENER_ERROR_ACQUISITION_FAILURE, ++ "%s", ++ _("screensaver already running in this session")); ++ return FALSE; ++ } + + dbus_error_free (&buserror); + +@@ -1263,7 +1272,7 @@ gs_listener_acquire (GSListener *listener, + NULL); + } + +- return acquired; ++ return (res != -1); + } + + static char * +-- +cgit v0.8.3.4 diff --git a/gnome-extra/gnome-screensaver/gnome-screensaver-2.30.2-r1.ebuild b/gnome-extra/gnome-screensaver/gnome-screensaver-2.30.2-r1.ebuild new file mode 100644 index 000000000000..dbd2d4d32eb9 --- /dev/null +++ b/gnome-extra/gnome-screensaver/gnome-screensaver-2.30.2-r1.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-screensaver/gnome-screensaver-2.30.2-r1.ebuild,v 1.1 2011/03/07 14:31:25 pacho Exp $ + +EAPI="2" + +inherit eutils gnome2 multilib autotools + +DESCRIPTION="Replaces xscreensaver, integrating with the desktop." +HOMEPAGE="http://live.gnome.org/GnomeScreensaver" +SRC_URI="${SRC_URI} + branding? ( http://www.gentoo.org/images/gentoo-logo.svg )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +KERNEL_IUSE="kernel_linux" +IUSE="branding debug doc libnotify opengl pam $KERNEL_IUSE" + +RDEPEND=">=gnome-base/gconf-2.6.1 + >=x11-libs/gtk+-2.14.0 + >=gnome-base/gnome-desktop-2.29.0:2 + >=gnome-base/gnome-menus-2.12 + >=dev-libs/glib-2.15 + >=gnome-base/libgnomekbd-0.1 + >=dev-libs/dbus-glib-0.71 + libnotify? ( x11-libs/libnotify ) + opengl? ( virtual/opengl ) + pam? ( virtual/pam ) + !pam? ( kernel_linux? ( sys-apps/shadow ) ) + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXrandr + x11-libs/libXScrnSaver + x11-libs/libXxf86misc + x11-libs/libXxf86vm" +DEPEND="${RDEPEND} + >=dev-util/pkgconfig-0.9 + >=dev-util/intltool-0.40 + doc? ( + app-text/xmlto + ~app-text/docbook-xml-dtd-4.1.2 + ~app-text/docbook-xml-dtd-4.4 ) + x11-proto/xextproto + x11-proto/randrproto + x11-proto/scrnsaverproto + x11-proto/xf86miscproto" + +DOCS="AUTHORS ChangeLog HACKING NEWS README TODO" + +pkg_setup() { + G2CONF="${G2CONF} + $(use_enable doc docbook-docs) + $(use_enable debug) + $(use_with libnotify) + $(use_with opengl gl) + $(use_enable pam) + --enable-locking + --with-xf86gamma-ext + --with-kbd-layout-indicator + --with-xscreensaverdir=/usr/share/xscreensaver/config + --with-xscreensaverhackdir=/usr/$(get_libdir)/misc/xscreensaver" +} + +src_prepare() { + gnome2_src_prepare + + # libnotify support was removed from trunk, so not needed for next release + epatch "${FILESDIR}/${P}-libnotify-0.7.patch" + + # The dialog uses libxklavier directly, so link against it, upstream bug #634949 + epatch "${FILESDIR}/${P}-libxklavier-configure.patch" + + # Fix QA warning, upstream bug #637676 + epatch "${FILESDIR}/${P}-popsquares-header.patch" + + # Fix fading on nvidia setups, upstream bugs #610294 and #618932 + epatch "${FILESDIR}/${P}-nvidia-fade.patch" + epatch "${FILESDIR}/${P}-nvidia-fade2.patch" + + # Don't run twice, upstream bug #642462 + epatch "${FILESDIR}/${P}-prevent-twice.patch" + + # Don't user name owner proxies for SessionManager, upstream bug #611207 + epatch "${FILESDIR}/${P}-name-manager.patch" + + # Fix intltoolize broken file, see upstream #577133 + sed "s:'\^\$\$lang\$\$':\^\$\$lang\$\$:g" -i po/Makefile.in.in \ + || die "sed failed" + + intltoolize --force --copy --automake || die "intltoolize failed" + eautoreconf +} + +src_install() { + gnome2_src_install + + # Install the conversion script in the documentation + dodoc "${S}/data/migrate-xscreensaver-config.sh" + dodoc "${S}/data/xscreensaver-config.xsl" + + # Conversion information + sed -e "s:\${PF}:${PF}:" < "${FILESDIR}/xss-conversion-2.txt" \ + > "${S}/xss-conversion.txt" || die "sed failed" + + dodoc "${S}/xss-conversion.txt" + + # Non PAM users will need this suid to read the password hashes. + # OpenPAM users will probably need this too when + # http://bugzilla.gnome.org/show_bug.cgi?id=370847 + # is fixed. + if ! use pam ; then + fperms u+s /usr/libexec/gnome-screensaver-dialog + fi + + if use branding ; then + insinto /usr/share/pixmaps/ + doins "${DISTDIR}/gentoo-logo.svg" || die "doins 1 failed" + insinto /usr/share/applications/screensavers/ + doins "${FILESDIR}/gentoologo-floaters.desktop" || die "doins 2 failed" + fi +} + +pkg_postinst() { + gnome2_pkg_postinst + + if has_version "<x11-base/xorg-server-1.5.3-r4" ; then + ewarn "You have a too old xorg-server installation. This will cause" + ewarn "gnome-screensaver to eat up your CPU. Please consider upgrading." + echo + fi + + if has_version "<x11-misc/xscreensaver-4.22-r2" ; then + ewarn "You have xscreensaver installed, you probably want to disable it." + ewarn "To prevent a duplicate screensaver entry in the menu, you need to" + ewarn "build xscreensaver with -gnome in the USE flags." + ewarn "echo \"x11-misc/xscreensaver -gnome\" >> /etc/portage/package.use" + + echo + fi + + elog "Information for converting screensavers is located in " + elog "/usr/share/doc/${PF}/xss-conversion.txt.${PORTAGE_COMPRESS}" +} |