summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2014-06-19 16:21:19 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2014-06-19 16:21:19 +0000
commitda79f791537fb79700362597a329075c373b83c3 (patch)
tree134d63b11510c660baea82ebee58ab2276eb55f0 /sys-power
parentStable on alpha, bug #470260 (diff)
downloadgentoo-2-da79f791537fb79700362597a329075c373b83c3.tar.gz
gentoo-2-da79f791537fb79700362597a329075c373b83c3.tar.bz2
gentoo-2-da79f791537fb79700362597a329075c373b83c3.zip
old
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/upower/ChangeLog9
-rw-r--r--sys-power/upower/files/upower-0.9.23-clamp_percentage_for_overfull_batt.patch72
-rw-r--r--sys-power/upower/files/upower-0.9.23-create-dir-runtime.patch34
-rw-r--r--sys-power/upower/files/upower-0.9.23-fix-segfault.patch24
-rw-r--r--sys-power/upower/upower-0.9.23-r3.ebuild91
-rw-r--r--sys-power/upower/upower-0.99.0.ebuild80
6 files changed, 8 insertions, 302 deletions
diff --git a/sys-power/upower/ChangeLog b/sys-power/upower/ChangeLog
index b90e623380c4..21b859ffe10a 100644
--- a/sys-power/upower/ChangeLog
+++ b/sys-power/upower/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-power/upower
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/ChangeLog,v 1.156 2014/06/19 06:09:51 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/ChangeLog,v 1.157 2014/06/19 16:21:19 ssuominen Exp $
+
+ 19 Jun 2014; Samuli Suominen <ssuominen@gentoo.org>
+ -files/upower-0.9.23-clamp_percentage_for_overfull_batt.patch,
+ -files/upower-0.9.23-create-dir-runtime.patch,
+ -files/upower-0.9.23-fix-segfault.patch, -upower-0.9.23-r3.ebuild,
+ -upower-0.99.0.ebuild:
+ old
19 Jun 2014; Samuli Suominen <ssuominen@gentoo.org> upower-0.99.0-r1.ebuild:
amd64/arm/x86 stable wrt #513700
diff --git a/sys-power/upower/files/upower-0.9.23-clamp_percentage_for_overfull_batt.patch b/sys-power/upower/files/upower-0.9.23-clamp_percentage_for_overfull_batt.patch
deleted file mode 100644
index 6e643c42de5e..000000000000
--- a/sys-power/upower/files/upower-0.9.23-clamp_percentage_for_overfull_batt.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From b8fe9902f3c6c50ca6a23e24fcea99582beebc65 Mon Sep 17 00:00:00 2001
-From: Martin Pitt <martinpitt@gnome.org>
-Date: Tue, 22 Oct 2013 08:02:51 +0000
-Subject: linux: Clamp percentage for overfull batteries
-
-Some batteries report energy > energy_full and a percentage ("capacity"
-attribute) > 100%. Clamp these within 0 and 100% for both plausibility as well
-as to avoid setting an out-of-range property which would then become 0%.
-
-https://launchpad.net/bugs/1240673
----
-diff --git a/src/linux/integration-test b/src/linux/integration-test
-index 8489bf3..4be1922 100755
---- a/src/linux/integration-test
-+++ b/src/linux/integration-test
-@@ -442,6 +442,39 @@ class Tests(unittest.TestCase):
- self.assertEqual(self.get_dbus_property('OnLowBattery'), False)
- self.stop_daemon()
-
-+ def test_battery_overfull(self):
-+ '''battery which reports a > 100% percentage for a full battery'''
-+
-+ self.testbed.add_device('power_supply', 'BAT0', None,
-+ ['type', 'Battery',
-+ 'present', '1',
-+ 'status', 'Full',
-+ 'current_now', '1000',
-+ 'charge_now', '11000000',
-+ 'charge_full', '10000000',
-+ 'charge_full_design', '11000000',
-+ 'capacity', '110',
-+ 'voltage_now', '12000000'], [])
-+
-+ self.start_daemon()
-+ devs = self.proxy.EnumerateDevices()
-+ self.assertEqual(len(devs), 1)
-+ bat0_up = devs[0]
-+
-+ # should clamp percentage
-+ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'Percentage'), 100.0)
-+ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'IsPresent'), True)
-+ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'State'),
-+ UP_DEVICE_STATE_FULLY_CHARGED)
-+ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'Energy'), 132.0)
-+ # should adjust EnergyFull to reality, not what the battery claims
-+ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'EnergyFull'), 132.0)
-+ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'EnergyFullDesign'), 132.0)
-+ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'Voltage'), 12.0)
-+ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'PowerSupply'), True)
-+ self.assertEqual(self.get_dbus_dev_property(bat0_up, 'Type'), 2)
-+ self.stop_daemon()
-+
- def test_battery_temperature(self):
- '''battery which reports temperature'''
-
-diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c
-index 8020277..b953d65 100644
---- a/src/linux/up-device-supply.c
-+++ b/src/linux/up-device-supply.c
-@@ -708,6 +708,10 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
- /* get a precise percentage */
- if (sysfs_file_exists (native_path, "capacity")) {
- percentage = sysfs_get_double (native_path, "capacity");
-+ if (percentage < 0.0f)
-+ percentage = 0.0f;
-+ if (percentage > 100.0f)
-+ percentage = 100.0f;
- /* for devices which provide capacity, but not {energy,charge}_now */
- if (energy < 0.1f && energy_full > 0.0f)
- energy = energy_full * percentage / 100;
---
-cgit v0.9.0.2-2-gbebe
diff --git a/sys-power/upower/files/upower-0.9.23-create-dir-runtime.patch b/sys-power/upower/files/upower-0.9.23-create-dir-runtime.patch
deleted file mode 100644
index 34340d44ec30..000000000000
--- a/sys-power/upower/files/upower-0.9.23-create-dir-runtime.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From b9cff29978113aefe3ad18521f383f12ab099a34 Mon Sep 17 00:00:00 2001
-From: Cosimo Cecchi <cosimo@endlessm.com>
-Date: Tue, 25 Feb 2014 09:43:04 +0000
-Subject: Create the history directory at runtime
-
-In addition to build time - this increases compatibilty with OSTree,
-which starts out with an empty /var.
-
-Signed-off-by: Richard Hughes <richard@hughsie.com>
----
-diff --git a/src/up-history.c b/src/up-history.c
-index f9d0fdf..795b093 100644
---- a/src/up-history.c
-+++ b/src/up-history.c
-@@ -414,6 +414,7 @@ up_history_set_directory (UpHistory *history, const gchar *dir)
- {
- g_free (history->priv->dir);
- history->priv->dir = g_strdup (dir);
-+ g_mkdir_with_parents (dir, 0755);
- }
-
- /**
-@@ -887,7 +888,8 @@ up_history_init (UpHistory *history)
- history->priv->data_time_full = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
- history->priv->data_time_empty = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
- history->priv->max_data_age = UP_HISTORY_DEFAULT_MAX_DATA_AGE;
-- history->priv->dir = g_build_filename (HISTORY_DIR, NULL);
-+
-+ up_history_set_directory (history, HISTORY_DIR);
- }
-
- /**
---
-cgit v0.9.0.2-2-gbebe
diff --git a/sys-power/upower/files/upower-0.9.23-fix-segfault.patch b/sys-power/upower/files/upower-0.9.23-fix-segfault.patch
deleted file mode 100644
index 3e8976320777..000000000000
--- a/sys-power/upower/files/upower-0.9.23-fix-segfault.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 0d64bbddaa0078ef148d609a3cfad854cf00d7de Mon Sep 17 00:00:00 2001
-From: Martin Pitt <martinpitt@gnome.org>
-Date: Fri, 08 Nov 2013 13:59:50 +0000
-Subject: lib: Fix segfault on getting property when daemon is not running
-
-This fixes "upower --version" when the daemon is not running, and thus the
-client proxy is NULL.
----
-diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c
-index 35d7b5d..17fb02d 100644
---- a/libupower-glib/up-client.c
-+++ b/libupower-glib/up-client.c
-@@ -322,6 +322,9 @@ up_client_get_property (GObject *object,
- UpClient *client;
- client = UP_CLIENT (object);
-
-+ if (client->priv->proxy == NULL)
-+ return;
-+
- switch (prop_id) {
- case PROP_DAEMON_VERSION:
- g_value_set_string (value, up_client_glue_get_daemon_version (client->priv->proxy));
---
-cgit v0.9.0.2-2-gbebe
diff --git a/sys-power/upower/upower-0.9.23-r3.ebuild b/sys-power/upower/upower-0.9.23-r3.ebuild
deleted file mode 100644
index 9224084de359..000000000000
--- a/sys-power/upower/upower-0.9.23-r3.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/upower-0.9.23-r3.ebuild,v 1.1 2014/06/02 18:45:13 ssuominen Exp $
-
-EAPI=5
-inherit eutils systemd
-
-DESCRIPTION="D-Bus abstraction for enumerating power devices and querying history and statistics"
-HOMEPAGE="http://upower.freedesktop.org/"
-SRC_URI="http://${PN}.freedesktop.org/releases/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
-IUSE="doc +introspection ios kernel_FreeBSD kernel_linux"
-
-COMMON_DEPEND=">=dev-libs/dbus-glib-0.100
- >=dev-libs/glib-2.22
- sys-apps/dbus
- >=sys-auth/polkit-0.110
- introspection? ( dev-libs/gobject-introspection )
- kernel_linux? (
- virtual/libusb:1
- virtual/libgudev:=
- virtual/udev
- ios? (
- >=app-pda/libimobiledevice-1:=
- >=app-pda/libplist-1:=
- )
- )"
-RDEPEND="${COMMON_DEPEND}
- kernel_linux? (
- app-shells/bash
- >=sys-apps/systemd-200
- )"
-DEPEND="${COMMON_DEPEND}
- dev-libs/libxslt
- app-text/docbook-xsl-stylesheets
- dev-util/intltool
- virtual/pkgconfig
- doc? (
- dev-util/gtk-doc
- app-text/docbook-xml-dtd:4.1.2
- )"
-
-QA_MULTILIB_PATHS="usr/lib/${PN}/.*"
-
-DOCS="AUTHORS HACKING NEWS README"
-
-src_prepare() {
- sed -i -e '/DISABLE_DEPRECATED/d' configure || die
-
- epatch \
- "${FILESDIR}"/${P}-create-dir-runtime.patch \
- "${FILESDIR}"/${P}-fix-segfault.patch \
- "${FILESDIR}"/${P}-clamp_percentage_for_overfull_batt.patch
-}
-
-src_configure() {
- local backend myconf
-
- if use kernel_linux; then
- backend=linux
- myconf="--disable-deprecated"
- elif use kernel_FreeBSD; then
- backend=freebsd
- else
- backend=dummy
- fi
-
- econf \
- --libexecdir="${EPREFIX}"/usr/lib/${PN} \
- --localstatedir="${EPREFIX}"/var \
- $(use_enable introspection) \
- --disable-static \
- ${myconf} \
- --enable-man-pages \
- $(use_enable doc gtk-doc) \
- --disable-tests \
- --with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \
- --with-backend=${backend} \
- $(use_with ios idevice) \
- "$(systemd_with_utildir)" \
- "$(systemd_with_unitdir)"
-}
-
-src_install() {
- default
- keepdir /var/lib/upower #383091
- prune_libtool_files
-}
diff --git a/sys-power/upower/upower-0.99.0.ebuild b/sys-power/upower/upower-0.99.0.ebuild
deleted file mode 100644
index 8eb1c1a44b9f..000000000000
--- a/sys-power/upower/upower-0.99.0.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/upower-0.99.0.ebuild,v 1.6 2014/06/02 12:47:33 ssuominen Exp $
-
-EAPI=5
-inherit eutils systemd
-
-DESCRIPTION="D-Bus abstraction for enumerating power devices and querying history and statistics"
-HOMEPAGE="http://upower.freedesktop.org/"
-SRC_URI="http://${PN}.freedesktop.org/releases/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0/2" # based on SONAME of libupower-glib.so
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-IUSE="doc +introspection ios kernel_FreeBSD kernel_linux"
-
-RDEPEND=">=dev-libs/dbus-glib-0.100
- >=dev-libs/glib-2.30
- sys-apps/dbus:=
- >=sys-auth/polkit-0.110
- introspection? ( dev-libs/gobject-introspection )
- kernel_linux? (
- virtual/libusb:1
- virtual/libgudev:=
- virtual/udev
- ios? (
- >=app-pda/libimobiledevice-1:=
- >=app-pda/libplist-1:=
- )
- )"
-DEPEND="${RDEPEND}
- dev-libs/libxslt
- app-text/docbook-xsl-stylesheets
- dev-util/intltool
- virtual/pkgconfig
- doc? (
- dev-util/gtk-doc
- app-text/docbook-xml-dtd:4.1.2
- )"
-
-QA_MULTILIB_PATHS="usr/lib/${PN}/.*"
-
-DOCS="AUTHORS HACKING NEWS README"
-
-src_prepare() {
- sed -i -e '/DISABLE_DEPRECATED/d' configure || die
-}
-
-src_configure() {
- local backend myconf
-
- if use kernel_linux; then
- backend=linux
- elif use kernel_FreeBSD; then
- backend=freebsd
- else
- backend=dummy
- fi
-
- econf \
- --libexecdir="${EPREFIX}"/usr/lib/${PN} \
- --localstatedir="${EPREFIX}"/var \
- $(use_enable introspection) \
- --disable-static \
- ${myconf} \
- --enable-man-pages \
- $(use_enable doc gtk-doc) \
- --disable-tests \
- --with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \
- --with-backend=${backend} \
- $(use_with ios idevice) \
- "$(systemd_with_utildir)" \
- "$(systemd_with_unitdir)"
-}
-
-src_install() {
- default
- keepdir /var/lib/upower #383091
- prune_libtool_files
-}