From be5ffe0b43bc96a60dcc750a45ba7d518adf4968 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Fri, 4 Sep 2026 15:56:49 +0300 Subject: [PATCH] Update package version to 4.0 --- info.yml | 13 ++++++++++--- recipe.sh | 15 +++++++-------- .../lame-cbr-abr-quality-settings-clamp.patch | 19 +++++++++++++++++++ source-files/lame-symbols.patch | 15 +++++++++++++++ 4 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 source-files/lame-cbr-abr-quality-settings-clamp.patch create mode 100644 source-files/lame-symbols.patch diff --git a/info.yml b/info.yml index 8419f1a..b178b93 100644 --- a/info.yml +++ b/info.yml @@ -1,14 +1,21 @@ name: lame description: high quality MPEG Audio Layer III (MP3) encoder -version: "3.100" -revision: 2 +version: "4.0" +revision: 1 url: http://lame.sourceforge.net/ -license: LGPL +license: LGPL-2.0-only maintainers: - enumdev@enumerated.dev architecture: any type: source depends: + - glibc + - mpg123 - ncurses make_depends: - nasm +downloads: + - url: https://downloads.sourceforge.net/project/lame/lame/${BPM_PKG_VERSION}/lame-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 3df5124d5ad3a98312ffd7ba6a9b36230e4f8a3e66d3ce0f425e336c32d216eb diff --git a/recipe.sh b/recipe.sh index 170a3fc..0276bcf 100644 --- a/recipe.sh +++ b/recipe.sh @@ -2,19 +2,19 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -DOWNLOAD="https://downloads.sourceforge.net/lame/lame-${BPM_PKG_VERSION}.tar.gz" -FILENAME="${DOWNLOAD##*/}" - # The prepare function is executed in the root of the temp directory -# This function is used for downloading files and putting them into the correct location +# This function is used for putting downloaded files to the correct location or applying patches prepare() { - wget "$DOWNLOAD" - tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" + cd "$BPM_SOURCE" + patch -Np1 -i "$BPM_WORKDIR"/lame-symbols.patch + patch -Np1 -i "$BPM_WORKDIR"/lame-cbr-abr-quality-settings-clamp.patch + autoreconf -fi -I /usr/share/gettext/m4 } # The build function is executed in the source directory # This function is used to compile the source code build() { + export CFLAGS="$CFLAGS -Wno-implicit-function-declaration -Wno-incompatible-pointer-types" ./configure --prefix=/usr --enable-mp3rtp --enable-nasm --disable-static make } @@ -30,6 +30,5 @@ check() { package() { make DESTDIR="$BPM_OUTPUT" install - install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/lame/LICENSE - install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/lame/COPYING + install -Dm644 "$BPM_SOURCE"/{LICENSE,COPYING} -t "$BPM_OUTPUT"/usr/share/licenses/lame } diff --git a/source-files/lame-cbr-abr-quality-settings-clamp.patch b/source-files/lame-cbr-abr-quality-settings-clamp.patch new file mode 100644 index 0000000..4b29e0c --- /dev/null +++ b/source-files/lame-cbr-abr-quality-settings-clamp.patch @@ -0,0 +1,19 @@ +Description: CBR: High quality settings (e.g, -q 0) degrade quality over -q 4 +Origin: https://sourceforge.net/p/lame/bugs/516/#a26d +Forwarded: https://sourceforge.net/p/lame/bugs/516/ + +--- a/libmp3lame/lame.c ++++ b/libmp3lame/lame.c +@@ -1050,6 +1050,11 @@ lame_init_params(lame_global_flags * gfp + if (gfp->quality < 0) + gfp->quality = LAME_DEFAULT_QUALITY; + ++ /* VBR and ABR don't give good results with noise shaping ++ * settings used in quality levels below 4. ++ */ ++ if (gfp->quality < 4) ++ gfp->quality = 4; + + if (cfg->vbr == vbr_off) + (void) lame_set_VBR_mean_bitrate_kbps(gfp, gfp->brate); + diff --git a/source-files/lame-symbols.patch b/source-files/lame-symbols.patch new file mode 100644 index 0000000..56bdc05 --- /dev/null +++ b/source-files/lame-symbols.patch @@ -0,0 +1,15 @@ +Description: Add missing symbol(s) to library symbol file +Author: Fabian Greffrath +Forwarded: https://sourceforge.net/p/lame/bugs/515/ + +--- a/include/libmp3lame.sym ++++ b/include/libmp3lame.sym +@@ -193,6 +193,7 @@ hip_decode_headers + hip_decode1 + hip_decode1_headers + hip_decode1_headersB ++hip_finish_pinfo + lame_decode_init + lame_decode + lame_decode_headers +