summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2014-05-31 18:22:41 +0000
committerPacho Ramos <pacho@gentoo.org>2014-05-31 18:22:41 +0000
commit47daeb76b4bef32dbf885fcc2a599c804671f495 (patch)
treed998991495f021accd73a52da1ba22260d6e0d06 /app-laptop
parentRevert as ssuominen reported breakage with upower-pm-utils. This is only comp... (diff)
downloadgentoo-2-47daeb76b4bef32dbf885fcc2a599c804671f495.tar.gz
gentoo-2-47daeb76b4bef32dbf885fcc2a599c804671f495.tar.bz2
gentoo-2-47daeb76b4bef32dbf885fcc2a599c804671f495.zip
Add it back as I just got another mail from him telling it wasn't really breaking it ;)
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'app-laptop')
-rw-r--r--app-laptop/batti/ChangeLog9
-rw-r--r--app-laptop/batti/batti-0.3.8-r2.ebuild47
-rw-r--r--app-laptop/batti/files/batti-0.3.8-upower-0.99.patch34
3 files changed, 89 insertions, 1 deletions
diff --git a/app-laptop/batti/ChangeLog b/app-laptop/batti/ChangeLog
index 1bd876682cd6..6db79f446cc0 100644
--- a/app-laptop/batti/ChangeLog
+++ b/app-laptop/batti/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-laptop/batti
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-laptop/batti/ChangeLog,v 1.20 2014/05/31 18:19:54 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/batti/ChangeLog,v 1.21 2014/05/31 18:22:41 pacho Exp $
+
+*batti-0.3.8-r2 (31 May 2014)
+
+ 31 May 2014; Pacho Ramos <pacho@gentoo.org> +batti-0.3.8-r2.ebuild,
+ +files/batti-0.3.8-upower-0.99.patch:
+ Add it back as I just got another mail from him telling it wasn't really
+ breaking it ;)
31 May 2014; Pacho Ramos <pacho@gentoo.org> -batti-0.3.8-r2.ebuild,
-files/batti-0.3.8-upower-0.99.patch, batti-0.3.8-r1.ebuild:
diff --git a/app-laptop/batti/batti-0.3.8-r2.ebuild b/app-laptop/batti/batti-0.3.8-r2.ebuild
new file mode 100644
index 000000000000..f263d6b971be
--- /dev/null
+++ b/app-laptop/batti/batti-0.3.8-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/batti/batti-0.3.8-r2.ebuild,v 1.3 2014/05/31 18:22:41 pacho Exp $
+
+EAPI=5
+
+SUPPORT_PYTHON_ABIS="1"
+PYTHON_DEPEND="2"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit python distutils gnome2-utils eutils
+
+DESCRIPTION="A upower based battery monitor for the system tray, similar to batterymon"
+HOMEPAGE="http://code.google.com/p/batti-gtk/"
+SRC_URI="http://batti-gtk.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libnotify"
+
+RDEPEND="dev-python/pygtk
+ dev-python/dbus-python
+ || ( sys-power/upower:= sys-power/upower-pm-utils )
+ x11-themes/gnome-icon-theme
+ libnotify? ( x11-libs/libnotify )"
+DEPEND=""
+
+DOCS="AUTHORS"
+
+src_prepare() {
+ has_version ">=sys-power/upower-0.99" && epatch "${FILESDIR}/${P}-upower-0.99.patch"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ distutils_pkg_postinst
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ distutils_pkg_postrm
+}
diff --git a/app-laptop/batti/files/batti-0.3.8-upower-0.99.patch b/app-laptop/batti/files/batti-0.3.8-upower-0.99.patch
new file mode 100644
index 000000000000..6f313a594c94
--- /dev/null
+++ b/app-laptop/batti/files/batti-0.3.8-upower-0.99.patch
@@ -0,0 +1,34 @@
+diff -Naur batti-0.3.8.orig/src/PowerBackend.py batti-0.3.8/src/PowerBackend.py
+--- batti-0.3.8.orig/src/PowerBackend.py 2014-04-15 19:30:34.123260000 +0200
++++ batti-0.3.8/src/PowerBackend.py 2014-04-15 19:32:11.859168509 +0200
+@@ -180,17 +180,6 @@
+
+ properties = dbus.Interface(iface, 'org.freedesktop.DBus.Properties')
+
+- if properties.Get(self.dbus_interface, 'CanSuspend'):
+- self.__can_suspend = True
+- else:
+- self.__can_suspend = False
+-
+- if properties.Get(self.dbus_interface, 'CanHibernate'):
+- self.__can_hibernate = True
+- else:
+- self.__can_hibernate = False
+-
+-
+ def __get_interface(self):
+ dkit_obj = self.__bus.get_object(self.dbus_service, self.dbus_object)
+ return dbus.Interface(dkit_obj, self.dbus_interface)
+@@ -201,12 +190,6 @@
+ self.__mc_action(widget, event, data)
+
+
+- def can_suspend(self):
+- return self.__can_suspend and self.__get_interface().SuspendAllowed()
+-
+- def can_hibernate(self):
+- return self.__can_hibernate and self.__get_interface().HibernateAllowed()
+-
+ def suspend(self):
+ self.__get_interface().Suspend()
+