Index | Thread | Search

From:
Antoine Jacoutot <ajacoutot@bsdfrog.org>
Subject:
Re: fix audio/lame for llvm22
To:
Matthieu Herrb <matthieu@herrb.eu>, Antoine Jacoutot <ajacoutot@openbsd.org>
Cc:
ports@openbsd.org
Date:
Sat, 16 May 2026 00:15:42 +0200

Download raw body.

Thread
On May 15, 2026 9:55:56 PM GMT+02:00, Matthieu Herrb <matthieu@herrb.eu> wrote:
>ok ?
>
>Index: Makefile
>===================================================================
>RCS file: /cvs/OpenBSD/ports/audio/lame/Makefile,v
>diff -u -p -u -r1.68 Makefile
>--- Makefile	13 Feb 2026 08:03:05 -0000	1.68
>+++ Makefile	15 May 2026 19:54:04 -0000
>@@ -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
> 
>Index: patches/patch-libmp3lame_id3tag_c
>===================================================================
>RCS file: patches/patch-libmp3lame_id3tag_c
>diff -N patches/patch-libmp3lame_id3tag_c
>--- /dev/null	1 Jan 1970 00:00:00 -0000
>+++ patches/patch-libmp3lame_id3tag_c	15 May 2026 19:54:04 -0000
>@@ -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 */
>+ }
>

Ok
--
Antoine