1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python2_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 libav libsamplerate sndfile python test"
19 RESTRICT="!test? ( test )"
23 !libav? ( >=media-video/ffmpeg-2.6:0= )
24 libav? ( >=media-video/libav-9:0= )
26 fftw? ( sci-libs/fftw:3.0= )
27 jack? ( virtual/jack )
28 libsamplerate? ( media-libs/libsamplerate )
32 dev-python/numpy-python2[${PYTHON_USEDEP}]
33 dev-python/numpy[${PYTHON_USEDEP}]
36 sndfile? ( media-libs/libsndfile )
42 doc? ( app-doc/doxygen )
44 REQUIRED_USE="${PYTHON_REQUIRED_USE}
45 ?? ( double-precision libsamplerate )
48 DOCS=( AUTHORS ChangeLog README.md )
53 sed -e "s:doxygen:doxygen_disabled:" -i wscript || die
56 sed -e "/bld.*tests/d" -i wscript || die
64 --docdir="${EPREFIX}"/usr/share/doc/${PF}
65 $(use_enable double-precision double)
66 $(use_enable fftw fftw3)
67 $(use_enable ffmpeg avcodec)
69 $(use_enable libsamplerate samplerate)
72 use double-precision || mywafconfargs+=( $(use_enable fftw fftw3f) )
74 waf-utils_src_configure "${mywafconfargs[@]}"
77 cd "${PYTHON_SRC_DIR}" || die
78 distutils-r1_src_configure
83 waf-utils_src_compile --notests
91 cd "${PYTHON_SRC_DIR}" || die
92 distutils-r1_src_compile
97 waf-utils_src_compile --alltests
100 cd "${PYTHON_SRC_DIR}" || die
101 distutils-r1_src_test
106 waf-utils_src_install
108 if use examples; then
109 # install dist_noinst_SCRIPTS from Makefile.am
114 cd "${PYTHON_SRC_DIR}" || die
115 DOCS="" distutils-r1_src_install
116 newdoc python/README.md README.python
122 dodoc -r doc/_build/dirhtml/.
125 find "${ED}" -name "*.a" -delete || die