From bf3260a1b58ba968d7b62f4a538e47b0aef1762a Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Mon, 19 Jan 2015 11:08:00 -0600 Subject: [PATCH] phonon: add Qt 5 library and backends --- .../{ => qt4}/default.nix | 0 .../phonon-backend-gstreamer/qt5/default.nix | 31 +++++++++++++++ .../phonon-backend-vlc/{ => qt4}/default.nix | 0 .../phonon-backend-vlc/qt5/default.nix | 38 +++++++++++++++++++ .../libraries/phonon/{ => qt4}/default.nix | 0 .../libraries/phonon/qt5/default.nix | 30 +++++++++++++++ pkgs/top-level/all-packages.nix | 19 +++------- 7 files changed, 105 insertions(+), 13 deletions(-) rename pkgs/development/libraries/phonon-backend-gstreamer/{ => qt4}/default.nix (100%) create mode 100644 pkgs/development/libraries/phonon-backend-gstreamer/qt5/default.nix rename pkgs/development/libraries/phonon-backend-vlc/{ => qt4}/default.nix (100%) create mode 100644 pkgs/development/libraries/phonon-backend-vlc/qt5/default.nix rename pkgs/development/libraries/phonon/{ => qt4}/default.nix (100%) create mode 100644 pkgs/development/libraries/phonon/qt5/default.nix diff --git a/pkgs/development/libraries/phonon-backend-gstreamer/default.nix b/pkgs/development/libraries/phonon-backend-gstreamer/qt4/default.nix similarity index 100% rename from pkgs/development/libraries/phonon-backend-gstreamer/default.nix rename to pkgs/development/libraries/phonon-backend-gstreamer/qt4/default.nix diff --git a/pkgs/development/libraries/phonon-backend-gstreamer/qt5/default.nix b/pkgs/development/libraries/phonon-backend-gstreamer/qt5/default.nix new file mode 100644 index 000000000000..8553e060c565 --- /dev/null +++ b/pkgs/development/libraries/phonon-backend-gstreamer/qt5/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl, cmake, qt5, pkgconfig, phonon_qt5, gst_all_1 }: + +let + version = "4.8.2"; + pname = "phonon-backend-gstreamer"; +in + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://kde/stable/phonon/${pname}/${version}/src/${name}.tar.xz"; + sha256 = "1q1ix6zsfnh6gfnpmwp67s376m7g7ahpjl1qp2fqakzb5cgzgq10"; + }; + + buildInputs = with gst_all_1; [ phonon_qt5 qt5 gstreamer gst-plugins-base ]; + + nativeBuildInputs = [ cmake pkgconfig ]; + + cmakeFlags = [ + "-DCMAKE_INSTALL_LIBDIR=lib" + "-DPHONON_BUILD_PHONON4QT5=ON" + ]; + + meta = with stdenv.lib; { + homepage = http://phonon.kde.org/; + description = "GStreamer backend for Phonon"; + platforms = platforms.linux; + maintainer = with maintainers; [ ttuegel ]; + }; +} diff --git a/pkgs/development/libraries/phonon-backend-vlc/default.nix b/pkgs/development/libraries/phonon-backend-vlc/qt4/default.nix similarity index 100% rename from pkgs/development/libraries/phonon-backend-vlc/default.nix rename to pkgs/development/libraries/phonon-backend-vlc/qt4/default.nix diff --git a/pkgs/development/libraries/phonon-backend-vlc/qt5/default.nix b/pkgs/development/libraries/phonon-backend-vlc/qt5/default.nix new file mode 100644 index 000000000000..9ccd35312b1c --- /dev/null +++ b/pkgs/development/libraries/phonon-backend-vlc/qt5/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, xz, vlc, cmake, pkgconfig, phonon_qt5, qt5 }: + +with stdenv.lib; + +let + pname = "phonon-backend-vlc"; + v = "0.8.2"; + # Force same Qt version in phonon and VLC + vlc_ = vlc.override { + inherit qt5; + qt4 = null; + withQt5 = true; + }; + phonon_ = phonon.override { inherit qt4 qt5 withQt5; }; +in + +stdenv.mkDerivation { + name = "${pname}-${v}"; + + src = fetchurl { + url = "mirror://kde/stable/phonon/${pname}/${v}/${pname}-${v}.tar.xz"; + sha256 = "18ysdga681my75lxxv5h242pa4qappvg5z73wnc0ks9yypnzidys"; + }; + + nativeBuildInputs = [ cmake pkgconfig xz ]; + + buildInputs = [ vlc_ phonon_qt5 qt5]; + + cmakeFlags = ["-DPHONON_BUILD_PHONON4QT5=ON"]; + + meta = { + homepage = http://phonon.kde.org/; + description = "VideoLAN backend for Phonon multimedia framework"; + platforms = platforms.linux; + maintainers = with maintainers; [ ttuegel urkud ]; + license = licenses.lgpl21Plus; + }; +} diff --git a/pkgs/development/libraries/phonon/default.nix b/pkgs/development/libraries/phonon/qt4/default.nix similarity index 100% rename from pkgs/development/libraries/phonon/default.nix rename to pkgs/development/libraries/phonon/qt4/default.nix diff --git a/pkgs/development/libraries/phonon/qt5/default.nix b/pkgs/development/libraries/phonon/qt5/default.nix new file mode 100644 index 000000000000..187684ca5be0 --- /dev/null +++ b/pkgs/development/libraries/phonon/qt5/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, cmake, automoc4, pulseaudio, qt5 }: + +with stdenv.lib; + +let + v = "4.8.1"; +in + +stdenv.mkDerivation rec { + name = "phonon-${v}"; + + src = fetchurl { + url = "mirror://kde/stable/phonon/${v}/phonon-${v}.tar.xz"; + sha256 = "1l97h1jj3gvl1chx1qbipizfvjgqc05wrhdcflc76c2krlk03jmn"; + }; + + buildInputs = [ qt5 pulseaudio ]; + + nativeBuildInputs = [ cmake automoc4 ]; + + cmakeFlags = ["-DPHONON_BUILD_PHONON4QT5=ON"]; + + meta = { + homepage = http://phonon.kde.org/; + description = "Multimedia API for Qt"; + license = stdenv.lib.licenses.lgpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = with stdenv.lib.maintainers; [ ttuegel ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 51c99b030364..c2b480389e7c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6802,23 +6802,16 @@ let pdf2xml = callPackage ../development/libraries/pdf2xml {} ; - phonon = callPackage ../development/libraries/phonon { inherit qt4; }; + phonon = callPackage ../development/libraries/phonon/qt4 {}; - phonon_qt5 = phonon.override { - withQt5 = true; - inherit qt5; - qt4 = null; - }; + phonon_backend_gstreamer = callPackage ../development/libraries/phonon-backend-gstreamer/qt4 {}; - phonon_backend_gstreamer = callPackage ../development/libraries/phonon-backend-gstreamer { }; + phonon_backend_vlc = callPackage ../development/libraries/phonon-backend-vlc/qt4 {}; - phonon_backend_vlc = callPackage ../development/libraries/phonon-backend-vlc { inherit qt4; }; + phonon_qt5 = callPackage ../development/libraries/phonon/qt5 {}; - phonon_qt5_backend_vlc = phonon_backend_vlc.override { - withQt5 = true; - inherit qt5; - qt4 = null; - }; + phonon_qt5_backend_gstreamer = callPackage ../development/libraries/phonon-backend-gstreamer/qt5 {}; + phonon_qt5_backend_vlc = callPackage ../development/libraries/phonon-backend-vlc/qt5 {}; physfs = callPackage ../development/libraries/physfs { };