dev-util/pkgcheck: make sphinx dep conditional on doc USE flag
authorTim Harder <radhermit@gentoo.org>
Tue, 8 Jan 2019 22:36:24 +0000 (16:36 -0600)
committerTim Harder <radhermit@gentoo.org>
Tue, 8 Jan 2019 22:46:27 +0000 (16:46 -0600)
Signed-off-by: Tim Harder <radhermit@gentoo.org>
dev-util/pkgcheck/pkgcheck-9999.ebuild

index d9b406ee5548611213ba4d9f8fb8e725670b6b0f..898fbc5e514f4e6a1d3681bbd536f035770b78e2 100644 (file)
@@ -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
 }