commit: b3bcc60e8ada620ef9d42aafb8cfc759ab80f084 Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr> AuthorDate: Tue Feb 24 09:53:29 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Feb 24 14:05:31 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3bcc60e
media-sound/twolame: fix c23, test, add dot-a test needs frontend/twolame built w/ sndfile remove sed no-op, since 3.0.13 -O3 is removed and warning_flags are only for maintainer_mode Closes: https://bugs.gentoo.org/970532 Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr> Part-of: https://codeberg.org/gentoo/gentoo/pulls/129 Merges: https://codeberg.org/gentoo/gentoo/pulls/129 Signed-off-by: Sam James <sam <AT> gentoo.org> media-sound/twolame/files/twolame-0.4.0-fix_C23.patch | 15 +++++++++++++++ media-sound/twolame/twolame-0.4.0-r1.ebuild | 17 +++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/media-sound/twolame/files/twolame-0.4.0-fix_C23.patch b/media-sound/twolame/files/twolame-0.4.0-fix_C23.patch new file mode 100644 index 000000000000..e484fa88d603 --- /dev/null +++ b/media-sound/twolame/files/twolame-0.4.0-fix_C23.patch @@ -0,0 +1,15 @@ +PR merged https://github.com/njh/twolame/pull/105.patch +fix old-style-def for c23 +--- a/libtwolame/psycho_2.c ++++ b/libtwolame/psycho_2.c +@@ -54,9 +54,7 @@ static const FLOAT bmax[27] = { 20.0, 20.0, 20.0, 20.0, 20.0, 17.0, 15.0, + 4.5, 4.5, 4.5, 3.5, 3.5, 3.5 + }; + +-static void psycho_2_read_absthr(absthr, table) +-FLOAT *absthr; +-int table; ++static void psycho_2_read_absthr(FLOAT *absthr, int table) + { + int j; + #include "psycho_2_absthr.h" diff --git a/media-sound/twolame/twolame-0.4.0-r1.ebuild b/media-sound/twolame/twolame-0.4.0-r1.ebuild index 0af6a89fbb4a..7a2268c0c319 100644 --- a/media-sound/twolame/twolame-0.4.0-r1.ebuild +++ b/media-sound/twolame/twolame-0.4.0-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit multilib-minimal +inherit dot-a multilib-minimal DESCRIPTION="An optimised MPEG Audio Layer 2 (MP2) encoder" HOMEPAGE="https://www.twolame.org" @@ -13,6 +13,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~sparc x86 ~x64-macos" IUSE="+sndfile static-libs test" +REQUIRED_USE="test? ( sndfile )" RESTRICT="!test? ( test )" RDEPEND="sndfile? ( >=media-libs/libsndfile-1.0.25[${MULTILIB_USEDEP}] )" @@ -22,11 +23,12 @@ BDEPEND=" test? ( dev-lang/perl ) " -src_prepare() { - sed -i -e '/CFLAGS/s:-O3::' configure || die - # remove -Werror, bug 493940 - sed -i -e '/WARNING_CFLAGS/s:-Werror::' configure || die +PATCHES=( + # PR merged + "${FILESDIR}"/${P}-fix_C23.patch +) +src_prepare() { if [[ ${CHOST} == *solaris* ]]; then # libsndfile doesn't like -std=c99 on Solaris sed -i -e '/CFLAGS/s:-std=c99::' configure || die @@ -39,6 +41,8 @@ src_prepare() { } multilib_src_configure() { + use static-libs && lto-guarantee-fat + local myeconfargs=( $(use_enable sndfile) $(use_enable static-libs static) @@ -48,5 +52,6 @@ multilib_src_configure() { multilib_src_install_all() { default + use static-libs && strip-lto-bytecode find "${ED}" -type f -name "*.la" -delete || die }
