summaryrefslogtreecommitdiff
path: root/media-libs/chromaprint
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2015-10-30 15:31:09 +0100
committerAlexis Ballier <aballier@gentoo.org>2015-10-30 15:31:17 +0100
commitaa9e027ad7f15145076741af9d666b409167f561 (patch)
tree7e92bcd933a8aac06621dc8cba72cac21b197ce2 /media-libs/chromaprint
parentff91151495008bd60938a1c8632f289bf35393b8 (diff)
downloadgentoo-aa9e027ad7f15145076741af9d666b409167f561.tar.gz
gentoo-aa9e027ad7f15145076741af9d666b409167f561.tar.xz
media-libs/chromaprint: Backport fix from upstream to build with ffmpeg git master.
Package-Manager: portage-2.2.23
Diffstat (limited to 'media-libs/chromaprint')
-rw-r--r--media-libs/chromaprint/chromaprint-1.2.ebuild4
-rw-r--r--media-libs/chromaprint/files/chromaprint-1.2-ffmpeg29.patch48
2 files changed, 50 insertions, 2 deletions
diff --git a/media-libs/chromaprint/chromaprint-1.2.ebuild b/media-libs/chromaprint/chromaprint-1.2.ebuild
index 670ff3859c7..c0de492549f 100644
--- a/media-libs/chromaprint/chromaprint-1.2.ebuild
+++ b/media-libs/chromaprint/chromaprint-1.2.ebuild
@@ -17,7 +17,7 @@ IUSE="libav test tools"
# note: use ffmpeg or libav instead of fftw because it's recommended and required for tools
RDEPEND="
libav? ( media-video/libav:0= )
- !libav? ( media-video/ffmpeg:0= )
+ !libav? ( >=media-video/ffmpeg-2.6:0= )
"
DEPEND="${RDEPEND}
test? (
@@ -27,7 +27,7 @@ DEPEND="${RDEPEND}
DOCS="NEWS.txt README.md"
-PATCHES=( "${FILESDIR}"/${PN}-1.1-gtest.patch )
+PATCHES=( "${FILESDIR}"/${PN}-1.1-gtest.patch "${FILESDIR}"/${P}-ffmpeg29.patch )
src_configure() {
local mycmakeargs=(
diff --git a/media-libs/chromaprint/files/chromaprint-1.2-ffmpeg29.patch b/media-libs/chromaprint/files/chromaprint-1.2-ffmpeg29.patch
new file mode 100644
index 00000000000..6910f243b2e
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-1.2-ffmpeg29.patch
@@ -0,0 +1,48 @@
+commit 37092d380a28abcc63fa120499030a0f2b7df80f
+Author: Rodger Combs <rodger.combs@gmail.com>
+Date: Fri Oct 2 14:48:01 2015 -0500
+
+ fpcalc: remove uses of deprecated lavc APIs
+
+Index: chromaprint-1.2/examples/fpcalc.c
+===================================================================
+--- chromaprint-1.2.orig/examples/fpcalc.c
++++ chromaprint-1.2/examples/fpcalc.c
+@@ -17,10 +17,6 @@
+ #define MAX(a, b) ((a) > (b) ? (a) : (b))
+ #define MIN(a, b) ((a) < (b) ? (a) : (b))
+
+-#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 28, 0)
+-#define avcodec_free_frame av_freep
+-#endif
+-
+ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name, int max_length, int *duration)
+ {
+ int ok = 0, remaining, length, consumed, codec_ctx_opened = 0, got_frame, stream_index;
+@@ -131,7 +127,7 @@ int decode_audio_file(ChromaprintContext
+ remaining = max_length * codec_ctx->channels * codec_ctx->sample_rate;
+ chromaprint_start(chromaprint_ctx, codec_ctx->sample_rate, codec_ctx->channels);
+
+- frame = avcodec_alloc_frame();
++ frame = av_frame_alloc();
+
+ while (1) {
+ if (av_read_frame(format_ctx, &packet) < 0) {
+@@ -139,7 +135,7 @@ int decode_audio_file(ChromaprintContext
+ }
+
+ if (packet.stream_index == stream_index) {
+- avcodec_get_frame_defaults(frame);
++ av_frame_unref(frame);
+
+ got_frame = 0;
+ consumed = avcodec_decode_audio4(codec_ctx, frame, &got_frame, &packet);
+@@ -196,7 +192,7 @@ finish:
+
+ done:
+ if (frame) {
+- avcodec_free_frame(&frame);
++ av_frame_free(&frame);
+ }
+ if (dst_data[0]) {
+ av_freep(&dst_data[0]);