1
0
forked from ports/contrib

clementine: fix compilation

This commit is contained in:
Danny Rawlins 2017-06-19 23:12:38 +10:00
parent 443d6a812a
commit a2dcca25aa
5 changed files with 76 additions and 4 deletions

View File

@ -1 +1,3 @@
04ce1c102841282e620d4caae2a897a2 1.3.1.tar.gz
885e76a182935bccdf1a453b3be65b3b clementine-1.3.1-chromaprint-1.4.0.patch
725df5c9ce58e7dcfd9592a976200812 clementine-gcc6.patch

View File

@ -1,5 +1,7 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF36EAFGVpKDu/PxPQCPv03XnLg25xTY7VqjqEiIyDQB0J8FPceg3gLvyd7p2jOSKvrdtTExMf54ypdGTL7sKTmww=
SHA256 (Pkgfile) = 35bbde450d604d0640e32e20fd8672e0ce316d3b124430678ddaa7d2731f3696
RWSagIOpLGJF3xz0/DEuUoAUhNEXyPZ6UDVUAl0ZzrdFcb6p+guHeDt4VzX1t7DU270AMh8fd5l2vxQHYYgS6LcAdsCE4l2Z6Qs=
SHA256 (Pkgfile) = 02f4bdd561452ac3796b3d813a6f81fba7d8b192978fc3c223d78ad1e4736efc
SHA256 (.footprint) = 3f1bad4230e6fa52cf3322aee039d5ce640d26e8fbe4aac8df657f1b7ad8938b
SHA256 (1.3.1.tar.gz) = f885931a9ab7c88607d07b50c64fcce46fc05f13dd2c0a04188c94eff938f37c
SHA256 (clementine-gcc6.patch) = 05bd4dc0138eed084332fa1a688a96858418731f337f54e0d8ab0853123f40ee
SHA256 (clementine-1.3.1-chromaprint-1.4.0.patch) = 4cc9c9df599df4a595c6acf4e129a54296c0a8e537627435e3df14e1e95447b0

View File

@ -6,12 +6,17 @@
name=clementine
version=1.3.1
release=1
source=(https://github.com/clementine-player/Clementine/archive/$version.tar.gz)
release=2
source=(https://github.com/clementine-player/Clementine/archive/$version.tar.gz
clementine-gcc6.patch
clementine-1.3.1-chromaprint-1.4.0.patch)
build() {
cd Clementine-$version
patch -p1 -i $SRC/clementine-gcc6.patch
patch -p1 -i $SRC/clementine-1.3.1-chromaprint-1.4.0.patch
install -d build
cd build

View File

@ -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 9579b62ae..c7ad99e2e 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);

View File

@ -0,0 +1,22 @@
From e31278c05666f8ae0e819bd831c65e8766ba2679 Mon Sep 17 00:00:00 2001
From: Bigard Florian <florian.bigard@gmail.com>
Date: Mon, 9 May 2016 11:55:34 +0200
Subject: [PATCH] Fix projectm compilation with GCC 6 (#5371)
---
3rdparty/libprojectm/CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/3rdparty/libprojectm/CMakeLists.txt b/3rdparty/libprojectm/CMakeLists.txt
index e6287f176..0ef785c49 100644
--- a/3rdparty/libprojectm/CMakeLists.txt
+++ b/3rdparty/libprojectm/CMakeLists.txt
@@ -24,6 +24,8 @@ set(BUILD_PROJECTM_STATIC ON)
set(DISABLE_NATIVE_PRESETS ON)
set(DISABLE_MILKDROP_PRESETS OFF)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98")
+
if(DISABLE_NATIVE_PRESETS)
ADD_DEFINITIONS(-DDISABLE_NATIVE_PRESETS)
endif(DISABLE_NATIVE_PRESETS)