# Copyright 2009 Ali Polatel # Distributed under the terms of the GNU General Public License v2 WAF_VERSION="2.0.27" require setup-py [ import=setuptools blacklist=2 with_opt=true multibuild=false ] waf require ffmpeg [ with_opt=true ] SUMMARY="Library for audio labelling" DESCRIPTION=" aubio is a library for audio labelling. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. The name aubio comes from 'audio' with a typo: several transcription errors are likely to be found in the results too. " HOMEPAGE="https://aubio.org" DOWNLOADS=" ${HOMEPAGE}/pub/${PNV}.tar.bz2 https://waf.io/waf-${WAF_VERSION}.tar.bz2 " LICENCES="GPL-3" SLOT="0" PLATFORMS="~amd64" MYOPTIONS=" doc jack " DEPENDENCIES=" build: virtual/pkg-config doc? ( app-doc/doxygen app-text/txt2man dev-python/Sphinx[python_abis:*(-)?] ) build+run: media-libs/libsndfile[>=1.0.4] media-libs/libsamplerate[>=0.0.15] sci-libs/fftw[>=3.0.0] jack? ( media-sound/jack-audio-connection-kit ) python? ( dev-python/numpy[python_abis:*(-)?] ) " DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/cdfe9cef2dcc3edf7d05ca2e9c2dbbf8dea21f1c.patch "${FILES}"/8a05420e5dd8c7b8b2447f82dc919765876511b3.patch "${FILES}"/245deeadd81afc4ec5635b65d71646490c5c19fd.patch "${FILES}"/128acfdcdcc13fcf4333a01c425b83028e746694.patch "${FILES}"/0b947f9634937d27589d995ec90e90d763aca86f.patch "${FILES}"/53bc55cda4f0e106e63b8a993538fa4debf4bb66.patch "${FILES}"/8e9d3a3696e1384f21e8a7b9bc302b17bfb912b4.patch "${FILES}"/95ff046c698156f21e2ca0d1d8a02c23ab76969f.patch "${FILES}"/3c04fb823eb9971c1d7ee130ff6dde3468dc5d06.patch "${FILES}"/f852d815a7b91b024b9b0d162c3ef2ebc8133200.patch "${FILES}"/0a93f7078b2ab3a8c08bd5e995f21ca7b126f3e8.patch "${FILES}"/ee46e7c8e702f2d14687ae71f9fe49071da531be.patch ) WAF_SRC_CONFIGURE_PARAMS=( --docdir=/usr/share/doc/${PNVR}/html --mandir=/usr/share/man/man1 --enable-complex --enable-double --enable-fftw3 --disable-fftw3f --disable-intelipp --disable-samplerate --disable-sndfile ) WAF_SRC_CONFIGURE_OPTION_ENABLES=( "doc docs" "ffmpeg avcodec" jack ) WAF_SRC_COMPILE_PARAMS=( --notests ) src_prepare() { default # copy in newer waf version to fix build with python 3.11 & 3.12 edo cp -a "${WORKBASE}"/waf-${WAF_VERSION}/{waf,waflib} "${WORK}" # fix documentation install path edo sed \ -e "s:libaubio-doc:${PNVR}:g" \ -i wscript # remove failing test with ffmpeg 7 # https://github.com/aubio/aubio/issues/397 edo rm tests/src/io/test-source_avcodec.c } src_configure() { waf_src_configure if option python ; then setup-py_src_configure fi } src_compile() { waf_src_compile if option python ; then setup-py_src_compile fi } src_test() { ewaf --jobs=${EXJOBS:-1} --alltests # Python tests segfault (0.4.1) #if option python ; then #edo pushd python/tests #export PYTHONPATH=$(ls -d "${WORK}"/python/build/lib.*/) #edo ${PYTHON} -B run_all_tests #edo popd #fi } src_install() { waf_src_install if option python ; then setup-py_src_install fi }