Merge pull request #13742 from rnhmjoj/mkvtoolnix

mkvtoolnix: 8.4.0 -> 8.9.0
This commit is contained in:
Arseniy Seroka 2016-03-07 22:48:02 +03:00
commit 8c67e43b8e
2 changed files with 36 additions and 61 deletions

View File

@ -1,76 +1,54 @@
{ stdenv, fetchurl, gettext, pkgconfig, ruby
, boost, expat, file, flac, libebml, libmatroska, libogg, libvorbis, xdg_utils, zlib
# pugixml (not packaged)
, buildConfig ? "all"
, withGUI ? false, qt5 ? null # Disabled for now until upstream issues are resolved
, legacyGUI ? true, wxGTK ? null
# For now both qt5 and wxwidgets gui's are enabled, if wxwidgets is disabled the
# build system doesn't install desktop entries, icons, etc...
, libiconv
{ stdenv, fetchgit, pkgconfig, autoconf, automake
, ruby, file, xdg_utils, gettext, expat, qt5, boost
, libebml, zlib, libmatroska, libogg, libvorbis, flac
, withGUI ? true
}:
let
inherit (stdenv.lib) enableFeature optional;
in
assert withGUI -> qt5 != null;
assert legacyGUI -> wxGTK != null;
with stdenv.lib;
stdenv.mkDerivation rec {
name = "mkvtoolnix-${version}";
version = "8.4.0";
version = "8.9.0";
src = fetchurl {
url = "http://www.bunkus.org/videotools/mkvtoolnix/sources/${name}.tar.xz";
sha256 = "0y7qm8q9vpvjiw7b69k9140pw9nhvs6ggmk56yxnmcd02inm19gn";
src = fetchgit {
url = "https://github.com/mbunkus/mkvtoolnix.git";
rev = "54e6b52b3dde07f89da4542997ef059e18802128";
sha256 = "1hm9f9q60c0axmmlsalazsiil8gk3v8q6cl5qxsfa95m51i39878";
};
patchPhase = ''
patchShebangs ./rake.d/
patchShebangs ./Rakefile
# Force ruby encoding to use UTF-8 or else when enabling qt5 the Rakefile may
# fail with `invalid byte sequence in US-ASCII' due to UTF-8 characters
# This workaround replaces an arbitrary comment in the drake file
sed -e 's,#--,Encoding.default_external = Encoding::UTF_8,' -i ./drake
'';
configureFlags = [
"--with-boost-libdir=${boost.lib}/lib"
"--without-curl"
] ++ (
if (withGUI || legacyGUI) then [
"--with-mkvtoolnix-gui"
"--enable-gui"
(enableFeature withGUI "qt")
(enableFeature legacyGUI "wxwidgets")
] else [
"--disable-gui"
]
);
nativeBuildInputs = [ gettext pkgconfig ruby ];
nativeBuildInputs = [ gettext ruby ];
buildInputs = [
boost expat file flac libebml libmatroska libogg libvorbis xdg_utils zlib
] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ]
++ optional withGUI qt5
++ optional legacyGUI wxGTK;
pkgconfig autoconf automake expat
file xdg_utils boost libebml zlib
libmatroska libogg libvorbis flac
(optional withGUI qt5.qtbase)
];
enableParallelBuilding = true;
preConfigure = "./autogen.sh";
buildPhase = "./drake -j $NIX_BUILD_CORES";
installPhase = "./drake install -j $NIX_BUILD_CORES";
buildPhase = ''
./drake
'';
installPhase = ''
./drake install
'';
configureFlags = [
"--enable-magic"
"--enable-optimization"
"--with-boost-libdir=${boost.lib}/lib"
"--disable-debug"
"--disable-profiling"
"--disable-precompiled-headers"
"--disable-static-qt"
"--without-curl"
"--with-gettext"
(enableFeature withGUI "qt")
];
meta = with stdenv.lib; {
description = "Cross-platform tools for Matroska";
homepage = http://www.bunkus.org/videotools/mkvtoolnix/;
license = licenses.gpl2;
maintainers = with maintainers; [ codyopel fuuzetsu ];
platforms = platforms.all;
homepage = http://www.bunkus.org/videotools/mkvtoolnix/;
license = licenses.gpl2;
maintainers = with maintainers; [ codyopel fuuzetsu rnhmjoj ];
platforms = platforms.linux;
};
}

View File

@ -8148,9 +8148,6 @@ let
mkvtoolnix-cli = mkvtoolnix.override {
withGUI = false;
qt5 = null;
legacyGUI = false;
wxGTK = null;
};
mlt-qt4 = callPackage ../development/libraries/mlt {