aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2011-05-25 20:05:17 -0500
committerDonnie Berkholz <dberkholz@gentoo.org>2011-05-26 09:03:04 -0500
commit50241131ba628cbf7a393e710cfae7c25a44cf49 (patch)
tree02fc1c758faa70e46e662075db688c655cbc38ef
parentopenbabel: 2.3 is in the tree now. (diff)
downloaddberkholz-50241131ba628cbf7a393e710cfae7c25a44cf49.tar.gz
dberkholz-50241131ba628cbf7a393e710cfae7c25a44cf49.tar.bz2
dberkholz-50241131ba628cbf7a393e710cfae7c25a44cf49.zip
tp_smapi: Whitelist X120e and T520 so thinkpad_ec will load.
-rw-r--r--app-laptop/tp_smapi/ChangeLog59
-rw-r--r--app-laptop/tp_smapi/Manifest14
-rw-r--r--app-laptop/tp_smapi/files/0.33-remove-cdev.patch19
-rw-r--r--app-laptop/tp_smapi/files/0.40-add-x120e-and-t520-to-whitelist.patch12
-rw-r--r--app-laptop/tp_smapi/files/fix_header_check.patch19
-rw-r--r--app-laptop/tp_smapi/files/tp_smapi-0.40-2.6.37.patch30
-rw-r--r--app-laptop/tp_smapi/metadata.xml9
-rw-r--r--app-laptop/tp_smapi/tp_smapi-0.36.ebuild57
-rw-r--r--app-laptop/tp_smapi/tp_smapi-0.40-r2.ebuild (renamed from app-laptop/tp_smapi/tp_smapi-0.37.ebuild)41
9 files changed, 148 insertions, 112 deletions
diff --git a/app-laptop/tp_smapi/ChangeLog b/app-laptop/tp_smapi/ChangeLog
index 7c7b3c9..58f5872 100644
--- a/app-laptop/tp_smapi/ChangeLog
+++ b/app-laptop/tp_smapi/ChangeLog
@@ -1,6 +1,61 @@
# ChangeLog for app-laptop/tp_smapi
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-laptop/tp_smapi/ChangeLog,v 1.23 2007/12/31 18:30:43 welp Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/tp_smapi/ChangeLog,v 1.38 2011/05/20 11:20:42 tomka Exp $
+
+ 20 May 2011; Thomas Kahle <tomka@gentoo.org> tp_smapi-0.40-r1.ebuild:
+ x86 stable per bug 365559
+
+ 04 May 2011; Markos Chandras <hwoarang@gentoo.org> tp_smapi-0.40-r1.ebuild:
+ Stable on amd64 wrt bug #342239
+
+ 02 Apr 2011; Alexey Shvetsov <alexxy@gentoo.org> tp_smapi-0.40-r1.ebuild:
+ Fix bug #348751
+
+*tp_smapi-0.40-r1 (29 Nov 2010)
+
+ 29 Nov 2010; Alexey Shvetsov <alexxy@gentoo.org> +tp_smapi-0.40-r1.ebuild,
+ +files/tp_smapi-0.40-2.6.37.patch, +files/fix_header_check.patch:
+ Fix bugs #294251 #346493
+
+ 01 Dec 2009; Christian Faulhammer <fauli@gentoo.org> tp_smapi-0.40.ebuild:
+ stable x86, bug 289124
+
+ 25 Oct 2009; Torsten Veller <tove@gentoo.org> metadata.xml:
+ Remove welp from metadata.xml (#141007)
+
+ 06 Sep 2009; Robin H. Johnson <robbat2@gentoo.org> tp_smapi-0.37.ebuild,
+ tp_smapi-0.39.ebuild, tp_smapi-0.40.ebuild:
+ Cleaning up for linux-info work: inherit linux-mod implies inherit
+ linux-info.
+
+ 08 Jul 2009; Markus Meier <maekke@gentoo.org> tp_smapi-0.40.ebuild:
+ amd64 stable, bug #274086
+
+*tp_smapi-0.40 (25 Mar 2009)
+
+ 25 Mar 2009; Patrick McLean <chutzpah@gentoo.org> +tp_smapi-0.40.ebuild:
+ Version bump (bug #254043). Use updated ebuild provided by Anton Bolshakov
+ <anton.bugs@gmail.com>.
+
+*tp_smapi-0.39 (20 Oct 2008)
+
+ 20 Oct 2008; <welp@gentoo.org> +tp_smapi-0.39.ebuild:
+ Bump to 0.39; Bug 239033
+
+ 22 Sep 2008; Hanno Boeck <hanno@gentoo.org>
+ +files/thinkpad_ec_semaphore.patch, tp_smapi-0.37.ebuild:
+ Add support for 2.6.27.
+
+ 31 Jul 2008; Ulrich Mueller <ulm@gentoo.org> metadata.xml:
+ Add USE flag description to metadata wrt GLEP 56.
+
+ 31 Mar 2008; Peter Weller <welp@gentoo.org> tp_smapi-0.37.ebuild:
+ s/linux_info-pkg-setup/linux-info_pkg_setup/
+
+*tp_smapi-0.37 (30 Mar 2008)
+
+ 30 Mar 2008; Peter Weller <welp@gentoo.org> +tp_smapi-0.37.ebuild:
+ Bump; bugs 141565 and 208627
*tp_smapi-0.33 (31 Dec 2007)
diff --git a/app-laptop/tp_smapi/Manifest b/app-laptop/tp_smapi/Manifest
index 9082a9a..340bc26 100644
--- a/app-laptop/tp_smapi/Manifest
+++ b/app-laptop/tp_smapi/Manifest
@@ -1,7 +1,7 @@
-AUX 0.33-remove-cdev.patch 871 RMD160 aa03041890a2ff70587fd6db4d89076fda4f6699 SHA1 577f8e793fb5a25c74ea4b4991e571d6f7cc90e9 SHA256 ebd1531b3a99af67a95180a1d2f5b8d7c17129999ef4626da86c662ee9f1d702
-DIST tp_smapi-0.36.tgz 37597 RMD160 627e49fb5389af1613f3be423140a40c7776d84c SHA1 a44c346a6ca3954563f733465ed02052ba72fcc2 SHA256 ed70f240f56206493f699478d1a0b392eb7230cc1f0ecb57b1103d6cabe1e113
-DIST tp_smapi-0.37.tgz 38261 RMD160 003d575a83351060703f8f8c5dd096f5c2f6173b SHA1 cebc7c0912aac997b99ecbd81b2afeb6ee7c0876 SHA256 2455a12c0c7a7e1cc36ff47a6f92036e11da87f10caef86a206688498b4d1fb5
-EBUILD tp_smapi-0.36.ebuild 1213 RMD160 c90686f2662d11e7ca4c628d80c3eb7049dad695 SHA1 9367db9fc0ad90de90e1727646df57eee65ce88e SHA256 39313f39320f42ca1fff354aaa65e5a4a48270af1319df8256c96d7dd062b9e9
-EBUILD tp_smapi-0.37.ebuild 1470 RMD160 e91401eb15d43447ecf6685ee11beb67e8cce300 SHA1 bbfed199587a4046b2096e9d49a96bb3173e2209 SHA256 c3a5350c101eb6b15e118f869c03504201ed05b74e07d3fab203cea78edc95ac
-MISC ChangeLog 2948 RMD160 25dca704075bb5b7183220bdf7c4c7412b7559f3 SHA1 7df385e3ff69efb387e463c6ca009b42fb81c710 SHA256 04f62e34a0f540c9a7224f076b5b29fb0ff77fe4940cf879b99633eda70db4bb
-MISC metadata.xml 247 RMD160 b3f1fa5b78abd67407da3071742319c07697ef8f SHA1 f44979eefe1314886e71e3796ecc964f2f86ef62 SHA256 7cb16124facba1f3e602873bd816878fa6f052500dd007e308c187f916e7e01f
+AUX 0.40-add-x120e-and-t520-to-whitelist.patch 523 RMD160 248746f18ff43ebb199be9c43ae88d6260518cb1 SHA1 1622a683b14e02f2d2c1e5da263ff56e1fe0436a SHA256 304be734d3b14faa9bb80720454e158959554539c09908f89c81ae7dc5f06308
+AUX fix_header_check.patch 701 RMD160 c1a79ee4d8501831b3f7522848f979993be5eb8d SHA1 17941fc5583c4740618627d4c1c925e6217dcedd SHA256 5cfc979ac6f9f3f1fb94625b3bf3a31fc6132d3ad8670d38cff2b2116400015c
+AUX tp_smapi-0.40-2.6.37.patch 1181 RMD160 602ba1598ee7175abfda516fe61ab96b80e2691e SHA1 ed3fbf2e06def4572e8dd2b9ee16e6aac8f500ed SHA256 b36523686dd1710ee8dae2b9ba6598572afe0d564c2278a7105a0fa27fe3d4d5
+DIST tp_smapi-0.40.tgz 39002 RMD160 8b564396afe6255476e73c9c78bd47294eeb8d53 SHA1 bc1bd1c6558d1972501e816308234d48ac530fc6 SHA256 ccb0965684cad076160750f2ac380f99373fa73f0bcc1091ffce2492f56349ab
+EBUILD tp_smapi-0.40-r2.ebuild 1566 RMD160 43bfabf20c6cd68efc65a9a8d05cd627e502c330 SHA1 e5aea170c7a72641d3c1e3240627e4edc03cc1da SHA256 d8692ab3654567fdf0d8beaac9ca411fd8d082c5f35e6c970fdf1e4cd28ff363
+MISC ChangeLog 4793 RMD160 6dd3e2c030353a0825bddf8a05df82b8694a8287 SHA1 be3cc29fb45bbccc310200b87d5eaeca665b201f SHA256 e0f40126b37889170c857e209219814804c37e00660614ae888c8582ff852272
+MISC metadata.xml 242 RMD160 ae266e9b31780c5bf3de48ff64cb377c484be043 SHA1 1e42ee4142d75d4d5a98ebe944b225178ec57680 SHA256 c4b5ad1432ce813ea0f307e9ff1c1bad05cc4aed39c0344be243259400a45372
diff --git a/app-laptop/tp_smapi/files/0.33-remove-cdev.patch b/app-laptop/tp_smapi/files/0.33-remove-cdev.patch
deleted file mode 100644
index 69445e6..0000000
--- a/app-laptop/tp_smapi/files/0.33-remove-cdev.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -urN tp_smapi-0.33.orig/hdaps.c tp_smapi-0.33/hdaps.c
---- tp_smapi-0.33.orig/hdaps.c 2008-03-12 00:42:20.000000000 -0700
-+++ tp_smapi-0.33/hdaps.c 2008-03-12 00:43:30.000000000 -0700
-@@ -827,7 +827,6 @@
- hdaps_idev->id.vendor = HDAPS_INPUT_VENDOR;
- hdaps_idev->id.product = HDAPS_INPUT_PRODUCT;
- hdaps_idev->id.version = HDAPS_INPUT_JS_VERSION;
-- hdaps_idev->cdev.dev = &pdev->dev;
- hdaps_idev->evbit[0] = BIT(EV_ABS);
- hdaps_idev->open = hdaps_mousedev_open;
- hdaps_idev->close = hdaps_mousedev_close;
-@@ -847,7 +846,6 @@
- hdaps_idev_raw->id.vendor = HDAPS_INPUT_VENDOR;
- hdaps_idev_raw->id.product = HDAPS_INPUT_PRODUCT;
- hdaps_idev_raw->id.version = HDAPS_INPUT_RAW_VERSION;
-- hdaps_idev_raw->cdev.dev = &pdev->dev;
- hdaps_idev_raw->evbit[0] = BIT(EV_ABS);
- hdaps_idev_raw->open = hdaps_mousedev_open;
- hdaps_idev_raw->close = hdaps_mousedev_close;
diff --git a/app-laptop/tp_smapi/files/0.40-add-x120e-and-t520-to-whitelist.patch b/app-laptop/tp_smapi/files/0.40-add-x120e-and-t520-to-whitelist.patch
new file mode 100644
index 0000000..6e0c8d9
--- /dev/null
+++ b/app-laptop/tp_smapi/files/0.40-add-x120e-and-t520-to-whitelist.patch
@@ -0,0 +1,12 @@
+diff -ur tp_smapi-0.40.orig//thinkpad_ec.c tp_smapi-0.40//thinkpad_ec.c
+--- tp_smapi-0.40.orig//thinkpad_ec.c 2011-05-25 20:01:04.623516726 -0500
++++ tp_smapi-0.40//thinkpad_ec.c 2011-05-25 20:02:01.303273850 -0500
+@@ -456,6 +456,8 @@
+ TP_DMI_MATCH("IBM", "ThinkPad A30"),
+ TP_DMI_MATCH("IBM", "ThinkPad T23"),
+ TP_DMI_MATCH("IBM", "ThinkPad X24"),
++ TP_DMI_MATCH("LENOVO", "ThinkPad X120e"),
++ TP_DMI_MATCH("LENOVO", "ThinkPad T520"),
+ { .ident = NULL }
+ };
+ return dmi_find_substring(DMI_DEV_TYPE_OEM_STRING,
diff --git a/app-laptop/tp_smapi/files/fix_header_check.patch b/app-laptop/tp_smapi/files/fix_header_check.patch
new file mode 100644
index 0000000..97b6569
--- /dev/null
+++ b/app-laptop/tp_smapi/files/fix_header_check.patch
@@ -0,0 +1,19 @@
+*** Makefile.orig Mon Nov 23 08:55:42 2009
+--- Makefile Mon Nov 23 08:57:48 2009
+***************
+*** 27,33 ****
+
+ DEBUG := 0
+
+! ifneq ($(shell [ -f $(KBUILD)/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))
+--- 27,33 ----
+
+ DEBUG := 0
+
+! 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))
diff --git a/app-laptop/tp_smapi/files/tp_smapi-0.40-2.6.37.patch b/app-laptop/tp_smapi/files/tp_smapi-0.40-2.6.37.patch
new file mode 100644
index 0000000..60f0599
--- /dev/null
+++ b/app-laptop/tp_smapi/files/tp_smapi-0.40-2.6.37.patch
@@ -0,0 +1,30 @@
+diff -urN tp_smapi-0.40.orig/thinkpad_ec.c tp_smapi-0.40/thinkpad_ec.c
+--- tp_smapi-0.40.orig/thinkpad_ec.c 2008-12-16 08:03:06.000000000 +0300
++++ tp_smapi-0.40/thinkpad_ec.c 2010-11-22 18:16:54.000000000 +0300
+@@ -88,7 +88,11 @@
+ #define TPC_PREFETCH_JUNK (INITIAL_JIFFIES+1) /* Ignore prefetch */
+
+ /* Locking: */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+ static DECLARE_MUTEX(thinkpad_ec_mutex);
++#else
++static DEFINE_SEMAPHORE(thinkpad_ec_mutex);
++#endif
+
+ /* Kludge in case the ACPI DSDT reserves the ports we need. */
+ static int force_io; /* Willing to do IO to ports we couldn't reserve? */
+diff -urN tp_smapi-0.40.orig/tp_smapi.c tp_smapi-0.40/tp_smapi.c
+--- tp_smapi-0.40.orig/tp_smapi.c 2008-12-16 08:03:06.000000000 +0300
++++ tp_smapi-0.40/tp_smapi.c 2010-11-22 18:17:29.000000000 +0300
+@@ -109,7 +109,11 @@
+ #define SMAPI_PORT2 0x4F /* fixed port, meaning unclear */
+ static unsigned short smapi_port; /* APM control port, normally 0xB2 */
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+ static DECLARE_MUTEX(smapi_mutex);
++#else
++static DEFINE_SEMAPHORE(smapi_mutex);
++#endif
+
+ /**
+ * find_smapi_port - read SMAPI port from NVRAM
diff --git a/app-laptop/tp_smapi/metadata.xml b/app-laptop/tp_smapi/metadata.xml
index d391ed0..b2d0e4c 100644
--- a/app-laptop/tp_smapi/metadata.xml
+++ b/app-laptop/tp_smapi/metadata.xml
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>mobile</herd>
-<maintainer>
- <email>welp@gentoo.org</email>
- <name>Peter Weller</name>
-</maintainer>
+ <herd>mobile</herd>
+ <use>
+ <flag name="hdaps">Install a compatible HDAPS module</flag>
+ </use>
</pkgmetadata>
diff --git a/app-laptop/tp_smapi/tp_smapi-0.36.ebuild b/app-laptop/tp_smapi/tp_smapi-0.36.ebuild
deleted file mode 100644
index b2decff..0000000
--- a/app-laptop/tp_smapi/tp_smapi-0.36.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 1999-2007 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.33.ebuild,v 1.1 2007/12/31 18:30:43 welp Exp $
-
-inherit 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_DIR}"
- BUILD_TARGETS="default"
-
- if use hdaps; then
- MODULE_NAMES="${MODULE_NAMES} hdaps(extra:)"
- BUILD_PARAMS="${BUILD_PARAMS} HDAPS=1"
- fi
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- epatch "${FILESDIR}"/0.33-remove-cdev.patch
-
- # Remove usage of `sudo` in Makefile.
- sed -i 's,sudo ,,' Makefile
-}
-
-src_install() {
- linux-mod_src_install
-
- dodoc CHANGES README
-}
diff --git a/app-laptop/tp_smapi/tp_smapi-0.37.ebuild b/app-laptop/tp_smapi/tp_smapi-0.40-r2.ebuild
index 468c9f2..226f2c2 100644
--- a/app-laptop/tp_smapi/tp_smapi-0.37.ebuild
+++ b/app-laptop/tp_smapi/tp_smapi-0.40-r2.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2011 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.37.ebuild,v 1.2 2008/03/31 08:34:42 welp Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/tp_smapi/tp_smapi-0.40-r1.ebuild,v 1.4 2011/05/20 11:20:42 tomka Exp $
-inherit linux-mod linux-info
+EAPI="3"
+
+inherit eutils linux-mod
DESCRIPTION="IBM ThinkPad SMAPI BIOS driver"
HOMEPAGE="http://tpctl.sourceforge.net/"
@@ -10,7 +12,7 @@ SRC_URI="mirror://sourceforge/tpctl/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 x86"
IUSE="hdaps"
@@ -19,6 +21,7 @@ RESTRICT="userpriv"
# We need dmideode if the kernel does not support DMI_DEV_TYPE_OEM_STRING
# in dmi.h
DEPEND="sys-apps/dmidecode"
+RDEPEND="${DEPEND}"
pkg_setup() {
linux-mod_pkg_setup
@@ -31,37 +34,31 @@ pkg_setup() {
fi
MODULE_NAMES="thinkpad_ec(extra:) tp_smapi(extra:)"
- BUILD_PARAMS="KSRC=${KV_DIR} KBUILD=${KV_DIR}"
+ 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)"
+ 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_unpack() {
- unpack ${A}
- cd "${S}"
-
- # Remove usage of `sudo` in Makefile.
- sed -i 's,sudo ,,' Makefile
-
- # compile with 2.6.27
- if kernel_is ge 2 6 27; then
- sed -i \
- -e "s:asm/semaphore.h:linux/semaphore.h:g" \
- *.c \
- || die
- fi
+src_prepare() {
+ epatch "${FILESDIR}/${P}-2.6.37.patch"
+ epatch "${FILESDIR}"/fix_header_check.patch
+ epatch "${FILESDIR}"/0.40-add-x120e-and-t520-to-whitelist.patch
}
src_install() {
linux-mod_src_install
-
dodoc CHANGES README
}