media-libs/libid3tag: Fix build with gperf 3.1.
authorAlexis Ballier <aballier@gentoo.org>
Fri, 16 Jun 2017 10:37:04 +0000 (12:37 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Fri, 16 Jun 2017 10:37:04 +0000 (12:37 +0200)
https://bugs.gentoo.org/show_bug.cgi?id=605158
By Mihai Moldovan.

Package-Manager: Portage-2.3.6, Repoman-2.3.2

media-libs/libid3tag/files/libid3tag-0.15.1b-fix-signature.patch [new file with mode: 0644]
media-libs/libid3tag/libid3tag-0.15.1b-r4.ebuild

diff --git a/media-libs/libid3tag/files/libid3tag-0.15.1b-fix-signature.patch b/media-libs/libid3tag/files/libid3tag-0.15.1b-fix-signature.patch
new file mode 100644 (file)
index 0000000..a365811
--- /dev/null
@@ -0,0 +1,12 @@
+diff -pur libid3tag-0.15.1b-orig/compat.h libid3tag-0.15.1b/compat.h
+--- libid3tag-0.15.1b-orig/compat.h    2004-01-23 10:41:32.000000000 +0100
++++ libid3tag-0.15.1b/compat.h 2017-03-15 01:49:23.808834401 +0100
+@@ -34,7 +34,7 @@ struct id3_compat {
+ };
+ 
+ struct id3_compat const *id3_compat_lookup(register char const *,
+-                                         register unsigned int);
++                                         register size_t);
+ 
+ int id3_compat_fixup(struct id3_tag *);
+ 
index 8bd20c8236a0137743d9052b7c955a3f80cbff2d..f5b1ca4ed5782874198710bdc58ab35b6a35ea5a 100644 (file)
@@ -23,6 +23,10 @@ DEPEND="${RDEPEND}
 src_prepare() {
        epunt_cxx #74489
        epatch "${FILESDIR}/${PV}"/*.patch
+       # gperf 3.1 and newer generate code with a size_t length parameter,
+       # older versions are incompatible and take an unsigned int.
+       has_version '>=dev-util/gperf-3.1' && epatch "${FILESDIR}/${P}-fix-signature.patch"
+
        elibtoolize #sane .so versionning on fbsd and .so -> .so.version symlink
 }