summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2017-01-18 23:04:49 +0100
committerLars Wendler <polynomial-c@gentoo.org>2017-01-19 00:36:06 +0100
commit8a278563748e136559a6cc193ae3895c6412c882 (patch)
tree11818d9adeea7eefad34712261cc7ef2048e6868 /media-sound
parentsys-apps/noexec: clean up old. (diff)
downloadgentoo-8a278563748e136559a6cc193ae3895c6412c882.tar.gz
gentoo-8a278563748e136559a6cc193ae3895c6412c882.tar.bz2
gentoo-8a278563748e136559a6cc193ae3895c6412c882.zip
media-sound/mixxx: Fixed compilation with >=media-libs/chromaprint-1.4
Fixes Gentoo bug #604528 Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/mixxx/files/mixxx-2.0.0-chromaprint-1.4.patch40
-rw-r--r--media-sound/mixxx/mixxx-2.0.0-r3.ebuild3
2 files changed, 42 insertions, 1 deletions
diff --git a/media-sound/mixxx/files/mixxx-2.0.0-chromaprint-1.4.patch b/media-sound/mixxx/files/mixxx-2.0.0-chromaprint-1.4.patch
new file mode 100644
index 00000000000..77827f3d8d8
--- /dev/null
+++ b/media-sound/mixxx/files/mixxx-2.0.0-chromaprint-1.4.patch
@@ -0,0 +1,40 @@
+Backported chromaprint-1.4 API changes based on the fix suggested in:
+https://github.com/mixxxdj/mixxx/pull/1073
+
+and the work done by Charlie Gehlin in:
+https://bugs.gentoo.org/604528
+
+--- mixxx-2.0.0/src/musicbrainz/chromaprinter.cpp
++++ mixxx-2.0.0/src/musicbrainz/chromaprinter.cpp
+@@ -25,6 +25,16 @@
+
+ QString ChromaPrinter::calcFingerPrint(const Mixxx::SoundSourcePointer& pSoundSource) {
+
++ // Type declarations of *fprint and *encoded pointers need to account for Chromaprint API version
++ // (void* -> uint32_t*) and (void* -> char*) changed in versions v1.4.0 or later -- alyptik 12/2016
++ #if (CHROMAPRINT_VERSION_MINOR > 3) || (CHROMAPRINT_VERSION_MAJOR > 1)
++ typedef uint32_t* uint32_p;
++ typedef char* char_p;
++ #else
++ typedef void* uint32_p;
++ typedef void* char_p;
++ #endif
++
+ // this is worth 2min of audio, multiply by 2 because we have 2 channels
+ // AcoustID only stores a fingerprint for the first two minutes of a song
+ // on their server so we need only a fingerprint of the first two minutes
+@@ -57,12 +67,12 @@
+ }
+ chromaprint_finish(ctx);
+
+- void* fprint = NULL;
++ uint32_p fprint = NULL;
+ int size = 0;
+ int ret = chromaprint_get_raw_fingerprint(ctx, &fprint, &size);
+ QByteArray fingerprint;
+ if (ret == 1) {
+- void* encoded = NULL;
++ char_p encoded = NULL;
+ int encoded_size = 0;
+ chromaprint_encode_fingerprint(fprint, size,
+ CHROMAPRINT_ALGORITHM_DEFAULT,
diff --git a/media-sound/mixxx/mixxx-2.0.0-r3.ebuild b/media-sound/mixxx/mixxx-2.0.0-r3.ebuild
index 3856e2eb6d2..c9ae13ace70 100644
--- a/media-sound/mixxx/mixxx-2.0.0-r3.ebuild
+++ b/media-sound/mixxx/mixxx-2.0.0-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -70,6 +70,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.0.0-docs.patch
"${DISTDIR}"/${P}-ffmpeg30.patch
"${DISTDIR}"/${P}-ffmpeg31.patch
+ "${FILESDIR}"/${P}-chromaprint-1.4.patch #604528
)
src_prepare() {