--- /dev/null
+AUX tp_smapi-fix-vercheck.patch 503 RMD160 4a393fafa4316ea0b66ba95d044a053de2a43f0c SHA1 b2e0e26be961d2f2a3c8c4080be124beb8cd149d SHA256 9e6a878b2593f7809ea8a9f7939d9091d1faf5c8ff88e8e35d5b4572c13f4a25
+DIST tp_smapi-0.40.tgz 39002 RMD160 8b564396afe6255476e73c9c78bd47294eeb8d53 SHA1 bc1bd1c6558d1972501e816308234d48ac530fc6 SHA256 ccb0965684cad076160750f2ac380f99373fa73f0bcc1091ffce2492f56349ab
+EBUILD tp_smapi-0.40.ebuild 1440 RMD160 38d28cc789545d8480e9c2cbab6089f42637c0e8 SHA1 5214a85206646c198be48868d324414b0f15c56f SHA256 68dc18a01403985df447b00afad4fcd66446ee22cbcebbe103fbdc5cb6be1b75
--- /dev/null
+diff -Naur a/Makefile b/Makefile
+--- a/Makefile 2008-12-16 05:03:06.000000000 +0000
++++ b/Makefile 2009-01-15 02:47:01.000000000 +0000
+@@ -27,7 +27,7 @@
+
+ DEBUG := 0
+
+-ifneq ($(shell [ -f $(KBUILD)/include/linux/aio_abi.h ] && echo 1),1)
++ifneq ($(shell [ -f $(KSRC)/include/linux/aio_abi.h ] && echo 1),1)
+ $(warning Building tp_smapi requires Linux kernel 2.6.19 or newer, and matching kernel headers.)
+ $(warning You may need to override the following Make variables:)
+ $(warning . KVER=$(KVER))
--- /dev/null
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $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 $
+
+EAPI="2"
+
+inherit eutils linux-mod
+
+DESCRIPTION="IBM ThinkPad SMAPI BIOS driver"
+HOMEPAGE="http://tpctl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tpctl/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE="hdaps"
+
+RESTRICT="userpriv"
+
+# We need dmideode if the kernel does not support DMI_DEV_TYPE_OEM_STRING
+# in dmi.h
+DEPEND="sys-apps/dmidecode"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ if kernel_is lt 2 6 19; then
+ eerror
+ eerror "${P} requires Linux kernel 2.6.19 or above."
+ eerror
+ die "Unsupported kernel version"
+ fi
+
+ MODULE_NAMES="thinkpad_ec(extra:) tp_smapi(extra:)"
+ BUILD_PARAMS="KSRC=${KV_DIR} KBUILD=${KV_OUT_DIR}"
+ BUILD_TARGETS="default"
+
+ if use hdaps; then
+
+ CONFIG_CHECK="~INPUT_UINPUT"
+ WARNING_INPUT_UINPUT="Your kernel needs uinput for the hdaps module to perform better"
+ linux-info_pkg_setup
+
+ MODULE_NAMES="${MODULE_NAMES} hdaps(extra:)"
+ BUILD_PARAMS="${BUILD_PARAMS} HDAPS=1"
+
+ CONFIG_CHECK="!SENSORS_HDAPS"
+ ERROR_SENSORS_HDAPS="${P} with USE=hdaps conflicts with in-kernel HDAPS (CONFIG_SENSORS_HDAPS)"
+ linux-info_pkg_setup
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-fix-vercheck.patch
+}
+
+src_install() {
+ linux-mod_src_install
+ dodoc CHANGES README
+}