From 36873496dfc4f29ccbee6742863fb56519739797 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 12 Oct 2016 09:07:42 -0400 Subject: app-laptop/tp_smapi: new revision that doesn't call pkg_pretend() directly. Gentoo-Bug: 596622 Package-Manager: portage-2.3.0 --- app-laptop/tp_smapi/tp_smapi-0.42-r1.ebuild | 75 +++++++++++++++++++++++++++++ app-laptop/tp_smapi/tp_smapi-0.42.ebuild | 67 -------------------------- 2 files changed, 75 insertions(+), 67 deletions(-) create mode 100644 app-laptop/tp_smapi/tp_smapi-0.42-r1.ebuild delete mode 100644 app-laptop/tp_smapi/tp_smapi-0.42.ebuild (limited to 'app-laptop') diff --git a/app-laptop/tp_smapi/tp_smapi-0.42-r1.ebuild b/app-laptop/tp_smapi/tp_smapi-0.42-r1.ebuild new file mode 100644 index 000000000000..8f671665c63f --- /dev/null +++ b/app-laptop/tp_smapi/tp_smapi-0.42-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit flag-o-matic linux-mod + +DESCRIPTION="IBM ThinkPad SMAPI BIOS driver" +HOMEPAGE="https://github.com/evgeni/${PN}" +SRC_URI="${HOMEPAGE}/releases/download/tp-smapi/${PV}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="hdaps" + +# We need dmideode if the kernel does not support +# DMI_DEV_TYPE_OEM_STRING in dmi.h. +DEPEND="sys-apps/dmidecode" +RDEPEND="${DEPEND}" + +# This code is factored out of both pkg_pretend() and pkg_setup() +# because the PMS states that ebuilds may not call phase functions +# directly (see the "List of functions" section). This was bug #596616 +# and #596622. +tp_smapi_pkg_pretend() { + linux-mod_pkg_setup + + 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" + # Why call this twice? + 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 +} + +pkg_pretend() { + tp_smapi_pkg_pretend +} + +pkg_setup() { + # run again as pkg_pretend is not var safe + tp_smapi_pkg_pretend +} + +src_compile() { + # Kernel Makefiles may pull in -mpreferred-stack-boundary=3 + # which requires that SSE disabled or compilation will fail. + # So we need to ensure that appended user CLAGS do not re-enable SSE + # https://bugs.gentoo.org/show_bug.cgi?id=492964 + replace-flags '-msse*' '' + replace-flags '-mssse3' '' + + linux-mod_src_compile +} + +src_install() { + linux-mod_src_install + einstalldocs + newinitd "${FILESDIR}/${PN}-0.40-initd" smapi + newconfd "${FILESDIR}/${PN}-0.40-confd" smapi +} diff --git a/app-laptop/tp_smapi/tp_smapi-0.42.ebuild b/app-laptop/tp_smapi/tp_smapi-0.42.ebuild deleted file mode 100644 index ed4b4a57df4d..000000000000 --- a/app-laptop/tp_smapi/tp_smapi-0.42.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -inherit flag-o-matic linux-mod - -DESCRIPTION="IBM ThinkPad SMAPI BIOS driver" -HOMEPAGE="https://github.com/evgeni/${PN}" -SRC_URI="${HOMEPAGE}/releases/download/tp-smapi/${PV}/${P}.tgz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -IUSE="hdaps" - -# We need dmideode if the kernel does not support -# DMI_DEV_TYPE_OEM_STRING in dmi.h. -DEPEND="sys-apps/dmidecode" -RDEPEND="${DEPEND}" - -pkg_pretend() { - linux-mod_pkg_setup - - 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" - # Why call this twice? - 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 -} - -pkg_setup() { - # run again as pkg_pretend is not var safe - pkg_pretend -} - -src_compile() { - # Kernel Makefiles may pull in -mpreferred-stack-boundary=3 - # which requires that SSE disabled or compilation will fail. - # So we need to ensure that appended user CLAGS do not re-enable SSE - # https://bugs.gentoo.org/show_bug.cgi?id=492964 - replace-flags '-msse*' '' - replace-flags '-mssse3' '' - - linux-mod_src_compile -} - -src_install() { - linux-mod_src_install - einstalldocs - newinitd "${FILESDIR}/${PN}-0.40-initd" smapi - newconfd "${FILESDIR}/${PN}-0.40-confd" smapi -} -- cgit v1.2.3-65-gdbad