net-dialup/minicom: Sync with Gentoo

It's from Gentoo commit 555b17151250ba6f7e4b3bf00653df6dab80bd93.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2026-03-02 07:28:16 +00:00 committed by Krzesimir Nowak
parent 31aa5400be
commit 9b570ce84a
4 changed files with 172 additions and 0 deletions

View File

@ -1 +1,2 @@
DIST minicom-2.10.tar.gz 798751 BLAKE2B 1828b2670a71f8c94099cabc49b1e85ad35bd0491a78fe99a92d32176811d25b76afa74b417491f44bec40c1a7273e1bbc0ab9729dfa2626291b069b4447b919 SHA512 ced271a21b0ba97ad0b09093f341112d4c4f64f6b72631502acc136d2fb92eeb14965d4187fd8cfed0e0e2519b603b6e54d8dd780e666119ecfc5677203595e2
DIST minicom-2.11.1.tar.gz 1058823 BLAKE2B 20f3f118cea634cf3df5a3ad5513f32c3117d95e222027aac978f0b3d6be8fdc79b7602959129a2e36e05960800c8bce025423b69d609c9651c8bcbe4a70efb1 SHA512 a74ca75494051b5027a0b641f1fedcc8a341dc409e17f4f509fdb48d3958ed6e6a8482f4f0217671eaa3af6fd5e608f55759faf6f71fa89fddbb065ad99cf33d

View File

@ -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 <chemobejk@gmail.com>
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

View File

@ -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
}

View File

@ -0,0 +1,60 @@
# 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
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
}