From fe24a6de4b81b55fc127a66982ed972ed1148c29 Mon Sep 17 00:00:00 2001 From: PoroCYon Date: Sat, 17 Jul 2021 22:11:09 +0200 Subject: [PATCH] libserialport: add patch so it doesn't use termiox termios has been removed from recent kernels, so not having this patch causes "no such ioctl for device"-errors, preventing any use of the library --- ...s-it-has-been-removed-from-recent-ke.patch | 36 +++++++++++++++++++ srcpkgs/libserialport/template | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/libserialport/patches/0001-Remove-termiox-as-it-has-been-removed-from-recent-ke.patch diff --git a/srcpkgs/libserialport/patches/0001-Remove-termiox-as-it-has-been-removed-from-recent-ke.patch b/srcpkgs/libserialport/patches/0001-Remove-termiox-as-it-has-been-removed-from-recent-ke.patch new file mode 100644 index 00000000000000..43ccc125e4bbca --- /dev/null +++ b/srcpkgs/libserialport/patches/0001-Remove-termiox-as-it-has-been-removed-from-recent-ke.patch @@ -0,0 +1,36 @@ +Inspired by this commit from the upstream package: +https://sigrok.org/gitweb/?p=libserialport.git;a=commit;h=6f9b03e597ea7200eb616a4e410add3dd1690cb1 + +Applying this patch directly added some extra dependencies (autoconf, +automake), as the configure script needs to be regenerated with the +original commit. + +original commit message: + +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. +--- +diff --git a/libserialport_internal.h b/libserialport_internal.new.h +index 669152b..9a57b81 100644 +--- libserialport_internal.h ++++ libserialport_internal.h +@@ -69,11 +69,6 @@ + #include "linux/serial.h" + #endif + #include "linux_termios.h" +- +-/* TCGETX/TCSETX is not available everywhere. */ +-#if defined(TCGETX) && defined(TCSETX) && defined(HAVE_STRUCT_TERMIOX) +-#define USE_TERMIOX +-#endif + #endif + + /* TIOCINQ/TIOCOUTQ is not available everywhere. */ + diff --git a/srcpkgs/libserialport/template b/srcpkgs/libserialport/template index 23b6b92a42fe5d..7d1cdd3c763135 100644 --- a/srcpkgs/libserialport/template +++ b/srcpkgs/libserialport/template @@ -1,7 +1,7 @@ # Template file for 'libserialport' pkgname=libserialport version=0.1.1 -revision=2 +revision=3 build_style=gnu-configure short_desc="Cross-platform library for accessing serial ports" maintainer="lemmi "