summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnome-extra/gnome-power-manager/ChangeLog10
-rw-r--r--gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.0-gcc44-options.patch37
-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/gnome-power-manager-2.26.4.ebuild130
4 files changed, 269 insertions, 1 deletions
diff --git a/gnome-extra/gnome-power-manager/ChangeLog b/gnome-extra/gnome-power-manager/ChangeLog
index 5be7f5226a12..d98e4a5b7892 100644
--- a/gnome-extra/gnome-power-manager/ChangeLog
+++ b/gnome-extra/gnome-power-manager/ChangeLog
@@ -1,6 +1,14 @@
# 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.107 2009/05/02 18:26:31 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/gnome-extra/gnome-power-manager/ChangeLog,v 1.108 2009/08/09 18:31:49 eva Exp $
+
+*gnome-power-manager-2.26.4 (09 Aug 2009)
+
+ 09 Aug 2009; Gilles Dartiguelongue <eva@gentoo.org>
+ +files/gnome-power-manager-2.26.0-gcc44-options.patch,
+ +files/gnome-power-manager-2.26.1-fix-xrandr-1.3-detection.patch,
+ +gnome-power-manager-2.26.4.ebuild:
+ New version for GNOME 2.26. Port to devicekit-power.
*gnome-power-manager-2.24.4-r2 (02 May 2009)
diff --git a/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.0-gcc44-options.patch b/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.0-gcc44-options.patch
new file mode 100644
index 000000000000..7a2905f6480b
--- /dev/null
+++ b/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.0-gcc44-options.patch
@@ -0,0 +1,37 @@
+---
+ Author: Gilles Dartiguelongue <eva@gentoo.org>
+
+ Make warning and deprecation cflags optional, this is especially important for downstream.
+
+ https://bugs.gentoo.org/show_bug.cgi?id=263078
+
+ configure.ac | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -21,6 +21,9 @@ AC_PATH_PROG(GLIB_GENMARSHAL, glib-genma
+ dnl ---------------------------------------------------------------------------
+ dnl - Extra verbose warning switches
+ dnl ---------------------------------------------------------------------------
++
++case "$enable_compile_warnings" in
++ yes|maximum|error)
+ #CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
+ CPPFLAGS="$CPPFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED"
+ #CPPFLAGS="$CPPFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE"
+@@ -59,6 +62,12 @@ else
+ WARNINGFLAGS=""
+ WARNINGFLAGS=""
+ fi
++ ;;
++ *)
++ WARNINGFLAGS=""
++ WARNINGFLAGS=""
++ ;;
++esac
+ AC_SUBST(WARNINGFLAGS)
+ AC_SUBST(WARNINGFLAGS)
+
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
new file mode 100644
index 000000000000..192047f9e71e
--- /dev/null
+++ b/gnome-extra/gnome-power-manager/files/gnome-power-manager-2.26.1-fix-xrandr-1.3-detection.patch
@@ -0,0 +1,93 @@
+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/gnome-power-manager-2.26.4.ebuild b/gnome-extra/gnome-power-manager/gnome-power-manager-2.26.4.ebuild
new file mode 100644
index 000000000000..157dda4e9036
--- /dev/null
+++ b/gnome-extra/gnome-power-manager/gnome-power-manager-2.26.4.ebuild
@@ -0,0 +1,130 @@
+# 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.ebuild,v 1.1 2009/08/09 18:31:49 eva 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
+
+ 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
+
+ # 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"
+
+ # 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
+
+ # 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
+}