summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2016-12-26 17:13:27 +0100
committerLars Wendler <polynomial-c@gentoo.org>2016-12-26 17:13:27 +0100
commit38d0e53184badc23e1fa9f2d532f276b2f729e0f (patch)
tree9f7b9647136c1c564366fdd97932649aec859735 /media-sound/clementine
parentmedia-sound/clementine: update dependencies upon media-libs/libmygpo-qt (diff)
downloadgentoo-38d0e53184badc23e1fa9f2d532f276b2f729e0f.tar.gz
gentoo-38d0e53184badc23e1fa9f2d532f276b2f729e0f.tar.bz2
gentoo-38d0e53184badc23e1fa9f2d532f276b2f729e0f.zip
media-sound/clementine: Fixed building against >=media-libs/chromaprint-1.4
This fixes Gentoo bug #603662 Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'media-sound/clementine')
-rw-r--r--media-sound/clementine/clementine-1.3.1-r4.ebuild1
-rw-r--r--media-sound/clementine/files/clementine-chromaprint14.patch41
2 files changed, 42 insertions, 0 deletions
diff --git a/media-sound/clementine/clementine-1.3.1-r4.ebuild b/media-sound/clementine/clementine-1.3.1-r4.ebuild
index ed118c2e4001..a61c2fe0a121 100644
--- a/media-sound/clementine/clementine-1.3.1-r4.ebuild
+++ b/media-sound/clementine/clementine-1.3.1-r4.ebuild
@@ -95,6 +95,7 @@ S="${WORKDIR}/${MY_P^}"
PATCHES=(
"${FILESDIR}"/${PN}-1.3-fix-tokenizer.patch
"${FILESDIR}"/${P}-fix-desktop-file.patch
+ "${FILESDIR}"/${PN}-chromaprint14.patch #603662
)
src_prepare() {
diff --git a/media-sound/clementine/files/clementine-chromaprint14.patch b/media-sound/clementine/files/clementine-chromaprint14.patch
new file mode 100644
index 000000000000..bfdc49265aa3
--- /dev/null
+++ b/media-sound/clementine/files/clementine-chromaprint14.patch
@@ -0,0 +1,41 @@
+From ded312685735fc266d4154d355286eeb86db3bcd Mon Sep 17 00:00:00 2001
+From: Chocobozzz <florian.bigard@gmail.com>
+Date: Thu, 8 Dec 2016 23:12:17 +0100
+Subject: [PATCH] Add compatibility with chromaprint >= 1.4
+
+---
+ src/musicbrainz/chromaprinter.cpp | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/src/musicbrainz/chromaprinter.cpp b/src/musicbrainz/chromaprinter.cpp
+index 9579b62..c7ad99e 100644
+--- a/src/musicbrainz/chromaprinter.cpp
++++ b/src/musicbrainz/chromaprinter.cpp
+@@ -143,16 +143,24 @@ QString Chromaprinter::CreateFingerprint() {
+ ChromaprintContext* chromaprint =
+ chromaprint_new(CHROMAPRINT_ALGORITHM_DEFAULT);
+ chromaprint_start(chromaprint, kDecodeRate, kDecodeChannels);
+- chromaprint_feed(chromaprint, reinterpret_cast<void*>(data.data()),
++ chromaprint_feed(chromaprint, reinterpret_cast<int16_t *>(data.data()),
+ data.size() / 2);
+ chromaprint_finish(chromaprint);
+
+- void* fprint = nullptr;
+ int size = 0;
++
++#if CHROMAPRINT_VERSION_MAJOR >= 1 && CHROMAPRINT_VERSION_MINOR >= 4
++ u_int32_t *fprint = nullptr;
++ char *encoded = nullptr;
++#else
++ void *fprint = nullptr;
++ void *encoded = nullptr;
++#endif
++
+ int ret = chromaprint_get_raw_fingerprint(chromaprint, &fprint, &size);
++
+ QByteArray fingerprint;
+ if (ret == 1) {
+- void* encoded = nullptr;
+ int encoded_size = 0;
+ chromaprint_encode_fingerprint(fprint, size, CHROMAPRINT_ALGORITHM_DEFAULT,
+ &encoded, &encoded_size, 1);