summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Cardona <remi@gentoo.org>2009-10-26 16:06:59 +0000
committerRemi Cardona <remi@gentoo.org>2009-10-26 16:06:59 +0000
commit6dd289734b36f97118d70e95b9a05f82ef109f98 (patch)
tree971c100b3946189e64f4f1d416ede99a6e3f255e /gnome-extra/gnome-power-manager
parentamd64 stable wrt #290483 (diff)
downloadhistorical-6dd289734b36f97118d70e95b9a05f82ef109f98.tar.gz
historical-6dd289734b36f97118d70e95b9a05f82ef109f98.tar.bz2
historical-6dd289734b36f97118d70e95b9a05f82ef109f98.zip
gnome-extra/gnome-power-manager: backport patches from upstream, add randr patch
Package-Manager: portage-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/Manifest17
-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
7 files changed, 304 insertions, 106 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/Manifest b/gnome-extra/gnome-power-manager/Manifest
index a92153b467e0..ecc10d830cc9 100644
--- a/gnome-extra/gnome-power-manager/Manifest
+++ b/gnome-extra/gnome-power-manager/Manifest
@@ -1,9 +1,8 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX gnome-power-manager-2.16.3-doc.patch 3920 RMD160 a5afc7b63f52769f080d02d2f1883f23c41e5aaf SHA1 03485842cf6a96b5270592db9813ffa3d3982b77 SHA256 0c8b96a0ca75faf7132d3a80424175cac1ffe7271e7614fe956516fe67cf92fa
AUX gnome-power-manager-2.26.0-gcc44-options.patch 1118 RMD160 e9e26f67cdfd949d65bf9970b3ed5ace13918746 SHA1 3f371ae4bedf054904a8e3ae00a1fa94dbe82129 SHA256 c55251fb471782356188e1686d1bd8385ea08f0a5904d1ffee048c7e4f8b2614
-AUX gnome-power-manager-2.26.1-fix-xrandr-1.3-detection.patch 3138 RMD160 271f14e7949a0c20876c3a7fae7540de8e177bf5 SHA1 ae7849855e8ebc4afb380e088cf67527e8fc3e80 SHA256 904427555ca136470a11e8a7006b9a62a5ec9ffa0177aa689ba28f765a171ba4
+AUX gnome-power-manager-2.26.4-Check-for-XRR-functions-using-library-version-instea.patch 2879 RMD160 9b81913cc9c48f04f79e64873f7c3bc674fb2cee SHA1 0cb1c94c71c4e0838e0a277669c46238d7cefaa7 SHA256 badffa783434dadd71e818f5757e0a817e73878dada561019f9e1fae12f2138c
+AUX gnome-power-manager-2.26.4-Remove-an-unused-include-to-fix-compile.patch 648 RMD160 e8f1918049d6f0152936a438cb5b9133b8d07bdc SHA1 850725d01612c55a58dcf9325ac0f12087e9eb6f SHA256 06e72ef3787a8fa620a28c5c61e2599f8461d5b55335a5b36045a66959e64df0
+AUX gnome-power-manager-2.26.4-Use-a-larger-DPMS-idletime-timeout-to-mitigate-an-XS.patch 1487 RMD160 83776591623e35eeac9c916280526a9ce1db2f81 SHA1 b621863a1604226b4e92e5ea80846a3d45062bd9 SHA256 5c960c386caffde848687670046df78a79cfb1f641c2392e1bc2a3997c04c07d
AUX org.freedesktop.hal.power-management.policy 850 RMD160 42a5da73e27416a897d374f0289ecfdbd59ecdf2 SHA1 eed04e5c57fc20348b4d0ecc6c47322f162329fb SHA256 ec600302d7cb80241c12edaa5c1429997f63b53195d7526923f4496eb62b1b43
DIST gnome-power-manager-2.20.0.tar.bz2 2588839 RMD160 6f5cc9e9c57c1e913f0ef8a1d2d16784194bbd45 SHA1 117e8f5bc81ae81a110052df173eb75d87b08049 SHA256 bc1a3428bc98bfcab473e0f62387f32205c40693f6c6897931204ef4800aa1e5
DIST gnome-power-manager-2.22.1.tar.bz2 3002440 RMD160 88522f58589ece86127a84ebf52f87c0c462aa91 SHA1 bba77f4403643f10a26d7abf5a4681cd50ff08d4 SHA256 967dc61382e85dd6d8a8da74e9847760bbb429a3fdb97ab2f4f69bf574b0c1c4
@@ -14,13 +13,7 @@ DIST gnome-power-manager-2.26.4.tar.bz2 3755746 RMD160 6e5cc57d8776dc1a89a877b3c
EBUILD gnome-power-manager-2.20.0-r1.ebuild 2442 RMD160 60ae5507c78aeb6d33aa51b4cf085ebbc9b2e0f2 SHA1 2899114ea5ba76b2811de088b595d2fe9ffc6ef3 SHA256 a5bc475f807f5bda00fa927bd2d0addf2758b472037c5bf1f7fc8a402a4fc8a5
EBUILD gnome-power-manager-2.22.1.ebuild 2723 RMD160 4ce2281f8ad838a71d1c55e6c18d65740dd70cbb SHA1 4120137d1067331cf932fba56dbb2cfd08116e3a SHA256 4199da671daba8851e004ba54df976d9bed3f6b536666c54f21f613141f46f0e
EBUILD gnome-power-manager-2.24.4-r2.ebuild 3090 RMD160 894e1cac1d89f2adaabd879574a8d6cd44ae4182 SHA1 4214e9c506eecdbacf6c70ca73d776c51e8953dd SHA256 a7e02c77140f0b472bb92393d979e08465d0957b4c024c54a5efd47d0ffd85a3
+EBUILD gnome-power-manager-2.26.4-r1.ebuild 4047 RMD160 f722c82a69201516059458e289429bc93c9c10e5 SHA1 1ce8aa458230b4fb91d50786cf081203be1d2904 SHA256 6dc1abc77c3bff225b13ccaee5e46a9ff34da45731ff8b5153a4da3a3a1efd15
EBUILD gnome-power-manager-2.26.4.ebuild 3696 RMD160 c92df5484c9be0858ee1e9e96ea3a0724515fa46 SHA1 75aa4e5b130b5c22c2e5c1a1d9a566d4d3a65c6d SHA256 74a3ffb7d1aeefa9206e908368f2483594fc6413f2460d59f745cb7647529f57
-MISC ChangeLog 17649 RMD160 702def6db7a14b313bb62267e0bd0779bc12dd82 SHA1 dc1e583b07b101b70e3b752365137d57088cbeed SHA256 fa1092a57e3fdf9eaf7e8fca6778104d4b7590f5e8a9de1c0a4a2ae4a9af4bc0
+MISC ChangeLog 18187 RMD160 5b56eaea05eaffa13e19d31a5f20ce2dd1cf83df SHA1 536637c84f4379ef7549965515462a3bf95e0bc3 SHA256 6effe7bc268e693a7c7911b56fd7e5a9ce4736a023b92bc5781d8bbb25094124
MISC metadata.xml 438 RMD160 919237398a61022183868a6ad78259f5ba1ddb29 SHA1 22296b3f6619e92d83b5fa85e2ad1d3f15a1ba2a SHA256 b56e882af9618f6dc68e4c6d28bf85eb1cd0e12c2da53218551547760e63a489
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.11 (GNU/Linux)
-
-iEYEARECAAYFAkrBEMUACgkQ1fmVwcYIWAbL3ACeOVTFUzwXMLZK3in6iffTXYe7
-vt8AoL7Upm0953D3KvGiIECu2DA5sotL
-=tYea
------END PGP SIGNATURE-----
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
+}