1 |
commit: 38d0e53184badc23e1fa9f2d532f276b2f729e0f |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 26 16:13:27 2016 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 26 16:13:27 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38d0e531 |
7 |
|
8 |
media-sound/clementine: Fixed building against >=media-libs/chromaprint-1.4 |
9 |
|
10 |
This fixes Gentoo bug #603662 |
11 |
|
12 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
13 |
|
14 |
media-sound/clementine/clementine-1.3.1-r4.ebuild | 1 + |
15 |
.../files/clementine-chromaprint14.patch | 41 ++++++++++++++++++++++ |
16 |
2 files changed, 42 insertions(+) |
17 |
|
18 |
diff --git a/media-sound/clementine/clementine-1.3.1-r4.ebuild b/media-sound/clementine/clementine-1.3.1-r4.ebuild |
19 |
index ed118c2..a61c2fe 100644 |
20 |
--- a/media-sound/clementine/clementine-1.3.1-r4.ebuild |
21 |
+++ b/media-sound/clementine/clementine-1.3.1-r4.ebuild |
22 |
@@ -95,6 +95,7 @@ S="${WORKDIR}/${MY_P^}" |
23 |
PATCHES=( |
24 |
"${FILESDIR}"/${PN}-1.3-fix-tokenizer.patch |
25 |
"${FILESDIR}"/${P}-fix-desktop-file.patch |
26 |
+ "${FILESDIR}"/${PN}-chromaprint14.patch #603662 |
27 |
) |
28 |
|
29 |
src_prepare() { |
30 |
|
31 |
diff --git a/media-sound/clementine/files/clementine-chromaprint14.patch b/media-sound/clementine/files/clementine-chromaprint14.patch |
32 |
new file mode 100644 |
33 |
index 00000000..bfdc492 |
34 |
--- /dev/null |
35 |
+++ b/media-sound/clementine/files/clementine-chromaprint14.patch |
36 |
@@ -0,0 +1,41 @@ |
37 |
+From ded312685735fc266d4154d355286eeb86db3bcd Mon Sep 17 00:00:00 2001 |
38 |
+From: Chocobozzz <florian.bigard@×××××.com> |
39 |
+Date: Thu, 8 Dec 2016 23:12:17 +0100 |
40 |
+Subject: [PATCH] Add compatibility with chromaprint >= 1.4 |
41 |
+ |
42 |
+--- |
43 |
+ src/musicbrainz/chromaprinter.cpp | 14 +++++++++++--- |
44 |
+ 1 file changed, 11 insertions(+), 3 deletions(-) |
45 |
+ |
46 |
+diff --git a/src/musicbrainz/chromaprinter.cpp b/src/musicbrainz/chromaprinter.cpp |
47 |
+index 9579b62..c7ad99e 100644 |
48 |
+--- a/src/musicbrainz/chromaprinter.cpp |
49 |
++++ b/src/musicbrainz/chromaprinter.cpp |
50 |
+@@ -143,16 +143,24 @@ QString Chromaprinter::CreateFingerprint() { |
51 |
+ ChromaprintContext* chromaprint = |
52 |
+ chromaprint_new(CHROMAPRINT_ALGORITHM_DEFAULT); |
53 |
+ chromaprint_start(chromaprint, kDecodeRate, kDecodeChannels); |
54 |
+- chromaprint_feed(chromaprint, reinterpret_cast<void*>(data.data()), |
55 |
++ chromaprint_feed(chromaprint, reinterpret_cast<int16_t *>(data.data()), |
56 |
+ data.size() / 2); |
57 |
+ chromaprint_finish(chromaprint); |
58 |
+ |
59 |
+- void* fprint = nullptr; |
60 |
+ int size = 0; |
61 |
++ |
62 |
++#if CHROMAPRINT_VERSION_MAJOR >= 1 && CHROMAPRINT_VERSION_MINOR >= 4 |
63 |
++ u_int32_t *fprint = nullptr; |
64 |
++ char *encoded = nullptr; |
65 |
++#else |
66 |
++ void *fprint = nullptr; |
67 |
++ void *encoded = nullptr; |
68 |
++#endif |
69 |
++ |
70 |
+ int ret = chromaprint_get_raw_fingerprint(chromaprint, &fprint, &size); |
71 |
++ |
72 |
+ QByteArray fingerprint; |
73 |
+ if (ret == 1) { |
74 |
+- void* encoded = nullptr; |
75 |
+ int encoded_size = 0; |
76 |
+ chromaprint_encode_fingerprint(fprint, size, CHROMAPRINT_ALGORITHM_DEFAULT, |
77 |
+ &encoded, &encoded_size, 1); |