Fix the has_version calls for distutils_enable_sphinx to use -b option
(--host-root in earlier EAPIs).

Signed-off-by: Michał Górny <mgo...@gentoo.org>
---
 eclass/distutils-r1.eclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 814ee85a2b1f..c0b04cf7d997 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -426,9 +426,13 @@ distutils_enable_sphinx() {
 
                python_check_deps() {
                        use doc || return 0
+
+                       local hasv_args=( -b )
+                       [[ ${EAPI} == 6 ]] && hasv_args=( --host-root )
                        local p
                        for p in dev-python/sphinx 
"${_DISTUTILS_SPHINX_PLUGINS[@]}"; do
-                               has_version "${p}[${PYTHON_USEDEP}]" || return 1
+                               has_version "${hasv_args[@]}" 
"${p}[${PYTHON_USEDEP}]" ||
+                                       return 1
                        done
                }
        else
-- 
2.35.1


Reply via email to