From d99e939015fb1a46a52ecf9ca088feecf2452aa3 Mon Sep 17 00:00:00 2001 From: Cillian de Roiste Date: Sat, 20 Aug 2011 23:26:59 +0000 Subject: [PATCH] Upgrading Kdenlive to 0.8 svn path=/nixpkgs/trunk/; revision=28715 --- pkgs/applications/video/kdenlive/default.nix | 21 +++--- .../video/kdenlive/kdenlive-newmlt.patch | 70 +++++++++++++++++++ 2 files changed, 80 insertions(+), 11 deletions(-) create mode 100644 pkgs/applications/video/kdenlive/kdenlive-newmlt.patch diff --git a/pkgs/applications/video/kdenlive/default.nix b/pkgs/applications/video/kdenlive/default.nix index 5edae1b3e720..6db6e630d325 100644 --- a/pkgs/applications/video/kdenlive/default.nix +++ b/pkgs/applications/video/kdenlive/default.nix @@ -1,20 +1,19 @@ -{stdenv, fetchurl, lib, cmake, qt4, perl, kdelibs, automoc4, phonon, mlt, gettext, -shared_mime_info, soprano}: +{ stdenv, fetchurl, lib, cmake, qt4, perl, kdelibs, automoc4, phonon, mlt, gettext +, qimageblitz, qjson, shared_mime_info, soprano }: + +stdenv.mkDerivation rec { + name = "kdenlive-${version}"; + version = "0.8"; -stdenv.mkDerivation { - name = "kdenlive-0.7.8"; src = fetchurl { - url = mirror://sourceforge/kdenlive/kdenlive-0.7.8.tar.gz; - sha256 = "10bwmhh3kzdbq1nzq8s5ln7ydrzg41d1rihj5kdmf5hb91az8mvx"; + url = "mirror://sourceforge/kdenlive/${name}.tar.gz"; + sha256 = "18e3390c9eb7124af5cd43819c679374aec46dcaf1fc5cdb43918db470c1076f"; }; - prePatch = '' - # For Qt47 compatibility. - sed -i 's@class QImage@#include @' src/colorcorrection/vectorscopegenerator.h - ''; + patches = [ ./kdenlive-newmlt.patch ]; buildInputs = [ cmake qt4 perl kdelibs automoc4 phonon mlt gettext - shared_mime_info soprano ]; + qimageblitz qjson shared_mime_info soprano ]; meta = { description = "Free and open source video editor"; diff --git a/pkgs/applications/video/kdenlive/kdenlive-newmlt.patch b/pkgs/applications/video/kdenlive/kdenlive-newmlt.patch new file mode 100644 index 000000000000..b3a772a7ac6e --- /dev/null +++ b/pkgs/applications/video/kdenlive/kdenlive-newmlt.patch @@ -0,0 +1,70 @@ +From http://kdenlive.org/forum/cant-start-kdnlive-sdl-module-missing-mlt + +Kdenlive 0.8 tries to detect mlt by reading from stderr, but between +mlt 0.7.2 and 0.7.4 mlt this has changed from stderr to stdout. +=================================================================== +--- kdenlive-0.8/src.orig/wizard.cpp 2011-04-26 21:44:22.000000000 +0200 ++++ kdenlive-0.8/src/wizard.cpp 2011-07-21 18:22:18.470831892 +0200 +@@ -214,7 +214,7 @@ + button(QWizard::NextButton)->setEnabled(false); + } else { + checkProcess.waitForFinished(); +- QByteArray result = checkProcess.readAllStandardError(); ++ QByteArray result = checkProcess.readAllStandardOutput(); + + // Check MLT avformat module + QTreeWidgetItem *avformatItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Avformat module (FFmpeg)")); +@@ -246,7 +246,7 @@ + kDebug() << "// Error querying MLT's version"; + } else { + checkProcess.waitForFinished(); +- mltVersion = checkProcess.readAllStandardError(); ++ mltVersion = checkProcess.readAllStandardOutput(); + mltVersion = mltVersion.section('\n', 0, 0).simplified(); + mltVersion = mltVersion.section(' ', -1).simplified(); + version = 1000 * mltVersion.section('.', 0, 0).toInt() + 100 * mltVersion.section('.', 1, 1).toInt() + mltVersion.section('.', 2, 2).toInt(); +@@ -275,7 +275,7 @@ + kDebug() << "// Error parsing MLT's avformat codecs"; + } else { + checkProcess2.waitForFinished(); +- QByteArray codecList = checkProcess2.readAllStandardError(); ++ QByteArray codecList = checkProcess2.readAllStandardOutput(); + QString acodecList(codecList); + QStringList result; + QStringList alist = acodecList.split('\n', QString::SkipEmptyParts); +@@ -292,7 +292,7 @@ + kDebug() << "// Error parsing MLT's avformat codecs"; + } else { + checkProcess2.waitForFinished(); +- QByteArray codecList = checkProcess2.readAllStandardError(); ++ QByteArray codecList = checkProcess2.readAllStandardOutput(); + QString vcodecList(codecList); + QStringList result; + QStringList vlist = vcodecList.split('\n', QString::SkipEmptyParts); +@@ -309,7 +309,7 @@ + kDebug() << "// Error parsing MLT's avformat codecs"; + } else { + checkProcess2.waitForFinished(); +- QByteArray codecList = checkProcess2.readAllStandardError(); ++ QByteArray codecList = checkProcess2.readAllStandardOutput(); + QString vcodecList(codecList); + QStringList result; + QStringList vlist = vcodecList.split('\n', QString::SkipEmptyParts); +@@ -606,7 +606,7 @@ + + checkProcess.waitForFinished(); + +- QByteArray result = checkProcess.readAllStandardError(); ++ QByteArray result = checkProcess.readAllStandardOutput(); + if (!result.contains("- avformat")) errorMessage.append(i18n("MLT's avformat (FFMPEG) module not found. Please check your FFMPEG and MLT install. Kdenlive will not work until this issue is fixed.") + "\n");*/ + + QProcess checkProcess2; +@@ -616,7 +616,7 @@ + + checkProcess2.waitForFinished(); + +- QByteArray result = checkProcess2.readAllStandardError(); ++ QByteArray result = checkProcess2.readAllStandardOutput(); + if (!result.contains("sdl") || !result.contains("sdl_preview")) errorMessage.append(i18n("MLT's SDL module not found. Please check your MLT install. Kdenlive will not work until this issue is fixed.") + '\n'); + + if (!errorMessage.isEmpty()) {