public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-laptop/tp_smapi/files/, app-laptop/tp_smapi/
@ 2016-04-26 16:51 Austin English
  0 siblings, 0 replies; 4+ messages in thread
From: Austin English @ 2016-04-26 16:51 UTC (permalink / raw
  To: gentoo-commits

commit:     049085bd1fd0bad083e9b3edc42660a2f4b649d8
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 26 16:50:05 2016 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Tue Apr 26 16:50:05 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=049085bd

app-laptop/tp_smapi: use #!/sbin/openrc-run instead of #!/sbin/runscript

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=573846

Package-Manager: portage-2.2.26

 app-laptop/tp_smapi/files/tp_smapi-0.40-initd |  2 +-
 app-laptop/tp_smapi/tp_smapi-0.41-r2.ebuild   | 75 +++++++++++++++++++++++++++
 2 files changed, 76 insertions(+), 1 deletion(-)

diff --git a/app-laptop/tp_smapi/files/tp_smapi-0.40-initd b/app-laptop/tp_smapi/files/tp_smapi-0.40-initd
index e0b3bd5..3b8c10d 100644
--- a/app-laptop/tp_smapi/files/tp_smapi-0.40-initd
+++ b/app-laptop/tp_smapi/files/tp_smapi-0.40-initd
@@ -1,4 +1,4 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
 # Copyright (C) 2011 Henning Schild <henning@wh9.tu-dresden.de>
 # Copyright (C) 2011 Sebastian Pipping <sebastian@pipping.org>
 #

diff --git a/app-laptop/tp_smapi/tp_smapi-0.41-r2.ebuild b/app-laptop/tp_smapi/tp_smapi-0.41-r2.ebuild
new file mode 100644
index 0000000..e32c1f3
--- /dev/null
+++ b/app-laptop/tp_smapi/tp_smapi-0.41-r2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic linux-mod
+
+DESCRIPTION="IBM ThinkPad SMAPI BIOS driver"
+HOMEPAGE="https://github.com/evgeni/tp_smapi/ http://tpctl.sourceforge.net/"
+SRC_URI="mirror://github/evgeni/${PN}/${P}.tar.gz"
+
+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"
+RDEPEND="${DEPEND}"
+
+pkg_pretend() {
+	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_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)"
+		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
+	dodoc CHANGES README
+	newinitd "${FILESDIR}"/${PN}-0.40-initd smapi
+	newconfd "${FILESDIR}"/${PN}-0.40-confd smapi
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-laptop/tp_smapi/files/, app-laptop/tp_smapi/
@ 2018-01-30  4:01 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2018-01-30  4:01 UTC (permalink / raw
  To: gentoo-commits

commit:     a39ab58e766da4ad5021445cccf99b372b621a98
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 30 03:56:53 2018 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Jan 30 03:59:31 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a39ab58e

app-laptop/tp_smapi: new revision to fix the build with >= linux-4.15.

Closes: https://bugs.gentoo.org/646096
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 .../files/linux-4.15-timer_setup-fix.patch         | 43 ++++++++++++
 app-laptop/tp_smapi/tp_smapi-0.42-r2.ebuild        | 76 ++++++++++++++++++++++
 2 files changed, 119 insertions(+)

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 00000000000..88c5580db18
--- /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 <jnordholz@sec.t-labs.tu-berlin.de>
+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 <jnordholz@sec.t-labs.tu-berlin.de>
+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 00000000000..e09bd1f674d
--- /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
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-laptop/tp_smapi/files/, app-laptop/tp_smapi/
@ 2018-04-17 17:13 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2018-04-17 17:13 UTC (permalink / raw
  To: gentoo-commits

commit:     a00bbbb2c01824e553d7ffb2bf6e287704cf87ba
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 17 17:06:26 2018 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Apr 17 17:09:33 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a00bbbb2

app-laptop/tp_smapi: new version 0.43.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-laptop/tp_smapi/Manifest                       |  1 +
 .../files/linux-4.15-timer_setup-fix.patch         | 43 ----------------------
 ...p_smapi-0.42-r2.ebuild => tp_smapi-0.43.ebuild} |  2 -
 3 files changed, 1 insertion(+), 45 deletions(-)

diff --git a/app-laptop/tp_smapi/Manifest b/app-laptop/tp_smapi/Manifest
index 3da37c47df5..d2f981db017 100644
--- a/app-laptop/tp_smapi/Manifest
+++ b/app-laptop/tp_smapi/Manifest
@@ -1 +1,2 @@
 DIST tp_smapi-0.42.tgz 39867 BLAKE2B 0f7285fe99766437d964780f3c9d88480a19ed07de155e1794b5c48f318846fbde4eb759e825af9f5da89fb20aee5e217f32e873a70c7d85f63e3a44b385b0f7 SHA512 1004b7ef961a9908c2144b26ea60b6dddabd83d60c11421a03e3b810f5b635415ef52656d6980915512d68f809f7bc3d662328f25d111537bd7e175d252cf83b
+DIST tp_smapi-0.43.tgz 40122 BLAKE2B e14caa05d741d14b03c56c57badc5900a47735bc58966b5195ca34269a6227ecc50518ee5ce8cf47a4aacb314a0ed0332b987098f3be024b6af9024df6efdf9b SHA512 ec2e40a248e7eb5bff2ad9e57087058a8b4706d564bd340daba5a4700ad8a5389d1f9ec29984516a1167827ae55c28240dafb558df29e1f758a4f7af80caa1e7

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
deleted file mode 100644
index 88c5580db18..00000000000
--- a/app-laptop/tp_smapi/files/linux-4.15-timer_setup-fix.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 76c5120f7be4880cf2c6801f872327e4e70c449f Mon Sep 17 00:00:00 2001
-From: Jan Nordholz <jnordholz@sec.t-labs.tu-berlin.de>
-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 <jnordholz@sec.t-labs.tu-berlin.de>
-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.43.ebuild
similarity index 97%
rename from app-laptop/tp_smapi/tp_smapi-0.42-r2.ebuild
rename to app-laptop/tp_smapi/tp_smapi-0.43.ebuild
index e09bd1f674d..01186548256 100644
--- a/app-laptop/tp_smapi/tp_smapi-0.42-r2.ebuild
+++ b/app-laptop/tp_smapi/tp_smapi-0.43.ebuild
@@ -20,8 +20,6 @@ IUSE="hdaps"
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-laptop/tp_smapi/files/, app-laptop/tp_smapi/
@ 2023-07-25 13:04 Michael Orlitzky
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Orlitzky @ 2023-07-25 13:04 UTC (permalink / raw
  To: gentoo-commits

commit:     a2b0be7c44f72397f533322144bdb9751bb4c058
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 25 12:59:04 2023 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Jul 25 12:59:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2b0be7c

app-laptop/tp_smapi: add upstream patch for linux-6.4 compatibility.

Closes: https://bugs.gentoo.org/911177
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../tp_smapi/files/tp_smapi-0.43-linux-6.4.patch   | 45 ++++++++++++++++++++++
 app-laptop/tp_smapi/tp_smapi-0.43-r3.ebuild        |  2 +
 2 files changed, 47 insertions(+)

diff --git a/app-laptop/tp_smapi/files/tp_smapi-0.43-linux-6.4.patch b/app-laptop/tp_smapi/files/tp_smapi-0.43-linux-6.4.patch
new file mode 100644
index 000000000000..4ff1facca07f
--- /dev/null
+++ b/app-laptop/tp_smapi/files/tp_smapi-0.43-linux-6.4.patch
@@ -0,0 +1,45 @@
+From 0c3398b1acf2a2cabd9cee91dc3fe3d35805fa8b Mon Sep 17 00:00:00 2001
+From: Evgeni Golov <evgeni@golov.de>
+Date: Fri, 16 Jun 2023 18:13:54 +0200
+Subject: [PATCH] update DEFINE_SEMAPHORE usage for linux 6.4+
+
+Linux changed the DEFINE_SEMAPHORE macro in
+48380368dec14859723b9e3fbd43e042638d9a76, making it take two parameters
+instead of one. Pass an explicit 1 as on 6.4+.
+---
+ thinkpad_ec.c | 4 +++-
+ tp_smapi.c    | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/thinkpad_ec.c b/thinkpad_ec.c
+index a8e812f..62ef5ca 100644
+--- a/thinkpad_ec.c
++++ b/thinkpad_ec.c
+@@ -90,8 +90,10 @@ static u64 prefetch_jiffies;                      /* time of prefetch, or: */
+ /* Locking: */
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+ static DECLARE_MUTEX(thinkpad_ec_mutex);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)
+ static DEFINE_SEMAPHORE(thinkpad_ec_mutex);
++#else
++static DEFINE_SEMAPHORE(thinkpad_ec_mutex, 1);
+ #endif
+ 
+ /* Kludge in case the ACPI DSDT reserves the ports we need. */
+diff --git a/tp_smapi.c b/tp_smapi.c
+index 6346287..9feebab 100644
+--- a/tp_smapi.c
++++ b/tp_smapi.c
+@@ -111,8 +111,10 @@ 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
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)
+ static DEFINE_SEMAPHORE(smapi_mutex);
++#else
++static DEFINE_SEMAPHORE(smapi_mutex, 1);
+ #endif
+ 
+ /**

diff --git a/app-laptop/tp_smapi/tp_smapi-0.43-r3.ebuild b/app-laptop/tp_smapi/tp_smapi-0.43-r3.ebuild
index bf08d020ede7..b9105968ab60 100644
--- a/app-laptop/tp_smapi/tp_smapi-0.43-r3.ebuild
+++ b/app-laptop/tp_smapi/tp_smapi-0.43-r3.ebuild
@@ -15,6 +15,8 @@ KEYWORDS="~amd64 ~x86"
 
 IUSE="hdaps"
 
+PATCHES=( "${FILESDIR}/${P}-linux-6.4.patch" )
+
 pkg_setup() {
 	if use hdaps; then
 		local CONFIG_CHECK="~INPUT_UINPUT"


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-25 13:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 13:04 [gentoo-commits] repo/gentoo:master commit in: app-laptop/tp_smapi/files/, app-laptop/tp_smapi/ Michael Orlitzky
  -- strict thread matches above, loose matches on Subject: below --
2018-04-17 17:13 Michael Orlitzky
2018-01-30  4:01 Michael Orlitzky
2016-04-26 16:51 Austin English

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox