commit: cbea35422e5d18cd944849ee040d35c1d410625a
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 16 16:51:38 2015 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Wed Sep 16 16:51:38 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbea3542
media-sound/potamus: fix build with ffmpeg git master.
Package-Manager: portage-2.2.20.1
media-sound/potamus/files/ffmpeg29.patch | 22 ++++++++++++++++++++++
media-sound/potamus/potamus-16.ebuild | 7 ++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/media-sound/potamus/files/ffmpeg29.patch
b/media-sound/potamus/files/ffmpeg29.patch
new file mode 100644
index 0000000..8565d7d
--- /dev/null
+++ b/media-sound/potamus/files/ffmpeg29.patch
@@ -0,0 +1,22 @@
+Index: potamus-16/src/input-avcodec.c
+===================================================================
+--- potamus-16.orig/src/input-avcodec.c
++++ potamus-16/src/input-avcodec.c
+@@ -41,7 +41,7 @@ static int input_avcodec_open(input *p,
+ g_error("out of memory");
+ p->data = a;
+
+- a->frame = avcodec_alloc_frame();
++ a->frame = av_frame_alloc();
+
+ for (int pass = 0; pass < 2; pass++) {
+ a->format = NULL;
+@@ -114,7 +114,7 @@ static int input_avcodec_get_audio(input
+
+ // Decode the packet.
+ while (packet.size > 0) {
+- avcodec_get_frame_defaults(a->frame);
++ av_frame_unref(a->frame);
+
+ int got_frame = 0;
+ int in_used = avcodec_decode_audio4(a->codec_ctx,
diff --git a/media-sound/potamus/potamus-16.ebuild
b/media-sound/potamus/potamus-16.ebuild
index 5c3006b..aa6e665 100644
--- a/media-sound/potamus/potamus-16.ebuild
+++ b/media-sound/potamus/potamus-16.ebuild
@@ -4,7 +4,7 @@
EAPI=4
-inherit gnome2
+inherit gnome2 eutils
DESCRIPTION="a lightweight audio player with a simple interface and an
emphasis on high audio quality"
HOMEPAGE="http://offog.org/code/potamus.html"
@@ -30,6 +30,11 @@ RDEPEND="x11-libs/gtk+:2
DEPEND="${RDEPEND}
virtual/pkgconfig"
+src_prepare() {
+ gnome2_src_prepare
+ has_version '>=media-video/ffmpeg-2.8' && epatch
"${FILESDIR}/ffmpeg29.patch"
+}
+
src_configure() {
econf \
$(use_enable audiofile input-audiofile) \