summaryrefslogtreecommitdiff
path: root/community/chromaprint
diff options
context:
space:
mode:
Diffstat (limited to 'community/chromaprint')
-rw-r--r--community/chromaprint/PKGBUILD11
-rw-r--r--community/chromaprint/ffmpeg.patch33
2 files changed, 40 insertions, 4 deletions
diff --git a/community/chromaprint/PKGBUILD b/community/chromaprint/PKGBUILD
index ea7e1ef90..804f6dc65 100644
--- a/community/chromaprint/PKGBUILD
+++ b/community/chromaprint/PKGBUILD
@@ -1,21 +1,24 @@
-# $Id: PKGBUILD 62590 2012-01-22 09:25:04Z bisson $
+# $Id: PKGBUILD 73467 2012-07-08 09:29:39Z ibiru $
# Contributor: Wieland Hoffmann <the_mineo@web.de>
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
pkgname=chromaprint
pkgver=0.6
-pkgrel=2
+pkgrel=3
pkgdesc='Library that implements a custom algorithm for extracting fingerprints from any audio source'
url='http://acoustid.org/chromaprint/'
arch=('i686' 'x86_64')
license=('LGPL')
depends=('ffmpeg')
makedepends=('cmake')
-source=("https://github.com/downloads/lalinsky/${pkgname}/${pkgname}-${pkgver}.tar.gz")
-sha1sums=('e8bcc1d0d8dfec86aa648b87ba3f69b6d589eae0')
+source=("https://github.com/downloads/lalinsky/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'ffmpeg.patch')
+sha1sums=('e8bcc1d0d8dfec86aa648b87ba3f69b6d589eae0'
+ '56057f824a29194fc6041bd73e0d07412fcc065b')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i ../ffmpeg.patch
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_EXAMPLES=ON .
make
}
diff --git a/community/chromaprint/ffmpeg.patch b/community/chromaprint/ffmpeg.patch
new file mode 100644
index 000000000..7c0b86d77
--- /dev/null
+++ b/community/chromaprint/ffmpeg.patch
@@ -0,0 +1,33 @@
+diff -Naur old/examples/fpcalc.c new/examples/fpcalc.c
+--- old/examples/fpcalc.c 2011-12-22 22:11:23.000000000 +1100
++++ new/examples/fpcalc.c 2012-06-04 10:44:30.596604910 +1000
+@@ -28,7 +28,7 @@
+ #endif
+ int16_t *buffer;
+
+- if (av_open_input_file(&format_ctx, file_name, NULL, 0, NULL) != 0) {
++ if (avformat_open_input(&format_ctx, file_name, NULL, NULL) != 0) {
+ fprintf(stderr, "ERROR: couldn't open the file\n");
+ goto done;
+ }
+@@ -71,9 +71,9 @@
+ goto done;
+ }
+
+- if (codec_ctx->sample_fmt != SAMPLE_FMT_S16) {
++ if (codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16) {
+ #ifdef HAVE_AV_AUDIO_CONVERT
+- convert_ctx = av_audio_convert_alloc(SAMPLE_FMT_S16, codec_ctx->channels,
++ convert_ctx = av_audio_convert_alloc(AV_SAMPLE_FMT_S16, codec_ctx->channels,
+ codec_ctx->sample_fmt, codec_ctx->channels, NULL, 0);
+ if (!convert_ctx) {
+ fprintf(stderr, "ERROR: couldn't create sample format converter\n");
+@@ -133,7 +133,7 @@
+ if (convert_ctx) {
+ const void *ibuf[6] = { buffer1 };
+ void *obuf[6] = { buffer2 };
+- int istride[6] = { av_get_bits_per_sample_format(codec_ctx->sample_fmt) / 8 };
++ int istride[6] = { av_get_bytes_per_sample(codec_ctx->sample_fmt) };
+ int ostride[6] = { 2 };
+ int len = buffer_size / istride[0];
+ if (av_audio_convert(convert_ctx, obuf, ostride, ibuf, istride, len) < 0) {