diff options
-rw-r--r-- | pkgs/applications/video/kmplayer/default.nix | 41 | ||||
-rw-r--r-- | pkgs/applications/video/kmplayer/kmplayer_part-plugin_metadata.patch | 11 | ||||
-rw-r--r-- | pkgs/applications/video/kmplayer/no-docs.patch | 12 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
4 files changed, 50 insertions, 16 deletions
diff --git a/pkgs/applications/video/kmplayer/default.nix b/pkgs/applications/video/kmplayer/default.nix index 59b9893ded146..f0d7fa3537076 100644 --- a/pkgs/applications/video/kmplayer/default.nix +++ b/pkgs/applications/video/kmplayer/default.nix @@ -1,30 +1,41 @@ -{ stdenv, fetchurl -, automoc4, cmake, gettext, makeWrapper, perl, pkgconfig -, kdelibs4, cairo, dbus_glib, mplayer +{ + mkDerivation, lib, fetchurl, + extra-cmake-modules, makeWrapper, + qtsvg, qtx11extras, ki18n, kdelibs4support, kio, kmediaplayer, kwidgetsaddons, + phonon, cairo, mplayer }: -stdenv.mkDerivation { - name = "kmplayer-0.11.3d"; +mkDerivation rec { + majorMinorVersion = "0.12"; + patchVersion = "0b"; + version = "${majorMinorVersion}.${patchVersion}"; + name = "kmplayer-${version}"; src = fetchurl { - #url = http://kmplayer.kde.org/pkgs/kmplayer-0.11.3d.tar.bz2; - url = "mirror://gentoo/distfiles/kmplayer-0.11.3d.tar.bz2"; - sha256 = "1yvbkb1hh5y7fqfvixjf2rryzm0fm0fpkx4lmvhi7k7d0v4wpgky"; + url = "mirror://kde/stable/kmplayer/${majorMinorVersion}/kmplayer-${version}.tar.bz2"; + sha256 = "0wzdxym4fc83wvqyhcwid65yv59a2wvp1lq303cn124mpnlwx62y"; }; - buildInputs = [ kdelibs4 cairo dbus_glib ]; + patches = [ + ./kmplayer_part-plugin_metadata.patch # Qt 5.9 doesn't like an empty string for the optional "FILE" argument of "Q_PLUGIN_METADATA" + ./no-docs.patch # Don't build docs due to errors (kdelibs4support propagates kdoctools) + ]; - nativeBuildInputs = [ automoc4 cmake gettext makeWrapper perl pkgconfig ]; + nativeBuildInputs = [ extra-cmake-modules makeWrapper ]; + + buildInputs = [ + qtsvg qtx11extras ki18n kdelibs4support kio kmediaplayer kwidgetsaddons + phonon cairo + ]; postInstall = '' wrapProgram $out/bin/kmplayer --suffix PATH : ${mplayer}/bin ''; - meta = { + meta = with lib; { description = "MPlayer front-end for KDE"; - license = "GPL"; - homepage = http://kmplayer.kde.org; - broken = true; # Also unavailable on this mirror - maintainers = [ stdenv.lib.maintainers.sander ]; + license = with licenses; [ gpl2 lgpl2 fdl12 ]; + homepage = https://kmplayer.kde.org/; + maintainers = with maintainers; [ sander zraexy ]; }; } diff --git a/pkgs/applications/video/kmplayer/kmplayer_part-plugin_metadata.patch b/pkgs/applications/video/kmplayer/kmplayer_part-plugin_metadata.patch new file mode 100644 index 0000000000000..9b6652b0be589 --- /dev/null +++ b/pkgs/applications/video/kmplayer/kmplayer_part-plugin_metadata.patch @@ -0,0 +1,11 @@ +--- a/src/kmplayer_part.h ++++ b/src/kmplayer_part.h +@@ -36,7 +36,7 @@ + + class KMPlayerFactory : public KPluginFactory { + Q_OBJECT +- Q_PLUGIN_METADATA(IID "org.kde.KPluginFactory" FILE "") ++ Q_PLUGIN_METADATA(IID "org.kde.KPluginFactory") + Q_INTERFACES(KPluginFactory) + public: + KMPlayerFactory(); diff --git a/pkgs/applications/video/kmplayer/no-docs.patch b/pkgs/applications/video/kmplayer/no-docs.patch new file mode 100644 index 0000000000000..c93453f908c9d --- /dev/null +++ b/pkgs/applications/video/kmplayer/no-docs.patch @@ -0,0 +1,12 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -79,9 +79,6 @@ + + add_subdirectory(src) + add_subdirectory(icons) +-if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/doc" AND KF5DocTools_VERSION) +- add_subdirectory(doc) +-endif(KF5DocTools_VERSION) + add_subdirectory(data) + + if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 833becfccf916..d51dfb6d57edc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15240,7 +15240,7 @@ with pkgs; kiwix = callPackage ../applications/misc/kiwix { }; - kmplayer = kde4.callPackage ../applications/video/kmplayer { }; + kmplayer = libsForQt5.callPackage ../applications/video/kmplayer { }; kodestudio = callPackage ../applications/editors/kodestudio { }; |