1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python{2_7,3_{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 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 )
31 dev-python/numpy[${PYTHON_USEDEP}]
33 sndfile? ( media-libs/libsndfile )
39 doc? ( app-doc/doxygen )
41 REQUIRED_USE="${PYTHON_REQUIRED_USE}
42 ?? ( double-precision libsamplerate )
45 DOCS=( AUTHORS ChangeLog README.md )
49 "${FILESDIR}"/${PN}-0.4.9-docdir.patch
54 sed -e "s:doxygen:doxygen_disabled:" -i wscript || die
57 sed -e "/bld.*tests/d" -i wscript || die
65 --docdir="${EPREFIX}"/usr/share/doc/${PF}
66 $(use_enable doc docs)
67 $(use_enable double-precision double)
68 $(use_enable fftw fftw3)
69 $(use_enable ffmpeg avcodec)
71 $(use_enable libsamplerate samplerate)
74 use double-precision || mywafconfargs+=( $(use_enable fftw fftw3f) )
76 waf-utils_src_configure "${mywafconfargs[@]}"
79 cd "${PYTHON_SRC_DIR}" || die
80 distutils-r1_src_configure
85 waf-utils_src_compile --notests
93 cd "${PYTHON_SRC_DIR}" || die
94 distutils-r1_src_compile
99 waf-utils_src_compile --alltests
102 cd "${PYTHON_SRC_DIR}" || die
103 distutils-r1_src_test
108 waf-utils_src_install
110 if use examples; then
111 # install dist_noinst_SCRIPTS from Makefile.am
116 cd "${PYTHON_SRC_DIR}" || die
117 DOCS="" distutils-r1_src_install
118 newdoc python/README.md README.python
124 dodoc -r doc/_build/dirhtml/.
127 find "${ED}" -name "*.a" -delete || die