diff options
-rw-r--r-- | app-laptop/batti/ChangeLog | 12 | ||||
-rw-r--r-- | app-laptop/batti/batti-0.3.8-r2.ebuild | 47 | ||||
-rw-r--r-- | app-laptop/batti/files/batti-0.3.8-upower-0.99.patch | 34 |
3 files changed, 90 insertions, 3 deletions
diff --git a/app-laptop/batti/ChangeLog b/app-laptop/batti/ChangeLog index 1257dff11c51..8e2ef51a4389 100644 --- a/app-laptop/batti/ChangeLog +++ b/app-laptop/batti/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-laptop/batti -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/batti/ChangeLog,v 1.18 2013/02/09 18:57:10 idl0r Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/batti/ChangeLog,v 1.19 2014/05/31 18:06:22 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: + Use patch from ArchLinux to support upower-0.99 (x11-misc/cbatticon is another + alternative to this package that has dead upstream since 2011) 09 Feb 2013; Christian Ruppert <idl0r@gentoo.org> batti-0.3.8-r1.ebuild: Fix Icon dependency @@ -76,4 +83,3 @@ 12 Apr 2010; Samuli Suominen <ssuominen@gentoo.org> +batti-0.3.1.ebuild: Initial commit wrt #314797 by Arthur Spitzer. - 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..ffb4ee81bf1e --- /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.1 2014/05/31 18:06:22 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() + |