diff options
Diffstat (limited to 'media-libs/aubio')
-rw-r--r-- | media-libs/aubio/Manifest | 1 | ||||
-rw-r--r-- | media-libs/aubio/aubio-0.4.9-r5.ebuild | 182 |
2 files changed, 183 insertions, 0 deletions
diff --git a/media-libs/aubio/Manifest b/media-libs/aubio/Manifest index 64954ef7818a..e0040f9044a1 100644 --- a/media-libs/aubio/Manifest +++ b/media-libs/aubio/Manifest @@ -5,4 +5,5 @@ AUX ffmpeg5.patch 745 BLAKE2B f353faf80b4fdfb26b2d8a135ab0415ac3f6780a2b5894e18b DIST aubio-0.4.9.tar.bz2 397604 BLAKE2B b849d92678ea8fb20e17921b1a61fdc85a84d4a528acfefa3278169ab5f7fe935217ec37dd9f931202f0f0a1fd3a9518372afbce34cc2dd3ca30c6b4e5d9a301 SHA512 0cb81bb4b15051db3f3f4d160d500af56fdfb237e0a74e3f366f53c2870030aa0a7cee8469a611a9694c36b8866d3d42ffb48241c999de08f3fee43e6d903130 DIST waf-2.0.27.tar.bz2 693624 BLAKE2B 34dcb84df2f42d7c92988226ae0208a9407a091f79e47b8abe1d3b33105d58df06072bfb3c22a7bb6dfa8f083224642c55fa2c9fc0110a2d49d3d10ea754c928 SHA512 a62dbb1ee89d88969c31d3f634577d80b8a595460d445cae9b42ca423cfcbbb96347b5b67697165833f3dd496b4bc7e312e166af86cb3b97ed57ffe59f46b98a EBUILD aubio-0.4.9-r4.ebuild 4070 BLAKE2B 7bb5634b723df1d527c7679a8fa9a9c7290f206ec39492ccbc034ea22c3e59fc5906083c9ba00fad013995c9cf6eaac4dd634b1b89664295eb4c6b98a480594a SHA512 60c59b90f3a0e043787f036cba746452f6bdd57ca3c4823c95ff35a2766ab3467016178f6763f2367d880959339812996d60dbb58a9cb46a23ab07dc02e4e840 +EBUILD aubio-0.4.9-r5.ebuild 4201 BLAKE2B e696d7388cb07af628b83ea8874ce07e87fff8d08d05cf9b2491ae3ea3b571c3243fc8123bfb64c902490bc48fe4a124d3cc96e2ca893499f4c9ac015169e5f6 SHA512 01d283ebea3f214df7eae173d1ed27096f2ff9f1fafbaf770608486d76ae3034c4f0f7dd5a4d5e9a2868abb06bdee39911ffbc095b73181a067aef444817b57d MISC metadata.xml 424 BLAKE2B 427627520c0e31649dc3bfa4011cb80b48cac5bc2ba6bea55812b033b1a92e2a07477729f83057ae0c213c82ed20899e05978e6968db3d3ff166e153c4b1c1ea SHA512 a9cb14aef216e074f21616493f1a9276c43f05709b14492de8cbd90d4f19878bc9f905545327985639f05ee75234d11689eba519f88c6bafaa8b848bd887178d diff --git a/media-libs/aubio/aubio-0.4.9-r5.ebuild b/media-libs/aubio/aubio-0.4.9-r5.ebuild new file mode 100644 index 000000000000..b2358128f12b --- /dev/null +++ b/media-libs/aubio/aubio-0.4.9-r5.ebuild @@ -0,0 +1,182 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +DISTUTILS_EXT=1 +DISTUTILS_OPTIONAL=1 +PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_REQ_USE='threads(+)' +inherit distutils-r1 ffmpeg-compat waf-utils + +DESCRIPTION="Library for audio labelling" +HOMEPAGE="https://aubio.org/" +WAFVERSION=2.0.27 +WAFTARBALL=waf-${WAFVERSION}.tar.bz2 +SRC_URI=" + https://aubio.org/pub/${P}.tar.bz2 + https://waf.io/${WAFTARBALL} +" + +LICENSE="GPL-3" +SLOT="0/5" +KEYWORDS="~amd64 ~loong ~ppc ~ppc64 ~sparc ~x86" +IUSE="blas doc double-precision examples ffmpeg fftw jack libsamplerate sndfile python test" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + ?? ( double-precision libsamplerate ) + doc? ( python ) +" + +RESTRICT="!test? ( test )" + +RDEPEND=" + blas? ( virtual/cblas ) + ffmpeg? ( media-video/ffmpeg-compat:6= ) + fftw? ( sci-libs/fftw:3.0= ) + jack? ( virtual/jack ) + libsamplerate? ( media-libs/libsamplerate ) + python? ( + ${PYTHON_DEPS} + dev-python/numpy[${PYTHON_USEDEP}] + ) + sndfile? ( media-libs/libsndfile ) +" + +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + app-text/txt2man + virtual/pkgconfig + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + test? ( dev-python/pytest[${PYTHON_USEDEP}] ) +" +BDEPEND="${DISTUTILS_DEPS}" + +DOCS=( AUTHORS ChangeLog README.md ) +PYTHON_SRC_DIR="${S}" + +PATCHES=( + "${FILESDIR}"/${P}-docdir.patch + "${FILESDIR}"/${P}-gcc-14.patch + "${FILESDIR}"/${P}-numpy-2.patch + "${FILESDIR}"/ffmpeg5.patch +) + +src_prepare() { + default + + # In case when aubio is already installed, calling of the + # `sphinx` function at the wscript causes a python interpreter + # crash on `import aubio` if aubio was built with <numpy-2, + # but current version of numpy is >=2. + # Additionally, it causes duplication of the documentation. + sed \ + -e '/\(doxygen\|sphinx\)(bld)$/d' \ + -e "s/package = 'blas'/package = 'cblas'/" \ + -i wscript || die + + sed -e "s/, 'sphinx.ext.intersphinx'//" -i doc/conf.py || die + + # ERROR: "Skipped: no test sounds, add some in 'python/tests/sounds/'!" + rm python/tests/test_source.py || die + + if ! use test; then + sed -e "/bld.*tests/d" -i wscript || die + fi + + # update waf to fix Python 3.12 compatibility + python_setup + sed -r \ + -e "s:python:${PYTHON}:" \ + -e "s:(WAFVERSION=).*:\1${WAFVERSION}:" \ + -e "s:(WAFURL=).*:\1'${DISTDIR}/${WAFTARBALL}':" \ + -e 's:^fetchwaf$:cp "${WAFURL}" "${WAFTARBALL}":' \ + -i scripts/get_waf.sh || die + emake expandwaf +} + +src_configure() { + # TODO: fix with >=ffmpeg-7 (or mask USE) then drop compat (bug #942964) + use ffmpeg && ffmpeg_compat_setup 6 + + python_setup + + local mywafconfargs=( + --enable-complex + --docdir="${EPREFIX}"/usr/share/doc/${PF} + $(use_enable blas) + $(use_enable doc docs) + $(use_enable double-precision double) + $(use_enable fftw fftw3) + $(use_enable ffmpeg avcodec) + $(use_enable jack) + $(use_enable libsamplerate samplerate) + $(use_enable sndfile) + ) + + use double-precision || mywafconfargs+=( $(use_enable fftw fftw3f) ) + + waf-utils_src_configure "${mywafconfargs[@]}" + + if use python ; then + cd "${PYTHON_SRC_DIR}" || die + distutils-r1_src_configure + fi +} + +src_compile() { + waf-utils_src_compile --notests + + if use python ; then + cd "${PYTHON_SRC_DIR}" || die + distutils-r1_src_compile + + if use doc ; then + # No API function available for this use case + pushd "${S}"/doc &>/dev/null || die + python_setup + LD_LIBRARY_PATH="${S}/build/src:${LD_LIBRARY_PATH}" \ + PYTHONPATH="${S%%/}-${EPYTHON/./_}/install/usr/lib/${EPYTHON}/site-packages:${PYTHONPATH}" \ + emake html + fi + + cd "${S}" || die + fi +} + +src_test() { + waf-utils_src_compile --alltests + + if use python ; then + cd "${PYTHON_SRC_DIR}" || die + distutils-r1_src_test + fi +} + +python_test() { + LD_LIBRARY_PATH="${S}/build/src:${LD_LIBRARY_PATH}" eunittest python/tests +} + +src_install() { + waf-utils_src_install + + if use examples; then + # install dist_noinst_SCRIPTS from Makefile.am + dodoc -r examples + fi + + if use python ; then + cd "${PYTHON_SRC_DIR}" || die + DOCS="" distutils-r1_src_install + newdoc python/README.md README.python + fi + + if use doc; then + dodoc doc/*.txt + docinto html + dodoc -r doc/_build/html/. + fi + + find "${ED}" -name "*.a" -delete || die +} |