From 4650985dd0e898b82e0d2ec225931297d4fadccf Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 31 Jan 2018 20:30:04 +0000 Subject: gentoo resync : 31.01.2018 --- app-laptop/Manifest.gz | Bin 3392 -> 3395 bytes app-laptop/tp_smapi/Manifest | 2 + .../files/linux-4.15-timer_setup-fix.patch | 43 ++++++++++++ app-laptop/tp_smapi/tp_smapi-0.42-r2.ebuild | 76 +++++++++++++++++++++ 4 files changed, 121 insertions(+) create mode 100644 app-laptop/tp_smapi/files/linux-4.15-timer_setup-fix.patch create mode 100644 app-laptop/tp_smapi/tp_smapi-0.42-r2.ebuild (limited to 'app-laptop') diff --git a/app-laptop/Manifest.gz b/app-laptop/Manifest.gz index e5443f56fb86..300fb5a98ce3 100644 Binary files a/app-laptop/Manifest.gz and b/app-laptop/Manifest.gz differ diff --git a/app-laptop/tp_smapi/Manifest b/app-laptop/tp_smapi/Manifest index 0f33c2bc84e0..d9dd23107b91 100644 --- a/app-laptop/tp_smapi/Manifest +++ b/app-laptop/tp_smapi/Manifest @@ -1,5 +1,7 @@ +AUX linux-4.15-timer_setup-fix.patch 1374 BLAKE2B 6d194a47b4b55bf27139d02b978ea99a5d095c20bf326b083134c3c4b0df4d489d03630edec055b92179f897709da6885706f5b33062bb64b1dad627f9a82b59 SHA512 9f4cf02891d051ecb04748f974b90b1d9228b3e9cff2c3c1715075cf7d23a75b5ecab375e80223f9456aede913c25bb88c7a49cac7022cf42141598c0f66b541 AUX tp_smapi-0.40-confd 785 BLAKE2B da1e2a5ce6e441eebf1a3dffcce8a863688a525f6ee4c29537b1783e3283c5a0311e4317617cff4be8c35246accf69738778c6c34e4d2af77a18f23a1e84b363 SHA512 a08f0b15ea37f79e1a8b41b3a3a59421dcf26e482d2eaa269e7c3f728c142e68e8c130c8a53f4c14829436a20e1354318464de780d9fbe10777d7929d7944dca AUX tp_smapi-0.40-initd 1851 BLAKE2B 852fc13e2d74a570918c451966214ed8ca3daea9bdb66e856f48554261f4cafc8d8be7b76889a6a639f0dc1310d34036131a9982be0cdcf0e458707e7938b161 SHA512 ebf8ac628e00979f21e266fb6d187f02bfeeafc9482a0c5bed4fd4f092c7a27158747ccf629c802969ad2a8f13124276ef889927b3f1f01a7ce44fdcde103698 DIST tp_smapi-0.42.tgz 39867 BLAKE2B 0f7285fe99766437d964780f3c9d88480a19ed07de155e1794b5c48f318846fbde4eb759e825af9f5da89fb20aee5e217f32e873a70c7d85f63e3a44b385b0f7 SHA512 1004b7ef961a9908c2144b26ea60b6dddabd83d60c11421a03e3b810f5b635415ef52656d6980915512d68f809f7bc3d662328f25d111537bd7e175d252cf83b EBUILD tp_smapi-0.42-r1.ebuild 1947 BLAKE2B 8b3ce3e2e96c025ee1236feb410019d9033b8633a476b346e6aae63d4b1a48940edf9a294de5d85c4e6eb2d337f654dfd5379439ed17548502fbec98ae03a872 SHA512 d09fe01652350951baaaf67af7ce32036515a1535cb9f774d2e0e2f92b0f79163babc3c19c554a37a15b5ddde3bf5a4904e95dfaa74274783911d2c5335fbbef +EBUILD tp_smapi-0.42-r2.ebuild 2009 BLAKE2B 8ef125cc7f35bc868fed563da9bb880f3cc766c5df12a4d27e85c5e785132a715f02753d6b15882efeb11577b99f742c86831c4cf182e6cf213080cc0708b998 SHA512 9d851aa646bd312f5997e8b3a7d4c23b4d2e9ab4b18086d87fb5e8fbda32b449d6900b93ce4e45483c05ec3f3c40ee8e5b4952daf7d593ca1343172ce5c4f147 MISC metadata.xml 473 BLAKE2B 9d19f4112fc0ac3e045c2d92e510bec52bbfbcd9bbca442d856598cc95f546592c4661b317215d35a6540a14e4bf68b3b826baa8c434a170e9841fce3706cc99 SHA512 21ce54c4cd204ddea9f1170f8e1b66e636bb2b541856ff541371bd572403519a09cf2367f5642a596684d66145bc9ab92396b102ef51086f2d22f96fc6c0b7af diff --git a/app-laptop/tp_smapi/files/linux-4.15-timer_setup-fix.patch b/app-laptop/tp_smapi/files/linux-4.15-timer_setup-fix.patch new file mode 100644 index 000000000000..88c5580db181 --- /dev/null +++ b/app-laptop/tp_smapi/files/linux-4.15-timer_setup-fix.patch @@ -0,0 +1,43 @@ +From 76c5120f7be4880cf2c6801f872327e4e70c449f Mon Sep 17 00:00:00 2001 +From: Jan Nordholz +Date: Mon, 4 Dec 2017 03:27:11 +0100 +Subject: [PATCH] Adapt HDAPS driver to use the new timer_setup() interface. + +Linux 4.15 removed the ancient init_timer() API and changed the signature +of the timer handler function. + +Signed-off-by: Jan Nordholz +Closes: #31 +--- + hdaps.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/hdaps.c b/hdaps.c +index 0763c3a..76930a3 100644 +--- a/hdaps.c ++++ b/hdaps.c +@@ -469,7 +469,11 @@ static void hdaps_calibrate(void) + /* Timer handler for updating the input device. Runs in softirq context, + * so avoid lenghty or blocking operations. + */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + static void hdaps_mousedev_poll(unsigned long unused) ++#else ++static void hdaps_mousedev_poll(struct timer_list *unused) ++#endif + { + int ret; + +@@ -779,8 +783,12 @@ static int __init hdaps_init(void) + hdaps_invert = 0; /* default */ + + /* Init timer before platform_driver_register, in case of suspend */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) + init_timer(&hdaps_timer); + hdaps_timer.function = hdaps_mousedev_poll; ++#else ++ timer_setup(&hdaps_timer, hdaps_mousedev_poll, 0); ++#endif + ret = platform_driver_register(&hdaps_driver); + if (ret) + goto out; diff --git a/app-laptop/tp_smapi/tp_smapi-0.42-r2.ebuild b/app-laptop/tp_smapi/tp_smapi-0.42-r2.ebuild new file mode 100644 index 000000000000..e09bd1f674de --- /dev/null +++ b/app-laptop/tp_smapi/tp_smapi-0.42-r2.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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}" + +PATCHES=( "${FILESDIR}/linux-4.15-timer_setup-fix.patch" ) + +# 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 +} -- cgit v1.2.3