summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2013-03-21 17:59:52 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2013-03-21 17:59:52 +0000
commitc2f781022cc2631c7e12e3ab60552c646ac1cc3d (patch)
tree9d66508100585921d8c6807e68cf124987b97026 /sys-power/upower
parentVersion bump (diff)
downloadgentoo-2-c2f781022cc2631c7e12e3ab60552c646ac1cc3d.tar.gz
gentoo-2-c2f781022cc2631c7e12e3ab60552c646ac1cc3d.tar.bz2
gentoo-2-c2f781022cc2631c7e12e3ab60552c646ac1cc3d.zip
Backport patch from upstream for hidraw compatibility issues with current udev.
(Portage version: 2.2.0_alpha166/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
Diffstat (limited to 'sys-power/upower')
-rw-r--r--sys-power/upower/ChangeLog9
-rw-r--r--sys-power/upower/files/upower-0.9.20-hidraw_with_udev-196.patch30
-rw-r--r--sys-power/upower/upower-0.9.20-r2.ebuild89
3 files changed, 127 insertions, 1 deletions
diff --git a/sys-power/upower/ChangeLog b/sys-power/upower/ChangeLog
index 1b36b19298fb..bd73a1ff2ff6 100644
--- a/sys-power/upower/ChangeLog
+++ b/sys-power/upower/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-power/upower
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/ChangeLog,v 1.105 2013/03/20 15:44:36 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/ChangeLog,v 1.106 2013/03/21 17:59:52 ssuominen Exp $
+
+*upower-0.9.20-r2 (21 Mar 2013)
+
+ 21 Mar 2013; Samuli Suominen <ssuominen@gentoo.org> +upower-0.9.20-r2.ebuild,
+ +files/upower-0.9.20-hidraw_with_udev-196.patch:
+ Backport patch from upstream for hidraw compatibility issues with current
+ udev.
*upower-0.9.20-r1 (20 Mar 2013)
diff --git a/sys-power/upower/files/upower-0.9.20-hidraw_with_udev-196.patch b/sys-power/upower/files/upower-0.9.20-hidraw_with_udev-196.patch
new file mode 100644
index 000000000000..850e010bc17c
--- /dev/null
+++ b/sys-power/upower/files/upower-0.9.20-hidraw_with_udev-196.patch
@@ -0,0 +1,30 @@
+From 232d70155c45d24afabe47ed37954cc000678295 Mon Sep 17 00:00:00 2001
+From: Arkadiusz Miśkiewicz <arekm@maven.pl>
+Date: Wed, 20 Mar 2013 16:51:14 +0000
+Subject: Find hidraw devices correctly with systemd udev >= v196.
+
+udev v196 libraries changed behaviour of g_udev_device_get_sysfs_attr()
+by stopping following symlinks for "device" attribute [1]. That change
+broke hiddev finding for unifying devices. Fix that by getting sysfs
+path from parent hiddev device.
+
+1. http://cgit.freedesktop.org/systemd/systemd/commit/?id=5ae18ddc0d86673520c0dd6b59ccac8afc8aa605
+
+Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
+Signed-off-by: Richard Hughes <richard@hughsie.com>
+---
+diff --git a/src/linux/up-device-unifying.c b/src/linux/up-device-unifying.c
+index c7f0103..4b659c3 100644
+--- a/src/linux/up-device-unifying.c
++++ b/src/linux/up-device-unifying.c
+@@ -165,7 +165,7 @@ up_device_unifying_coldplug (UpDevice *device)
+ hidraw_list = g_udev_client_query_by_subsystem (client, "hidraw");
+ for (l = hidraw_list; l != NULL; l = l->next) {
+ if (g_strcmp0 (g_udev_device_get_sysfs_path (parent),
+- g_udev_device_get_sysfs_attr (l->data, "device")) == 0) {
++ g_udev_device_get_sysfs_path(g_udev_device_get_parent(l->data))) == 0) {
+ receiver = g_object_ref (l->data);
+ break;
+ }
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/sys-power/upower/upower-0.9.20-r2.ebuild b/sys-power/upower/upower-0.9.20-r2.ebuild
new file mode 100644
index 000000000000..b1f42a79bd01
--- /dev/null
+++ b/sys-power/upower/upower-0.9.20-r2.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/upower/upower-0.9.20-r2.ebuild,v 1.1 2013/03/21 17:59:52 ssuominen Exp $
+
+EAPI=5
+inherit eutils systemd udev
+
+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 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="+deprecated doc +introspection ios kernel_FreeBSD kernel_linux systemd"
+
+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/udev-197[gudev]
+ ios? (
+ >=app-pda/libimobiledevice-1
+ >=app-pda/libplist-1
+ )
+ systemd? ( sys-apps/systemd )
+ )"
+RDEPEND="${COMMON_DEPEND}
+ kernel_linux? (
+ deprecated? ( >=sys-power/pm-utils-1.4.1 )
+ systemd? ( app-shells/bash )
+ )"
+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
+ )"
+REQUIRED_USE="kernel_linux? ( !deprecated? ( systemd ) )"
+
+QA_MULTILIB_PATHS="usr/lib/${PN}/.*"
+
+src_prepare() {
+ sed -i -e '/DISABLE_DEPRECATED/d' configure || die
+ epatch "${FILESDIR}"/${P}-hidraw_with_udev-196.patch
+}
+
+src_configure() {
+ local backend myconf
+
+ if use kernel_linux; then
+ backend=linux
+ myconf="$(use_enable 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) \
+ $(use_enable systemd) \
+ --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() {
+ emake DESTDIR="${D}" udevrulesdir="$(get_udevdir)"/rules.d install
+
+ dodoc AUTHORS HACKING NEWS README
+ keepdir /var/lib/upower #383091
+ prune_libtool_files
+}