summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@gentoo.org>2011-10-28 22:34:03 +0530
committerNirbheek Chauhan <nirbheek@gentoo.org>2011-10-28 22:34:03 +0530
commitba69b80f09dd451f7a6a427db401524b327f867e (patch)
tree3f7b072a34337503964cd0fd4eff2d40ab77d6ec /sys-power
parentRemove obsolete packages (diff)
downloadnirbheek-ba69b80f09dd451f7a6a427db401524b327f867e.tar.gz
nirbheek-ba69b80f09dd451f7a6a427db401524b327f867e.tar.bz2
nirbheek-ba69b80f09dd451f7a6a427db401524b327f867e.zip
Revert "Remove obsolete packages"
This reverts commit f578d94eed23cc311211f3b5993f7f4bf27edc07.
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/upower/Manifest7
-rw-r--r--sys-power/upower/files/upower-0.9.6-introspection-2.patch168
-rw-r--r--sys-power/upower/files/upower-0.9.6-introspection.patch30
-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.patch78
-rw-r--r--sys-power/upower/metadata.xml11
-rw-r--r--sys-power/upower/upower-0.9.12.ebuild84
7 files changed, 404 insertions, 0 deletions
diff --git a/sys-power/upower/Manifest b/sys-power/upower/Manifest
new file mode 100644
index 0000000..5ba57bb
--- /dev/null
+++ b/sys-power/upower/Manifest
@@ -0,0 +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-0.9.7-linux-2.6.36.patch 871 RMD160 79aacb81bd413ac92016c6e46cc4415c5ee6b6dd SHA1 4d553a05c3e907f6da2d021d9f6c011aecff3ed9 SHA256 f3a806575c9bffde8bcd8df982c4a8cf57f204a85b40d9cb1851fe01a32911b5
+AUX upower-dell-samsung-sdi-battery-quirk.patch 2689 RMD160 8766aafffd5a8ce8ca58c6eb7fbe03231878c963 SHA1 54a59e0ca780125518f251e41728f0fe72733f33 SHA256 160d05b1da8a67cad5807c61a7da1aa2229a29d1ccc87b5a035f8bcf4267f5e6
+DIST upower-0.9.12.tar.xz 389372 RMD160 2f3de1c13ad9faeef014a67fa378888910c68055 SHA1 d8983042347b4f8f84e27000d64d1418593a7b65 SHA256 06e7bb323c93a8e377a3cc5000b8deafdd22c92f3d2f3ef7f1a1f74d8e134bb0
+EBUILD upower-0.9.12.ebuild 2146 RMD160 ebbf82fe95cce0a05fcc1b6ac5a6f2cfef01dc43 SHA1 49e1f341abf4a550702eee82d5cdb5bef53081e9 SHA256 1e00f7dd8d60522d8dc9bdd268b4b8a0bbd1c6541831cc39d76839a484867fb2
+MISC metadata.xml 363 RMD160 7210445bae10f2ddf76edaa8e7144227a03c5de1 SHA1 76f5af45c1a11584d24878ee65e6773757cfa014 SHA256 b24b22d2e371b3ee7165cd9ae1ca6fac72aee10e107c192a4e94686ba95b9093
diff --git a/sys-power/upower/files/upower-0.9.6-introspection-2.patch b/sys-power/upower/files/upower-0.9.6-introspection-2.patch
new file mode 100644
index 0000000..7bdf577
--- /dev/null
+++ b/sys-power/upower/files/upower-0.9.6-introspection-2.patch
@@ -0,0 +1,168 @@
+From 58f3d9fbdff88173276f05e0d6da2cf864758381 Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard@hughsie.com>
+Date: Tue, 05 Oct 2010 10:13:09 +0000
+Subject: Fix up all the warnings when building with new versions of gobject-introspection
+
+---
+diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c
+index 13d5bf7..01ceeb8 100644
+--- a/libupower-glib/up-client.c
++++ b/libupower-glib/up-client.c
+@@ -120,7 +120,7 @@ up_client_get_device (UpClient *client, const gchar *object_path)
+ * You must have called up_client_enumerate_devices_sync() before calling this
+ * function.
+ *
+- * Return value: an array of #UpDevice objects, free with g_ptr_array_unref()
++ * Return value: (transfer full): an array of #UpDevice objects, free with g_ptr_array_unref()
+ *
+ * Since: 0.9.0
+ **/
+diff --git a/libupower-glib/up-device.c b/libupower-glib/up-device.c
+index 41097b2..999f25b 100644
+--- a/libupower-glib/up-device.c
++++ b/libupower-glib/up-device.c
+@@ -568,7 +568,7 @@ out:
+ *
+ * Gets the device history.
+ *
+- * Return value: an array of #UpHistoryItem's, else #NULL and @error is used
++ * Return value: (transfer full): an array of #UpHistoryItem's, else #NULL and @error is used
+ *
+ * Since: 0.9.0
+ **/
+@@ -653,7 +653,7 @@ out:
+ *
+ * Gets the device current statistics.
+ *
+- * Return value: an array of #UpStatsItem's, else #NULL and @error is used
++ * Return value: (transfer full): an array of #UpStatsItem's, else #NULL and @error is used
+ *
+ * Since: 0.9.0
+ **/
+diff --git a/libupower-glib/up-wakeup-item.c b/libupower-glib/up-wakeup-item.c
+index 776473b..7060a3d 100644
+--- a/libupower-glib/up-wakeup-item.c
++++ b/libupower-glib/up-wakeup-item.c
+@@ -66,7 +66,7 @@ G_DEFINE_TYPE (UpWakeupItem, up_wakeup_item, G_TYPE_OBJECT)
+
+ /**
+ * up_wakeup_item_get_is_userspace:
+- * @history_item: #UpWakeupItem
++ * @wakeup_item: #UpWakeupItem
+ *
+ * Gets if the item is userspace.
+ *
+@@ -83,7 +83,7 @@ up_wakeup_item_get_is_userspace (UpWakeupItem *wakeup_item)
+
+ /**
+ * up_wakeup_item_set_is_userspace:
+- * @history_item: #UpWakeupItem
++ * @wakeup_item: #UpWakeupItem
+ * @is_userspace: the new value
+ *
+ * Sets if the item is userspace.
+@@ -100,7 +100,7 @@ up_wakeup_item_set_is_userspace (UpWakeupItem *wakeup_item, gboolean is_userspac
+
+ /**
+ * up_wakeup_item_get_id:
+- * @history_item: #UpWakeupItem
++ * @wakeup_item: #UpWakeupItem
+ *
+ * Gets the item id.
+ *
+@@ -117,7 +117,7 @@ up_wakeup_item_get_id (UpWakeupItem *wakeup_item)
+
+ /**
+ * up_wakeup_item_set_id:
+- * @history_item: #UpWakeupItem
++ * @wakeup_item: #UpWakeupItem
+ * @id: the new value
+ *
+ * Sets the item id.
+@@ -134,7 +134,7 @@ up_wakeup_item_set_id (UpWakeupItem *wakeup_item, guint id)
+
+ /**
+ * up_wakeup_item_get_old:
+- * @history_item: #UpWakeupItem
++ * @wakeup_item: #UpWakeupItem
+ *
+ * Gets the item old.
+ *
+@@ -151,7 +151,7 @@ up_wakeup_item_get_old (UpWakeupItem *wakeup_item)
+
+ /**
+ * up_wakeup_item_set_old:
+- * @history_item: #UpWakeupItem
++ * @wakeup_item: #UpWakeupItem
+ * @old: the new value
+ *
+ * Sets the item old.
+@@ -168,7 +168,7 @@ up_wakeup_item_set_old (UpWakeupItem *wakeup_item, guint old)
+
+ /**
+ * up_wakeup_item_get_value:
+- * @history_item: #UpWakeupItem
++ * @wakeup_item: #UpWakeupItem
+ *
+ * Gets the item value.
+ *
+@@ -185,7 +185,7 @@ up_wakeup_item_get_value (UpWakeupItem *wakeup_item)
+
+ /**
+ * up_wakeup_item_set_value:
+- * @history_item: #UpWakeupItem
++ * @wakeup_item: #UpWakeupItem
+ * @value: the new value
+ *
+ * Sets the item value.
+@@ -202,7 +202,7 @@ up_wakeup_item_set_value (UpWakeupItem *wakeup_item, gdouble value)
+
+ /**
+ * up_wakeup_item_get_cmdline:
+- * @history_item: #UpWakeupItem
++ * @wakeup_item: #UpWakeupItem
+ *
+ * Gets the item cmdline.
+ *
+@@ -219,7 +219,7 @@ up_wakeup_item_get_cmdline (UpWakeupItem *wakeup_item)
+
+ /**
+ * up_wakeup_item_set_cmdline:
+- * @history_item: #UpWakeupItem
++ * @wakeup_item: #UpWakeupItem
+ * @cmdline: the new value
+ *
+ * Sets the item cmdline.
+@@ -237,7 +237,7 @@ up_wakeup_item_set_cmdline (UpWakeupItem *wakeup_item, const gchar *cmdline)
+
+ /**
+ * up_wakeup_item_get_details:
+- * @history_item: #UpWakeupItem
++ * @wakeup_item: #UpWakeupItem
+ *
+ * Gets the item details.
+ *
+@@ -254,7 +254,7 @@ up_wakeup_item_get_details (UpWakeupItem *wakeup_item)
+
+ /**
+ * up_wakeup_item_set_details:
+- * @history_item: #UpWakeupItem
++ * @wakeup_item: #UpWakeupItem
+ * @details: the new value
+ *
+ * Sets the item details.
+diff --git a/libupower-glib/up-wakeups.c b/libupower-glib/up-wakeups.c
+index 1388eab..2843891 100644
+--- a/libupower-glib/up-wakeups.c
++++ b/libupower-glib/up-wakeups.c
+@@ -95,7 +95,7 @@ up_wakeups_get_total_sync (UpWakeups *wakeups, GCancellable *cancellable, GError
+ *
+ * Gets the wakeups data from the daemon.
+ *
+- * Return value: an array of %UpWakeupItem's
++ * Return value: (transfer full): an array of %UpWakeupItem's
+ *
+ * Since: 0.9.1
+ **/
+--
+cgit v0.8.3-6-g21f6
diff --git a/sys-power/upower/files/upower-0.9.6-introspection.patch b/sys-power/upower/files/upower-0.9.6-introspection.patch
new file mode 100644
index 0000000..53dbe03
--- /dev/null
+++ b/sys-power/upower/files/upower-0.9.6-introspection.patch
@@ -0,0 +1,30 @@
+From cfd3641501b23ae68beb9656489e8c3077c3dad5 Mon Sep 17 00:00:00 2001
+From: Edward Sheldrake <ejsheldrake@gmail.com>
+Date: Tue, 05 Oct 2010 10:03:42 +0000
+Subject: Fix building with gobject-introspection 0.9.10
+
+---
+diff --git a/libupower-glib/Makefile.am b/libupower-glib/Makefile.am
+index 83322c4..652f2de 100644
+--- a/libupower-glib/Makefile.am
++++ b/libupower-glib/Makefile.am
+@@ -60,14 +60,15 @@ EXTRA_DIST = \
+ CLEANFILES = $(BUILT_SOURCES)
+
+ if HAVE_INTROSPECTION
+-introspection_sources = $(libupower_glib_la_SOURCES)
++introspection_sources = $(libupower_glib_include_HEADERS) $(libupower_glib_la_SOURCES)
+
+ UPowerGlib-1.0.gir: libupower-glib.la
+ UPowerGlib_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0
+ UPowerGlib_1_0_gir_CFLAGS = $(INCLUDES)
+-PackageKitGlib_1_0_gir_SCANNERFLAGS = --identifier-prefix=Up --warn-all --add-include-path=$(srcdir)
++UPowerGlib_1_0_gir_SCANNERFLAGS = --identifier-prefix=Up --symbol-prefix=up_ --warn-all --add-include-path=$(srcdir)
+ UPowerGlib_1_0_gir_LIBS = libupower-glib.la
+ UPowerGlib_1_0_gir_FILES = $(introspection_sources)
++UPowerGlib_1_0_gir_NAMESPACE = UPowerGlib
+ INTROSPECTION_GIRS += UPowerGlib-1.0.gir
+
+ girdir = $(datadir)/gir-1.0
+--
+cgit v0.8.3-6-g21f6
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
new file mode 100644
index 0000000..24fb764
--- /dev/null
+++ b/sys-power/upower/files/upower-dell-samsung-sdi-battery-quirk.patch
@@ -0,0 +1,78 @@
+From 7849ca66af7f74bfdba968e979c4596c9e99ff3d Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek@gentoo.org>
+Date: Sub, 29 May 2011 15:43:22 +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.
+
+Was observed with the following battery:
+
+vendor: SAMSUNG SDI
+model: DELL U600P04
+serial: 0000
+technology: lithium-ion
+
+https://bugs.freedesktop.org/show_bug.cgi?id=31196
+---
+ src/linux/up-device-supply.c | 37 ++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 37 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,8 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply)
+ UpDeviceState old_state;
+ UpDeviceState state;
+ UpDevice *device = UP_DEVICE (supply);
++ UpDevice *device_tmp;
++ UpDeviceKind type;
+ const gchar *native_path;
+ GUdevDevice *native;
+ gboolean is_present;
+@@ -599,6 +604,40 @@ 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;
++ daemon = up_device_get_daemon (device);
++ /* get states of AC power supplies */
++ devices = up_device_list_get_array (up_daemon_get_device_list(daemon));
++ for (i = 0; i < devices->len; i++) {
++ device_tmp = (UpDevice *) g_ptr_array_index (devices, i);
++ g_object_get (device_tmp,
++ "type", &type,
++ NULL);
++ if (type != UP_DEVICE_KIND_LINE_POWER)
++ continue;
++ ret = up_device_supply_get_online (device_tmp, &online);
++ if (!ret)
++ continue;
++
++ /* print what we're trying */
++ g_debug ("guessing battery state using power supply status:%i",
++ online);
++
++ /* If any of the power supplies is not online,
++ * assume it's discharging, and break */
++ if (!online) {
++ state = UP_DEVICE_STATE_DISCHARGING;
++ break;
++ }
++ }
++ /* print what we did */
++ 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 */
+--
+1.7.2.2
+
diff --git a/sys-power/upower/metadata.xml b/sys-power/upower/metadata.xml
new file mode 100644
index 0000000..1d2462d
--- /dev/null
+++ b/sys-power/upower/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>freedesktop</herd>
+ <maintainer>
+ <email>freedesktop-bugs@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="introspection">Use <pkg>dev-libs/gobject-introspection</pkg> for introspection</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-power/upower/upower-0.9.12.ebuild b/sys-power/upower/upower-0.9.12.ebuild
new file mode 100644
index 0000000..ce85701
--- /dev/null
+++ b/sys-power/upower/upower-0.9.12.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/upower-0.9.12.ebuild,v 1.2 2011/07/10 16:11:39 hwoarang Exp $
+
+EAPI=4
+inherit linux-info
+
+DESCRIPTION="D-Bus abstraction for enumerating power devices and querying history and statistics"
+HOMEPAGE="http://upower.freedesktop.org/"
+SRC_URI="http://upower.freedesktop.org/releases/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="debug doc +introspection ios kernel_FreeBSD kernel_linux"
+
+COMMON_DEPEND=">=dev-libs/dbus-glib-0.88
+ >=dev-libs/glib-2.21.5:2
+ sys-apps/dbus
+ >=sys-auth/polkit-0.101-r1
+ introspection? ( dev-libs/gobject-introspection )
+ kernel_linux? (
+ || ( >=sys-fs/udev-171[gudev] >=sys-fs/udev-151[extras] )
+ virtual/libusb:1
+ ios? ( >=app-pda/libimobiledevice-0.9.7
+ >=app-pda/libplist-0.12 ) )
+ !sys-apps/hal"
+RDEPEND="${COMMON_DEPEND}
+ kernel_linux? ( >=sys-power/pm-utils-1.4.1 )"
+DEPEND="${COMMON_DEPEND}
+ dev-libs/libxslt
+ app-text/docbook-xsl-stylesheets
+ >=dev-util/intltool-0.40.0
+ dev-util/pkgconfig
+ doc? ( dev-util/gtk-doc
+ app-text/docbook-xml-dtd:4.1.2 )"
+
+RESTRICT="test"
+
+DOCS=( AUTHORS HACKING NEWS README )
+
+pkg_setup() {
+ if use kernel_linux && kernel_is lt 2 6 37; then
+ if use amd64 || use x86; then
+ CONFIG_CHECK="~ACPI_SYSFS_POWER"
+ linux-info_pkg_setup
+ fi
+ fi
+}
+
+src_prepare() {
+ # Battery weirdness
+ epatch "${FILESDIR}/${PN}-dell-samsung-sdi-battery-quirk.patch"
+ sed -i -e '/DISABLE_DEPRECATED/d' configure || die
+}
+
+src_configure() {
+ local backend
+
+ if use kernel_linux; then
+ backend=linux
+ elif use kernel_FreeBSD; then
+ backend=freebsd
+ else
+ backend=dummy
+ fi
+
+ econf \
+ --localstatedir="${EPREFIX}"/var \
+ $(use_enable introspection) \
+ --disable-static \
+ $(use_enable debug verbose-mode) \
+ --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)
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}