Package: xmms2 Version: 0.8+dfsg-4 Severity: important Tags: patch Dear Maintainer,
xmms2 currenty fails to build against libav9 as found in debian/experimental: [ 68/319] c: src/plugins/null/null.c -> _build_/src/plugins/null/null.c.1.o 19:26:16 runner ['/usr/bin/gcc', '-g', '-O0', '-Wall', '-Wempty-body', '-Wformat=2', '-Wformat-nonliteral', '-Wformat-security', '-Wignored-qualifiers', '-Wmissing-prototypes', '-Wstrict-prototypes', '-Wtype-limits', '-Wwrite-strings', '-Wno-format-extra-args', '-Wno-format-zero-length', '-fdiagnostics-show-option', '-Werror=implicit-function-declaration', '-fPIC', '-I/«BUILDDIR»/xmms2-0.8+dfsg/_build_', '-I/«BUILDDIR»/xmms2-0.8+dfsg', '-I/«BUILDDIR»/xmms2-0.8+dfsg/_build_/src/include', '-I/«BUILDDIR»/xmms2-0.8+dfsg/src/include', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '../src/plugins/null/null.c', '-c', '-o', 'src/plugins/null/null.c.1.o'] [ 69/319] c: src/plugins/avcodec/avcodec.c -> _build_/src/plugins/avcodec/avcodec.c.1.o 19:26:16 runner ['/usr/bin/gcc', '-g', '-O0', '-Wall', '-Wempty-body', '-Wformat=2', '-Wformat-nonliteral', '-Wformat-security', '-Wignored-qualifiers', '-Wmissing-prototypes', '-Wstrict-prototypes', '-Wtype-limits', '-Wwrite-strings', '-Wno-format-extra-args', '-Wno-format-zero-length', '-fdiagnostics-show-option', '-Werror=implicit-function-declaration', '-fPIC', '-I/«BUILDDIR»/xmms2-0.8+dfsg/_build_', '-I/«BUILDDIR»/xmms2-0.8+dfsg', '-I/«BUILDDIR»/xmms2-0.8+dfsg/_build_/src/include', '-I/«BUILDDIR»/xmms2-0.8+dfsg/src/include', '-I/usr/include/glib-2.0', '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include', '../src/plugins/avcodec/avcodec.c', '-c', '-o', 'src/plugins/avcodec/avcodec.c.1.o'] ../src/plugins/avcodec/avcodec.c: In function 'xmms_avcodec_destroy': ../src/plugins/avcodec/avcodec.c:109:2: error: implicit declaration of function 'av_free' [-Werror=implicit-function-declaration] ../src/plugins/avcodec/avcodec.c: In function 'xmms_avcodec_init': ../src/plugins/avcodec/avcodec.c:137:2: error: implicit declaration of function 'avcodec_init' [-Werror=implicit-function-declaration] ../src/plugins/avcodec/avcodec.c:203:2: error: implicit declaration of function 'avcodec_alloc_context' [-Werror=implicit-function-declaration] ../src/plugins/avcodec/avcodec.c:203:17: warning: assignment makes pointer from integer without a cast [enabled by default] ../src/plugins/avcodec/avcodec.c:214:2: error: implicit declaration of function 'avcodec_open' [-Werror=implicit-function-declaration] ../src/plugins/avcodec/avcodec.c: In function 'xmms_avcodec_read': ../src/plugins/avcodec/avcodec.c:334:3: warning: 'avcodec_decode_audio3' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3594) [-Wdeprecated-declarations] ../src/plugins/avcodec/avcodec.c: In function 'xmms_avcodec_seek': ../src/plugins/avcodec/avcodec.c:400:3: warning: 'avcodec_decode_audio3' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3594) [-Wdeprecated-declarations] cc1: some warnings being treated as errors Waf: Leaving directory `/«BUILDDIR»/xmms2-0.8+dfsg/_build_' Furtuntatly, upstream has already fixed this in the latest development release. With the help of Diego Burrin, I have backported the patches from http://git.vdust.net/cgit.cgi/xmms2-vdust/log/?h=DrO_o-avcodec to the current version of the package and testbuilt it. Please find the debdiff attached to this email. Cheers, Reinhard -- System Information: Debian Release: wheezy/sid APT prefers precise-updates APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 'precise-proposed'), (500, 'precise') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-34-generic (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -Nru xmms2-0.8+dfsg/debian/changelog xmms2-0.8+dfsg/debian/changelog --- xmms2-0.8+dfsg/debian/changelog 2012-06-26 10:39:31.000000000 +0200 +++ xmms2-0.8+dfsg/debian/changelog 2012-11-25 19:23:16.000000000 +0100 @@ -1,3 +1,11 @@ +xmms2 (0.8+dfsg-4ubuntu1) raring; urgency=low + + * Unbreak compilation against libav9 by backporting three patches from + upstream: fix-avcodec-init.patch, fix-alloc-context.patch and + fix-missing-include.patch + + -- Reinhard Tartler <[email protected]> Sun, 25 Nov 2012 19:23:15 +0100 + xmms2 (0.8+dfsg-4) unstable; urgency=low * Using -j1 for waf on bsd diff -Nru xmms2-0.8+dfsg/debian/patches/fix-alloc-context.patch xmms2-0.8+dfsg/debian/patches/fix-alloc-context.patch --- xmms2-0.8+dfsg/debian/patches/fix-alloc-context.patch 1970-01-01 01:00:00.000000000 +0100 +++ xmms2-0.8+dfsg/debian/patches/fix-alloc-context.patch 2012-11-25 19:20:41.000000000 +0100 @@ -0,0 +1,52 @@ +From 628ff29c5fdc4ff8352443d01c8b85bd89821683 Mon Sep 17 00:00:00 2001 +From: Juho Vähä-Herttua <[email protected]> +Date: Fri, 08 Jun 2012 06:47:03 +0000 +Subject: OTHER: Fix some deprecated warnings in libavcodec + +--- +diff --git a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c +index b32de4d..86d979f 100644 +--- a/src/plugins/avcodec/avcodec.c ++++ b/src/plugins/avcodec/avcodec.c +@@ -208,7 +208,7 @@ xmms_avcodec_init (xmms_xform_t *xform) + } + } + +- data->codecctx = avcodec_alloc_context (); ++ data->codecctx = avcodec_alloc_context3 (codec); + data->codecctx->sample_rate = data->samplerate; + data->codecctx->channels = data->channels; + data->codecctx->bit_rate = data->bitrate; +@@ -219,7 +219,7 @@ xmms_avcodec_init (xmms_xform_t *xform) + data->codecctx->codec_id = codec->id; + data->codecctx->codec_type = codec->type; + +- if (avcodec_open (data->codecctx, codec) < 0) { ++ if (avcodec_open2 (data->codecctx, codec, NULL) < 0) { + XMMS_DBG ("Opening decoder '%s' failed", codec->name); + goto err; + } else { +diff --git a/src/plugins/avcodec/avcodec_compat.h b/src/plugins/avcodec/avcodec_compat.h +index f1b1af7..bc770f2 100644 +--- a/src/plugins/avcodec/avcodec_compat.h ++++ b/src/plugins/avcodec/avcodec_compat.h +@@ -69,3 +69,17 @@ typedef struct AVPacket { + #if LIBAVCODEC_VERSION_INT >= 0x350400 + # define avcodec_init() + #endif ++ ++/* Map avcodec_alloc_context3 into the deprecated version ++ * avcodec_alloc_context in versions earlier than 53.04 (ffmpeg 0.9) */ ++#if LIBAVCODEC_VERSION_INT < 0x350400 ++# define avcodec_alloc_context3(codec) \ ++ avcodec_alloc_context() ++#endif ++ ++/* Map avcodec_open2 into the deprecated version ++ * avcodec_open in versions earlier than 53.04 (ffmpeg 0.9) */ ++#if LIBAVCODEC_VERSION_INT < 0x350400 ++# define avcodec_open2(avctx, codec, options) \ ++ avcodec_open(avctx, codec) ++#endif +-- +cgit v0.9.0.3 diff -Nru xmms2-0.8+dfsg/debian/patches/fix-avcodec-init.patch xmms2-0.8+dfsg/debian/patches/fix-avcodec-init.patch --- xmms2-0.8+dfsg/debian/patches/fix-avcodec-init.patch 1970-01-01 01:00:00.000000000 +0100 +++ xmms2-0.8+dfsg/debian/patches/fix-avcodec-init.patch 2012-11-25 19:20:13.000000000 +0100 @@ -0,0 +1,20 @@ +From c16bb588fd5122b36aea8ab9fbf2ea552eb1a194 Mon Sep 17 00:00:00 2001 +From: Juho Vähä-Herttua <[email protected]> +Date: Fri, 08 Jun 2012 06:30:47 +0000 +Subject: OTHER: Quick fix to make XMMS2 compile on ffmpeg 0.11 + +--- +diff --git a/src/plugins/avcodec/avcodec_compat.h b/src/plugins/avcodec/avcodec_compat.h +index df87b27..f1b1af7 100644 +--- a/src/plugins/avcodec/avcodec_compat.h ++++ b/src/plugins/avcodec/avcodec_compat.h +@@ -65,3 +65,7 @@ typedef struct AVPacket { + # define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO + #endif + ++/* Calling avcodec_init is not necessary after 53.04 (ffmpeg 0.9) */ ++#if LIBAVCODEC_VERSION_INT >= 0x350400 ++# define avcodec_init() ++#endif +-- +cgit v0.9.0.3 diff -Nru xmms2-0.8+dfsg/debian/patches/fix-missing-include.patch xmms2-0.8+dfsg/debian/patches/fix-missing-include.patch --- xmms2-0.8+dfsg/debian/patches/fix-missing-include.patch 1970-01-01 01:00:00.000000000 +0100 +++ xmms2-0.8+dfsg/debian/patches/fix-missing-include.patch 2012-11-25 19:21:10.000000000 +0100 @@ -0,0 +1,21 @@ +From ec98cc5d2962a5270adb8c7f0f892cc4647cd61b Mon Sep 17 00:00:00 2001 +From: Diego Biurrun <[email protected]> +Date: Sun, 25 Nov 2012 16:33:02 +0000 +Subject: OTHER: Support for newer libavcodec versions + +Add missing #include +--- +diff --git a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c +index 86d979f..357a1ae 100644 +--- a/src/plugins/avcodec/avcodec.c ++++ b/src/plugins/avcodec/avcodec.c +@@ -23,6 +23,7 @@ + #include <stdlib.h> + #include <string.h> + #include <glib.h> ++#include <libavutil/mem.h> + + #include "avcodec_compat.h" + +-- +cgit v0.9.0.3 diff -Nru xmms2-0.8+dfsg/debian/patches/series xmms2-0.8+dfsg/debian/patches/series --- xmms2-0.8+dfsg/debian/patches/series 2012-06-18 10:41:46.000000000 +0200 +++ xmms2-0.8+dfsg/debian/patches/series 2012-11-25 19:22:19.000000000 +0100 @@ -5,3 +5,6 @@ rpath.patch fix-manpage-errors.patch fix-typos.patch +fix-avcodec-init.patch +fix-alloc-context.patch +fix-missing-include.patch

