commit:     f8d12a03e7bceea94b214c8f981838931d546607
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Mon Oct  6 12:12:53 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct  8 05:50:54 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8d12a03

media-libs/libid3tag: fix cmake-4 / c23

Backport two patches from upstream

Closes: https://bugs.gentoo.org/952068
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/44066
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../libid3tag/files/libid3tag-0.16.3-cmake4.patch  | 10 +++++
 .../libid3tag/files/libid3tag-0.16.3-fix_c23.patch | 50 ++++++++++++++++++++++
 media-libs/libid3tag/libid3tag-0.16.3.ebuild       |  6 +++
 3 files changed, 66 insertions(+)

diff --git a/media-libs/libid3tag/files/libid3tag-0.16.3-cmake4.patch 
b/media-libs/libid3tag/files/libid3tag-0.16.3-cmake4.patch
new file mode 100644
index 000000000000..952a503661a4
--- /dev/null
+++ b/media-libs/libid3tag/files/libid3tag-0.16.3-cmake4.patch
@@ -0,0 +1,10 @@
+fix cmake-4 compat, patch from upstream, see https://bugs.gentoo.org/952068
+https://codeberg.org/tenacityteam/libid3tag/commit/eee94b22508a066f7b9bc1ae05d2d85982e73959.patch
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.1.0)
++cmake_minimum_required(VERSION 3.10)
+ project(id3tag VERSION 0.16.3)
+ 
+ option(BUILD_SHARED_LIBS "Build dynamic library" ON)

diff --git a/media-libs/libid3tag/files/libid3tag-0.16.3-fix_c23.patch 
b/media-libs/libid3tag/files/libid3tag-0.16.3-fix_c23.patch
new file mode 100644
index 000000000000..5cc8448520b2
--- /dev/null
+++ b/media-libs/libid3tag/files/libid3tag-0.16.3-fix_c23.patch
@@ -0,0 +1,50 @@
+fix c23, patch from upstream
+https://codeberg.org/tenacityteam/libid3tag/commit/bf4fed66ae44174c32936c0eb5c74ff29b0f4b33.patch
+--- a/compat.c
++++ b/compat.c
+@@ -88,9 +88,7 @@ inline
+ #endif
+ #endif
+ static unsigned int
+-hash (str, len)
+-     register const char *str;
+-     register unsigned int len;
++hash (register const char* str, register unsigned int len)
+ {
+   static const unsigned char asso_values[] =
+     {
+@@ -145,9 +143,7 @@ hash (str, len)
+ __inline
+ #endif
+ const struct id3_compat *
+-id3_compat_lookup (str, len)
+-     register const char *str;
+-     register size_t len;
++id3_compat_lookup(register const char *str, register size_t len)
+ {
+   static const struct id3_compat wordlist[] =
+     {
+--- a/frametype.c
++++ b/frametype.c
+@@ -311,9 +311,7 @@ inline
+ #endif
+ #endif
+ static unsigned int
+-hash (str, len)
+-     register const char *str;
+-     register unsigned int len;
++hash(register const char *str, register unsigned int len)
+ {
+   static const unsigned char asso_values[] =
+     {
+@@ -351,9 +349,7 @@ hash (str, len)
+ __inline
+ #endif
+ const struct id3_frametype *
+-id3_frametype_lookup (str, len)
+-     register const char *str;
+-     register size_t len;
++id3_frametype_lookup(register const char *str, register size_t len)
+ {
+   static const struct id3_frametype wordlist[] =
+     {

diff --git a/media-libs/libid3tag/libid3tag-0.16.3.ebuild 
b/media-libs/libid3tag/libid3tag-0.16.3.ebuild
index ec737f790219..bdda43680e06 100644
--- a/media-libs/libid3tag/libid3tag-0.16.3.ebuild
+++ b/media-libs/libid3tag/libid3tag-0.16.3.ebuild
@@ -16,3 +16,9 @@ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc 
ppc64 ~riscv ~s390
 
 RDEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
 DEPEND="${RDEPEND}"
+
+PATCHES=(
+       # patches from upstream
+       "${FILESDIR}"/${P}-cmake4.patch
+       "${FILESDIR}"/${P}-fix_c23.patch
+)

Reply via email to