commit: 765cbe9e259d277abfaa186a9d5cb2d7725b211a
Author: Aliaksei Urbanski <aliaksei.urbanski <AT> gmail <DOT> com>
AuthorDate: Wed Jun 19 00:59:28 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun 25 02:08:49 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=765cbe9e
media-libs/aubio: revbump to 0.4.9-r4
These changes fix:
- compile with python-exec[-native-symlinks]
- GCC 14 compatibility
- NumPy 2 compatibility
- documentation issues:
* partially missing docs on the first install
* duplicated docs on reinstalls
- missing blas USE flag
- missing pytest dependency
[sam: Drop the changes to -r2.]
Closes: https://bugs.gentoo.org/933405
Closes: https://bugs.gentoo.org/925102
Bug: https://bugs.gentoo.org/589262
Signed-off-by: Aliaksei Urbanski <aliaksei.urbanski <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36988
Signed-off-by: Sam James <sam <AT> gentoo.org>
...aubio-0.4.9-r3.ebuild => aubio-0.4.9-r4.ebuild} | 32 +++++++++++++------
media-libs/aubio/files/aubio-0.4.9-gcc-14.patch | 37 ++++++++++++++++++++++
media-libs/aubio/files/aubio-0.4.9-numpy-2.patch | 13 ++++++++
3 files changed, 72 insertions(+), 10 deletions(-)
diff --git a/media-libs/aubio/aubio-0.4.9-r3.ebuild
b/media-libs/aubio/aubio-0.4.9-r4.ebuild
similarity index 77%
rename from media-libs/aubio/aubio-0.4.9-r3.ebuild
rename to media-libs/aubio/aubio-0.4.9-r4.ebuild
index 4a910ed12d2e..0c8533c51c66 100644
--- a/media-libs/aubio/aubio-0.4.9-r3.ebuild
+++ b/media-libs/aubio/aubio-0.4.9-r4.ebuild
@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
PYTHON_REQ_USE='threads(+)'
inherit distutils-r1 waf-utils
@@ -22,7 +22,7 @@ SRC_URI="
LICENSE="GPL-3"
SLOT="0/5"
KEYWORDS="~amd64 ~loong ~ppc ~ppc64 ~sparc ~x86"
-IUSE="doc double-precision examples ffmpeg fftw jack libsamplerate sndfile
python test"
+IUSE="blas doc double-precision examples ffmpeg fftw jack libsamplerate
sndfile python test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
?? ( double-precision libsamplerate )
@@ -32,6 +32,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
RESTRICT="!test? ( test )"
RDEPEND="
+ blas? ( virtual/cblas )
ffmpeg? ( >=media-video/ffmpeg-2.6:0= )
fftw? ( sci-libs/fftw:3.0= )
jack? ( virtual/jack )
@@ -47,10 +48,8 @@ DEPEND="${RDEPEND}
${PYTHON_DEPS}
app-text/txt2man
virtual/pkgconfig
- doc? (
- app-text/doxygen
- dev-python/sphinx[${PYTHON_USEDEP}]
- )
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )
"
BDEPEND="${DISTUTILS_DEPS}"
@@ -59,13 +58,23 @@ 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
- sed -e "s:doxygen:doxygen_disabled:" -i wscript || die
+ # 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
@@ -77,7 +86,9 @@ src_prepare() {
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}":' \
@@ -91,6 +102,7 @@ src_configure() {
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)
@@ -122,8 +134,8 @@ src_compile() {
pushd "${S}"/doc &>/dev/null || die
python_setup
LD_LIBRARY_PATH="${S}/build/src:${LD_LIBRARY_PATH}" \
-
PYTHONPATH="${S%%/}-${EPYTHON/./_}/lib${PYTHONPATH:+:${PYTHONPATH}}" \
- emake dirhtml
+
PYTHONPATH="${S%%/}-${EPYTHON/./_}/install/usr/lib/${EPYTHON}/site-packages:${PYTHONPATH}"
\
+ emake html
fi
cd "${S}" || die
@@ -160,7 +172,7 @@ src_install() {
if use doc; then
dodoc doc/*.txt
docinto html
- dodoc -r doc/_build/dirhtml/.
+ dodoc -r doc/_build/html/.
fi
find "${ED}" -name "*.a" -delete || die
diff --git a/media-libs/aubio/files/aubio-0.4.9-gcc-14.patch
b/media-libs/aubio/files/aubio-0.4.9-gcc-14.patch
new file mode 100644
index 000000000000..658ca9e2ffcf
--- /dev/null
+++ b/media-libs/aubio/files/aubio-0.4.9-gcc-14.patch
@@ -0,0 +1,37 @@
+# https://bugs.gentoo.org/925102
+# https://github.com/aubio/aubio/commit/95ff046c
+
+From: Paul Brossier <[email protected]>
+Date: Thu, 2 Jul 2020 11:16:13 +0200
+Subject: [PATCH] [py] add const qualifiers to ufuncs prototypes for latest
numpy
+
+---
+ python/ext/ufuncs.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/python/ext/ufuncs.c b/python/ext/ufuncs.c
+index d373d7258..e5641342e 100644
+--- a/python/ext/ufuncs.c
++++ b/python/ext/ufuncs.c
+@@ -3,8 +3,8 @@
+
+ typedef smpl_t (*aubio_unary_func_t)(smpl_t input);
+
+-static void aubio_PyUFunc_d_d(char **args, npy_intp *dimensions,
+- npy_intp* steps, void* data)
++static void aubio_PyUFunc_d_d(char **args, const npy_intp *dimensions,
++ const npy_intp* steps, void* data)
+ {
+ npy_intp i;
+ npy_intp n = dimensions[0];
+@@ -22,8 +22,8 @@ static void aubio_PyUFunc_d_d(char **args, npy_intp
*dimensions,
+ }
+ }
+
+-static void aubio_PyUFunc_f_f_As_d_d(char **args, npy_intp *dimensions,
+- npy_intp* steps, void* data)
++static void aubio_PyUFunc_f_f_As_d_d(char **args, const npy_intp *dimensions,
++ const npy_intp* steps, void* data)
+ {
+ npy_intp i;
+ npy_intp n = dimensions[0];
diff --git a/media-libs/aubio/files/aubio-0.4.9-numpy-2.patch
b/media-libs/aubio/files/aubio-0.4.9-numpy-2.patch
new file mode 100644
index 000000000000..be51e88fc6a4
--- /dev/null
+++ b/media-libs/aubio/files/aubio-0.4.9-numpy-2.patch
@@ -0,0 +1,13 @@
+diff --git a/python/tests/test_cvec.py b/python/tests/test_cvec.py
+index 73ee6549..e21418fc 100755
+--- a/python/tests/test_cvec.py
++++ b/python/tests/test_cvec.py
+@@ -43,7 +43,7 @@ class aubio_cvec_test_case(TestCase):
+ spec = cvec(1024)
+ spec.phas[39:-1] = -np.pi
+ assert_equal(spec.phas[0:39], 0)
+- assert_equal(spec.phas[39:-1], -np.pi)
++ assert_equal(spec.phas[39:-1], np.asanyarray(-np.pi, spec.phas.dtype))
+ assert_equal(spec.norm, 0)
+
+ def test_assign_cvec_with_other_cvec(self):