1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-laptop/tp_smapi/tp_smapi-0.40.ebuild,v 1.4 2009/12/01 18:51:39 fauli Exp $
7 inherit eutils linux-mod
9 DESCRIPTION="IBM ThinkPad SMAPI BIOS driver"
10 HOMEPAGE="http://tpctl.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/tpctl/${P}.tgz"
21 # We need dmideode if the kernel does not support DMI_DEV_TYPE_OEM_STRING
23 DEPEND="sys-apps/dmidecode"
28 if kernel_is lt 2 6 19; then
30 eerror "${P} requires Linux kernel 2.6.19 or above."
32 die "Unsupported kernel version"
35 MODULE_NAMES="thinkpad_ec(extra:) tp_smapi(extra:)"
36 BUILD_PARAMS="KSRC=${KV_DIR} KBUILD=${KV_OUT_DIR}"
37 BUILD_TARGETS="default"
41 CONFIG_CHECK="~INPUT_UINPUT"
42 WARNING_INPUT_UINPUT="Your kernel needs uinput for the hdaps module to perform better"
45 MODULE_NAMES="${MODULE_NAMES} hdaps(extra:)"
46 BUILD_PARAMS="${BUILD_PARAMS} HDAPS=1"
48 CONFIG_CHECK="!SENSORS_HDAPS"
49 ERROR_SENSORS_HDAPS="${P} with USE=hdaps conflicts with in-kernel HDAPS (CONFIG_SENSORS_HDAPS)"
55 epatch "${FILESDIR}"/${PN}-fix-vercheck.patch
56 epatch "${FILESDIR}"/0001-Convert-DECLARE_MUTEX-to-DEFINE_SEMAPHORE.patch