summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Cardona <remi@gentoo.org>2009-10-26 16:06:59 +0000
committerRémi Cardona <remi@gentoo.org>2009-10-26 16:06:59 +0000
commit64a96ee56357e24b42fb9821de868687e4a9e37d (patch)
tree0adcbd247f8afc20c9a0d15c68c08865668e3198 /gnome-extra/gnome-power-manager
parentamd64 stable wrt #290483 (diff)
downloadgentoo-2-64a96ee56357e24b42fb9821de868687e4a9e37d.tar.gz
gentoo-2-64a96ee56357e24b42fb9821de868687e4a9e37d.tar.bz2
gentoo-2-64a96ee56357e24b42fb9821de868687e4a9e37d.zip
gnome-extra/gnome-power-manager: backport patches from upstream, add randr patch
(Portage version: 2.2_rc46/cvs/Linux i686)
Diffstat (limited to 'gnome-extra/gnome-power-manager')
-rw-r--r--gnome-extra/gnome-power-manager/ChangeLog15
-rw-r--r--gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.1-fix-xrandr-1.3-detection.patch93
-rw-r--r--gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.4-Check-for-XRR-functions-using-library-version-instea.patch85
-rw-r--r--gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.4-Remove-an-unused-include-to-fix-compile.patch25
-rw-r--r--gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.4-Use-a-larger-DPMS-idletime-timeout-to-mitigate-an-XS.patch39
-rw-r--r--gnome-extra/gnome-power-manager/gnome-power-manager-2.26.4-r1.ebuild136
6 files changed, 299 insertions, 94 deletions
diff --git a/gnome-extra/gnome-power-manager/ChangeLog b/gnome-extra/gnome-power-manager/ChangeLog
index 829880308a91..7c56c9b8b874 100644
--- a/gnome-extra/gnome-power-manager/ChangeLog
+++ b/gnome-extra/gnome-power-manager/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for gnome-extra/gnome-power-manager
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-power-manager/ChangeLog,v 1.109 2009/09/28 19:37:52 eva Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-power-manager/ChangeLog,v 1.110 2009/10/26 16:06:59 remi Exp $
+
+*gnome-power-manager-2.26.4-r1 (26 Oct 2009)
+
+ 26 Oct 2009; Rémi Cardona <remi@gentoo.org>
+ -files/gnome-power-manager-2.26.1-fix-xrandr-1.3-detection.patch,
+ +gnome-power-manager-2.26.4-r1.ebuild,
+ +files/gnome-power-manager-2.26.4-Check-for-XRR-functions-using-library-ve
+ rsion-instea.patch,
+ +files/gnome-power-manager-2.26.4-Remove-an-unused-include-to-fix-compile.
+ patch,
+ +files/gnome-power-manager-2.26.4-Use-a-larger-DPMS-idletime-timeout-to-mi
+ tigate-an-XS.patch:
+ backport patches from upstream, add randr patch
28 Sep 2009; Gilles Dartiguelongue <eva@gentoo.org>
gnome-power-manager-2.24.4-r2.ebuild, gnome-power-manager-2.26.4.ebuild:
diff --git a/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.1-fix-xrandr-1.3-detection.patch b/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.1-fix-xrandr-1.3-detection.patch
deleted file mode 100644
index 192047f9e71e..000000000000
--- a/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.1-fix-xrandr-1.3-detection.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 383f735200a5f838ee93eb137df65df7e266fc4c Mon Sep 17 00:00:00 2001
-From: Priit Laes <plaes@plaes.org>
-Date: Mon, 11 May 2009 13:11:45 +0000
-Subject: Check whether xrandr-1.3 features are really supported by xorg-server.
-
-Fixes #582142.
----
-diff --git a/src/gpm-brightness-xrandr.c b/src/gpm-brightness-xrandr.c
-index d6fb595..b7a5515 100644
---- a/src/gpm-brightness-xrandr.c
-+++ b/src/gpm-brightness-xrandr.c
-@@ -60,8 +60,11 @@ struct GpmBrightnessXRandRPrivate
- Display *dpy;
- guint shared_value;
- gboolean has_extension;
-+#if (RANDR_MAJOR == 1 && RANDR_MINOR >= 3)
-+ gboolean has_randr13;
-+#endif
- gboolean hw_changed;
-- /* An cache of XRRScreenResources is used as XRRGetScreenResources is expensive */
-+ /* A cache of XRRScreenResources is used as XRRGetScreenResources is expensive */
- GPtrArray *resources;
- };
-
-@@ -170,6 +173,34 @@ gpm_brightness_xrandr_setup_display (GpmBrightnessXRandR *brightness)
- return TRUE;
- }
-
-+#if (RANDR_MAJOR == 1 && RANDR_MINOR >= 3)
-+/**
-+ * gpm_brightness_xrandr_setup_version: Check whether xserver really supports xrandr-1.3 features.
-+ **/
-+static gboolean
-+gpm_brightness_xrandr_setup_version (GpmBrightnessXRandR *brightness)
-+{
-+ gint major, minor;
-+
-+ g_return_val_if_fail (GPM_IS_BRIGHTNESS_XRANDR (brightness), FALSE);
-+
-+ /* get the display */
-+ brightness->priv->dpy = GDK_DISPLAY();
-+ if (!brightness->priv->dpy) {
-+ egg_error ("Cannot open display");
-+ return FALSE;
-+ }
-+ if (!XRRQueryVersion (brightness->priv->dpy, &major, &minor)) {
-+ return FALSE;
-+ }
-+ if (major == 1 && minor < 3) {
-+ egg_debug ("RandR version %d.%d does not support XRRGetScreenResourcesCurrent", major, minor);
-+ return FALSE;
-+ }
-+ return TRUE;
-+}
-+#endif
-+
- /**
- * gpm_brightness_xrandr_output_get_limits:
- **/
-@@ -616,9 +647,14 @@ gpm_brightness_xrandr_update_cache (GpmBrightnessXRandR *brightness)
- root = RootWindow (brightness->priv->dpy, screen);
- /* XRRGetScreenResourcesCurrent is less expensive than
- XRRGetScreenResources, however it is available only
-- in RandR 1.3 or higher */
-+ in RandR 1.3 or higher and of course xserver needs
-+ to support it.
-+ */
- #if (RANDR_MAJOR == 1 && RANDR_MINOR >= 3)
-- resource = XRRGetScreenResourcesCurrent (brightness->priv->dpy, root);
-+ if (brightness->priv->has_randr13)
-+ resource = XRRGetScreenResourcesCurrent (brightness->priv->dpy, root);
-+ else
-+ resource = XRRGetScreenResources (brightness->priv->dpy, root);
- #else
- resource = XRRGetScreenResources (brightness->priv->dpy, root);
- #endif
-@@ -684,8 +720,13 @@ gpm_brightness_xrandr_init (GpmBrightnessXRandR *brightness)
-
- /* can we do this */
- brightness->priv->has_extension = gpm_brightness_xrandr_setup_display (brightness);
-- if (brightness->priv->has_extension == FALSE)
-+ if (brightness->priv->has_extension == FALSE) {
-+ egg_debug ("no XRANDR extension, so aborting init");
- return;
-+ }
-+#if (RANDR_MAJOR == 1 && RANDR_MINOR >= 3)
-+ brightness->priv->has_randr13 = gpm_brightness_xrandr_setup_version (brightness);
-+#endif
-
- screen = gdk_screen_get_default ();
- window = gdk_screen_get_root_window (screen);
---
-cgit v0.8.2
diff --git a/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.4-Check-for-XRR-functions-using-library-version-instea.patch b/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.4-Check-for-XRR-functions-using-library-version-instea.patch
new file mode 100644
index 000000000000..71dd94d8671f
--- /dev/null
+++ b/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.4-Check-for-XRR-functions-using-library-version-instea.patch
@@ -0,0 +1,85 @@
+From 558a5634d60221e5485083193155d1ee062c8e0e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?R=C3=A9mi=20Cardona?= <remi@gentoo.org>
+Date: Fri, 11 Sep 2009 21:33:58 +0200
+Subject: [PATCH] Check for XRR* functions using library version instead of proto version
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+randrproto 1.3 can be installed with libXrandr 1.2, which causes linking
+errors with g-p-m. This patch checks that libXrandr (and not randrproto)
+1.3 is available.
+
+Signed-off-by: Rémi Cardona <remi@gentoo.org>
+---
+ configure.ac | 4 ++++
+ src/gpm-brightness-xrandr.c | 13 ++++++-------
+ 2 files changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4cbe47c..4baa0cf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -171,6 +171,10 @@ PKG_CHECK_MODULES(XRANDR, [
+ AC_SUBST(XRANDR_CFLAGS)
+ AC_SUBST(XRANDR_LIBS)
+
++PKG_CHECK_EXISTS(
++ [xrandr >= 1.3],
++ [AC_DEFINE(HAVE_XRANDR_13, 1, [xrandr 1.3 available])])
++
+ PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
+ AC_SUBST(LIBNOTIFY_CFLAGS)
+ AC_SUBST(LIBNOTIFY_LIBS)
+diff --git a/src/gpm-brightness-xrandr.c b/src/gpm-brightness-xrandr.c
+index cce4df2..3332be3 100644
+--- a/src/gpm-brightness-xrandr.c
++++ b/src/gpm-brightness-xrandr.c
+@@ -60,7 +60,7 @@ struct GpmBrightnessXRandRPrivate
+ Display *dpy;
+ guint shared_value;
+ gboolean has_extension;
+-#if (RANDR_MAJOR == 1 && RANDR_MINOR >= 3)
++#ifdef HAVE_XRANDR_13
+ gboolean has_randr13;
+ #endif
+ gboolean hw_changed;
+@@ -173,7 +173,7 @@ gpm_brightness_xrandr_setup_display (GpmBrightnessXRandR *brightness)
+ return TRUE;
+ }
+
+-#if (RANDR_MAJOR == 1 && RANDR_MINOR >= 3)
++#ifdef HAVE_XRANDR_13
+ /**
+ * gpm_brightness_xrandr_setup_version: Check whether xserver really supports xrandr-1.3 features.
+ **/
+@@ -650,14 +650,13 @@ gpm_brightness_xrandr_update_cache (GpmBrightnessXRandR *brightness)
+ in RandR 1.3 or higher and of course xserver needs
+ to support it.
+ */
+-#if (RANDR_MAJOR == 1 && RANDR_MINOR >= 3)
++#ifdef HAVE_XRANDR_13
+ if (brightness->priv->has_randr13)
+ resource = XRRGetScreenResourcesCurrent (brightness->priv->dpy, root);
+ else
+- resource = XRRGetScreenResources (brightness->priv->dpy, root);
+-#else
+- resource = XRRGetScreenResources (brightness->priv->dpy, root);
+ #endif
++ resource = XRRGetScreenResources (brightness->priv->dpy, root);
++
+ if (resource != NULL) {
+ egg_debug ("adding resource %p", resource);
+ g_ptr_array_add (brightness->priv->resources, resource);
+@@ -724,7 +723,7 @@ gpm_brightness_xrandr_init (GpmBrightnessXRandR *brightness)
+ egg_debug ("no XRANDR extension, so aborting init");
+ return;
+ }
+-#if (RANDR_MAJOR == 1 && RANDR_MINOR >= 3)
++#ifdef HAVE_XRANDR_13
+ brightness->priv->has_randr13 = gpm_brightness_xrandr_setup_version (brightness);
+ #endif
+
+--
+1.6.5.1
+
diff --git a/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.4-Remove-an-unused-include-to-fix-compile.patch b/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.4-Remove-an-unused-include-to-fix-compile.patch
new file mode 100644
index 000000000000..10fd0001865d
--- /dev/null
+++ b/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.4-Remove-an-unused-include-to-fix-compile.patch
@@ -0,0 +1,25 @@
+From 83ab201c9c4637f2b81dc640f297178f850450b8 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Tue, 28 Jul 2009 08:42:46 +0100
+Subject: [PATCH] Remove an unused include to fix compile
+
+Signed-off-by: Richard Hughes <richard@hughsie.com>
+---
+ src/gpm-dpms.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/src/gpm-dpms.c b/src/gpm-dpms.c
+index a58ed7d..d939b80 100644
+--- a/src/gpm-dpms.c
++++ b/src/gpm-dpms.c
+@@ -40,7 +40,6 @@
+ #ifdef HAVE_DPMS_EXTENSION
+ #include <X11/Xproto.h>
+ #include <X11/extensions/dpms.h>
+-#include <X11/extensions/dpmsstr.h>
+ #endif
+
+ #include "egg-debug.h"
+--
+1.6.5.1
+
diff --git a/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.4-Use-a-larger-DPMS-idletime-timeout-to-mitigate-an-XS.patch b/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.4-Use-a-larger-DPMS-idletime-timeout-to-mitigate-an-XS.patch
new file mode 100644
index 000000000000..f1e4b5384df2
--- /dev/null
+++ b/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.4-Use-a-larger-DPMS-idletime-timeout-to-mitigate-an-XS.patch
@@ -0,0 +1,39 @@
+From bebf24f41c43f0b2338aefea87f39ba7423d02be Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard@hughsie.com>
+Date: Fri, 14 Aug 2009 11:17:45 +0100
+Subject: [PATCH] Use a larger DPMS idletime timeout to mitigate an XSync bug
+
+---
+ src/gpm-idle.c | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/gpm-idle.c b/src/gpm-idle.c
+index 852f0f3..abe6075 100644
+--- a/src/gpm-idle.c
++++ b/src/gpm-idle.c
+@@ -51,6 +51,11 @@
+ #define GPM_IDLE_TIMEOUT_IGNORE_DPMS_CHANGE 1.0f /* seconds */
+ #define GPM_IDLE_IDLETIME_ID 1
+
++/* XSync seems to be unreliable when setting small values of time.
++ * Ideally we want this to be 1ms (or smaller!) to reduce the chance of a race,
++ * but this fails to trigger on some systems. */
++#define GPM_IDLE_SMALLEST_RESET_VALUE 500 /* ms */
++
+ struct GpmIdlePrivate
+ {
+ EggIdletime *idletime;
+@@ -366,8 +371,8 @@ gpm_idle_idletime_reset_cb (EggIdletime *idletime, GpmIdle *idle)
+ if (idle->priv->mode == GPM_IDLE_MODE_BLANK &&
+ elapsed < GPM_IDLE_TIMEOUT_IGNORE_DPMS_CHANGE) {
+ egg_debug ("ignoring reset, as we've just done a state change");
+- /* make sure we trigger a short 1ms timeout so we can get the expired signal */
+- egg_idletime_alarm_set (idle->priv->idletime, GPM_IDLE_IDLETIME_ID, 1);
++ /* make sure we trigger a short timeout so we can get the expired signal */
++ egg_idletime_alarm_set (idle->priv->idletime, GPM_IDLE_IDLETIME_ID, GPM_IDLE_SMALLEST_RESET_VALUE);
+ return;
+ }
+
+--
+1.6.5.1
+
diff --git a/gnome-extra/gnome-power-manager/gnome-power-manager-2.26.4-r1.ebuild b/gnome-extra/gnome-power-manager/gnome-power-manager-2.26.4-r1.ebuild
new file mode 100644
index 000000000000..50efda35b52c
--- /dev/null
+++ b/gnome-extra/gnome-power-manager/gnome-power-manager-2.26.4-r1.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-power-manager/gnome-power-manager-2.26.4-r1.ebuild,v 1.1 2009/10/26 16:06:59 remi Exp $
+
+EAPI="2"
+
+inherit autotools eutils gnome2 virtualx
+
+DESCRIPTION="Gnome Power Manager"
+HOMEPAGE="http://www.gnome.org/projects/gnome-power-manager/"
+SRC_URI="${SRC_URI}
+ mirror://gentoo/${P}-cpufreq-patches.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc policykit test"
+
+# See bug #196490 & bug #575500
+#RESTRICT="test"
+
+RDEPEND=">=dev-libs/glib-2.6.0
+ >=x11-libs/gtk+-2.11.0
+ >=gnome-base/gnome-keyring-0.6.0
+ >=sys-apps/hal-0.5.9
+ >=dev-libs/dbus-glib-0.71
+ >=gnome-base/libglade-2.5.0
+ >=x11-libs/libnotify-0.4.3
+ >=x11-libs/libwnck-2.10.0
+ >=x11-libs/cairo-1.0.0
+ >=gnome-base/gnome-panel-2
+ >=gnome-base/gconf-2.10
+ >=media-libs/libcanberra-0.10[gtk]
+ >=sys-apps/devicekit-001
+ >=sys-apps/devicekit-power-005
+ >=dev-libs/libunique-1
+
+ >=x11-apps/xrandr-1.2
+ x11-libs/libX11
+ x11-libs/libXext
+
+ policykit? (
+ >=sys-auth/policykit-0.8
+ >=sys-apps/hal-0.5.12_rc1-r2[policykit]
+ >=gnome-extra/policykit-gnome-0.8 )"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ app-text/scrollkeeper
+ app-text/docbook-xml-dtd:4.3
+ >=dev-util/pkgconfig-0.9
+ >=dev-util/intltool-0.35
+ >=app-text/gnome-doc-utils-0.3.2
+ doc? (
+ app-text/xmlto
+ app-text/docbook-sgml-utils
+ app-text/docbook-xml-dtd:4.4
+ app-text/docbook-sgml-dtd:4.1
+ app-text/docbook-xml-dtd:4.1.2 )"
+
+# docbook-sgml-utils and docbook-sgml-dtd-4.1 used for creating man pages
+# (files under ${S}/man).
+# docbook-xml-dtd-4.4 and -4.1.2 are used by the xml files under ${S}/docs.
+
+DOCS="AUTHORS ChangeLog NEWS README TODO"
+
+pkg_setup() {
+ G2CONF="${G2CONF}
+ $(use_enable test tests)
+ $(use_enable doc docbook-docs)
+ $(use_enable policykit)
+ $(use_enable policykit gconf-defaults)
+ --enable-compile-warnings=minimum
+ --with-dpms-ext
+ --enable-legacy-buttons
+ --enable-applets"
+}
+
+src_prepare() {
+ gnome2_src_prepare
+
+ # Drop debugger CFLAGS
+ sed -e 's:^CPPFLAGS="$CPPFLAGS -g"$::g' -i configure.ac \
+ || die "sed 2 failed"
+
+ # Drop test that needs a running daemon
+ sed 's:^\(.*gpm_inhibit_test (test);\)://\1:' -i src/gpm-self-test.c \
+ || die "sed 3 failed"
+
+ # Skip crazy compilation warnings, bug #263078
+ epatch "${FILESDIR}/${PN}-2.26.0-gcc44-options.patch"
+
+ # Backport patches from upstream, add patch to stop using RANDR_MAJOR/MINOR
+ epatch "${FILESDIR}/${PN}-2.26.4-Use-a-larger-DPMS-idletime-timeout-to-mitigate-an-XS.patch"
+ epatch "${FILESDIR}/${PN}-2.26.4-Remove-an-unused-include-to-fix-compile.patch"
+ epatch "${FILESDIR}/${PN}-2.26.4-Check-for-XRR-functions-using-library-version-instea.patch"
+
+ # Resurrect cpufreq in capplet, bug #263891
+ epatch "${WORKDIR}/${PN}-2.26.0-cpufreq-libhal-glib.patch"
+ epatch "${WORKDIR}/${PN}-2.26.0-cpufreq-support.patch"
+ epatch "${WORKDIR}/${PN}-2.26.0-cpufreq-ui.patch"
+ epatch "${WORKDIR}/${PN}-2.26.3-cpufreq-po.patch"
+
+ # Fix uninstalled cpufreq schemas, bug #266995
+ epatch "${WORKDIR}/${PN}-2.26.0-cpufreq-schemas.patch"
+
+ intltoolize --force --copy --automake || die "intltoolize failed"
+
+ # Make it libtool-1 compatible
+ rm -v m4/lt* m4/libtool.m4 || die "removing libtool macros failed"
+ eautoreconf
+
+ if ! use doc; then
+ # Remove the docbook2man rules here since it's not handled by a proper
+ # parameter in configure.in.
+ sed -e 's:@HAVE_DOCBOOK2MAN_TRUE@.*::' \
+ -i "${S}/man/Makefile.in" || die "sed 1 failed"
+ fi
+
+ # glibc splits this out, whereas other libc's do not tend to
+ use elibc_glibc || sed -e 's/-lresolv//' -i configure || die "sed 4 failed"
+}
+
+src_test() {
+ unset DBUS_SESSION_BUS_ADDRESS
+ Xemake check || die "Test phase failed"
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ elog
+ elog "To enable frequency scaling interface, use the following command:"
+ elog " gconftool-2 /apps/gnome-power-manager/ui/cpufreq_show"
+ elog "Note that this will conflict with other power managment utility"
+ elog "like app-laptop/laptop-mode-tools."
+ elog
+}