phonon-backend-gstreamer: add Qt 5 support

This commit is contained in:
Thomas Tuegel 2014-11-17 19:30:46 -06:00
parent c3240b9315
commit b1123db790
2 changed files with 27 additions and 10 deletions

View File

@ -1,28 +1,39 @@
{ stdenv, fetchurl, cmake, automoc4, qt4, pkgconfig, phonon, gstreamer
, gst_plugins_base }:
{ stdenv, fetchurl, cmake, automoc4, pkgconfig, gst_all_1
, phonon, qt4 ? null, qt5 ? null, withQt5 ? false }:
with stdenv.lib;
assert (withQt5 -> qt5 != null); assert (!withQt5 -> qt4 != null);
let
version = "4.7.2";
version = "4.8.0";
pname = "phonon-backend-gstreamer";
qt = if withQt5 then qt5 else qt4;
# Force same Qt version in phonon
phonon_ = phonon.override { inherit qt4 qt5 withQt5; };
in
stdenv.mkDerivation rec {
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://kde/stable/phonon/${pname}/${version}/src/${name}.tar.xz";
sha256 = "1cfjk450aajr8hfhnfq7zbmryprxiwr9ha5x585dsh7mja82mdw0";
url = "mirror://kde/stable/phonon/${pname}/${version}/${name}.tar.xz";
sha256 = "0zjqf1gpj6h9hj27225vihg5gj0fjgvh4n9nkrbij7kf57bcn6gq";
};
buildInputs = [ phonon qt4 gstreamer gst_plugins_base ];
buildInputs = with gst_all_1; [ phonon_ qt gstreamer gst-plugins-base ];
nativeBuildInputs = [ cmake automoc4 pkgconfig ];
cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ];
cmakeFlags =
[ "-DCMAKE_INSTALL_LIBDIR=lib"
] ++ optional withQt5 "-DPHONON_BUILD_PHONON4QT5=ON";
meta = {
homepage = http://phonon.kde.org/;
description = "GStreamer backend for Phonon";
platforms = stdenv.lib.platforms.linux;
};
platforms = platforms.linux;
maintainers = with maintainers; [ ttuegel ];
license = licenses.lgpl21Plus;
};
}

View File

@ -6522,7 +6522,13 @@ let
qt4 = null;
};
phonon_backend_gstreamer = callPackage ../development/libraries/phonon-backend-gstreamer { };
phonon_backend_gstreamer = callPackage ../development/libraries/phonon-backend-gstreamer { inherit qt4; };
phonon_qt5_backend_gstreamer = phonon_backend_gstreamer.override {
withQt5 = true;
inherit qt5;
qt4 = null;
};
phonon_backend_vlc = callPackage ../development/libraries/phonon-backend-vlc { };