summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2010-11-09 23:41:52 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2010-11-10 00:00:30 +0530
commitd53f297ef928933d2e0c955742d440d0c3d7a150 (patch)
tree41cd2c1c4cca20be25137ced5bd82c4c362ad108
parentsys-power/upower: fix bad battery state when fully-charged (diff)
downloadnirbheek-d53f297ef928933d2e0c955742d440d0c3d7a150.tar.gz
nirbheek-d53f297ef928933d2e0c955742d440d0c3d7a150.tar.bz2
nirbheek-d53f297ef928933d2e0c955742d440d0c3d7a150.zip
Bump upower, update patch
-rw-r--r--sys-power/upower/Manifest7
-rw-r--r--sys-power/upower/files/upower-0.9.7-linux-2.6.36.patch26
-rw-r--r--sys-power/upower/files/upower-dell-samsung-sdi-battery-quirk.patch34
-rw-r--r--sys-power/upower/upower-0.9.7.ebuild (renamed from sys-power/upower/upower-0.9.6.ebuild)19
4 files changed, 60 insertions, 26 deletions
diff --git a/sys-power/upower/Manifest b/sys-power/upower/Manifest
index 30d3404..e1c3231 100644
--- a/sys-power/upower/Manifest
+++ b/sys-power/upower/Manifest
@@ -1,6 +1,7 @@
AUX upower-0.9.6-introspection-2.patch 4913 RMD160 8c564657c46ed8fb462ac897662b2f0dff085662 SHA1 4ecce4e42b977bd06d44dc81357019afbcab7359 SHA256 1bbb8272c3eb7fd377857a60804a97fa8f93c1b41ed474eaece4b30118197937
AUX upower-0.9.6-introspection.patch 1211 RMD160 1c5f68cd72181e7e98b43e847add7054d7372dd2 SHA1 9fbf83d4a6226e9c5eb9059ac4b907043e70c344 SHA256 4325436699554dae5cc5c3ac4768d40a44f4a708f2f4d3e90ee896c341f72dad
-AUX upower-dell-samsung-sdi-battery-quirk.patch 2371 RMD160 4f4da397e14a350c2faebca2ad0d70e2d00a9b0a SHA1 070792f533b210eec19e918609e48a970ef91153 SHA256 7e9b6e8a579aaef21715ffe45348d1c63229ed392275b4ce001f86ed3d0d0a50
-DIST upower-0.9.6.tar.bz2 453993 RMD160 f1bf3a2138d41bc7c138fb2df2b99980f64ae000 SHA1 4e21c948ac7eda57f9f0ab1fde734315517fe9ac SHA256 aeff4a0c98a12b8beb56ca92314e1e8a6711f13929a294ae3c0a725125a1db4f
-EBUILD upower-0.9.6.ebuild 2382 RMD160 596fd6cb22ce27564351bc5461500fae3d7c4e31 SHA1 596282a1d7d5fc97a600420269194d32c74dd259 SHA256 3186e5b43bdeaa0a3152ad40939075419e0eca90ccafe8a6568dc9179f880ef8
+AUX upower-0.9.7-linux-2.6.36.patch 871 RMD160 79aacb81bd413ac92016c6e46cc4415c5ee6b6dd SHA1 4d553a05c3e907f6da2d021d9f6c011aecff3ed9 SHA256 f3a806575c9bffde8bcd8df982c4a8cf57f204a85b40d9cb1851fe01a32911b5
+AUX upower-dell-samsung-sdi-battery-quirk.patch 3038 RMD160 2302b7607aec5b1758cf3baa4c1acdc7d5edfec3 SHA1 65eaddc3faaf0221b2369a8311d754c47e33b9c5 SHA256 66450976ba0ac22fc6695723526ea03822ebcf2965b4773158e109bb727fdd7d
+DIST upower-0.9.7.tar.bz2 459717 RMD160 3f66a8a0f0a3a4e91428b13a068be820b1f4a44f SHA1 9fbf0bd9252430af66a23f71d661cdc60692f9cc SHA256 7db45ff675e6836e89adc84d6937e9e5cd468ded89e8bd19edcbfb1a28f42933
+EBUILD upower-0.9.7.ebuild 2174 RMD160 f5ab1358be8e548789a4e6d1382c3b4c97ff5a18 SHA1 809bd290c454df7753548281a7848e8f5c74a557 SHA256 8b983aaebff639bfcf0e1b5ecb263638e4d10552998e5aa490e03ba3570b6286
MISC metadata.xml 363 RMD160 7210445bae10f2ddf76edaa8e7144227a03c5de1 SHA1 76f5af45c1a11584d24878ee65e6773757cfa014 SHA256 b24b22d2e371b3ee7165cd9ae1ca6fac72aee10e107c192a4e94686ba95b9093
diff --git a/sys-power/upower/files/upower-0.9.7-linux-2.6.36.patch b/sys-power/upower/files/upower-0.9.7-linux-2.6.36.patch
new file mode 100644
index 0000000..7510276
--- /dev/null
+++ b/sys-power/upower/files/upower-0.9.7-linux-2.6.36.patch
@@ -0,0 +1,26 @@
+From 04dd349103ac1db8660d5c4fd86e91e3b488650c Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Thu, 04 Nov 2010 22:45:10 +0000
+Subject: Fix compilation eror against Linux 2.6.36
+
+Include <stdint.h> so that <linux/fs.h> can use uint64_t. Arguably a bug in the
+kernel headers, but it costs us nothing to safeguard against it.
+
+ CC libupshared_la-up-device-idevice.lo
+In file included from sysfs-utils.c:39:0:
+/usr/include/linux/fs.h:37:2: error: expected specifier-qualifier-list before ‘uint64_t’
+---
+diff --git a/src/linux/sysfs-utils.c b/src/linux/sysfs-utils.c
+index 01c3623..efba253 100644
+--- a/src/linux/sysfs-utils.c
++++ b/src/linux/sysfs-utils.c
+@@ -36,6 +36,7 @@
+ #include <fcntl.h>
+ #include <pwd.h>
+ #include <grp.h>
++#include <stdint.h>
+ #include <linux/fs.h>
+ #include <sys/ioctl.h>
+ #include <glib.h>
+--
+cgit v0.8.3-6-g21f6
diff --git a/sys-power/upower/files/upower-dell-samsung-sdi-battery-quirk.patch b/sys-power/upower/files/upower-dell-samsung-sdi-battery-quirk.patch
index 9781dbf..b0a3df1 100644
--- a/sys-power/upower/files/upower-dell-samsung-sdi-battery-quirk.patch
+++ b/sys-power/upower/files/upower-dell-samsung-sdi-battery-quirk.patch
@@ -1,3 +1,8 @@
+From 7849ca66af7f74bfdba968e979c4596c9e99ff3d Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
+Date: Tue, 9 Nov 2010 23:54:27 +0530
+Subject: [PATCH] Add Dell laptop battery always-discharging quirk
+
Once full, some Dell laptop batteries show battery state as "fully-charged" for
a second, and then set battery state as "Discharging". However, the "on-battery"
status is correct. Try to do some guesswork for this case.
@@ -9,10 +14,16 @@ model: DELL U600P04
serial: 0000
technology: lithium-ion
+https://bugs.freedesktop.org/show_bug.cgi?id=31196
---
---- src/linux/up-device-supply.c
-+++ src/linux/up-device-supply.c
-@@ -405,6 +405,9 @@
+ src/linux/up-device-supply.c | 40 ++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 40 insertions(+), 0 deletions(-)
+
+diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c
+index 341f5df..4294e04 100644
+--- a/src/linux/up-device-supply.c
++++ b/src/linux/up-device-supply.c
+@@ -402,6 +402,9 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
UpDeviceState old_state;
UpDeviceState state;
UpDevice *device = UP_DEVICE (supply);
@@ -22,7 +33,7 @@ technology: lithium-ion
const gchar *native_path;
GUdevDevice *native;
gboolean is_present;
-@@ -425,7 +428,9 @@
+@@ -422,7 +425,9 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
const gchar *recall_url = NULL;
UpDaemon *daemon;
gboolean on_battery;
@@ -32,10 +43,10 @@ technology: lithium-ion
native = G_UDEV_DEVICE (up_device_get_native (device));
native_path = g_udev_device_get_sysfs_path (native);
-@@ -610,6 +615,41 @@
- state = UP_DEVICE_STATE_FULLY_CHARGED;
+@@ -599,6 +604,41 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
+ if (percentage > 100.0f)
+ percentage = 100.0f;
}
-
+ /* some batteries show themselves as 'discharging' once they're full */
+ if (state == UP_DEVICE_STATE_DISCHARGING && percentage == 100.0f) {
+ state = UP_DEVICE_STATE_FULLY_CHARGED;
@@ -54,7 +65,7 @@ technology: lithium-ion
+ continue;
+
+ /* print what we're trying */
-+ egg_debug ("guessing battery state using power supply status:%i",
++ g_debug ("guessing battery state using power supply status:%i",
+ online);
+
+ /* If any of the power supplies is not online,
@@ -65,12 +76,15 @@ technology: lithium-ion
+ }
+ }
+ /* print what we did */
-+ egg_debug ("guessed battery state as '%s' using power supply status",
++ g_debug ("guessed battery state as '%s' using power supply status",
+ up_device_state_to_string (state));
+
+ g_ptr_array_unref (devices);
+ }
+
+
/* the battery isn't charging or discharging, it's just
* sitting there half full doing nothing: try to guess a state */
- if (state == UP_DEVICE_STATE_UNKNOWN) {
+--
+1.7.2.2
+
diff --git a/sys-power/upower/upower-0.9.6.ebuild b/sys-power/upower/upower-0.9.7.ebuild
index ff73350..4ae2ca8 100644
--- a/sys-power/upower/upower-0.9.6.ebuild
+++ b/sys-power/upower/upower-0.9.7.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/upower-0.9.6.ebuild,v 1.3 2010/10/18 09:46:48 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/upower-0.9.7.ebuild,v 1.1 2010/11/08 11:36:05 ssuominen Exp $
EAPI=3
-inherit autotools eutils linux-info
+inherit eutils linux-info
DESCRIPTION="D-Bus abstraction for enumerating power devices and querying history and statistics"
HOMEPAGE="http://upower.freedesktop.org/"
@@ -31,10 +31,9 @@ DEPEND="${COMMON_DEPEND}
>=dev-util/intltool-0.40.0
dev-util/pkgconfig
doc? ( dev-util/gtk-doc
- app-text/docbook-xml-dtd:4.1.2 )
- introspection? ( dev-util/gtk-doc-am )" # eautoreconf
+ app-text/docbook-xml-dtd:4.1.2 )"
-RESTRICT="test" # error getting system bus
+RESTRICT="test"
pkg_setup() {
if use kernel_linux; then
@@ -48,14 +47,8 @@ pkg_setup() {
src_prepare() {
# Battery weirdness
epatch "${FILESDIR}/${PN}-dell-samsung-sdi-battery-quirk.patch"
-
- if use introspection; then
- sed -i -e '/DISABLE_DEPRECATED/d' configure.ac || die
- epatch "${FILESDIR}"/${P}-introspection{,-2}.patch
- eautoreconf
- else
- sed -i -e '/DISABLE_DEPRECATED/d' configure || die
- fi
+ sed -i -e '/DISABLE_DEPRECATED/d' configure || die
+ epatch "${FILESDIR}"/${P}-linux-2.6.36.patch
}
src_configure() {