Hi, please find the following patch attached, wich fixes the build failure with newer ffmpeg. It's based on the hunks from Cyril and Christoph (thanks!) and adds a few more bits. Additionally it fixes #462013.
Now I only need a sponsor, however feel also free to do a MU based on this patch, if you come around to it earlier. Cheers, Stefan.
diff -u ktoon-0.8.1/debian/changelog ktoon-0.8.1/debian/changelog --- ktoon-0.8.1/debian/changelog +++ ktoon-0.8.1/debian/changelog @@ -1,3 +1,20 @@ +ktoon (0.8.1-4.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix build failure (Closes: #527721, #462013): + + Build-Depend on zlib1g-dev, thanks to Cyril Brulebois. + + Add debian/patches/90-fix-ffmpeg-includes.dpatch, based on a patch from + Christoph Egger. + + Add libswscale-dev and libavutil-dev to build-depends. + + Add debian/patches/95-ffmpeg-libs to also link against swscale and + avutil. + + Add debian/patches/92-fix-linking to link the ffmpeg exporter against + src/store as well. + + Add libpng12-dev to build-depends. + * Fix plugin directory in debian/patches/31_dirs (Closes: #462013). + + -- Stefan Potyra <sistp...@ubuntu.com> Sat, 23 Jan 2010 18:13:53 +0100 + ktoon (0.8.1-4) unstable; urgency=low * Depend on libgif-dev instead on libungif4-dev. Closes: #466185. diff -u ktoon-0.8.1/debian/control ktoon-0.8.1/debian/control --- ktoon-0.8.1/debian/control +++ ktoon-0.8.1/debian/control @@ -5,7 +5,8 @@ Build-Depends: debhelper (>= 5.0.0), dpatch, autotools-dev, libqt4-dev (>= 4.3), libaspell-dev, libaudio-dev, libgif-dev, libavcodec-dev, libavformat-dev, libglu1-mesa-dev, libming-dev, libming-util, libgstreamer0.10-dev, imagemagick, - docbook-to-man, libqt4-opengl-dev + docbook-to-man, libqt4-opengl-dev, zlib1g-dev, libavutil-dev, libswscale-dev, + libpng12-dev Standards-Version: 3.7.3 Homepage: http://ktoon.toonka.com diff -u ktoon-0.8.1/debian/patches/31_dirs ktoon-0.8.1/debian/patches/31_dirs --- ktoon-0.8.1/debian/patches/31_dirs +++ ktoon-0.8.1/debian/patches/31_dirs @@ -24,7 +24,7 @@ void KTExportWidget::loadPlugins() { - QDir pluginDirectory = QDir(HOME+"/plugins/"); -+ QDir pluginDirectory = QDir("/usr/share/ktoon/plugins/"); ++ QDir pluginDirectory = QDir("/usr/lib/ktoon/plugins/"); foreach (QString fileName, pluginDirectory.entryList(QDir::Files)) { @@ -219,7 +219,7 @@ m_tools.clear(); - QDir m_pluginDirectory = QDir(HOME+"/plugins/"); -+ QDir m_pluginDirectory = QDir("/usr/share/ktoon/plugins/"); ++ QDir m_pluginDirectory = QDir("/usr/lib/ktoon/plugins/"); foreach (QString fileName, m_pluginDirectory.entryList(QDir::Files)) { @@ -258,7 +258,7 @@ delete splash; - QApplication::addLibraryPath (HOME+"/plugins"); -+ QApplication::addLibraryPath ("/usr/share/ktoon/plugins"); ++ QApplication::addLibraryPath ("/usr/lib/ktoon/plugins"); #ifdef Q_OS_UNIX diff -u ktoon-0.8.1/debian/patches/00list ktoon-0.8.1/debian/patches/00list --- ktoon-0.8.1/debian/patches/00list +++ ktoon-0.8.1/debian/patches/00list @@ -4,0 +5,3 @@ +90-fix-ffmpeg-includes.dpatch +92-fix-linking.dpatch +95-fix-ffmpeg-libs.dpatch only in patch2: unchanged: --- ktoon-0.8.1.orig/debian/patches/90-fix-ffmpeg-includes.dpatch +++ ktoon-0.8.1/debian/patches/90-fix-ffmpeg-includes.dpatch @@ -0,0 +1,81 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 90-fix-ffmpeg-includes.dpatch by <sistp...@ubuntu.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +...@dpatch@ +diff -urNad ktoon-0.8.1~/src/components/export/ffmpegplugin/ffmpegmanager.cpp ktoon-0.8.1/src/components/export/ffmpegplugin/ffmpegmanager.cpp +--- ktoon-0.8.1~/src/components/export/ffmpegplugin/ffmpegmanager.cpp 2007-06-15 04:33:05.000000000 +0200 ++++ ktoon-0.8.1/src/components/export/ffmpegplugin/ffmpegmanager.cpp 2010-01-23 16:37:09.000000000 +0100 +@@ -27,6 +27,13 @@ + + #include <QImage> + ++#ifdef HAVE_FFMPEG ++extern "C" { ++#include <libswscale/swscale.h> ++} ++#include <cassert> ++#endif /* HAVE_FFMPEG */ ++ + #include "exportinterface.h" + + FFMpegManager::FFMpegManager() +@@ -178,7 +185,7 @@ + if (!(fmt->flags & AVFMT_NOFILE)) + { + /* close the output file */ +- url_fclose(&oc->pb); ++ url_fclose(oc->pb); + } + + av_free(oc); +@@ -302,7 +309,30 @@ + + memcpy(pictTmp.data[0],image.bits(),c->width*c->height*4); + +- img_convert((AVPicture *)m_picture,c->pix_fmt,&pictTmp,PIX_FMT_RGBA32,c->width,c->height); ++ static SwsContext *sws_context = NULL; ++ sws_context = sws_getCachedContext(sws_context, ++ c->width, ++ c->height, ++ PIX_FMT_RGBA32, ++ c->width, ++ c->height, ++ c->pix_fmt, ++ SWS_BICUBIC, ++ NULL, ++ NULL, ++ NULL); ++ assert(sws_context != NULL); ++ sws_scale(sws_context, ++ pictTmp.data, ++ pictTmp.linesize, ++ 0, ++ c->height, ++ m_picture->data, ++ m_picture->linesize); ++ ++#if 0 /* old variant */ ++ img_convert((AVPicture *)m_picture, c->pix_fmt, &pictTmp, PIX_FMT_RGBA32, c->width, c->height); ++#endif + avpicture_free(&pictTmp); + + picturePtr = m_picture; +diff -urNad ktoon-0.8.1~/src/components/export/ffmpegplugin/ffmpegmanager.h ktoon-0.8.1/src/components/export/ffmpegplugin/ffmpegmanager.h +--- ktoon-0.8.1~/src/components/export/ffmpegplugin/ffmpegmanager.h 2007-06-15 04:33:05.000000000 +0200 ++++ ktoon-0.8.1/src/components/export/ffmpegplugin/ffmpegmanager.h 2010-01-23 16:34:59.000000000 +0100 +@@ -35,8 +35,10 @@ + #include <QSize> + + #ifdef HAVE_FFMPEG +-#include <ffmpeg/avcodec.h> +-#include <ffmpeg/avformat.h> ++extern "C" { ++#include <libavcodec/avcodec.h> ++#include <libavformat/avformat.h> ++} + #endif + + /** only in patch2: unchanged: --- ktoon-0.8.1.orig/debian/patches/92-fix-linking.dpatch +++ ktoon-0.8.1/debian/patches/92-fix-linking.dpatch @@ -0,0 +1,29 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 92-fix-linking.dpatch by <sistp...@ubuntu.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +...@dpatch@ +diff -urNad ktoon-0.8.1~/src/components/export/ffmpegplugin/ffmpegplugin.pro ktoon-0.8.1/src/components/export/ffmpegplugin/ffmpegplugin.pro +--- ktoon-0.8.1~/src/components/export/ffmpegplugin/ffmpegplugin.pro 2007-06-15 04:33:05.000000000 +0200 ++++ ktoon-0.8.1/src/components/export/ffmpegplugin/ffmpegplugin.pro 2010-01-23 15:49:33.000000000 +0100 +@@ -9,14 +9,16 @@ + KDEV_QTVER = 4 + LIBS += -ldcore \ + -ldgui \ +- -lktoon ++ -lktoon \ ++ -lstore + INCLUDEPATH += ../../../../src/store \ + ../../../../src/ktoonlib \ + ../../../../src/dlib/dgui \ + ../../../../src/dlib/dcore + QMAKE_LIBDIR = ../../../../src/dlib/dcore \ + ../../../../src/dlib/dgui \ +- ../../../../src/ktoonlib ++ ../../../../src/ktoonlib \ ++ ../../../../src/store + CONFIG += release \ + warn_on \ + plugin only in patch2: unchanged: --- ktoon-0.8.1.orig/debian/patches/95-fix-ffmpeg-libs.dpatch +++ ktoon-0.8.1/debian/patches/95-fix-ffmpeg-libs.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 95-fix-ffmpeg-libs.dpatch by <sistp...@ubuntu.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +...@dpatch@ +diff -urNad ktoon-0.8.1~/configure ktoon-0.8.1/configure +--- ktoon-0.8.1~/configure 2010-01-23 15:10:50.000000000 +0100 ++++ ktoon-0.8.1/configure 2010-01-23 15:11:09.000000000 +0100 +@@ -104,7 +104,7 @@ + check "gif" gif && LIBS="$LIBS -lgif" && defineMacro HAVE_LIBGIF + + # checking ffmpeg +-check "ffmpeg 0.4.9" ffmpeg && LIBS="$LIBS -lavcodec -lavformat" && defineMacro HAVE_FFMPEG ++check "ffmpeg 0.4.9" ffmpeg && LIBS="$LIBS -lavcodec -lavformat -lswscale -lavutil" && defineMacro HAVE_FFMPEG + + + # Checking ming
signature.asc
Description: This is a digitally signed message part.