commit: 154c8907167e4408b8b1c526149384fa85314ea1 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sat Feb 7 00:51:52 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Feb 7 00:51:52 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=154c8907
net-dialup/minicom: fix compat w/ >=glibc-2.42 I'm not sure the patch is right for older glibc so use has_version and we can clean it up in a while. Closes: https://bugs.gentoo.org/969713 Signed-off-by: Sam James <sam <AT> gentoo.org> .../minicom/files/minicom-2.10-glibc-2.42.patch | 45 +++++++++++++++ net-dialup/minicom/minicom-2.10-r1.ebuild | 66 ++++++++++++++++++++++ 2 files changed, 111 insertions(+) diff --git a/net-dialup/minicom/files/minicom-2.10-glibc-2.42.patch b/net-dialup/minicom/files/minicom-2.10-glibc-2.42.patch new file mode 100644 index 000000000000..1a5950ae843d --- /dev/null +++ b/net-dialup/minicom/files/minicom-2.10-glibc-2.42.patch @@ -0,0 +1,45 @@ +https://salsa.debian.org/minicom-team/minicom/-/issues/17 +https://bugs.gentoo.org/969713 +https://salsa.debian.org/minicom-team/minicom/-/commit/964ae563cb5a78545ae1a4a3b6784c69ec73bc48 + +From 964ae563cb5a78545ae1a4a3b6784c69ec73bc48 Mon Sep 17 00:00:00 2001 +From: Stefan Becker <[email protected]> +Date: Mon, 17 Nov 2025 11:57:32 +0200 +Subject: [PATCH] src/sysdep.h: remove cfset{i,o}speed macros for glibc + +glibc 2.42 added support for arbitrary termios speeds on Linux, i.e. +speed_t and Bxxx defines changed from bitmasks to unsigned integers: +Therefore speed_t can no longer be used together with c_flag's internal +bitmask CBAUD. + +When minicom is compiled on such a system the baudrate setting is broken +and the user experiences garbled UART output. + +Remove the macros for glibc, i.e. call cfset{i,o}speed() instead. + +Fixes #17 +--- + src/sysdep.h | 9 --------- + 2 files changed, 1 insertion(+), 9 deletions(-) + +diff --git a/src/sysdep.h b/src/sysdep.h +index b11945c..9ba8836 100644 +--- a/src/sysdep.h ++++ b/src/sysdep.h +@@ -139,12 +139,3 @@ + # define cfsetospeed(tty, spd) + #endif + #endif +- +-/* Redefine cfset{i,o}speed for Linux > 1.1.68 && libc < 4.5.21 */ +-#if defined (__GLIBC__) && defined(CBAUDEX) +-# undef cfsetispeed +-# undef cfsetospeed +-# define cfsetispeed(xtty, xspd) \ +- ((xtty)->c_cflag = ((xtty)->c_cflag & ~CBAUD) | (xspd)) +-# define cfsetospeed(tty, spd) +-#endif +-- +GitLab + + diff --git a/net-dialup/minicom/minicom-2.10-r1.ebuild b/net-dialup/minicom/minicom-2.10-r1.ebuild new file mode 100644 index 000000000000..1aa36f68a63d --- /dev/null +++ b/net-dialup/minicom/minicom-2.10-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Serial Communication Program" +HOMEPAGE="https://salsa.debian.org/minicom-team/minicom" +SRC_URI="https://salsa.debian.org/${PN}-team/${PN}/-/archive/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="nls" + +DEPEND="sys-libs/ncurses:=" + +RDEPEND=" + ${DEPEND} + net-dialup/lrzsz +" + +BDEPEND=" + virtual/pkgconfig + nls? ( sys-devel/gettext ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.8-gentoo-runscript.patch + "${FILESDIR}"/${PN}-2.9-update-gettext.patch +) + +src_prepare() { + default + + # Drop a little while after glibc-2.42 is stable (bug #969713) + if ! has_version "sys-libs/glibc" || has_version ">=sys-libs/glibc-2.42" ; then + eapply "${FILESDIR}"/${PN}-2.10-glibc-2.42.patch + fi + + eautoreconf +} + +src_configure() { + # Lockdir must exist if not manually specified. + # '/var/lock' is created by OpenRC. + local myeconfargs=( + # See bug #788142 + --sysconfdir="${EPREFIX}"/etc/${PN} + + --disable-rpath + --enable-lock-dir="/var/lock" + $(use_enable nls) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + # Needs to match --sysconfdir above + insinto /etc/minicom + doins "${FILESDIR}"/minirc.dfl +}
