summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2014-02-10 16:47:48 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2014-02-10 16:47:48 +0000
commita658407ca0e1f6cce5e7c4f3a5e06f4414b80abc (patch)
tree1b6e3854d4abef83c6cf9894d6ebd09ea37fdd90
parentadding optional oracle support (diff)
downloadgentoo-2-a658407ca0e1f6cce5e7c4f3a5e06f4414b80abc.tar.gz
gentoo-2-a658407ca0e1f6cce5e7c4f3a5e06f4414b80abc.tar.bz2
gentoo-2-a658407ca0e1f6cce5e7c4f3a5e06f4414b80abc.zip
Apply upstream patch from bug 498194 to fix build with certain versions of media-video/libav wrt #498194 by Laurent Bachelier
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
-rw-r--r--media-libs/chromaprint/ChangeLog8
-rw-r--r--media-libs/chromaprint/chromaprint-1.1.ebuild3
-rw-r--r--media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch59
3 files changed, 68 insertions, 2 deletions
diff --git a/media-libs/chromaprint/ChangeLog b/media-libs/chromaprint/ChangeLog
index 5ddd0663246b..55f7dfa1eb07 100644
--- a/media-libs/chromaprint/ChangeLog
+++ b/media-libs/chromaprint/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-libs/chromaprint
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/chromaprint/ChangeLog,v 1.14 2014/01/14 10:06:53 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/chromaprint/ChangeLog,v 1.15 2014/02/10 16:47:48 ssuominen Exp $
+
+ 10 Feb 2014; Samuli Suominen <ssuominen@gentoo.org>
+ +files/chromaprint-1.1-libav_build_fix_for_tools.patch,
+ chromaprint-1.1.ebuild:
+ Apply upstream patch from bug 498194 to fix build with certain versions of
+ media-video/libav wrt #498194 by Laurent Bachelier
14 Jan 2014; Lars Wendler <polynomial-c@gentoo.org> chromaprint-1.1.ebuild,
+files/chromaprint-1.1-ffmpeg2.patch:
diff --git a/media-libs/chromaprint/chromaprint-1.1.ebuild b/media-libs/chromaprint/chromaprint-1.1.ebuild
index 986f6119acff..378ee1cec8de 100644
--- a/media-libs/chromaprint/chromaprint-1.1.ebuild
+++ b/media-libs/chromaprint/chromaprint-1.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/chromaprint/chromaprint-1.1.ebuild,v 1.2 2014/01/14 10:06:53 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/chromaprint/chromaprint-1.1.ebuild,v 1.3 2014/02/10 16:47:48 ssuominen Exp $
EAPI=5
@@ -32,6 +32,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-0.7-ffmpeg.patch
"${FILESDIR}"/${P}-gtest.patch
"${FILESDIR}"/${P}-ffmpeg2.patch
+ "${FILESDIR}"/${P}-libav_build_fix_for_tools.patch
)
src_configure() {
diff --git a/media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch b/media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch
new file mode 100644
index 000000000000..b53f79838091
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch
@@ -0,0 +1,59 @@
+http://bugs.gentoo.org/498194
+http://bitbucket.org/acoustid/chromaprint/commits/90822f6eee64da2941c9cbd9cd41a9664fead1d4
+
+From 90822f6eee64da2941c9cbd9cd41a9664fead1d4 Mon Sep 17 00:00:00 2001
+From: Urs Fleisch <ufleisch@users.sourceforge.net>
+Date: Sat, 28 Dec 2013 09:47:31 +0100
+Subject: [PATCH] Build fpcalc if neither HAVE_SWRESAMPLE nor HAVE_AVRESAMPLE
+ defined, issue #11.
+
+---
+ examples/fpcalc.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/examples/fpcalc.c b/examples/fpcalc.c
+index a4b0ff9..e73e358 100644
+--- a/examples/fpcalc.c
++++ b/examples/fpcalc.c
+@@ -33,6 +33,8 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ SwrContext *convert_ctx = NULL;
+ #elif defined(HAVE_AVRESAMPLE)
+ AVAudioResampleContext *convert_ctx = NULL;
++#else
++ void *convert_ctx = NULL;
+ #endif
+ int max_dst_nb_samples = 0, dst_linsize = 0;
+ uint8_t *dst_data[1] = { NULL };
+@@ -75,6 +77,7 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ goto done;
+ }
+
++#if defined(HAVE_SWRESAMPLE) || defined(HAVE_AVRESAMPLE)
+ if (codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16) {
+ int64_t channel_layout = codec_ctx->channel_layout;
+ if (!channel_layout) {
+@@ -111,6 +114,7 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ }
+ #endif
+ }
++#endif
+
+ if (stream->duration != AV_NOPTS_VALUE) {
+ *duration = stream->time_base.num * stream->duration / stream->time_base.den;
+@@ -155,10 +159,11 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ max_dst_nb_samples = frame->nb_samples;
+ }
+ #if defined(HAVE_SWRESAMPLE)
+- if (swr_convert(convert_ctx, dst_data, frame->nb_samples, (const uint8_t **)frame->data, frame->nb_samples) < 0) {
++ if (swr_convert(convert_ctx, dst_data, frame->nb_samples, (const uint8_t **)frame->data, frame->nb_samples) < 0)
+ #elif defined(HAVE_AVRESAMPLE)
+- if (avresample_convert(convert_ctx, dst_data, 0, frame->nb_samples, (uint8_t **)frame->data, 0, frame->nb_samples) < 0) {
++ if (avresample_convert(convert_ctx, dst_data, 0, frame->nb_samples, (uint8_t **)frame->data, 0, frame->nb_samples) < 0)
+ #endif
++ {
+ fprintf(stderr, "ERROR: couldn't convert the audio\n");
+ goto done;
+ }
+--
+1.9.rc2.211.gd198f5d
+