# Compiling Time: 0.01 SBU
# Maintainer: DeX77 <dex+fw@dragonslave.de>

pkgname=aubio
pkgver=0.4.9
pkgrel=11
pkgdesc="A tool for extracting annotations from audio signals"
archs=('x86_64')
groups=('multimedia-extra')
url="https://aubio.org"
depends=('ffmpeg>=7.0' 'jack2' 'python3-numpy')
makedepends=('doxygen' 'python3-build' 'python3-installer' 'python3-numpy' \
	'python3-setuptools' 'python3-wheel' 'python3-sphinx' 'waf')
source=("$url/pub/${pkgname}-${pkgver}.tar.bz2" \
	ffmpeg7.patch \
	numpy-2.0.patch )
up2date="Flasttar $url/pub"
sha1sums=('ab9c4f853e74dd7774d6325da9c9840e6d50a6d6' \
          '050b0761cbf80821af71779fbd41ad17a424d035' \
          '1b637726d396facd7d06a2be304f6d4c2f6cd5dd')

build() {
	Fcd
	Fexec rm -rf  waflib || Fdie
	Fpatchall
	export LINKFLAGS="$LDFLAGS"
	export CFLAGS+=" -I/usr/lib/python3.13/site-packages/numpy/_core/include  -Wno-incompatible-pointer-types"

	echo $CFLAGS

	Fexec waf configure --enable-fftw3 --libdir=/usr/lib --prefix=/usr || Fdie
	Fexec waf build || Fdie
	Fexec python -m build --wheel --no-isolation || Fdie
	Fexec waf --destdir="$Fdestdir" install || Fdie
	Fexec python -m installer --destdir="$Fdestdir" dist/*.whl

}

# optimization OK
