1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python3_{6,7} )
8 PYTHON_REQ_USE='threads(+)'
9 inherit distutils-r1 waf-utils
11 DESCRIPTION="Library for audio labelling"
12 HOMEPAGE="https://aubio.org/"
13 SRC_URI="https://aubio.org/pub/${P}.tar.bz2"
17 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
18 IUSE="doc double-precision examples ffmpeg fftw jack libsamplerate sndfile python test"
19 RESTRICT="!test? ( test )"
22 ffmpeg? ( >=media-video/ffmpeg-2.6:0= )
23 fftw? ( sci-libs/fftw:3.0= )
24 jack? ( virtual/jack )
25 libsamplerate? ( media-libs/libsamplerate )
28 dev-python/numpy[${PYTHON_USEDEP}]
30 sndfile? ( media-libs/libsndfile )
36 doc? ( app-doc/doxygen )
38 REQUIRED_USE="${PYTHON_REQUIRED_USE}
39 ?? ( double-precision libsamplerate )
42 DOCS=( AUTHORS ChangeLog README.md )
46 "${FILESDIR}"/${PN}-0.4.9-docdir.patch
51 sed -e "s:doxygen:doxygen_disabled:" -i wscript || die
54 sed -e "/bld.*tests/d" -i wscript || die
62 --docdir="${EPREFIX}"/usr/share/doc/${PF}
63 $(use_enable doc docs)
64 $(use_enable double-precision double)
65 $(use_enable fftw fftw3)
66 $(use_enable ffmpeg avcodec)
68 $(use_enable libsamplerate samplerate)
71 use double-precision || mywafconfargs+=( $(use_enable fftw fftw3f) )
73 waf-utils_src_configure "${mywafconfargs[@]}"
76 cd "${PYTHON_SRC_DIR}" || die
77 distutils-r1_src_configure
82 waf-utils_src_compile --notests
90 cd "${PYTHON_SRC_DIR}" || die
91 distutils-r1_src_compile
96 waf-utils_src_compile --alltests
99 cd "${PYTHON_SRC_DIR}" || die
100 distutils-r1_src_test
105 waf-utils_src_install
107 if use examples; then
108 # install dist_noinst_SCRIPTS from Makefile.am
113 cd "${PYTHON_SRC_DIR}" || die
114 DOCS="" distutils-r1_src_install
115 newdoc python/README.md README.python
121 dodoc -r doc/_build/dirhtml/.
124 find "${ED}" -name "*.a" -delete || die