From 4fa09d260a7cca92befc8dc9a58416879d75dc4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Tue, 18 Nov 2025 21:29:08 -0500 Subject: [PATCH] lame: Fix build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactor all the patches with git format-patch Update to build on 25.08 Signed-off-by: Hubert Figuière --- ...1-Build-xmm_quantize_sub.c-with-msse.patch | 34 ++++++++ ...autoconf-directives-in-build-system.patch} | 21 ++++- ...> 0003-Patch-out-remaining-ansi2knr.patch} | 51 +++++++++--- ...not-used-anywhere-in-lame-sourcetree.patch | 41 ++++++++++ lame/0005-Update-autoconf.patch | 81 +++++++++++++++++++ lame/lame-3.99.5.json | 25 +++--- lame/lame-msse.patch | 17 ---- lame/lame-tinfo.patch | 23 ------ 8 files changed, 224 insertions(+), 69 deletions(-) create mode 100644 lame/0001-Build-xmm_quantize_sub.c-with-msse.patch rename lame/{lame-gtk1-ac-directives.patch => 0002-Include-GTK-1-autoconf-directives-in-build-system.patch} (93%) rename lame/{lame-ansi2knr2devnull.patch => 0003-Patch-out-remaining-ansi2knr.patch} (52%) create mode 100644 lame/0004-initscr-is-not-used-anywhere-in-lame-sourcetree.patch create mode 100644 lame/0005-Update-autoconf.patch delete mode 100644 lame/lame-msse.patch delete mode 100644 lame/lame-tinfo.patch diff --git a/lame/0001-Build-xmm_quantize_sub.c-with-msse.patch b/lame/0001-Build-xmm_quantize_sub.c-with-msse.patch new file mode 100644 index 00000000..d62d91bc --- /dev/null +++ b/lame/0001-Build-xmm_quantize_sub.c-with-msse.patch @@ -0,0 +1,34 @@ +From bba34e509c2e144000becdc89e18bf6e34fe5517 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= +Date: Tue, 18 Nov 2025 20:33:54 -0500 +Subject: [PATCH 1/5] Build xmm_quantize_sub.c with -msse +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Sebastian Ramacher +Bug: http://sourceforge.net/p/lame/bugs/443/ +Bug-Debian: https://bugs.debian.org/760047 +Forwarded: http://sourceforge.net/p/lame/bugs/443/ +Last-Update: 2014-08-31 + +Signed-off-by: Hubert Figuière +--- + libmp3lame/vector/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libmp3lame/vector/Makefile.am b/libmp3lame/vector/Makefile.am +index ac595b1..6b05380 100644 +--- a/libmp3lame/vector/Makefile.am ++++ b/libmp3lame/vector/Makefile.am +@@ -20,6 +20,7 @@ xmm_sources = xmm_quantize_sub.c + + if WITH_XMM + liblamevectorroutines_la_SOURCES = $(xmm_sources) ++liblamevectorroutines_la_CFLAGS = -msse + endif + + noinst_HEADERS = lame_intrin.h +-- +2.51.0 + diff --git a/lame/lame-gtk1-ac-directives.patch b/lame/0002-Include-GTK-1-autoconf-directives-in-build-system.patch similarity index 93% rename from lame/lame-gtk1-ac-directives.patch rename to lame/0002-Include-GTK-1-autoconf-directives-in-build-system.patch index 7e0d3fe4..5a7fcb73 100644 --- a/lame/lame-gtk1-ac-directives.patch +++ b/lame/0002-Include-GTK-1-autoconf-directives-in-build-system.patch @@ -1,11 +1,25 @@ -Description: Include GTK-1 autoconf directives in build system. +From 20d0bd4ed444cd99bcf09ad8d36e69b027d7b1a4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= +Date: Tue, 18 Nov 2025 20:35:36 -0500 +Subject: [PATCH 2/5] Include GTK-1 autoconf directives in build system. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + Origin: http://anonscm.debian.org/gitweb/?p=pkg-multimedia/lame.git;a=tree;f=debian/patches Forwarded: yes Applied-Upstream: http://lame.cvs.sf.net/viewvc/lame/lame/acinclude.m4?revision=1.6 +Signed-off-by: Hubert Figuière +--- + acinclude.m4 | 193 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 193 insertions(+) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 0b8f869..eef0c3d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 -@@ -85,4 +85,197 @@ +@@ -85,4 +85,197 @@ int main(void) [AC_MSG_WARN(can't check for IEEE854 compliant 80 bit floats)] )])]) # alex_IEEE854_FLOAT80 @@ -203,3 +217,6 @@ Applied-Upstream: http://lame.cvs.sf.net/viewvc/lame/lame/acinclude.m4?revision= + AC_SUBST(GTK_LIBS) + rm -f conf.gtktest +]) +-- +2.51.0 + diff --git a/lame/lame-ansi2knr2devnull.patch b/lame/0003-Patch-out-remaining-ansi2knr.patch similarity index 52% rename from lame/lame-ansi2knr2devnull.patch rename to lame/0003-Patch-out-remaining-ansi2knr.patch index c427345e..97e03c03 100644 --- a/lame/lame-ansi2knr2devnull.patch +++ b/lame/0003-Patch-out-remaining-ansi2knr.patch @@ -1,9 +1,27 @@ -Description: Patch out remaining ansi2knr. +From 594b7a28a214513adf067ff7d35cf2f8653f6d90 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= +Date: Tue, 18 Nov 2025 20:36:22 -0500 +Subject: [PATCH 3/5] Patch out remaining ansi2knr. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + Author: Dimitri John Ledkov Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755111 + +Signed-off-by: Hubert Figuière +--- + configure.in | 1 - + doc/html/Makefile.am | 2 +- + doc/man/Makefile.am | 2 +- + libmp3lame/i386/Makefile.am | 2 +- + 4 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/configure.in b/configure.in +index 2f8fa66..308b7ba 100644 --- a/configure.in +++ b/configure.in -@@ -78,7 +78,6 @@ +@@ -78,7 +78,6 @@ if test "${GCC}" = "yes"; then fi dnl more automake stuff @@ -11,6 +29,20 @@ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755111 AC_CHECK_HEADER(dmalloc.h) if test "${ac_cv_header_dmalloc_h}" = "yes"; then +diff --git a/doc/html/Makefile.am b/doc/html/Makefile.am +index 1a20404..aebb30e 100644 +--- a/doc/html/Makefile.am ++++ b/doc/html/Makefile.am +@@ -1,6 +1,6 @@ + ## $Id: Makefile.am,v 1.7 2010/09/30 20:58:40 jaz001 Exp $ + +-AUTOMAKE_OPTIONS = foreign ansi2knr ++AUTOMAKE_OPTIONS = foreign + + docdir = $(datadir)/doc + pkgdocdir = $(docdir)/$(PACKAGE) +diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am +index ecab077..1de89e9 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am @@ -1,6 +1,6 @@ @@ -21,6 +53,8 @@ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755111 man_MANS = lame.1 EXTRA_DIST = ${man_MANS} +diff --git a/libmp3lame/i386/Makefile.am b/libmp3lame/i386/Makefile.am +index e49ad9c..b949a47 100644 --- a/libmp3lame/i386/Makefile.am +++ b/libmp3lame/i386/Makefile.am @@ -1,6 +1,6 @@ @@ -31,13 +65,6 @@ Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755111 DEFS = @DEFS@ @CONFIG_DEFS@ ---- a/doc/html/Makefile.am -+++ b/doc/html/Makefile.am -@@ -1,6 +1,6 @@ - ## $Id: Makefile.am,v 1.7 2010/09/30 20:58:40 jaz001 Exp $ - --AUTOMAKE_OPTIONS = foreign ansi2knr -+AUTOMAKE_OPTIONS = foreign - - docdir = $(datadir)/doc - pkgdocdir = $(docdir)/$(PACKAGE) +-- +2.51.0 + diff --git a/lame/0004-initscr-is-not-used-anywhere-in-lame-sourcetree.patch b/lame/0004-initscr-is-not-used-anywhere-in-lame-sourcetree.patch new file mode 100644 index 00000000..cab79a5e --- /dev/null +++ b/lame/0004-initscr-is-not-used-anywhere-in-lame-sourcetree.patch @@ -0,0 +1,41 @@ +From 22e5474508093bcdde14e0f60d74ba7894307d72 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= +Date: Tue, 18 Nov 2025 20:37:19 -0500 +Subject: [PATCH 4/5] initscr is not used anywhere in lame sourcetree +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +check for used tgetent instead +check for separate tinfo library optionally built out from libncurses source tree, +like used in debian and gentoo +- ssuominen@g.o + +http://bugs.gentoo.org/454322 + +Signed-off-by: Hubert Figuière +--- + configure.in | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/configure.in b/configure.in +index 308b7ba..05b2fe7 100644 +--- a/configure.in ++++ b/configure.in +@@ -371,9 +371,10 @@ dnl Checks for libraries. + + AC_CHECK_HEADERS(termcap.h) + AC_CHECK_HEADERS(ncurses/termcap.h) +-AC_CHECK_LIB(termcap, initscr, HAVE_TERMCAP="termcap") +-AC_CHECK_LIB(curses, initscr, HAVE_TERMCAP="curses") +-AC_CHECK_LIB(ncurses, initscr, HAVE_TERMCAP="ncurses") ++AC_CHECK_LIB(termcap, tgetent, HAVE_TERMCAP="termcap") ++AC_CHECK_LIB(curses, tgetent, HAVE_TERMCAP="curses") ++AC_CHECK_LIB(ncurses, tgetent, HAVE_TERMCAP="ncurses") ++AC_CHECK_LIB(tinfo, tgetent, HAVE_TERMCAP="tinfo") + + AM_ICONV + +-- +2.51.0 + diff --git a/lame/0005-Update-autoconf.patch b/lame/0005-Update-autoconf.patch new file mode 100644 index 00000000..7121013d --- /dev/null +++ b/lame/0005-Update-autoconf.patch @@ -0,0 +1,81 @@ +From 850ca75cc47fef9ed3eb6dfe4e95b6ac715aa48f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= +Date: Tue, 18 Nov 2025 21:41:31 -0500 +Subject: [PATCH 5/5] Update autoconf +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Hubert Figuière +--- + configure.in | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +diff --git a/configure.in b/configure.in +index 05b2fe7..ecafb45 100644 +--- a/configure.in ++++ b/configure.in +@@ -17,9 +17,10 @@ dnl FRONTEND_LDFLAGS + dnl FRONTEND_CFLAGS + dnl FRONTEND_LDADD + +-AC_PREREQ(2.68) ++AC_PREREQ([2.72]) + AC_INIT([lame],[3.99.5],[lame-dev@lists.sf.net]) + AC_CONFIG_SRCDIR([libmp3lame/lame.c]) ++AC_CONFIG_MACRO_DIRS([m4]) + AC_LANG([C]) + + dnl check system +@@ -37,9 +38,9 @@ AM_MAINTAINER_MODE + AM_MAKE_INCLUDE + + dnl check environment +-AC_AIX +-AC_ISC_POSIX +-AC_MINIX ++AC_USE_SYSTEM_EXTENSIONS ++AC_SEARCH_LIBS([strerror],[cposix]) ++AC_USE_SYSTEM_EXTENSIONS + case $host_os in + *cygwin* ) CYGWIN=yes;; + * ) CYGWIN=no;; +@@ -47,7 +48,7 @@ esac + + dnl libtool + # AC_DISABLE_SHARED +-AC_PROG_LIBTOOL ++LT_INIT + AC_SUBST(LIBTOOL_DEPS) + CFLAGS="${ac_save_CFLAGS}" + +@@ -85,7 +86,6 @@ if test "${ac_cv_header_dmalloc_h}" = "yes"; then + fi + + dnl Checks for header files. +-AC_HEADER_STDC + AC_CHECK_HEADERS( \ + errno.h \ + fcntl.h \ +@@ -135,8 +135,8 @@ if test $ac_cv_sizeof_short -eq 0 \ + exit 1 + fi + +-AC_C_LONG_DOUBLE +-if test "${ac_cv_c_have_long_double}" = "yes" ; then ++AC_TYPE_LONG_DOUBLE_WIDER ++if test "${ac_cv_type_long_double_wider}" = "yes" ; then + AC_CHECK_SIZEOF(long double) + fi + +@@ -324,7 +324,6 @@ if test ${cross_compiling} = "yes"; then + fi + + AC_TYPE_SIZE_T +-AC_HEADER_TIME + + dnl Checks for library functions. + AC_FUNC_ALLOCA +-- +2.51.0 + diff --git a/lame/lame-3.99.5.json b/lame/lame-3.99.5.json index 3b431dca..dc396162 100644 --- a/lame/lame-3.99.5.json +++ b/lame/lame-3.99.5.json @@ -10,26 +10,21 @@ }, { "type": "patch", - "path": "lame-msse.patch" - }, - { - "type": "patch", - "path": "lame-gtk1-ac-directives.patch" - }, - { - "type": "patch", - "path": "lame-ansi2knr2devnull.patch" - }, - { - "type": "patch", - "path": "lame-tinfo.patch", - "strip-components": 0 + "paths": [ + "0001-Build-xmm_quantize_sub.c-with-msse.patch", + "0002-Include-GTK-1-autoconf-directives-in-build-system.patch", + "0003-Patch-out-remaining-ansi2knr.patch", + "0004-initscr-is-not-used-anywhere-in-lame-sourcetree.patch", + "0005-Update-autoconf.patch" + ] }, { "type": "script", "dest-filename": "autogen.sh", "commands": [ - "autoreconf -vfi" + "mkdir m4", + "cp /usr/share/gettext/m4/*.m4 m4", + "autoreconf -vfi -I m4" ] } ], diff --git a/lame/lame-msse.patch b/lame/lame-msse.patch deleted file mode 100644 index 4b71a2ed..00000000 --- a/lame/lame-msse.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: Build xmm_quantize_sub.c with -msse -Author: Sebastian Ramacher -Bug: http://sourceforge.net/p/lame/bugs/443/ -Bug-Debian: https://bugs.debian.org/760047 -Forwarded: http://sourceforge.net/p/lame/bugs/443/ -Last-Update: 2014-08-31 - ---- lame-3.99.5+repack1.orig/libmp3lame/vector/Makefile.am -+++ lame-3.99.5+repack1/libmp3lame/vector/Makefile.am -@@ -20,6 +20,7 @@ xmm_sources = xmm_quantize_sub.c - - if WITH_XMM - liblamevectorroutines_la_SOURCES = $(xmm_sources) -+liblamevectorroutines_la_CFLAGS = -msse - endif - - noinst_HEADERS = lame_intrin.h diff --git a/lame/lame-tinfo.patch b/lame/lame-tinfo.patch deleted file mode 100644 index cb570e78..00000000 --- a/lame/lame-tinfo.patch +++ /dev/null @@ -1,23 +0,0 @@ -initscr is not used anywhere in lame sourcetree, check for used tgetent instead -check for separate tinfo library optionally built out from libncurses source tree, -like used in debian and gentoo -- ssuominen@g.o - -http://bugs.gentoo.org/454322 - ---- configure.in -+++ configure.in -@@ -372,9 +372,10 @@ - - AC_CHECK_HEADERS(termcap.h) - AC_CHECK_HEADERS(ncurses/termcap.h) --AC_CHECK_LIB(termcap, initscr, HAVE_TERMCAP="termcap") --AC_CHECK_LIB(curses, initscr, HAVE_TERMCAP="curses") --AC_CHECK_LIB(ncurses, initscr, HAVE_TERMCAP="ncurses") -+AC_CHECK_LIB(termcap, tgetent, HAVE_TERMCAP="termcap") -+AC_CHECK_LIB(curses, tgetent, HAVE_TERMCAP="curses") -+AC_CHECK_LIB(ncurses, tgetent, HAVE_TERMCAP="ncurses") -+AC_CHECK_LIB(tinfo, tgetent, HAVE_TERMCAP="tinfo") - - AM_ICONV -