tags 739332 + patch tags 739332 + pending thanks Dear maintainer,
I've prepared an NMU for survex (versioned as 1.2.11-1.1) and am going to upload it in 5 days to debian/experimental in order to compile it against libav10. Please feel free to tell me if I should delay it longer. Regards.
diff -Nru survex-1.2.11/debian/changelog survex-1.2.11/debian/changelog --- survex-1.2.11/debian/changelog 2014-01-27 21:56:18.000000000 -0500 +++ survex-1.2.11/debian/changelog 2014-04-12 11:04:39.000000000 -0400 @@ -1,3 +1,13 @@ +survex (1.2.11-1.1) experimental; urgency=low + + * Add libav10.patch and compile against libav10 (Closes: #739332) + Since this patch changes configure.ac, automake is invoked during the build + and triggers regeneration of documentation. This requires additional build + dependencies automake sgmltools-lite jadetex ghostscript, which are added + to debian/control. + + -- Reinhard Tartler <[email protected]> Sat, 12 Apr 2014 10:12:56 -0400 + survex (1.2.11-1) unstable; urgency=medium * New upstream release diff -Nru survex-1.2.11/debian/control survex-1.2.11/debian/control --- survex-1.2.11/debian/control 2014-01-27 21:55:13.000000000 -0500 +++ survex-1.2.11/debian/control 2014-04-12 11:02:55.000000000 -0400 @@ -5,8 +5,9 @@ Uploaders: Wookey <[email protected]> Standards-Version: 3.9.5 Build-Depends: debhelper (>= 9), libx11-dev, libxext-dev, x11proto-core-dev, - libavcodec-dev, libavformat-dev, libproj-dev, libswscale-dev, - libwxgtk2.8-dev, mesa-common-dev, libglu1-mesa-dev, autotools-dev + libavcodec-dev (>= 6:10~), libavformat-dev (>= 6:10~), libproj-dev, libswscale-dev (>= 6:10~), + libwxgtk2.8-dev, mesa-common-dev, libglu1-mesa-dev, autotools-dev, + automake, sgmltools-lite, jadetex, ghostscript Homepage: http://survex.com/ Package: survex diff -Nru survex-1.2.11/debian/patches/libav10.patch survex-1.2.11/debian/patches/libav10.patch --- survex-1.2.11/debian/patches/libav10.patch 1969-12-31 19:00:00.000000000 -0500 +++ survex-1.2.11/debian/patches/libav10.patch 2014-04-12 10:43:44.000000000 -0400 @@ -0,0 +1,114 @@ +From 8364c65ff7e60bda6061c99b79d9825b251e020e Mon Sep 17 00:00:00 2001 +From: Olly Betts <[email protected]> +Date: Tue, 18 Feb 2014 11:49:49 +1300 +Subject: [PATCH] configure.ac,src/moviemaker.cc: Fix to work with libav 10. + Reported by Moritz Muehlenhoff in <http://bugs.debian.org/739332>. + +--- + ChangeLog | 5 +++++ + configure.ac | 4 ++-- + src/moviemaker.cc | 31 +++++++++++++++++++++---------- + 3 files changed, 28 insertions(+), 12 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -201,9 +201,9 @@ AC_CHECK_LIB(avcodec, avcodec_register_a + [AVEN_LIBS="-lswscale -lavformat -lavcodec -lavutil" + save_LIBS=$LIBS + LIBS="$LIBS $AVEN_LIBS" +- AC_CHECK_FUNCS([av_guess_format avio_open avio_close avformat_write_header avcodec_encode_video2 avcodec_free_frame avcodec_open2 avformat_new_stream]) ++ AC_CHECK_FUNCS([av_guess_format avio_open avio_close avformat_write_header avcodec_encode_video2 avcodec_free_frame avcodec_open2 avformat_new_stream av_frame_alloc av_frame_free]) + AC_CHECK_DECLS([AVMEDIA_TYPE_VIDEO], [], [], [#include <libavcodec/avcodec.h>]) +- AC_CHECK_DECLS([AVCODEC_ID_NONE], [], [], [#include <libavcodec/avcodec.h>]) ++ AC_CHECK_DECLS([AV_CODEC_ID_NONE], [], [], [#include <libavcodec/avcodec.h>]) + AC_CHECK_DECLS([AV_PIX_FMT_YUV420P], [], [], [#include <libavutil/pixfmt.h>]) + LIBS=$save_LIBS])], + [], [-lavformat -lavcodec -lswscale $WX_LIBS])], +--- a/src/moviemaker.cc ++++ b/src/moviemaker.cc +@@ -76,12 +76,23 @@ extern "C" { + # ifndef HAVE_AVIO_CLOSE + # define avio_close url_fclose + # endif +-# ifndef HAVE_AVCODEC_FREE_FRAME +-static inline void avcodec_free_frame(AVFrame ** frame) { ++# ifndef HAVE_AV_FRAME_ALLOC ++static inline AVFrame * av_frame_alloc() { ++ return avcodec_alloc_frame(); ++} ++# endif ++# ifndef HAVE_AV_FRAME_FREE ++# ifdef HAVE_AVCODEC_FREE_FRAME ++static inline void av_frame_free(AVFrame ** frame) { ++ avcodec_free_frame(frame); ++} ++# else ++static inline void av_frame_free(AVFrame ** frame) { + free((*frame)->data[0]); + free(*frame); +- *frame = NULL ++ *frame = NULL; + } ++# endif + # endif + # ifndef HAVE_AVCODEC_OPEN2 + // We always pass NULL for OPTS below. +@@ -94,8 +105,8 @@ static inline void avcodec_free_frame(AV + # if !HAVE_DECL_AVMEDIA_TYPE_VIDEO + # define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO + # endif +-# if !HAVE_DECL_AVCODEC_ID_NONE +-# define AVCODEC_ID_NONE CODEC_ID_NONE ++# if !HAVE_DECL_AV_CODEC_ID_NONE ++# define AV_CODEC_ID_NONE CODEC_ID_NONE + # endif + # if !HAVE_DECL_AV_PIX_FMT_YUV420P + # define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P +@@ -143,7 +154,7 @@ bool MovieMaker::Open(const char *fnm, i + return false; + } + } +- if (fmt->video_codec == AVCODEC_ID_NONE) { ++ if (fmt->video_codec == AV_CODEC_ID_NONE) { + averrno = MOVIE_AUDIO_ONLY; + return false; + } +@@ -229,7 +240,7 @@ bool MovieMaker::Open(const char *fnm, i + #endif + + /* Allocate the encoded raw picture. */ +- frame = avcodec_alloc_frame(); ++ frame = av_frame_alloc(); + if (!frame) { + averrno = AVERROR(ENOMEM); + return false; +@@ -240,9 +251,9 @@ bool MovieMaker::Open(const char *fnm, i + return false; + } + +- if (c->pix_fmt != PIX_FMT_YUV420P) { ++ if (c->pix_fmt != AV_PIX_FMT_YUV420P) { + // FIXME need to allocate another frame for this case if we stop +- // hardcoding PIX_FMT_YUV420P. ++ // hardcoding AV_PIX_FMT_YUV420P. + abort(); + } + +@@ -328,7 +339,7 @@ bool MovieMaker::AddFrame() + #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H + AVCodecContext * c = video_st->codec; + +- if (c->pix_fmt != PIX_FMT_YUV420P) { ++ if (c->pix_fmt != AV_PIX_FMT_YUV420P) { + // FIXME convert... + abort(); + } +@@ -501,7 +512,7 @@ MovieMaker::release() + } + + if (frame) { +- avcodec_free_frame(&frame); ++ av_frame_free(&frame); + } + free(pixels); + pixels = NULL; diff -Nru survex-1.2.11/debian/patches/series survex-1.2.11/debian/patches/series --- survex-1.2.11/debian/patches/series 1969-12-31 19:00:00.000000000 -0500 +++ survex-1.2.11/debian/patches/series 2014-04-12 10:44:19.000000000 -0400 @@ -0,0 +1 @@ +libav10.patch

