summary refs log tree commit diff
path: root/pkgs/development/libraries/phonon
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-11-24 10:07:55 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2019-11-24 10:07:55 +0100
commitab0a828662c4c6a8535b630081a67c20286099ab (patch)
treed172e1d2739947b35ecd23890c4f6f8ef0d585be /pkgs/development/libraries/phonon
parent65edeb8633de16792a84195f77a6b4ea408e2608 (diff)
parent2dea86498412e797b8bf43ca38ebb2a7f9e5766b (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/development/libraries/phonon')
-rw-r--r--pkgs/development/libraries/phonon/backends/gstreamer.nix41
-rw-r--r--pkgs/development/libraries/phonon/backends/vlc.nix45
-rw-r--r--pkgs/development/libraries/phonon/default.nix42
3 files changed, 63 insertions, 65 deletions
diff --git a/pkgs/development/libraries/phonon/backends/gstreamer.nix b/pkgs/development/libraries/phonon/backends/gstreamer.nix
index ef7633dadaf36..d9267827e779a 100644
--- a/pkgs/development/libraries/phonon/backends/gstreamer.nix
+++ b/pkgs/development/libraries/phonon/backends/gstreamer.nix
@@ -1,21 +1,13 @@
 { stdenv, lib, fetchurl, cmake, gst_all_1, phonon, pkgconfig
-, extra-cmake-modules, qtbase ? null, qtx11extras ? null, qt4 ? null
-, withQt5 ? false
+, extra-cmake-modules, qttools, qtbase, qtx11extras
 , debug ? false
 }:
 
 with lib;
 
-let
-  v = "4.9.0";
+stdenv.mkDerivation rec {
   pname = "phonon-backend-gstreamer";
-in
-
-assert withQt5 -> qtbase != null;
-assert withQt5 -> qtx11extras != null;
-
-stdenv.mkDerivation {
-  name = "${pname}-${if withQt5 then "qt5" else "qt4"}-${v}";
+  version = "4.10.0";
 
   meta = with stdenv.lib; {
     homepage = https://phonon.kde.org/;
@@ -26,8 +18,8 @@ stdenv.mkDerivation {
   };
 
   src = fetchurl {
-    url = "mirror://kde/stable/phonon/${pname}/${v}/${pname}-${v}.tar.xz";
-    sha256 = "1wc5p1rqglf0n1avp55s50k7fjdzdrhg0gind15k8796w7nfbhyf";
+    url = "mirror://kde/stable/phonon/${pname}/${version}/${pname}-${version}.tar.xz";
+    sha256 = "1wk1ip2w7fkh65zk6rilj314dna0hgsv2xhjmpr5w08xa8sii1y5";
   };
 
   # Hardcode paths to useful plugins so the backend doesn't depend
@@ -52,17 +44,26 @@ stdenv.mkDerivation {
       ''-DGST_PLUGIN_PATH_1_0="${gstPluginPaths}"''
     ];
 
-  buildInputs = with gst_all_1;
-    [ gstreamer gst-plugins-base phonon ]
-    ++ (if withQt5 then [ qtbase qtx11extras ] else [ qt4 ]);
+  buildInputs = with gst_all_1; [
+    gstreamer
+    gst-plugins-base
+    phonon
+    qtbase
+    qtx11extras
+  ];
 
   # cleanup: the build system creates (empty) $out/$out/share/icons (double prefix)
   # if DESTDIR is unset
   DESTDIR="/";
 
-  nativeBuildInputs = [ cmake pkgconfig ] ++ optional withQt5 extra-cmake-modules;
+  nativeBuildInputs = [
+    cmake
+    pkgconfig
+    extra-cmake-modules
+    qttools
+  ];
 
-  cmakeFlags =
-    [ "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" ]
-    ++ optional withQt5 "-DPHONON_BUILD_PHONON4QT5=ON";
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}"
+  ];
 }
diff --git a/pkgs/development/libraries/phonon/backends/vlc.nix b/pkgs/development/libraries/phonon/backends/vlc.nix
index 98c6be85672c3..9ed137e4f4508 100644
--- a/pkgs/development/libraries/phonon/backends/vlc.nix
+++ b/pkgs/development/libraries/phonon/backends/vlc.nix
@@ -1,22 +1,13 @@
 { stdenv, lib, fetchurl, cmake, phonon, pkgconfig, vlc
-, extra-cmake-modules, qtbase ? null, qtx11extras ? null, qt4 ? null
-, withQt4 ? false
+, extra-cmake-modules, qttools, qtbase, qtx11extras
 , debug ? false
 }:
 
 with lib;
 
-let
-  v = "0.10.2";
+stdenv.mkDerivation rec {
   pname = "phonon-backend-vlc";
-in
-
-assert withQt4 -> qt4 != null;
-assert !withQt4 -> qtbase != null;
-assert !withQt4 -> qtx11extras != null;
-
-stdenv.mkDerivation {
-  name = "${pname}-${if withQt4 then "qt4" else "qt5"}-${v}";
+  version = "0.11.1";
 
   meta = with stdenv.lib; {
     homepage = https://phonon.kde.org/;
@@ -26,17 +17,25 @@ stdenv.mkDerivation {
   };
 
   src = fetchurl {
-    url = "mirror://kde/stable/phonon/${pname}/${v}/${pname}-${v}.tar.xz";
-    sha256 = "163jqq5p9n0yfw2fqk0cqn3c6mqycxsvc4956zhkw5345g81a2a9";
+    url = "mirror://kde/stable/phonon/${pname}/${version}/${pname}-${version}.tar.xz";
+    sha256 = "1vp52i5996khpxs233an7mlrzdji50gcs58ig8nrwfwlgyb1xnfc";
   };
 
-  buildInputs =
-    [ phonon vlc ]
-    ++ (if withQt4 then [ qt4 ] else [ qtbase qtx11extras ]);
-
-  nativeBuildInputs = [ cmake pkgconfig ] ++ optional (!withQt4) extra-cmake-modules;
-
-  cmakeFlags =
-    [ "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" ]
-    ++ optional (!withQt4) "-DPHONON_BUILD_PHONON4QT5=ON";
+  buildInputs = [
+    phonon
+    vlc
+    qtbase
+    qtx11extras
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkgconfig
+    qttools
+    extra-cmake-modules
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}"
+  ];
 }
diff --git a/pkgs/development/libraries/phonon/default.nix b/pkgs/development/libraries/phonon/default.nix
index dd163571a1bde..dbd87a822c1d0 100644
--- a/pkgs/development/libraries/phonon/default.nix
+++ b/pkgs/development/libraries/phonon/default.nix
@@ -1,22 +1,17 @@
 { stdenv, lib, fetchurl, cmake, libGLU_combined, pkgconfig, libpulseaudio
-, qt4 ? null, extra-cmake-modules ? null, qtbase ? null, qttools ? null
-, withQt5 ? false
+, extra-cmake-modules, qtbase, qttools
 , debug ? false }:
 
 with lib;
 
 let
-  v = "4.11.1";
-
-  soname = if withQt5 then "phonon4qt5" else "phonon";
+  soname = "phonon4qt5";
   buildsystemdir = "share/cmake/${soname}";
 in
 
-assert withQt5 -> qtbase != null;
-assert withQt5 -> qttools != null;
-
-stdenv.mkDerivation {
-  name = "phonon-${if withQt5 then "qt5" else "qt4"}-${v}";
+stdenv.mkDerivation rec {
+  pname = "phonon";
+  version = "4.11.1";
 
   meta = {
     homepage = https://phonon.kde.org/;
@@ -27,25 +22,30 @@ stdenv.mkDerivation {
   };
 
   src = fetchurl {
-    url = "mirror://kde/stable/phonon/${v}/phonon-${v}.tar.xz";
+    url = "mirror://kde/stable/phonon/${version}/phonon-${version}.tar.xz";
     sha256 = "0bfy8iqmjhlg3ma3iqd3kxjc2zkzpjgashbpf5x17y0dc2i1whxl";
   };
 
-  buildInputs =
-    [ libGLU_combined libpulseaudio ]
-    ++ (if withQt5 then [ qtbase qttools ] else [ qt4 ]);
+  buildInputs = [
+    libGLU_combined
+    libpulseaudio
+    qtbase
+    qttools
+  ];
 
-  nativeBuildInputs =
-    [ cmake pkgconfig ]
-    ++ optional withQt5 extra-cmake-modules;
+  nativeBuildInputs = [
+    cmake
+    pkgconfig
+    extra-cmake-modules
+  ];
 
   outputs = [ "out" "dev" ];
 
   NIX_CFLAGS_COMPILE = "-fPIC";
 
-  cmakeFlags =
-    [ "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" ]
-    ++ optional withQt5 "-DPHONON_BUILD_PHONON4QT5=ON";
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}"
+  ];
 
   preConfigure = ''
     cmakeFlags+=" -DPHONON_QT_MKSPECS_INSTALL_DIR=''${!outputDev}/mkspecs"
@@ -63,10 +63,8 @@ stdenv.mkDerivation {
     sed -i cmake/FindPhononInternal.cmake \
         -e "/set(INCLUDE_INSTALL_DIR/ c set(INCLUDE_INSTALL_DIR \"''${!outputDev}/include\")"
 
-    ${optionalString withQt5 ''
     sed -i cmake/FindPhononInternal.cmake \
         -e "/set(PLUGIN_INSTALL_DIR/ c set(PLUGIN_INSTALL_DIR \"$qtPluginPrefix/..\")"
-    ''}
 
     sed -i CMakeLists.txt \
         -e "/set(BUILDSYSTEM_INSTALL_DIR/ c set(BUILDSYSTEM_INSTALL_DIR \"''${!outputDev}/${buildsystemdir}\")"