diff options
author | Sam James <sam@gentoo.org> | 2021-09-16 02:05:11 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-09-16 02:17:33 +0100 |
commit | d0d32526c2f5a421da0d79cd55d287bab06e260a (patch) | |
tree | 1502a57e889ae9d39527a2329ba668fd1b3d4cc5 /dev-libs/libserialport | |
parent | sys-apps/busybox: add 1.34.0 (diff) | |
download | gentoo-d0d32526c2f5a421da0d79cd55d287bab06e260a.tar.gz gentoo-d0d32526c2f5a421da0d79cd55d287bab06e260a.tar.bz2 gentoo-d0d32526c2f5a421da0d79cd55d287bab06e260a.zip |
dev-libs/libserialport: add patch for runtime breakage w/ new kernels
Closes: https://bugs.gentoo.org/813273
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/libserialport')
-rw-r--r-- | dev-libs/libserialport/files/libserialport-0.1.1-kernel-termiox.patch | 32 | ||||
-rw-r--r-- | dev-libs/libserialport/libserialport-0.1.1-r1.ebuild | 46 |
2 files changed, 78 insertions, 0 deletions
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 000000000000..8a8aed26a31d --- /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 000000000000..a06498d3dbfc --- /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 +} |