summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2013-06-17 19:46:02 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2013-06-17 19:46:02 +0000
commitb10aec3b1af02f9163013166e62b6c6c98fe40ae (patch)
tree2b0d0d7a9b78916b531b22880d37f56f08238d2c /media-plugins/vdr-audiorecorder
parentVersion bump (bug 470720), multilib build, preparations for netsurf eclass. (diff)
downloadgentoo-2-b10aec3b1af02f9163013166e62b6c6c98fe40ae.tar.gz
gentoo-2-b10aec3b1af02f9163013166e62b6c6c98fe40ae.tar.bz2
gentoo-2-b10aec3b1af02f9163013166e62b6c6c98fe40ae.zip
Apply libav patch to build with libav9 too. Fixes bug#443248.
(Portage version: 2.2.0_alpha180/cvs/Linux x86_64, signed Manifest commit with key 8EEE3BE8)
Diffstat (limited to 'media-plugins/vdr-audiorecorder')
-rw-r--r--media-plugins/vdr-audiorecorder/ChangeLog8
-rw-r--r--media-plugins/vdr-audiorecorder/files/vdr-audiorecorder-0.1.0_pre14-libav9.patch58
-rw-r--r--media-plugins/vdr-audiorecorder/vdr-audiorecorder-0.1.0_pre14-r2.ebuild6
3 files changed, 67 insertions, 5 deletions
diff --git a/media-plugins/vdr-audiorecorder/ChangeLog b/media-plugins/vdr-audiorecorder/ChangeLog
index dfb8a8d2621e..fb40d514ae9c 100644
--- a/media-plugins/vdr-audiorecorder/ChangeLog
+++ b/media-plugins/vdr-audiorecorder/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-plugins/vdr-audiorecorder
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-audiorecorder/ChangeLog,v 1.16 2013/01/18 16:22:53 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-audiorecorder/ChangeLog,v 1.17 2013/06/17 19:46:02 scarabeus Exp $
+
+ 17 Jun 2013; Tomáš Chvátal <scarabeus@gentoo.org>
+ +files/vdr-audiorecorder-0.1.0_pre14-libav9.patch,
+ vdr-audiorecorder-0.1.0_pre14-r2.ebuild:
+ Apply libav patch to build with libav9 too. Fixes bug#443248.
18 Jan 2013; Alexis Ballier <aballier@gentoo.org>
vdr-audiorecorder-0.1.0_pre14-r2.ebuild,
@@ -103,4 +108,3 @@
05 Jul 2006; Matthias Schwarzott <zzam@gentoo.org> +files/confd,
+files/rc-addon.sh, +metadata.xml, +vdr-audiorecorder-0.1.0_pre3.ebuild:
Initial import of ebuild written by me.
-
diff --git a/media-plugins/vdr-audiorecorder/files/vdr-audiorecorder-0.1.0_pre14-libav9.patch b/media-plugins/vdr-audiorecorder/files/vdr-audiorecorder-0.1.0_pre14-libav9.patch
new file mode 100644
index 000000000000..70512e5c1e48
--- /dev/null
+++ b/media-plugins/vdr-audiorecorder/files/vdr-audiorecorder-0.1.0_pre14-libav9.patch
@@ -0,0 +1,58 @@
+diff -urN audiorecorder-0.1.0-pre14.old/convert.c audiorecorder-0.1.0-pre14/convert.c
+--- audiorecorder-0.1.0-pre14.old/convert.c 2013-06-17 21:31:31.670412829 +0200
++++ audiorecorder-0.1.0-pre14/convert.c 2013-06-17 21:35:18.387404763 +0200
+@@ -51,8 +51,8 @@
+ return;
+ }
+
+- decoder_ctx = avcodec_alloc_context();
+- decoder_open = avcodec_open(decoder_ctx, decoder_codec);
++ decoder_ctx = avcodec_alloc_context3(NULL);
++ decoder_open = avcodec_open2(decoder_ctx, decoder_codec, 0);
+
+ if (decoder_open < 0) {
+ dsyslog("[audiorecorder]: could not open codec mp2 (%s, "
+@@ -77,13 +77,13 @@
+ return;
+ }
+
+- encoder_ctx = avcodec_alloc_context();
++ encoder_ctx = avcodec_alloc_context3(NULL);
+
+ encoder_ctx->bit_rate = bit_rate;
+ encoder_ctx->sample_rate = sample_rate;
+ encoder_ctx->channels = channels;
+
+- encoder_open = avcodec_open(encoder_ctx, encoder_codec);
++ encoder_open = avcodec_open2(encoder_ctx, encoder_codec, 0);
+
+ if (encoder_open < 0) {
+ dsyslog("[audiorecorder]: could not open codec %s (%s, %s())", codec, __FILE__, __func__);
+@@ -111,9 +111,13 @@
+ avcodec_decode_audio(decoder_ctx, (short *)decoder_buf.data,
+ &decoder_buf.length, mpa_frame->data, mpa_frame->length);
+ #else
++ AVPacket avpkt;
++ av_init_packet(&avpkt);
++ avpkt.data = mpa_frame->data;
++ avpkt.size = mpa_frame->length;
+ decoder_buf.length = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+- avcodec_decode_audio2(decoder_ctx, (short *)decoder_buf.data,
+- &decoder_buf.length, mpa_frame->data, mpa_frame->length);
++ int len = avcodec_decode_audio3(decoder_ctx, (short *)decoder_buf.data,
++ &decoder_buf.length, &avpkt);
+ #endif
+ }
+
+diff -urN audiorecorder-0.1.0-pre14.old/convert.h audiorecorder-0.1.0-pre14/convert.h
+--- audiorecorder-0.1.0-pre14.old/convert.h 2013-06-17 21:31:31.670412829 +0200
++++ audiorecorder-0.1.0-pre14/convert.h 2013-06-17 21:41:17.056392003 +0200
+@@ -10,7 +10,8 @@
+ #include "a-tools.h"
+
+ extern "C" {
+ #include <libavcodec/avcodec.h>
++#include <libavutil/mem.h>
+ }
+
+
diff --git a/media-plugins/vdr-audiorecorder/vdr-audiorecorder-0.1.0_pre14-r2.ebuild b/media-plugins/vdr-audiorecorder/vdr-audiorecorder-0.1.0_pre14-r2.ebuild
index b11dd35939b2..d119c60c9fff 100644
--- a/media-plugins/vdr-audiorecorder/vdr-audiorecorder-0.1.0_pre14-r2.ebuild
+++ b/media-plugins/vdr-audiorecorder/vdr-audiorecorder-0.1.0_pre14-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-audiorecorder/vdr-audiorecorder-0.1.0_pre14-r2.ebuild,v 1.2 2013/01/18 16:22:53 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/vdr-audiorecorder/vdr-audiorecorder-0.1.0_pre14-r2.ebuild,v 1.3 2013/06/17 19:46:02 scarabeus Exp $
EAPI="4"
@@ -35,11 +35,11 @@ src_prepare() {
sed -i "s:RegisterI18n:// RegisterI18n:" audiorecorder.c
# UINT64_C is needed by ffmpeg headers
- append-flags -D__STDC_CONSTANT_MACROS
+ append-cppflags -D__STDC_CONSTANT_MACROS
- epatch "${FILESDIR}/${P}_ffmpeg.diff"
epatch "${FILESDIR}/${P}_obsolete-i18n.diff"
epatch "${FILESDIR}/${P}-ffmpeg-1.patch"
+ epatch "${FILESDIR}/${P}-libav9.patch"
}
src_install() {