Merge pull request #97464 from cole-h/cantata-perl
cantata: add perl for dynamic playlists
This commit is contained in:
commit
a899a97eb9
2 changed files with 32 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
{ mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig
|
{ mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig
|
||||||
, qtbase, qtsvg, qttools
|
, qtbase, qtsvg, qttools, perl
|
||||||
|
|
||||||
# Cantata doesn't build with cdparanoia enabled so we disable that
|
# Cantata doesn't build with cdparanoia enabled so we disable that
|
||||||
# default for now until I (or someone else) figure it out.
|
# default for now until I (or someone else) figure it out.
|
||||||
|
@ -38,6 +38,8 @@ let
|
||||||
|
|
||||||
withUdisks = (withTaglib && withDevices);
|
withUdisks = (withTaglib && withDevices);
|
||||||
|
|
||||||
|
perl' = perl.withPackages (ppkgs: [ ppkgs.URI ]);
|
||||||
|
|
||||||
in mkDerivation {
|
in mkDerivation {
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
|
@ -48,7 +50,18 @@ in mkDerivation {
|
||||||
sha256 = "0ix7xp352bziwz31mw79y7wxxmdn6060p8ry2px243ni1lz1qx1c";
|
sha256 = "0ix7xp352bziwz31mw79y7wxxmdn6060p8ry2px243ni1lz1qx1c";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ qtbase qtsvg ]
|
patches = [
|
||||||
|
# Cantata wants to check if perl is in the PATH at runtime, but we
|
||||||
|
# patchShebangs the playlists scripts, making that unnecessary (perl will
|
||||||
|
# always be available because it's a dependency)
|
||||||
|
./dont-check-for-perl-in-PATH.diff
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs playlists
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildInputs = [ qtbase qtsvg perl' ]
|
||||||
++ lib.optionals withTaglib [ taglib taglib_extras ]
|
++ lib.optionals withTaglib [ taglib taglib_extras ]
|
||||||
++ lib.optionals withReplaygain [ ffmpeg_3 speex mpg123 ]
|
++ lib.optionals withReplaygain [ ffmpeg_3 speex mpg123 ]
|
||||||
++ lib.optional withHttpStream qtmultimedia
|
++ lib.optional withHttpStream qtmultimedia
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/playlists/dynamicplaylists.cpp b/playlists/dynamicplaylists.cpp
|
||||||
|
index 07b6dce3..6a3f97c9 100644
|
||||||
|
--- a/playlists/dynamicplaylists.cpp
|
||||||
|
+++ b/playlists/dynamicplaylists.cpp
|
||||||
|
@@ -211,11 +211,6 @@ void DynamicPlaylists::start(const QString &name)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (Utils::findExe("perl").isEmpty()) {
|
||||||
|
- emit error(tr("You need to install \"perl\" on your system in order for Cantata's dynamic mode to function."));
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
QString fName(Utils::dataDir(rulesDir, false)+name+constExtension);
|
||||||
|
|
||||||
|
if (!QFile::exists(fName)) {
|
||||||
|
|
Loading…
Reference in a new issue