135.6. lame-4.0
LAME MP3 encoder
4.0-1 · LGPL-2.0-or-later · 0.5 SBU · 732.4 KiB, 9 files · 41_system, 23 of 1047 · ports/core/audio-codecs/lame
Homepage: https://lame.sourceforge.io/
Why it is in KDOS. The comment above the 5 ports from libogg to lame in script/phases/41_system/packages.d/audio-codecs.txt:
ffmpeg, libsndfile and the gst plugin packages are configured against these and are only as capable as what is installed: each of those build systems answers a missing library by disabling the feature rather than failing. One encoder per format — adding a second earns nothing.
LAME is the MP3 encoder: the library libmp3lame and the lame command. ffmpeg, libsndfile, gst-plugins-good, sox, audacity, k3b and handbrake write MP3 through the library. It decodes MP3 too, through mpg123, for lame --decode, MP3 input and its hip_* decoding API.
Required by (18): audacious-plugins, audacity, audex, audiocd-kio, avidemux, cdrdao, ffmpeg, gst-plugins-good, handbrake, k3b, kwave, libsndfile, lmms, mpd, musescore, sox, tenacity, vice.
Sources: lame-4.0.tar.gz (1.4 MiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install lame'
build.sh:
export CFLAGS="$CFLAGS -Wno-implicit-function-declaration -Wno-implicit-int \
-Wno-int-conversion -Wno-incompatible-pointer-types"
./configure --prefix=/usr --libdir=/usr/lib --enable-static \
--enable-nasm=no \
--enable-frontend \
--enable-decoder \
--disable-gtktest
make
make DESTDIR=$PKG install
rm -f "$PKG/usr/lib/libmp3lame.a"
-Wno-implicit-function-declaration— with-Wno-implicit-int,-Wno-int-conversionand-Wno-incompatible-pointer-types: turn off the four diagnostics that GCC 14 and later report as errors by default (see Newer-compiler diagnostics as errors).--enable-static— buildlibmp3lame.aas well as the shared library, for thelameprogram alone;build.shdeletes the archive after the install. With the decoder on,lamecallship_finish_pinfo, whichlibmp3lame.symleaves out of the shared library’s exports, solamecannot link againstlibmp3lame.so. configure links the programs with libtool’s-staticunless--enable-dynamic-frontendsis given, so with the archive presentlametakes the library from it.--enable-nasm=no— changes nothing in this build. Upstream’sAC_ARG_ENABLE(nasm, …)setsASM_FOR_ARCH=i386whenever the switch is given,noincluded. The assembly routines stay out because they are written for i386 alone, and the build log sayschecking for assembler routines for this processor type... no.--enable-frontend— build thelamecommand, configure’s default, named.--enable-decoder— decode through mpg123, configure’s default, named. With it on, configure stops whenlibmpg123is missing instead of building without the decoder.--disable-gtktest— skip the test program configure compiles and runs against GTK 1.2, which only themp3xframe analyser uses and which is not a port.
Programs: lame.
Libraries: libmp3lame.so.
Directories: /usr/include/lame, /usr/share/licenses/lame.
The lame command reads the terminal’s capabilities through the termcap functions of ncurses (tgetent, tgetstr) for its console output, and configure links ncurses whenever it finds it, so ncurses is in depends; the installed lame needs libncursesw.so.6.