From 62a09e70299f2016a18bf787f1e1d97720284baa Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 21 Nov 2019 21:26:38 +0100 Subject: phonon: remove qt4 Qt4 is no longer supported. https://phabricator.kde.org/D22688 Co-authored-by: worldofpeace --- pkgs/development/libraries/phonon/default.nix | 42 +++++++++++++-------------- 1 file changed, 20 insertions(+), 22 deletions(-) (limited to 'pkgs/development/libraries/phonon') 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}\")" -- cgit 1.4.1