author | David Runge
<dvzrv@archlinux.org> 2018-04-24 19:45:51 UTC |
committer | David Runge
<dvzrv@archlinux.org> 2018-04-24 19:45:51 UTC |
parent | 5c026b56af2b9c9e19ab6f5bebb33c6ecd96e4f3 |
0001-Fix-build-with-FFmpeg-4.0.patch | +28 | -0 |
PKGBUILD | +12 | -5 |
diff --git a/0001-Fix-build-with-FFmpeg-4.0.patch b/0001-Fix-build-with-FFmpeg-4.0.patch new file mode 100644 index 0000000..1fbdae1 --- /dev/null +++ b/0001-Fix-build-with-FFmpeg-4.0.patch @@ -0,0 +1,28 @@ +From 5690daf759b473b9d13b4547ef37adc2695cf524 Mon Sep 17 00:00:00 2001 +From: James Cowgill <jcowgill@jcowgill.uk> +Date: Sun, 25 Feb 2018 14:23:25 +0000 +Subject: [PATCH] Fix build with FFmpeg 4.0 + +--- + src/io/source_avcodec.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c +index ccdce807..8197445c 100644 +--- a/src/io/source_avcodec.c ++++ b/src/io/source_avcodec.c +@@ -58,7 +58,11 @@ + #include "fmat.h" + #include "source_avcodec.h" + ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 56, 0) + #define AUBIO_AVCODEC_MAX_BUFFER_SIZE FF_MIN_BUFFER_SIZE ++#else ++#define AUBIO_AVCODEC_MAX_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE ++#endif + + struct _aubio_source_avcodec_t { + uint_t hop_size; +-- +2.17.0 + diff --git a/PKGBUILD b/PKGBUILD index 22ff666..fcb7bc1 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,7 +5,7 @@ pkgbase=aubio pkgname=('aubio' 'python-aubio' 'python2-aubio') pkgver=0.4.6 -pkgrel=4 +pkgrel=5 pkgdesc="A tool for extracting annotations from audio signals" arch=('x86_64') url="https://aubio.org/" @@ -14,10 +14,16 @@ makedepends=('doxygen' 'ffmpeg' 'fftw' 'jack' 'libsamplerate' 'libsndfile' 'python-numpy' 'python-setuptools' 'python-sphinx' 'python2-numpy' 'python2-setuptools' 'python2-sphinx' 'txt2man') checkdepends=('python-nose2' 'python2-nose2') -source=("https://${pkgname}.org/pub/${pkgname}-${pkgver}.tar.bz2") -sha512sums=('0e5cab0c88d51f2fb70c0d85e1c067a7b3758fbffdbd5026686726379aa36203adb63ed3f8e40c83ea02930e0ffc4e6c246803f1d518d448d47a01984678e77d') +source=("https://${pkgname}.org/pub/${pkgname}-${pkgver}.tar.bz2" + "0001-Fix-build-with-FFmpeg-4.0.patch") +sha512sums=('0e5cab0c88d51f2fb70c0d85e1c067a7b3758fbffdbd5026686726379aa36203adb63ed3f8e40c83ea02930e0ffc4e6c246803f1d518d448d47a01984678e77d' + '46fadc289bf6ae5b57d9ba15de0e3a892e255b26c0420efea6d0acdf39cd553d7e8c4ae9a2cde0fdfe0d99b3f05ef18b41e07288174c0fbf49c8d16f8d766f9a') prepare() { + cd "${pkgname[0]}-${pkgver}" + # apply patch to build with ffmpeg >= 4.0 + patch -Np1 -i "../0001-Fix-build-with-FFmpeg-4.0.patch" + cd .. cp -av "${pkgname[0]}-${pkgver}" "${pkgname[1]}-${pkgver}" cp -av "${pkgname[0]}-${pkgver}" "${pkgname[2]}-${pkgver}" cd "${pkgname[2]}-${pkgver}" @@ -29,6 +35,7 @@ prepare() { build() { cd "${pkgname[0]}-${pkgver}" + echo "$(pwd)" python2 waf configure --prefix=/usr \ --enable-fftw3 \ --htmldir=/usr/share/doc/${pkgname} \ @@ -88,8 +95,8 @@ package_python2-aubio() { install -t "${pkgdir}/usr/share/doc/${pkgname}/" \ -vDm 644 {AUTHORS,ChangeLog,README.md} # move duplicates - mv -v ${pkgdir}/usr/bin/aubio ${pkgdir}/usr/bin/aubio2 - mv -v ${pkgdir}/usr/bin/aubiocut ${pkgdir}/usr/bin/aubiocut2 + mv -v "${pkgdir}/usr/bin/aubio" "${pkgdir}/usr/bin/aubio2" + mv -v "${pkgdir}/usr/bin/aubiocut" "${pkgdir}/usr/bin/aubiocut2" } # vim:set ts=2 sw=2 et: