blob: 72421f6f494b10086dec6d725c138841d4ca70c3 [file] [log] [blame]
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/devicekit-power/devicekit-power-009.ebuild,v 1.2 2009/09/08 18:37:48 ikelos Exp $
EAPI="2"
inherit eutils gnome2 autotools linux-info
MY_PN="DeviceKit-power"
DESCRIPTION="D-Bus abstraction for enumerating power devices and querying history and statistics"
HOMEPAGE="http://www.freedesktop.org/wiki/Software/DeviceKit"
SRC_URI="http://hal.freedesktop.org/releases/${MY_PN}-${PV}.tar.gz"
LICENSE="GPL-2 LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug doc"
RDEPEND=">=dev-libs/glib-2.16.1
>=dev-libs/dbus-glib-0.76
>=sys-apps/devicekit-002
>=sys-auth/policykit-0.7
sys-apps/dbus
virtual/libusb:0
"
DEPEND="${RDEPEND}
>=dev-util/intltool-0.40
dev-util/pkgconfig
dev-libs/libxslt
dev-util/gtk-doc-am
doc? ( >=dev-util/gtk-doc-1.3 )
"
S="${WORKDIR}/${MY_PN}-${PV}"
function check_battery() {
# check sysfs power interface, bug #263959
local CONFIG_CHECK="~ACPI_SYSFS_POWER"
check_extra_config
}
pkg_setup() {
# Pedantic is currently broken
G2CONF="${G2CONF}
--localstatedir=/var
--disable-ansi
--enable-man-pages
$(use_enable debug verbose-mode)
"
check_battery
}
src_prepare() {
gnome2_src_prepare
# Fix build with older gcc, bug #266987
epatch "${FILESDIR}/${P}-build-gcc-4.1.2.patch"
# Fix crazy cflags and moved them to maintainer-mode, bug #267139
epatch "${FILESDIR}/${PN}-007-maintainer-cflags.patch"
# Patch to support power_now property for batteries
epatch "${FILESDIR}/${P}-power-now.patch"
intltoolize --force --copy --automake || die "intltoolize failed"
eautoreconf
}