Package: ktoon Version: 0.8.1-4.2 Severity: wishlist Tags: patch User: [email protected] Usertags: origin-ubuntu oneiric ubuntu-patch
Hi, Ubuntu as well as Debian exprimental has libav 0.7, which makes ktoon FTBFS, with the following error: ... g++ -c -pipe -O2 -D__STDC_CONSTANT_MACROS -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_PLUGIN -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4 -I../../../../src/store -I../../../../src/ktoonlib -I../../../../src/dlib/dgui -I../../../../src/dlib/dcore -I-pthread -I-I/usr/include/glib-2.0 -I-I/usr/lib/i386-linux-gnu/glib-2.0/include -I-I/usr/include/gstreamer-0.10 -I-I/usr/include/libxml2 -I. -o ffmpegmanager.o ffmpegmanager.cpp ffmpegmanager.cpp: In member function 'void FFMpegManager::create(const QString&, int, const QStringList&, const QSize&, int)': ffmpegmanager.cpp:58:69: error: 'guess_format' was not declared in this scope ffmpegmanager.cpp:110:48: error: 'av_alloc_format_context' was not declared in this scope ffmpegmanager.cpp:129:6: warning: 'int av_set_parameters(AVFormatContext*, AVFormatParameters*)' is deprecated (declared at /usr/include/libavformat/avformat.h:1329) [-Wdeprecated-declarations] ffmpegmanager.cpp:129:29: warning: 'int av_set_parameters(AVFormatContext*, AVFormatParameters*)' is deprecated (declared at /usr/include/libavformat/avformat.h:1329) [-Wdeprecated-declarations] ffmpegmanager.cpp:135:2: warning: 'void dump_format(AVFormatContext*, int, const char*, int)' is deprecated (declared at /usr/include/libavformat/avformat.h:1451) [-Wdeprecated-declarations] ffmpegmanager.cpp:135:50: warning: 'void dump_format(AVFormatContext*, int, const char*, int)' is deprecated (declared at /usr/include/libavformat/avformat.h:1451) [-Wdeprecated-declarations] ffmpegmanager.cpp:145:7: warning: 'int url_fopen(AVIOContext**, const char*, int)' is deprecated (declared at /usr/include/libavformat/avio.h:278) [-Wdeprecated-declarations] ffmpegmanager.cpp:145:64: warning: 'int url_fopen(AVIOContext**, const char*, int)' is deprecated (declared at /usr/include/libavformat/avio.h:278) [-Wdeprecated-declarations] ffmpegmanager.cpp:152:2: warning: 'int av_write_header(AVFormatContext*)' is deprecated (declared at /usr/include/libavformat/avformat.h:1387) [-Wdeprecated-declarations] ffmpegmanager.cpp:152:20: warning: 'int av_write_header(AVFormatContext*)' is deprecated (declared at /usr/include/libavformat/avformat.h:1387) [-Wdeprecated-declarations] ffmpegmanager.cpp:180:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ffmpegmanager.cpp:188:3: warning: 'int url_fclose(AVIOContext*)' is deprecated (declared at /usr/include/libavformat/avio.h:279) [-Wdeprecated-declarations] ffmpegmanager.cpp:188:20: warning: 'int url_fclose(AVIOContext*)' is deprecated (declared at /usr/include/libavformat/avio.h:279) [-Wdeprecated-declarations] ffmpegmanager.cpp: In member function 'AVStream* FFMpegManager::addVideoStream(AVFormatContext*, int, int, int, int)': ffmpegmanager.cpp:219:18: error: 'CODEC_TYPE_VIDEO' was not declared in this scope ffmpegmanager.cpp: In member function 'bool FFMpegManager::writeVideoFrame(const QString&, AVFormatContext*, AVStream*, int)': ffmpegmanager.cpp:349:16: error: 'PKT_FLAG_KEY' was not declared in this scope ffmpegmanager.cpp:372:18: error: 'PKT_FLAG_KEY' was not declared in this scope ffmpegmanager.cpp: At global scope: ffmpegmanager.cpp:453:6: warning: unused parameter 'oc' [-Wunused-parameter] make[5]: *** [ffmpegmanager.o] Error 1 The following patch fixes that issues: *** /tmp/tmpF0yF2J Thanks for considering the patch. -- System Information: Debian Release: squeeze/sid APT prefers natty-updates APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 'natty') Architecture: amd64 (x86_64) Kernel: Linux 2.6.38-10-generic (SMP w/2 CPU cores) Locale: LANG=es_ES.UTF8, LC_CTYPE=es_ES.UTF8 (charmap=UTF-8) (ignored: LC_ALL set to es_ES.UTF8) Shell: /bin/sh linked to /bin/dash
--- ktoon-0.8.1.orig/debian/patches/99-fix-FTBFS-libav-0.7.dpatch +++ ktoon-0.8.1/debian/patches/99-fix-FTBFS-libav-0.7.dpatch @@ -0,0 +1,60 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 99-fix-FTBFS-libav-0.7.dpatch by Fabrice Coutadeur <[email protected]> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' 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 2011-07-18 08:59:10.339487475 +0200 +@@ -48,11 +48,11 @@ + { + #ifdef HAVE_FFMPEG + +- AVOutputFormat *fmt = guess_format(0, filePath.toLatin1().data(), 0); ++ AVOutputFormat *fmt = av_guess_format(0, filePath.toLatin1().data(), 0); + + if ( !fmt ) + { +- fmt = guess_format("mpeg", NULL, NULL); ++ fmt = av_guess_format("mpeg", NULL, NULL); + } + + // AVFormatParameters params, *ap = ¶ms; +@@ -100,7 +100,7 @@ + default: break; + } + +- AVFormatContext *oc = av_alloc_format_context(); ++ AVFormatContext *oc = avformat_alloc_context(); + if ( !oc ) + { + dError() << "Error while export"; +@@ -209,7 +209,7 @@ + #endif + + c->codec_id = CodecID(codec_id); +- c->codec_type = CODEC_TYPE_VIDEO; ++ c->codec_type = AVMEDIA_TYPE_VIDEO; + + /* put sample parameters */ + c->bit_rate = 400000; +@@ -316,7 +316,7 @@ + AVPacket pkt; + av_init_packet(&pkt); + +- pkt.flags |= PKT_FLAG_KEY; ++ pkt.flags |= AV_PKT_FLAG_KEY; + pkt.stream_index= st->index; + pkt.data= (uint8_t *)picturePtr; + pkt.size= sizeof(AVPicture); +@@ -339,7 +339,7 @@ + pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base); + + if(c->coded_frame->key_frame) +- pkt.flags |= PKT_FLAG_KEY; ++ pkt.flags |= AV_PKT_FLAG_KEY; + pkt.stream_index= st->index; + pkt.data= videOutbuf; + pkt.size= out_size;

