author | David Runge
<dvzrv@archlinux.org> 2018-09-27 07:37:54 UTC |
committer | David Runge
<dvzrv@archlinux.org> 2018-09-27 07:37:54 UTC |
parent | 733528805fb5d2a988ed7964396f0210fb9c8a02 |
0001-Fix-build-with-FFmpeg-4.0.patch | +0 | -28 |
PKGBUILD | +24 | -27 |
diff --git a/0001-Fix-build-with-FFmpeg-4.0.patch b/0001-Fix-build-with-FFmpeg-4.0.patch deleted file mode 100644 index 1fbdae1..0000000 --- a/0001-Fix-build-with-FFmpeg-4.0.patch +++ /dev/null @@ -1,28 +0,0 @@ -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 2a75d11..18fe346 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,8 +4,8 @@ pkgbase=aubio pkgname=('aubio' 'python-aubio' 'python2-aubio') -pkgver=0.4.6 -pkgrel=7 +pkgver=0.4.7 +pkgrel=1 pkgdesc="A tool for extracting annotations from audio signals" arch=('x86_64') url="https://aubio.org/" @@ -14,56 +14,56 @@ 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" - "0001-Fix-build-with-FFmpeg-4.0.patch") -sha512sums=('0e5cab0c88d51f2fb70c0d85e1c067a7b3758fbffdbd5026686726379aa36203adb63ed3f8e40c83ea02930e0ffc4e6c246803f1d518d448d47a01984678e77d' - '46fadc289bf6ae5b57d9ba15de0e3a892e255b26c0420efea6d0acdf39cd553d7e8c4ae9a2cde0fdfe0d99b3f05ef18b41e07288174c0fbf49c8d16f8d766f9a') +source=("https://${pkgbase}.org/pub/${pkgbase}-${pkgver}.tar.bz2") +sha512sums=('30c614f2b502b993df28d4746a99421fe0aada33c98c42ea19c271554b29b360cb4d4f6650c1b1da508da4bc341348c5944cb452f69b2bf354ca6348f84de260') 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}" + cp -av "${pkgbase}-${pkgver}" "${pkgname[2]}-${pkgver}" cd "${pkgname[2]}-${pkgver}" # python2 shebang sed -e '1s/python/&2/' \ -i "python/lib/${pkgname}/"{__init__,cmd,cut}.py \ -i "python/tests/"*.py + # console_scripts names + sed -e 's/aubio =/aubio2 =/g' \ + -e 's/aubiocut/&2/' \ + -i setup.py } build() { - cd "${pkgname[0]}-${pkgver}" + cd "${pkgbase}-${pkgver}" echo "$(pwd)" - python2 waf configure --prefix=/usr \ + python waf configure --prefix=/usr \ --enable-fftw3 \ --htmldir=/usr/share/doc/${pkgname} \ --docdir=/usr/share/doc/${pkgname} \ --libdir=/usr/lib - python2 waf build - cd ../"${pkgname[1]}-${pkgver}" + python waf build python setup.py build cd ../"${pkgname[2]}-${pkgver}" python2 setup.py build } check() { - cd "${pkgname[1]}-${pkgver}" - PYTHONPATH="${PWD}/build/lib.linux-${CARCH}-3.7:${PYTHONPATH}" python setup.py test + cd "${pkgbase}-${pkgver}" + LD_LIBRARY_PATH="${PWD}/build/src" \ + PYTHONPATH="${PWD}/build/lib.linux-${CARCH}-3.7:${PYTHONPATH}" \ + python setup.py test cd ../"${pkgname[2]}-${pkgver}" - PYTHONPATH="${PWD}/build/lib.linux-${CARCH}-2.7:${PYTHONPATH}" python2 setup.py test + LD_LIBRARY_PATH="${PWD}/build/src" \ + PYTHONPATH="${PWD}/build/lib.linux-${CARCH}-2.7:${PYTHONPATH}" \ + python2 setup.py test } package_aubio() { pkgdesc="A tool for extracting annotations from audio signals" - depends=('ffmpeg' 'fftw' 'jack' 'libsamplerate') - optdepends=('python2-numpy: Python 2.x interface' - 'python-numpy: Python 3.x interface') + depends=('ffmpeg' 'fftw') + optdepends=('python2-aubio: Python 2.x interface' + 'python-aubio: Python 3.x interface') groups=('pro-audio') cd "${pkgname}-${pkgver}" - python2 waf --destdir="${pkgdir}" install + python waf --destdir="${pkgdir}" install # move doc, as waf configure doesn't honor the htmldir and docdir settings mv -v "${pkgdir}/usr/share/doc/lib${pkgname}-doc" \ "${pkgdir}/usr/share/doc/${pkgname}" @@ -74,7 +74,7 @@ package_aubio() { package_python-aubio() { pkgdesc="Python 3.x bindings for aubio." depends=('aubio' 'python-numpy' 'python-setuptools') - cd "${pkgname}-${pkgver}" + cd "${pkgbase}-${pkgver}" python setup.py install --skip-build \ --optimize=1 \ --root="${pkgdir}" @@ -91,9 +91,6 @@ package_python2-aubio() { --root="${pkgdir}" 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" } # vim:set ts=2 sw=2 et: