commit:     701b292cd636514c6f199006953443ecfada373f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 21 15:16:09 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jun 21 15:16:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=701b292c

media-libs/aubio: fix USE=doc

Closes: https://bugs.gentoo.org/679184
Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 media-libs/aubio/aubio-0.4.9.ebuild | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/media-libs/aubio/aubio-0.4.9.ebuild 
b/media-libs/aubio/aubio-0.4.9.ebuild
index 786cb94ce5e..575a7ff300a 100644
--- a/media-libs/aubio/aubio-0.4.9.ebuild
+++ b/media-libs/aubio/aubio-0.4.9.ebuild
@@ -16,6 +16,12 @@ LICENSE="GPL-3"
 SLOT="0/5"
 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc x86"
 IUSE="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="
@@ -29,15 +35,13 @@ RDEPEND="
        )
        sndfile? ( media-libs/libsndfile )
 "
+
 DEPEND="${RDEPEND}
        ${PYTHON_DEPS}
        app-text/txt2man
        virtual/pkgconfig
        doc? ( app-doc/doxygen )
 "
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
-       ?? ( double-precision libsamplerate )
-"
 
 DOCS=( AUTHORS ChangeLog README.md )
 PYTHON_SRC_DIR="${S}"
@@ -48,8 +52,11 @@ PATCHES=(
 
 src_prepare() {
        default
+
        sed -e "s:doxygen:doxygen_disabled:" -i wscript || die
 
+       sed -e "s/, 'sphinx.ext.intersphinx'//" -i doc/conf.py || die
+
        if ! use test; then
                sed -e "/bld.*tests/d" -i wscript || die
        fi
@@ -81,14 +88,20 @@ src_configure() {
 src_compile() {
        waf-utils_src_compile --notests
 
-       if use doc; then
-               cd "${S}"/doc || die
-               emake dirhtml
-       fi
-
        if use python ; then
                cd "${PYTHON_SRC_DIR}" || die
                distutils-r1_src_compile
+
+               if use doc ; then
+                       # No API function like distutils_install_for_testing 
available for this use case
+                       pushd "${S}"/doc &>/dev/null || die
+                       python_setup
+                       LD_LIBRARY_PATH="${S}/build/src" \
+                       
PYTHONPATH="${S%%/}-${EPYTHON/./_}/lib${PYTHONPATH:+:${PYTHONPATH}}" \
+                       emake dirhtml
+               fi
+
+               cd "${S}" || die
        fi
 }
 

Reply via email to