commit:     58ea8f56d1ed8d66302ee981906c6eda32a90bf0
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  8 22:36:24 2019 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Tue Jan  8 22:46:27 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58ea8f56

dev-util/pkgcheck: make sphinx dep conditional on doc USE flag

Signed-off-by: Tim Harder <radhermit <AT> gentoo.org>

 dev-util/pkgcheck/pkgcheck-9999.ebuild | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/dev-util/pkgcheck/pkgcheck-9999.ebuild 
b/dev-util/pkgcheck/pkgcheck-9999.ebuild
index d9b406ee554..898fbc5e514 100644
--- a/dev-util/pkgcheck/pkgcheck-9999.ebuild
+++ b/dev-util/pkgcheck/pkgcheck-9999.ebuild
@@ -19,6 +19,7 @@ HOMEPAGE="https://github.com/pkgcore/pkgcheck";
 
 LICENSE="|| ( BSD GPL-2 )"
 SLOT="0"
+IUSE="doc"
 
 if [[ ${PV} == *9999 ]]; then
        RDEPEND="
@@ -31,11 +32,11 @@ else
 fi
 RDEPEND+=" dev-python/lxml[${PYTHON_USEDEP}]"
 DEPEND="${RDEPEND}
+       doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
        dev-python/setuptools[${PYTHON_USEDEP}]"
-[[ ${PV} == *9999 ]] && DEPEND+=" dev-python/sphinx[${PYTHON_USEDEP}]"
 
 python_compile_all() {
-       esetup.py build_man
+       use doc && esetup.py build_man
 }
 
 python_test() {
@@ -44,7 +45,9 @@ python_test() {
 
 python_install_all() {
        local DOCS=( AUTHORS NEWS.rst )
-       distutils-r1_python_install install_man
+       esetup.py install_docs \
+               --docdir="${ED%/}/usr/share/doc/${PF}" \
+               --mandir="${ED%/}/usr/share/man"
        distutils-r1_python_install_all
 }
 

Reply via email to