From 69f21cdf8869d4425e88dbeb376f9e8a7208acca Mon Sep 17 00:00:00 2001 From: matthieu Date: Sat, 16 May 2026 08:01:38 +0000 Subject: [PATCH] audio/lame: Fix build with llvm 22. ok aja@ --- audio/lame/Makefile | 1 + audio/lame/patches/patch-libmp3lame_id3tag_c | 47 ++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 audio/lame/patches/patch-libmp3lame_id3tag_c diff --git a/audio/lame/Makefile b/audio/lame/Makefile index f1cca397af3..ebd1ff1ee49 100644 --- a/audio/lame/Makefile +++ b/audio/lame/Makefile @@ -3,6 +3,7 @@ COMMENT= lame ain't an MP3 encoder # tarball generated from https://svn.code.sf.net/p/lame/svn/trunk/lame#revision=6531 DISTNAME= lame-3.101pre6531 +REVISION= 0 SHARED_LIBS += mp3lame 2.2 # 0.0 diff --git a/audio/lame/patches/patch-libmp3lame_id3tag_c b/audio/lame/patches/patch-libmp3lame_id3tag_c new file mode 100644 index 00000000000..da75769cb90 --- /dev/null +++ b/audio/lame/patches/patch-libmp3lame_id3tag_c @@ -0,0 +1,47 @@ +Fix build with llvm 22 + +Index: libmp3lame/id3tag.c +--- libmp3lame/id3tag.c.orig ++++ libmp3lame/id3tag.c +@@ -658,7 +658,7 @@ id3tag_set_genre_utf8(lame_t gfp, unsigned short const + return 0; + } + } +- ret = id3v2_add_utf8_lng(gfp, ID_GENRE, 0, text); ++ ret = id3v2_add_utf8_lng(gfp, ID_GENRE, 0, (const char *)text); + if (ret == 0) { + gfc->tag_spec.flags |= CHANGED_FLAG; + gfc->tag_spec.genre_id3v1 = GENRE_INDEX_OTHER; +@@ -1138,19 +1138,19 @@ id3tag_set_textinfo_utf8(lame_t gfp, char const *id, u + return 0; + } + if (frame_id == ID_TXXX || frame_id == ID_WXXX || frame_id == ID_COMMENT) { +- return id3tag_set_userinfo_utf8(gfp, frame_id, text); ++ return id3tag_set_userinfo_utf8(gfp, frame_id, (const char *)text); + } + if (frame_id == ID_GENRE) { + return id3tag_set_genre_utf8(gfp, text); + } + if (frame_id == ID_PCST) { +- return id3v2_add_utf8_lng(gfp, frame_id, 0, text); ++ return id3v2_add_utf8_lng(gfp, frame_id, 0, (const char *)text); + } + if (frame_id == ID_USER) { +- return id3v2_add_utf8_lng(gfp, frame_id, text, 0); ++ return id3v2_add_utf8_lng(gfp, frame_id, (const char *)text, 0); + } + if (frame_id == ID_WFED) { +- return id3v2_add_utf8_lng(gfp, frame_id, text, 0); /* iTunes expects WFED to be a text frame */ ++ return id3v2_add_utf8_lng(gfp, frame_id, (const char *)text, 0); /* iTunes expects WFED to be a text frame */ + } + if (isFrameIdMatching(frame_id, FRAME_ID('T', 0, 0, 0)) + ||isFrameIdMatching(frame_id, FRAME_ID('W', 0, 0, 0))) { +@@ -1159,7 +1159,7 @@ id3tag_set_textinfo_utf8(lame_t gfp, char const *id, u + return -2; /* must be Latin-1 encoded */ + } + #endif +- return id3v2_add_utf8_lng(gfp, frame_id, 0, text); ++ return id3v2_add_utf8_lng(gfp, frame_id, 0, (const char *)text); + } + return -255; /* not supported by now */ + }