Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-laptop/tp_smapi/
Date: Sun, 20 Dec 2015 21:47:39
Message-Id: 1450648016.b2ae67998fc017775a514b475022f4dc4c3466bc.sping@gentoo
1 commit: b2ae67998fc017775a514b475022f4dc4c3466bc
2 Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 20 21:43:27 2015 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 20 21:46:56 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2ae6799
7
8 app-laptop/tp_smapi: Fix compilation (bug #492964)
9
10 Package-Manager: portage-2.2.26
11
12 app-laptop/tp_smapi/tp_smapi-0.41-r1.ebuild | 74 +++++++++++++++++++++++++++++
13 1 file changed, 74 insertions(+)
14
15 diff --git a/app-laptop/tp_smapi/tp_smapi-0.41-r1.ebuild b/app-laptop/tp_smapi/tp_smapi-0.41-r1.ebuild
16 new file mode 100644
17 index 0000000..fe6add2
18 --- /dev/null
19 +++ b/app-laptop/tp_smapi/tp_smapi-0.41-r1.ebuild
20 @@ -0,0 +1,74 @@
21 +# Copyright 1999-2015 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=5
26 +
27 +inherit flag-o-matic linux-mod
28 +
29 +DESCRIPTION="IBM ThinkPad SMAPI BIOS driver"
30 +HOMEPAGE="https://github.com/evgeni/tp_smapi/ http://tpctl.sourceforge.net/"
31 +SRC_URI="mirror://github/evgeni/${PN}/${P}.tar.gz"
32 +
33 +LICENSE="GPL-2"
34 +SLOT="0"
35 +KEYWORDS="~amd64 ~x86"
36 +
37 +IUSE="hdaps"
38 +
39 +RESTRICT="userpriv"
40 +
41 +# We need dmideode if the kernel does not support DMI_DEV_TYPE_OEM_STRING
42 +# in dmi.h
43 +DEPEND="sys-apps/dmidecode"
44 +RDEPEND="${DEPEND}"
45 +
46 +pkg_pretend() {
47 + linux-mod_pkg_setup
48 +
49 + if kernel_is lt 2 6 19; then
50 + eerror
51 + eerror "${P} requires Linux kernel 2.6.19 or above."
52 + eerror
53 + die "Unsupported kernel version"
54 + fi
55 +
56 + MODULE_NAMES="thinkpad_ec(extra:) tp_smapi(extra:)"
57 + BUILD_PARAMS="KSRC=${KV_DIR} KBUILD=${KV_OUT_DIR}"
58 + BUILD_TARGETS="default"
59 +
60 + if use hdaps; then
61 + CONFIG_CHECK="~INPUT_UINPUT"
62 + WARNING_INPUT_UINPUT="Your kernel needs uinput for the hdaps module to perform better"
63 + linux-info_pkg_setup
64 +
65 + MODULE_NAMES="${MODULE_NAMES} hdaps(extra:)"
66 + BUILD_PARAMS="${BUILD_PARAMS} HDAPS=1"
67 +
68 + CONFIG_CHECK="~!SENSORS_HDAPS"
69 + ERROR_SENSORS_HDAPS="${P} with USE=hdaps conflicts with in-kernel HDAPS (CONFIG_SENSORS_HDAPS)"
70 + linux-info_pkg_setup
71 + fi
72 +}
73 +
74 +pkg_setup() {
75 + # run again as pkg_pretend is not var safe
76 + pkg_pretend
77 +}
78 +
79 +src_compile() {
80 + # Kernel Makefiles may pull in -mpreferred-stack-boundary=3
81 + # which requires that SSE disabled or compilation will fail.
82 + # So we need to ensure that appended user CLAGS do not re-enable SSE
83 + # https://bugs.gentoo.org/show_bug.cgi?id=492964
84 + replace-flags '-msse*' ''
85 +
86 + linux-mod_src_compile
87 +}
88 +
89 +src_install() {
90 + linux-mod_src_install
91 + dodoc CHANGES README
92 + newinitd "${FILESDIR}"/${PN}-0.40-initd smapi
93 + newconfd "${FILESDIR}"/${PN}-0.40-confd smapi
94 +}