* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libserialport/files/, dev-libs/libserialport/
@ 2021-09-16 1:18 Sam James
0 siblings, 0 replies; only message in thread
From: Sam James @ 2021-09-16 1:18 UTC (permalink / raw
To: gentoo-commits
commit: d0d32526c2f5a421da0d79cd55d287bab06e260a
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 16 01:05:11 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 16 01:17:33 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0d32526
dev-libs/libserialport: add patch for runtime breakage w/ new kernels
Closes: https://bugs.gentoo.org/813273
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/libserialport-0.1.1-kernel-termiox.patch | 32 +++++++++++++++
.../libserialport/libserialport-0.1.1-r1.ebuild | 46 ++++++++++++++++++++++
2 files changed, 78 insertions(+)
diff --git a/dev-libs/libserialport/files/libserialport-0.1.1-kernel-termiox.patch b/dev-libs/libserialport/files/libserialport-0.1.1-kernel-termiox.patch
new file mode 100644
index 00000000000..8a8aed26a31
--- /dev/null
+++ b/dev-libs/libserialport/files/libserialport-0.1.1-kernel-termiox.patch
@@ -0,0 +1,32 @@
+https://sigrok.org/gitweb/?p=libserialport.git;a=commitdiff;h=6f9b03e597ea7200eb616a4e410add3dd1690cb1
+https://sigrok.org/bugzilla/show_bug.cgi?id=1687
+https://bugs.gentoo.org/813273
+
+Fixes runtime breakage with newer kernels.
+
+From: Karl Palsson <karlp@etactica.com>
+Date: Fri, 11 Jun 2021 17:07:09 +0000
+Subject: [PATCH] HACK: don't even check for termiox
+
+termiox was removed from linux in e0efb3168d34
+Some more information available in https://www.spinics.net/lists/linux-serial/msg41926.html
+
+Attempting to use the termiox ioctls on more modern kernels results in
+"Inappropriate IOCTL" errors.
+
+While the "right" solution might be to remove the termiox code from the
+linux path, simply not checking for termiox builds a libserialport that
+functions on modern linux kernels.
+
+Signed-off-by: Karl Palsson <karlp@etactica.com>
+--- a/configure.ac
++++ b/configure.ac
+@@ -112,7 +112,7 @@ AC_SYS_LARGEFILE
+ AC_TYPE_SIZE_T
+
+ # Check for specific termios structures.
+-AC_CHECK_TYPES([struct termios2, struct termiox],,,
++AC_CHECK_TYPES([struct termios2],,,
+ [[#include <linux/termios.h>]])
+ AC_CHECK_MEMBERS([struct termios.c_ispeed, struct termios.c_ospeed,
+ struct termios2.c_ispeed, struct termios2.c_ospeed],,,
diff --git a/dev-libs/libserialport/libserialport-0.1.1-r1.ebuild b/dev-libs/libserialport/libserialport-0.1.1-r1.ebuild
new file mode 100644
index 00000000000..a06498d3dbf
--- /dev/null
+++ b/dev-libs/libserialport/libserialport-0.1.1-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="git://sigrok.org/${PN}"
+ inherit git-r3
+else
+ SRC_URI="https://sigrok.org/download/source/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Cross platform serial port access library"
+HOMEPAGE="https://sigrok.org/wiki/Libserialport"
+
+LICENSE="LGPL-3"
+SLOT="0"
+IUSE="static-libs"
+
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-kernel-termiox.patch
+)
+
+src_prepare() {
+ default
+
+ #[[ ${PV} == "9999" ]] && eautoreconf
+ # Needed for the termiox patch, should be able to drop on next release
+ # (change back this + inherit to just for 9999)
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -type f -delete || die
+}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-16 1:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-16 1:18 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libserialport/files/, dev-libs/libserialport/ Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox