clementine: Add Spotify buildoption and fix musl

This commit is contained in:
John 2017-09-22 22:05:04 +02:00
parent d5fc6f2387
commit f80e970cbf
3 changed files with 76 additions and 3 deletions

View File

@ -0,0 +1,20 @@
--- a/logging.cpp 2017-09-22 21:33:36.030774014 +0200
+++ b/ext/libclementine-common/core/logging.cpp 2017-09-22 21:35:34.327766268 +0200
@@ -21,7 +21,7 @@
#include <QtGlobal>
#include <cxxabi.h>
-#ifdef Q_OS_UNIX
+#if defined Q_OS_UNIX && defined __GLIBC__
#include <execinfo.h>
#endif
@@ -249,7 +249,7 @@
}
void DumpStackTrace() {
-#ifdef Q_OS_UNIX
+#if defined Q_OS_UNIX && defined __GLIBC__
void* callstack[128];
int callstack_size =
backtrace(reinterpret_cast<void**>(&callstack), sizeof(callstack));

View File

@ -0,0 +1,42 @@
--- a/gstenginepipeline.cpp 2017-09-22 23:13:31.520359890 +0200
+++ b/src/engines/gstenginepipeline.cpp 2017-09-22 23:14:31.837362189 +0200
@@ -375,7 +375,7 @@
// Link the elements with special caps
// The scope path through the tee gets 16-bit ints.
GstCaps* caps16 = gst_caps_new_simple("audio/x-raw", "format", G_TYPE_STRING,
- "S16LE", NULL);
+ "S16LE", (char*)0);
gst_element_link_filtered(probe_converter, probe_sink, caps16);
gst_caps_unref(caps16);
--- a/chromaprinter.cpp 2017-09-22 23:18:59.324372383 +0200
+++ b/src/musicbrainz/chromaprinter.cpp 2017-09-22 23:19:35.520373762 +0200
@@ -78,7 +78,7 @@
// Chromaprint expects mono 16-bit ints at a sample rate of 11025Hz.
GstCaps* caps = gst_caps_new_simple(
"audio/x-raw", "format", G_TYPE_STRING, "S16LE", "channels", G_TYPE_INT,
- kDecodeChannels, "rate", G_TYPE_INT, kDecodeRate, NULL);
+ kDecodeChannels, "rate", G_TYPE_INT, kDecodeRate, (char*)0);
gst_element_link_filtered(resample, sink, caps);
gst_caps_unref(caps);
--- a/cddasongloader.cpp 2017-09-22 23:25:22.975387004 +0200
+++ b/src/devices/cddasongloader.cpp 2017-09-22 23:25:59.774388406 +0200
@@ -62,7 +62,7 @@
nullptr);
}
if (g_object_class_find_property (G_OBJECT_GET_CLASS (cdda_), "paranoia-mode")) {
- g_object_set (cdda_, "paranoia-mode", 0, NULL);
+ g_object_set (cdda_, "paranoia-mode", 0, (char*)0);
}
// Change the element's state to ready and paused, to be able to query it
@@ -106,7 +106,7 @@
GstElement* pipeline = gst_pipeline_new("pipeline");
GstElement* sink = gst_element_factory_make ("fakesink", NULL);
- gst_bin_add_many (GST_BIN (pipeline), cdda_, sink, NULL);
+ gst_bin_add_many (GST_BIN (pipeline), cdda_, sink, (char*)0);
gst_element_link (cdda_, sink);
gst_element_set_state(pipeline, GST_STATE_READY);
gst_element_set_state(pipeline, GST_STATE_PAUSED);

View File

@ -1,14 +1,14 @@
# Template file for 'clementine'
pkgname=clementine
version=1.3.1
revision=8
revision=9
patch_args="-Np1"
build_style=cmake
hostmakedepends="sparsehash pkg-config"
makedepends="chromaprint-devel boost-devel gst-plugins-base1-devel liblastfm-devel
qt-webkit-devel glew-devel qjson-devel sqlite-devel protobuf-devel libplist-devel
libusbmuxd-devel libmtp-devel libcdio-devel qca-devel pulseaudio-devel glu-devel
taglib-devel crypto++-devel libspotify-devel libechonest-devel"
taglib-devel crypto++-devel $(vopt_if spotify libspotify-devel) libechonest-devel"
depends="desktop-file-utils"
short_desc="A modern music player and library organizer"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
@ -18,13 +18,24 @@ wrksrc="Clementine-$version"
distfiles="https://github.com/clementine-player/Clementine/archive/$version.tar.gz"
checksum=f885931a9ab7c88607d07b50c64fcce46fc05f13dd2c0a04188c94eff938f37c
build_options="spotify"
case "$XBPS_TARGET_MACHINE" in
x86_64 | i686 | armv6l | armv7l)
build_options_default="spotify";;
*)
build_options_default="";;
esac
subpackages="$(vopt_if spotify clementine-spotify)"
pre_configure() {
sed -i 's|AMAZON_CLOUD_DRIVE OFF|AMAZON_CLOUD_DRIVE ON|g' CMakeLists.txt
sed -i 's;if (fs == NULL);if (!fs);' 3rdparty/libprojectm/MilkdropPresetFactory/Parser.cpp
}
post_install() {
rm -r $DESTDIR/builddir
$(vopt_if spotify rm\ -r\ $DESTDIR/builddir)
}
clementine-spotify_package() {