public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-laptop/batti/, app-laptop/batti/files/
@ 2017-06-18  9:17 Pacho Ramos
  0 siblings, 0 replies; only message in thread
From: Pacho Ramos @ 2017-06-18  9:17 UTC (permalink / raw
  To: gentoo-commits

commit:     fca6415a9829db5fa82e87c5f3cf1d2d4e4cb69b
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 18 09:17:04 2017 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Jun 18 09:17:28 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fca6415a

app-laptop/batti: Support current upower version (#600914 by idl0r), hicolor-icon-theme provides the enough icons for this.

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 app-laptop/batti/batti-0.3.8-r4.ebuild             | 45 ++++++++++++++++++++++
 .../batti/files/batti-0.3.8-upower-capital.patch   | 32 +++++++++++++++
 2 files changed, 77 insertions(+)

diff --git a/app-laptop/batti/batti-0.3.8-r4.ebuild b/app-laptop/batti/batti-0.3.8-r4.ebuild
new file mode 100644
index 00000000000..a0f42c02fb8
--- /dev/null
+++ b/app-laptop/batti/batti-0.3.8-r4.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 gnome2-utils
+
+DESCRIPTION="A upower based battery monitor for the system tray, similar to batterymon"
+HOMEPAGE="https://code.google.com/p/batti-gtk/"
+SRC_URI="https://batti-gtk.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libnotify"
+
+RDEPEND="
+	dev-python/pygtk:2[${PYTHON_USEDEP}]
+	dev-python/dbus-python[${PYTHON_USEDEP}]
+	|| ( sys-power/upower sys-power/upower-pm-utils )
+	x11-themes/hicolor-icon-theme
+	libnotify? ( x11-libs/libnotify )
+"
+DEPEND=""
+
+src_prepare() {
+	default
+	if has_version ">=sys-power/upower-0.99"; then
+		eapply "${FILESDIR}/${P}-upower-0.99.patch"
+		eapply "${FILESDIR}/${P}-upower-capital.patch"
+	fi
+}
+
+pkg_preinst() {
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+	gnome2_icon_cache_update
+}

diff --git a/app-laptop/batti/files/batti-0.3.8-upower-capital.patch b/app-laptop/batti/files/batti-0.3.8-upower-capital.patch
new file mode 100644
index 00000000000..e7f62761661
--- /dev/null
+++ b/app-laptop/batti/files/batti-0.3.8-upower-capital.patch
@@ -0,0 +1,32 @@
+From 1e0fe57a93ed3996bad295e20eeda81f6af483af Mon Sep 17 00:00:00 2001
+From: Christian Ruppert <idl0r@gentoo.org>
+Date: Wed, 20 Jul 2016 20:14:32 +0200
+Subject: [PATCH] The type property (in recent UPower at least) needs to have a
+ capital T - "Type"
+
+---
+ src/PowerBackend.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/PowerBackend.py b/src/PowerBackend.py
+index e020b98..56bcb61 100644
+--- a/src/PowerBackend.py
++++ b/src/PowerBackend.py
+@@ -165,7 +165,7 @@ def __init__(self):
+         self.__batteries = {}
+         for dev in devices:
+             (prop_iface, dev_iface) = self.__get_battery(dev)
+-            type = prop_iface.Get(self.device_interface, 'type')
++            type = prop_iface.Get(self.device_interface, 'Type')
+             if type == self.bat_type:
+                 power_bat = UPowerBattery(prop_iface, dev_iface)
+                 self.__batteries[dev] = power_bat
+@@ -228,7 +228,7 @@ def set_right_popup_menu_action(self, action):
+     def __device_added(self, udi):
+         (prop_iface, dev_iface) = self.__get_battery(udi)
+         try:
+-            type = prop_iface.Get(self.device_interface, 'type')
++            type = prop_iface.Get(self.device_interface, 'Type')
+             if type == self.bat_type:
+                 power_bat = UPowerBattery(prop_iface, dev_iface)
+                 power_bat.set_left_popup_menu_action(self.__mc_action)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-18  9:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-18  9:17 [gentoo-commits] repo/gentoo:master commit in: app-laptop/batti/, app-laptop/batti/files/ Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox