mixxx: fix build with gcc-6 and chromaprint-1.4
This commit is contained in:
parent
d59e168d51
commit
2e97310ae8
3 changed files with 78 additions and 1 deletions
33
srcpkgs/mixxx/patches/0007-fix_gcc6_issue.patch
Normal file
33
srcpkgs/mixxx/patches/0007-fix_gcc6_issue.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
From: "Matteo F. Vescovi" <mfv@debian.org>
|
||||
Date: Mon, 25 Jul 2016 22:17:43 +0200
|
||||
Subject: fix_gcc6_issue
|
||||
|
||||
---
|
||||
src/util/math.h | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/src/util/math.h b/src/util/math.h
|
||||
index 018335e..85971d1 100644
|
||||
--- src/util/math.h
|
||||
+++ src/util/math.h
|
||||
@@ -3,8 +3,20 @@
|
||||
|
||||
// Causes MSVC to define M_PI and friends.
|
||||
// http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
|
||||
+// Our SConscript defines this but check anyway.
|
||||
+#ifdef __WINDOWS__
|
||||
+#ifndef _USE_MATH_DEFINES
|
||||
#define _USE_MATH_DEFINES
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
+#include <math.h>
|
||||
#include <cmath>
|
||||
+// Note: Because of our fpclassify hack, we actualy need to inlude both,
|
||||
+// the c and the c++ version of the math header.
|
||||
+// From GCC 6.1.1 math.h depends on cmath, which failes to compile if included
|
||||
+// after our fpclassify hack
|
||||
+
|
||||
#include <algorithm>
|
||||
|
||||
#include "util/assert.h"
|
44
srcpkgs/mixxx/patches/0008-chromaprint-1.4.patch
Normal file
44
srcpkgs/mixxx/patches/0008-chromaprint-1.4.patch
Normal file
|
@ -0,0 +1,44 @@
|
|||
Description: chromaprint 1.4 compatibility
|
||||
Origin: upstream,
|
||||
https://github.com/mixxxdj/mixxx/commit/71f3e5d0adb5116a23f9163b045f3419b9056a08,
|
||||
https://github.com/mixxxdj/mixxx/commit/830e864384ee1c96272997ee3f1dae4f71b28f3e,
|
||||
https://github.com/mixxxdj/mixxx/commit/c5b4368fd228feee28af4fb32ab6fbfd3f29f212
|
||||
Last-Update: 2017-01-11
|
||||
|
||||
--- src/musicbrainz/chromaprinter.cpp
|
||||
+++ src/musicbrainz/chromaprinter.cpp
|
||||
@@ -5,6 +5,19 @@
|
||||
#include "musicbrainz/chromaprinter.h"
|
||||
#include "soundsourceproxy.h"
|
||||
|
||||
+namespace
|
||||
+{
|
||||
+ // 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
|
||||
+}
|
||||
+
|
||||
ChromaPrinter::ChromaPrinter(QObject* parent)
|
||||
: QObject(parent) {
|
||||
}
|
||||
@@ -57,12 +70,12 @@ QString ChromaPrinter::calcFingerPrint(c
|
||||
}
|
||||
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,
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'mixxx'
|
||||
pkgname=mixxx
|
||||
version=2.0.0
|
||||
revision=2
|
||||
revision=3
|
||||
hostmakedepends="scons pkg-config"
|
||||
makedepends="portaudio-devel libusb-devel libmad-devel protobuf-devel
|
||||
libid3tag-devel glu-devel taglib-devel opus-devel portmidi-devel
|
||||
|
|
Loading…
Reference in a new issue