* [gentoo-commits] dev/dberkholz:master commit in: app-laptop/tp_smapi/files/, app-laptop/tp_smapi/
@ 2011-05-26 14:03 Donnie Berkholz
0 siblings, 0 replies; 2+ messages in thread
From: Donnie Berkholz @ 2011-05-26 14:03 UTC (permalink / raw
To: gentoo-commits
commit: 50241131ba628cbf7a393e710cfae7c25a44cf49
Author: Donnie Berkholz <dberkholz <AT> gentoo <DOT> org>
AuthorDate: Thu May 26 01:05:17 2011 +0000
Commit: Donnie Berkholz <dberkholz <AT> gentoo <DOT> org>
CommitDate: Thu May 26 14:03:04 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dberkholz.git;a=commit;h=50241131
tp_smapi: Whitelist X120e and T520 so thinkpad_ec will load.
---
app-laptop/tp_smapi/ChangeLog | 59 +++++++++++++++++++-
app-laptop/tp_smapi/Manifest | 14 ++--
app-laptop/tp_smapi/files/0.33-remove-cdev.patch | 19 ------
.../0.40-add-x120e-and-t520-to-whitelist.patch | 12 ++++
| 19 ++++++
.../tp_smapi/files/tp_smapi-0.40-2.6.37.patch | 30 ++++++++++
app-laptop/tp_smapi/metadata.xml | 9 +--
app-laptop/tp_smapi/tp_smapi-0.36.ebuild | 57 -------------------
...p_smapi-0.37.ebuild => tp_smapi-0.40-r2.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,
--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
similarity index 57%
rename from app-laptop/tp_smapi/tp_smapi-0.37.ebuild
rename to 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
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] dev/dberkholz:master commit in: app-laptop/tp_smapi/files/, app-laptop/tp_smapi/
@ 2011-06-27 21:53 Donnie Berkholz
0 siblings, 0 replies; 2+ messages in thread
From: Donnie Berkholz @ 2011-06-27 21:53 UTC (permalink / raw
To: gentoo-commits
commit: b39bf3cc8ff50a6f42f962ae9731b99a0fea9331
Author: Donnie Berkholz <dberkholz <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 27 21:53:08 2011 +0000
Commit: Donnie Berkholz <dberkholz <AT> gentoo <DOT> org>
CommitDate: Mon Jun 27 21:53:08 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dberkholz.git;a=commit;h=b39bf3cc
tp_smapi: merge in changes from main tree, revbump.
---
app-laptop/tp_smapi/Manifest | 4 +-
app-laptop/tp_smapi/files/tp_smapi-0.40-confd | 20 ++++
app-laptop/tp_smapi/files/tp_smapi-0.40-initd | 92 ++++++++++++++++++++
...mapi-0.40-r2.ebuild => tp_smapi-0.40-r3.ebuild} | 19 +++--
4 files changed, 128 insertions(+), 7 deletions(-)
diff --git a/app-laptop/tp_smapi/Manifest b/app-laptop/tp_smapi/Manifest
index 340bc26..c995e28 100644
--- a/app-laptop/tp_smapi/Manifest
+++ b/app-laptop/tp_smapi/Manifest
@@ -1,7 +1,9 @@
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
+AUX tp_smapi-0.40-confd 785 RMD160 55d174b025625dd51e128baaaad2271fbddc3cab SHA1 a2a6d5198230da99dfbd3f451406ec9989b3ae49 SHA256 3996b08957adea6f14e5a0e394212026dc73e6802a8dcd5aa9a3b413530c3fdb
+AUX tp_smapi-0.40-initd 1832 RMD160 154ac41defcd04f2edbc83d5ab71c4048f02835d SHA1 4ffd64701c8158b945b45ef46986876bc073d7c2 SHA256 a6f5096f52d2d9fdaa0e2be9a3b796f101ba109fa53816b7c515a400110de1af
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
+EBUILD tp_smapi-0.40-r3.ebuild 1717 RMD160 284ce8d882f7f1f83d9bb249c24348b11598411b SHA1 ffc5f3b683597d90597fa3370666dd3bf1747a68 SHA256 b93eba4b707e8bec3f39208d141dc1263b859deb61c26d6e080d84f6160b51fe
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/tp_smapi-0.40-confd b/app-laptop/tp_smapi/files/tp_smapi-0.40-confd
new file mode 100644
index 0000000..7c80f35
--- /dev/null
+++ b/app-laptop/tp_smapi/files/tp_smapi-0.40-confd
@@ -0,0 +1,20 @@
+# /etc/conf.d/smapi: config file for /etc/init.d/smapi
+
+# use '/etc/init.d/smapi info' at any time to check the thresholds
+# currently used by the driver
+# Note that the kernel does some sanity checking on the values and
+# will not accept any combination of values you may try to set up.
+# (i.e. stop value lower than start) So if the output of info does
+# not match what you wanted the driver probably did not like your
+# configuration.
+
+# default thresholds for '/etc/init.d/smapi start'
+SMAPI_THRESH_START="30"
+SMAPI_THRESH_STOP="85"
+# values to be used for '/etc/init.d/smapi low'
+SMAPI_LOW_THRESH_START="${SMAPI_THRESH_START}"
+SMAPI_LOW_THRESH_STOP="${SMAPI_THRESH_STOP}"
+
+# values to be used for '/etc/init.d/smapi high'
+SMAPI_HIGH_THRESH_START="95"
+SMAPI_HIGH_THRESH_STOP="100"
diff --git a/app-laptop/tp_smapi/files/tp_smapi-0.40-initd b/app-laptop/tp_smapi/files/tp_smapi-0.40-initd
new file mode 100755
index 0000000..4edb051
--- /dev/null
+++ b/app-laptop/tp_smapi/files/tp_smapi-0.40-initd
@@ -0,0 +1,92 @@
+#!/sbin/runscript
+# Copyright (C) 2011 Henning Schild <henning@wh9.tu-dresden.de>
+# Copyright (C) 2011 Sebastian Pipping <sebastian@pipping.org>
+#
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+opts="low high info"
+
+SMAPI_SYSFS="/sys/devices/platform/smapi"
+BATS="BAT0 BAT1"
+
+depend() {
+ after modules
+}
+
+start() {
+ local state1
+ local state2
+
+ ebegin "Making sure that module 'tp_smapi' is loaded"
+ modprobe tp_smapi
+ state1=$?
+ eend ${state1}
+
+ ebegin "Checking for \"${SMAPI_SYSFS}\""
+ test -d "${SMAPI_SYSFS}"
+ state2=$?
+ eend ${state2}
+
+ if [ "${state1}" -ne "0" ] || [ "${state2}" -ne "0" ]; then
+ return 1
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ set_all ${SMAPI_THRESH_START} ${SMAPI_THRESH_STOP}
+ eend $?
+}
+
+stop() {
+ einfo "Nothing required to be done to stop ${SVCNAME}"
+}
+
+require_started() {
+ if ! service_started; then
+ "${RC_SERVICE}" start || return $?
+ fi
+}
+
+high() {
+ require_started
+
+ einfo "Switching ${SVCNAME} to high thesholds"
+ set_all ${SMAPI_HIGH_THRESH_START} ${SMAPI_HIGH_THRESH_STOP}
+}
+
+low() {
+ require_started
+
+ einfo "Switching ${SVCNAME} to low thesholds"
+ set_all ${SMAPI_LOW_THRESH_START} ${SMAPI_LOW_THRESH_STOP}
+}
+
+set_all() {
+ local tstart=$1
+ local tstop=$2
+ local bat
+
+ for bat in ${BATS}; do
+ ebegin " setting thresholds for ${bat}: $tstart $tstop"
+ echo ${tstart} > ${SMAPI_SYSFS}/${bat}/start_charge_thresh
+ echo ${tstop} > ${SMAPI_SYSFS}/${bat}/stop_charge_thresh
+ eend $?
+ done
+}
+
+info() {
+ local presence
+ local tstart
+ local tstop
+ local bat
+
+ require_started
+
+ for bat in ${BATS}; do
+ tstart=$(cat ${SMAPI_SYSFS}/${bat}/start_charge_thresh)
+ tstop=$(cat ${SMAPI_SYSFS}/${bat}/stop_charge_thresh)
+ if [ "$(cat ${SMAPI_SYSFS}/${bat}/installed)" -eq "1" ]; then
+ presence=" [installed]"
+ fi
+ einfo "${bat}: ${tstart} ${tstop}${presence}"
+ done
+}
diff --git a/app-laptop/tp_smapi/tp_smapi-0.40-r2.ebuild b/app-laptop/tp_smapi/tp_smapi-0.40-r3.ebuild
similarity index 81%
rename from app-laptop/tp_smapi/tp_smapi-0.40-r2.ebuild
rename to app-laptop/tp_smapi/tp_smapi-0.40-r3.ebuild
index 226f2c2..3bbd8d6 100644
--- a/app-laptop/tp_smapi/tp_smapi-0.40-r2.ebuild
+++ b/app-laptop/tp_smapi/tp_smapi-0.40-r3.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $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 $
-EAPI="3"
+EAPI=4
inherit eutils linux-mod
@@ -23,7 +23,7 @@ RESTRICT="userpriv"
DEPEND="sys-apps/dmidecode"
RDEPEND="${DEPEND}"
-pkg_setup() {
+pkg_pretend() {
linux-mod_pkg_setup
if kernel_is lt 2 6 19; then
@@ -38,7 +38,6 @@ pkg_setup() {
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
@@ -52,13 +51,21 @@ pkg_setup() {
fi
}
+pkg_setup() {
+ # run again as pkg_pretend is not var safe
+ pkg_pretend
+}
+
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
+ epatch \
+ "${FILESDIR}/${P}-2.6.37.patch" \
+ "${FILESDIR}"/fix_header_check.patch \
+ "${FILESDIR}"/0.40-add-x120e-and-t520-to-whitelist.patch
}
src_install() {
linux-mod_src_install
dodoc CHANGES README
+ newinitd "${FILESDIR}"/${P}-initd smapi
+ newconfd "${FILESDIR}"/${P}-confd smapi
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-27 21:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 14:03 [gentoo-commits] dev/dberkholz:master commit in: app-laptop/tp_smapi/files/, app-laptop/tp_smapi/ Donnie Berkholz
-- strict thread matches above, loose matches on Subject: below --
2011-06-27 21:53 Donnie Berkholz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox