cantata: make qtmultimedia and vlc optional

Upstream defaults vlc to off. Its only purpose is as an alternative to
QtMultimedia for "MPD HTTP stream playback" [1]. Similarly, provide a
toggle for qtmultimedia, in case somebody wants to disable HTTP stream
playback.

[1] efa907c8e0/CMakeLists.txt (L51)
This commit is contained in:
Cole Helbling 2020-03-30 10:10:23 -07:00
parent 570e3edc85
commit 23f4ac9150
No known key found for this signature in database
GPG Key ID: B37E0F2371016A4C

View File

@ -1,5 +1,5 @@
{ mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig, vlc
, qtbase, qtmultimedia, qtsvg, qttools
{ mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig
, qtbase, qtsvg, qttools
# Cantata doesn't build with cdparanoia enabled so we disable that
# default for now until I (or someone else) figure it out.
@ -9,12 +9,14 @@
, withMusicbrainz ? false, libmusicbrainz5
, withTaglib ? true, taglib, taglib_extras
, withHttpStream ? true, qtmultimedia
, withReplaygain ? true, ffmpeg, speex, mpg123
, withMtp ? true, libmtp
, withOnlineServices ? true
, withDevices ? true, udisks2
, withDynamic ? true
, withHttpServer ? true
, withLibVlc ? false, vlc
, withStreams ? true
}:
@ -26,6 +28,7 @@ assert withMtp -> withTaglib;
assert withMusicbrainz -> withCdda && withTaglib;
assert withOnlineServices -> withTaglib;
assert withReplaygain -> withTaglib;
assert withLibVlc -> withHttpStream;
let
version = "2.4.1";
@ -45,15 +48,17 @@ in mkDerivation {
sha256 = "0ix7xp352bziwz31mw79y7wxxmdn6060p8ry2px243ni1lz1qx1c";
};
buildInputs = [ vlc qtbase qtmultimedia qtsvg ]
buildInputs = [ qtbase qtsvg ]
++ lib.optionals withTaglib [ taglib taglib_extras ]
++ lib.optionals withReplaygain [ ffmpeg speex mpg123 ]
++ lib.optional withHttpStream qtmultimedia
++ lib.optional withCdda cdparanoia
++ lib.optional withCddb libcddb
++ lib.optional withLame lame
++ lib.optional withMtp libmtp
++ lib.optional withMusicbrainz libmusicbrainz5
++ lib.optional withUdisks udisks2;
++ lib.optional withUdisks udisks2
++ lib.optional withLibVlc vlc;
nativeBuildInputs = [ cmake pkgconfig qttools ];
@ -62,6 +67,7 @@ in mkDerivation {
cmakeFlags = lib.flatten [
(fstats withTaglib [ "TAGLIB" "TAGLIB_EXTRAS" ])
(fstats withReplaygain [ "FFMPEG" "MPG123" "SPEEXDSP" ])
(fstat withHttpStream "HTTP_STREAM_PLAYBACK")
(fstat withCdda "CDPARANOIA")
(fstat withCddb "CDDB")
(fstat withLame "LAME")
@ -71,6 +77,7 @@ in mkDerivation {
(fstat withDynamic "DYNAMIC")
(fstat withDevices "DEVICES_SUPPORT")
(fstat withHttpServer "HTTP_SERVER")
(fstat withLibVlc "LIBVLC")
(fstat withStreams "STREAMS")
(fstat withUdisks "UDISKS2")
"-DENABLE_HTTPS_SUPPORT=ON"