From: "Andrew Ammerlaan" <andrewammerlaan@riseup.net> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] repo/proj/guru:dev commit in: eclass/ Date: Sun, 6 Dec 2020 10:46:03 +0000 (UTC) [thread overview] Message-ID: <1607251549.bba19fbc646bdafc6a94e2ee6c40de85d6776175.andrewammerlaan@gentoo> (raw) commit: bba19fbc646bdafc6a94e2ee6c40de85d6776175 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> AuthorDate: Sun Dec 6 10:13:25 2020 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> CommitDate: Sun Dec 6 10:45:49 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bba19fbc eclass/docs: moved to ::gentoo Package-Manager: Portage-3.0.11, Repoman-3.0.2 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net> eclass/docs.eclass | 365 ----------------------------------------------------- 1 file changed, 365 deletions(-) diff --git a/eclass/docs.eclass b/eclass/docs.eclass deleted file mode 100644 index 773c0065..00000000 --- a/eclass/docs.eclass +++ /dev/null @@ -1,365 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: docs.eclass -# @MAINTAINER: -# Andrew Ammerlaan <andrewammerlaan@riseup.net> -# @AUTHOR: -# Author: Andrew Ammerlaan <andrewammerlaan@riseup.net> -# Based on the work of: Michał Górny <mgorny@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 7 -# @BLURB: A simple eclass to build documentation. -# @DESCRIPTION: -# A simple eclass providing functions to build documentation. -# -# Please note that docs sets RDEPEND and DEPEND unconditionally -# for you. -# -# This eclass also appends "doc" to IUSE, and sets HTML_DOCS -# to the location of the compiled documentation -# -# The aim of this eclass is to make it easy to add additional -# doc builders. To do this, add a <DOCBUILDER>-setup and -# <DOCBUILDER>-build function for your doc builder. -# For python based doc builders you can use the -# python_append_deps function to append [${PYTHON_USEDEP}] -# automatically to additional dependencies. - -case "${EAPI:-0}" in - 0|1|2|3|4) - die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" - ;; - 5|6|7) - ;; - *) - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" - ;; -esac - -# @ECLASS-VARIABLE: DOCBUILDER -# @REQUIRED -# @PRE_INHERIT -# @DESCRIPTION: -# Sets the doc builder to use, currently supports -# sphinx, mkdocs and doxygen - -# @ECLASS-VARIABLE: DOCDIR -# @DESCRIPTION: -# Path containing the doc builder config file(s). -# -# For sphinx this is the location of "conf.py" -# For mkdocs this is the location of "mkdocs.yml" -# -# Note that mkdocs.yml often does not reside -# in the same directory as the actual doc files -# -# Defaults to ${S} - -# @ECLASS-VARIABLE: DOCDEPEND -# @DEFAULT_UNSET -# @PRE_INHERIT -# @DESCRIPTION: -# Sets additional dependencies to build docs. -# For sphinx and mkdocs these dependencies should -# be specified without [${PYTHON_USEDEP}], this -# is added by the eclass. E.g. to depend on mkdocs-material: -# -# DOCDEPEND="dev-python/mkdocs-material" -# -# This eclass appends to this variable, so you can -# call it later in your ebuild again if necessary. - -# @ECLASS-VARIABLE: AUTODOC -# @PRE_INHERIT -# @DESCRIPTION: -# Sets whether to use sphinx.ext.autodoc/mkautodoc -# Defaults to 1 (True) for sphinx, and 0 (False) for mkdocs - -# @ECLASS-VARIABLE: OUTDIR -# @DESCRIPTION: -# Sets where the compiled files will be put. -# There's no real reason to change this, but this -# variable is useful if you want to overwrite the HTML_DOCS -# added by this eclass. E.g.: -# -# HTML_DOCS=( "${yourdocs}" "${OUTDIR}/." ) -# -# Defaults to ${DOCDIR}/_build/html - -# @ECLASS-VARIABLE: DOCS_CONFIG_NAME -# @DESCRIPTION: -# Name of the doc builder config file. -# -# Only relevant for doxygen, as it allows -# config files with non-standard names -# -# Defaults to Doxyfile for doxygen - -if [[ ! ${_DOCS} ]]; then - -# For the python based DOCBUILDERS we need to inherit python-any-r1 -case "${DOCBUILDER}" in - "sphinx"|"mkdocs") - # If this is not a python package then - # this is not already set, so we need - # to set this to inherit python-any-r1 - if [[ -z "${PYTHON_COMPAT}" ]]; then - PYTHON_COMPAT=( python3_{6,7,8} ) - fi - - # Inherit python-any-r1 if neither python-any-r1 nor - # python-r1 have been inherited, because we need the - # python_gen_any_dep function - if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1} ]]; then - inherit python-any-r1 - fi - ;; - "doxygen") - # do not need to inherit anything for doxygen - true - ;; - "") - die "DOCBUILDER unset, should be set to use ${ECLASS}" - ;; - *) - die "Unsupported DOCBUILDER=${DOCBUILDER} (unknown) for ${ECLASS}" - ;; -esac - -# @FUNCTION: python_check_deps -# @DESCRIPTION: -# Check if the dependencies are valid -python_check_deps() { - debug-print-function ${FUNCNAME} - use doc || return 0 - - local dep - for dep in ${check_deps[@]}; do - has_version "${dep}[${PYTHON_USEDEP}]" || return 1 - done -} -# Save this before we start manipulating it -check_deps=${DOCDEPEND} - -# @FUNCTION: python_append_dep -# @DESCRIPTION: -# Appends [\${PYTHON_USEDEP}] to all dependencies -# for python based DOCBUILDERs such as mkdocs or -# sphinx. -python_append_deps() { - debug-print-function ${FUNCNAME} - - local temp=() - local dep - for dep in ${DOCDEPEND[@]}; do - temp+=" ${dep}[\${PYTHON_USEDEP}]" - done - DOCDEPEND=${temp} -} - -# @FUNCTION: sphinx_setup -# @DESCRIPTION: -# Sets dependencies for sphinx -sphinx_setup() { - debug-print-function ${FUNCNAME} - - : ${AUTODOC:=1} - - if [[ ${AUTODOC} == 0 && -n "${DOCDEPEND}" ]]; then - die "${FUNCNAME}: do not set autodoc to 0 if external plugins are used" - fi - if [[ ${AUTODOC} == 1 ]]; then - DOCDEPEND="$(python_gen_any_dep " - dev-python/sphinx[\${PYTHON_USEDEP}] - ${DOCDEPEND}")" - - else - DOCDEPEND="dev-python/sphinx" - fi -} - -# @FUNCTION: sphinx_compile -# @DESCRIPTION: -# Calls sphinx to build docs. -# -# If you overwrite src_compile or python_compile_all -# do not call this function, call docs_compile instead -sphinx_compile() { - debug-print-function ${FUNCNAME} - use doc || return - - local confpy=${DOCDIR}/conf.py - [[ -f ${confpy} ]] || - die "${confpy} not found, DOCDIR=${DOCDIR} call wrong" - - if [[ ${AUTODOC} == 0 ]]; then - if grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then - die "${FUNCNAME}: autodoc disabled but sphinx.ext.autodoc found in ${confpy}" - fi - elif [[ ${AUTODOC} == 1 ]]; then - if ! grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then - die "${FUNCNAME}: sphinx.ext.autodoc not found in ${confpy}, set AUTODOC=0" - fi - fi - - sed -i -e 's:^intersphinx_mapping:disabled_&:' \ - "${DOCDIR}"/conf.py || die - # not all packages include the Makefile in pypi tarball - sphinx-build -b html -d "${DOCDIR}"/_build/doctrees "${DOCDIR}" \ - "${OUTDIR}" || die -} - -# @FUNCTION: mkdocs_setup -# @DESCRIPTION: -# Sets dependencies for mkdocs -mkdocs_setup() { - debug-print-function ${FUNCNAME} - - : ${AUTODOC:=0} - - if [[ ${AUTODOC} == 1 ]]; then - DOCDEPEND="$(python_gen_any_dep " - dev-python/mkdocs[\${PYTHON_USEDEP}] - dev-python/mkautodoc[\${PYTHON_USEDEP}] - ${DOCDEPEND}")" - else - DOCDEPEND="$(python_gen_any_dep " - dev-python/mkdocs[\${PYTHON_USEDEP}] - ${DOCDEPEND}")" - fi -} - -# @FUNCTION: mkdocs_compile -# @DESCRIPTION: -# Calls mkdocs to build docs. -# -# If you overwrite src_compile or python_compile_all -# do not call this function, call docs_compile instead -mkdocs_compile() { - debug-print-function ${FUNCNAME} - use doc || return - - local mkdocsyml=${DOCDIR}/mkdocs.yml - [[ -f ${mkdocsyml} ]] || - die "${mkdocsyml} not found, DOCDIR=${DOCDIR} wrong" - - pushd "${DOCDIR}" - mkdocs build -d "${OUTDIR}" || die - popd - - # remove generated .gz variants - # mkdocs currently has no option to disable this - # and portage complains: "Colliding files found by ecompress" - rm "${OUTDIR}"/*.gz || die -} - -# @FUNCTION: doxygen_setup -# @DESCRIPTION: -# Sets dependencies for doxygen -doxygen_setup() { - debug-print-function ${FUNCNAME} - - DOCDEPEND="app-doc/doxygen - ${DOCDEPEND}" -} - -# @FUNCTION: doxygen_compile -# @DESCRIPTION: -# Calls doxygen to build docs. -# -# If you overwrite src_compile or python_compile_all -# do not call this function, call docs_compile instead -doxygen_compile() { - debug-print-function ${FUNCNAME} - use doc || return - - : ${DOCS_CONFIG_NAME:="Doxyfile"} - - local doxyfile=${DOCDIR}/${DOCS_CONFIG_NAME} - [[ -f ${doxyfile} ]] || - die "${doxyfile} not found, DOCDIR=${DOCDIR} or DOCS_CONFIG_NAME=${DOCS_CONFIG_NAME} wrong" - - # doxygen wants the HTML_OUTPUT dir to already exist - mkdir -p "${OUTDIR}" - - pushd "${DOCDIR}" - (cat "${doxyfile}" ; echo "HTML_OUTPUT=${OUTDIR}") | doxygen - || die - popd -} - -# @FUNCTION: docs_compile -# @DESCRIPTION: -# Calls DOCBUILDER and sets HTML_DOCS -# -# This function must be called in global scope. Take care not to -# overwrite the variables set by it. Has support for distutils-r1 -# eclass, but only if this eclass is inherited *after* -# distutils-r1. If you need to extend src_compile() or -# python_compile_all(), you can call the original implementation -# as docs_compile. -docs_compile() { - debug-print-function ${FUNCNAME} - use doc || return - - # Set a sensible default as DOCDIR - : ${DOCDIR:="${S}"} - - # Where to put the compiled files? - : ${OUTDIR:="${DOCDIR}/_build/html"} - - case "${DOCBUILDER}" in - "sphinx") - sphinx_compile - ;; - "mkdocs") - mkdocs_compile - ;; - "doxygen") - doxygen_compile - ;; - esac - - HTML_DOCS+=( "${OUTDIR}/." ) - - # we need to ensure successful return in case we're called last, - # otherwise Portage may wrongly assume sourcing failed - return 0 -} - - -# This is where we setup the USE/(B)DEPEND variables -# and call the doc builder specific setup functions -IUSE+=" doc" - -# Call the correct setup function -case "${DOCBUILDER}" in - "sphinx") - python_append_deps - sphinx_setup - ;; - "mkdocs") - python_append_deps - mkdocs_setup - ;; - "doxygen") - doxygen_setup - ;; -esac - -if [[ ${EAPI} == [56] ]]; then - DEPEND+=" doc? ( ${DOCDEPEND} )" -else - BDEPEND+=" doc? ( ${DOCDEPEND} )" -fi - -# If this is a python package using distutils-r1 -# then put the compile function in the specific -# python function, else just put it in src_compile -if [[ ${_DISTUTILS_R1} && ( ${DOCBUILDER}="mkdocs" || ${DOCBUILDER}="sphinx" ) ]]; then - python_compile_all() { docs_compile; } -else - src_compile() { docs_compile; } -fi - -_DOCS=1 -fi
WARNING: multiple messages have this Message-ID (diff)
From: "Andrew Ammerlaan" <andrewammerlaan@riseup.net> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] repo/proj/guru:master commit in: eclass/ Date: Sun, 6 Dec 2020 10:49:26 +0000 (UTC) [thread overview] Message-ID: <1607251549.bba19fbc646bdafc6a94e2ee6c40de85d6776175.andrewammerlaan@gentoo> (raw) Message-ID: <20201206104926.kk7T9EgroGQ1E38OXBfFm70KnTyYOXLtXdxrHmFsLS4@z> (raw) commit: bba19fbc646bdafc6a94e2ee6c40de85d6776175 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> AuthorDate: Sun Dec 6 10:13:25 2020 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> CommitDate: Sun Dec 6 10:45:49 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bba19fbc eclass/docs: moved to ::gentoo Package-Manager: Portage-3.0.11, Repoman-3.0.2 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net> eclass/docs.eclass | 365 ----------------------------------------------------- 1 file changed, 365 deletions(-) diff --git a/eclass/docs.eclass b/eclass/docs.eclass deleted file mode 100644 index 773c0065..00000000 --- a/eclass/docs.eclass +++ /dev/null @@ -1,365 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: docs.eclass -# @MAINTAINER: -# Andrew Ammerlaan <andrewammerlaan@riseup.net> -# @AUTHOR: -# Author: Andrew Ammerlaan <andrewammerlaan@riseup.net> -# Based on the work of: Michał Górny <mgorny@gentoo.org> -# @SUPPORTED_EAPIS: 5 6 7 -# @BLURB: A simple eclass to build documentation. -# @DESCRIPTION: -# A simple eclass providing functions to build documentation. -# -# Please note that docs sets RDEPEND and DEPEND unconditionally -# for you. -# -# This eclass also appends "doc" to IUSE, and sets HTML_DOCS -# to the location of the compiled documentation -# -# The aim of this eclass is to make it easy to add additional -# doc builders. To do this, add a <DOCBUILDER>-setup and -# <DOCBUILDER>-build function for your doc builder. -# For python based doc builders you can use the -# python_append_deps function to append [${PYTHON_USEDEP}] -# automatically to additional dependencies. - -case "${EAPI:-0}" in - 0|1|2|3|4) - die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" - ;; - 5|6|7) - ;; - *) - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" - ;; -esac - -# @ECLASS-VARIABLE: DOCBUILDER -# @REQUIRED -# @PRE_INHERIT -# @DESCRIPTION: -# Sets the doc builder to use, currently supports -# sphinx, mkdocs and doxygen - -# @ECLASS-VARIABLE: DOCDIR -# @DESCRIPTION: -# Path containing the doc builder config file(s). -# -# For sphinx this is the location of "conf.py" -# For mkdocs this is the location of "mkdocs.yml" -# -# Note that mkdocs.yml often does not reside -# in the same directory as the actual doc files -# -# Defaults to ${S} - -# @ECLASS-VARIABLE: DOCDEPEND -# @DEFAULT_UNSET -# @PRE_INHERIT -# @DESCRIPTION: -# Sets additional dependencies to build docs. -# For sphinx and mkdocs these dependencies should -# be specified without [${PYTHON_USEDEP}], this -# is added by the eclass. E.g. to depend on mkdocs-material: -# -# DOCDEPEND="dev-python/mkdocs-material" -# -# This eclass appends to this variable, so you can -# call it later in your ebuild again if necessary. - -# @ECLASS-VARIABLE: AUTODOC -# @PRE_INHERIT -# @DESCRIPTION: -# Sets whether to use sphinx.ext.autodoc/mkautodoc -# Defaults to 1 (True) for sphinx, and 0 (False) for mkdocs - -# @ECLASS-VARIABLE: OUTDIR -# @DESCRIPTION: -# Sets where the compiled files will be put. -# There's no real reason to change this, but this -# variable is useful if you want to overwrite the HTML_DOCS -# added by this eclass. E.g.: -# -# HTML_DOCS=( "${yourdocs}" "${OUTDIR}/." ) -# -# Defaults to ${DOCDIR}/_build/html - -# @ECLASS-VARIABLE: DOCS_CONFIG_NAME -# @DESCRIPTION: -# Name of the doc builder config file. -# -# Only relevant for doxygen, as it allows -# config files with non-standard names -# -# Defaults to Doxyfile for doxygen - -if [[ ! ${_DOCS} ]]; then - -# For the python based DOCBUILDERS we need to inherit python-any-r1 -case "${DOCBUILDER}" in - "sphinx"|"mkdocs") - # If this is not a python package then - # this is not already set, so we need - # to set this to inherit python-any-r1 - if [[ -z "${PYTHON_COMPAT}" ]]; then - PYTHON_COMPAT=( python3_{6,7,8} ) - fi - - # Inherit python-any-r1 if neither python-any-r1 nor - # python-r1 have been inherited, because we need the - # python_gen_any_dep function - if [[ ! ${_PYTHON_R1} && ! ${_PYTHON_ANY_R1} ]]; then - inherit python-any-r1 - fi - ;; - "doxygen") - # do not need to inherit anything for doxygen - true - ;; - "") - die "DOCBUILDER unset, should be set to use ${ECLASS}" - ;; - *) - die "Unsupported DOCBUILDER=${DOCBUILDER} (unknown) for ${ECLASS}" - ;; -esac - -# @FUNCTION: python_check_deps -# @DESCRIPTION: -# Check if the dependencies are valid -python_check_deps() { - debug-print-function ${FUNCNAME} - use doc || return 0 - - local dep - for dep in ${check_deps[@]}; do - has_version "${dep}[${PYTHON_USEDEP}]" || return 1 - done -} -# Save this before we start manipulating it -check_deps=${DOCDEPEND} - -# @FUNCTION: python_append_dep -# @DESCRIPTION: -# Appends [\${PYTHON_USEDEP}] to all dependencies -# for python based DOCBUILDERs such as mkdocs or -# sphinx. -python_append_deps() { - debug-print-function ${FUNCNAME} - - local temp=() - local dep - for dep in ${DOCDEPEND[@]}; do - temp+=" ${dep}[\${PYTHON_USEDEP}]" - done - DOCDEPEND=${temp} -} - -# @FUNCTION: sphinx_setup -# @DESCRIPTION: -# Sets dependencies for sphinx -sphinx_setup() { - debug-print-function ${FUNCNAME} - - : ${AUTODOC:=1} - - if [[ ${AUTODOC} == 0 && -n "${DOCDEPEND}" ]]; then - die "${FUNCNAME}: do not set autodoc to 0 if external plugins are used" - fi - if [[ ${AUTODOC} == 1 ]]; then - DOCDEPEND="$(python_gen_any_dep " - dev-python/sphinx[\${PYTHON_USEDEP}] - ${DOCDEPEND}")" - - else - DOCDEPEND="dev-python/sphinx" - fi -} - -# @FUNCTION: sphinx_compile -# @DESCRIPTION: -# Calls sphinx to build docs. -# -# If you overwrite src_compile or python_compile_all -# do not call this function, call docs_compile instead -sphinx_compile() { - debug-print-function ${FUNCNAME} - use doc || return - - local confpy=${DOCDIR}/conf.py - [[ -f ${confpy} ]] || - die "${confpy} not found, DOCDIR=${DOCDIR} call wrong" - - if [[ ${AUTODOC} == 0 ]]; then - if grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then - die "${FUNCNAME}: autodoc disabled but sphinx.ext.autodoc found in ${confpy}" - fi - elif [[ ${AUTODOC} == 1 ]]; then - if ! grep -F -q 'sphinx.ext.autodoc' "${confpy}"; then - die "${FUNCNAME}: sphinx.ext.autodoc not found in ${confpy}, set AUTODOC=0" - fi - fi - - sed -i -e 's:^intersphinx_mapping:disabled_&:' \ - "${DOCDIR}"/conf.py || die - # not all packages include the Makefile in pypi tarball - sphinx-build -b html -d "${DOCDIR}"/_build/doctrees "${DOCDIR}" \ - "${OUTDIR}" || die -} - -# @FUNCTION: mkdocs_setup -# @DESCRIPTION: -# Sets dependencies for mkdocs -mkdocs_setup() { - debug-print-function ${FUNCNAME} - - : ${AUTODOC:=0} - - if [[ ${AUTODOC} == 1 ]]; then - DOCDEPEND="$(python_gen_any_dep " - dev-python/mkdocs[\${PYTHON_USEDEP}] - dev-python/mkautodoc[\${PYTHON_USEDEP}] - ${DOCDEPEND}")" - else - DOCDEPEND="$(python_gen_any_dep " - dev-python/mkdocs[\${PYTHON_USEDEP}] - ${DOCDEPEND}")" - fi -} - -# @FUNCTION: mkdocs_compile -# @DESCRIPTION: -# Calls mkdocs to build docs. -# -# If you overwrite src_compile or python_compile_all -# do not call this function, call docs_compile instead -mkdocs_compile() { - debug-print-function ${FUNCNAME} - use doc || return - - local mkdocsyml=${DOCDIR}/mkdocs.yml - [[ -f ${mkdocsyml} ]] || - die "${mkdocsyml} not found, DOCDIR=${DOCDIR} wrong" - - pushd "${DOCDIR}" - mkdocs build -d "${OUTDIR}" || die - popd - - # remove generated .gz variants - # mkdocs currently has no option to disable this - # and portage complains: "Colliding files found by ecompress" - rm "${OUTDIR}"/*.gz || die -} - -# @FUNCTION: doxygen_setup -# @DESCRIPTION: -# Sets dependencies for doxygen -doxygen_setup() { - debug-print-function ${FUNCNAME} - - DOCDEPEND="app-doc/doxygen - ${DOCDEPEND}" -} - -# @FUNCTION: doxygen_compile -# @DESCRIPTION: -# Calls doxygen to build docs. -# -# If you overwrite src_compile or python_compile_all -# do not call this function, call docs_compile instead -doxygen_compile() { - debug-print-function ${FUNCNAME} - use doc || return - - : ${DOCS_CONFIG_NAME:="Doxyfile"} - - local doxyfile=${DOCDIR}/${DOCS_CONFIG_NAME} - [[ -f ${doxyfile} ]] || - die "${doxyfile} not found, DOCDIR=${DOCDIR} or DOCS_CONFIG_NAME=${DOCS_CONFIG_NAME} wrong" - - # doxygen wants the HTML_OUTPUT dir to already exist - mkdir -p "${OUTDIR}" - - pushd "${DOCDIR}" - (cat "${doxyfile}" ; echo "HTML_OUTPUT=${OUTDIR}") | doxygen - || die - popd -} - -# @FUNCTION: docs_compile -# @DESCRIPTION: -# Calls DOCBUILDER and sets HTML_DOCS -# -# This function must be called in global scope. Take care not to -# overwrite the variables set by it. Has support for distutils-r1 -# eclass, but only if this eclass is inherited *after* -# distutils-r1. If you need to extend src_compile() or -# python_compile_all(), you can call the original implementation -# as docs_compile. -docs_compile() { - debug-print-function ${FUNCNAME} - use doc || return - - # Set a sensible default as DOCDIR - : ${DOCDIR:="${S}"} - - # Where to put the compiled files? - : ${OUTDIR:="${DOCDIR}/_build/html"} - - case "${DOCBUILDER}" in - "sphinx") - sphinx_compile - ;; - "mkdocs") - mkdocs_compile - ;; - "doxygen") - doxygen_compile - ;; - esac - - HTML_DOCS+=( "${OUTDIR}/." ) - - # we need to ensure successful return in case we're called last, - # otherwise Portage may wrongly assume sourcing failed - return 0 -} - - -# This is where we setup the USE/(B)DEPEND variables -# and call the doc builder specific setup functions -IUSE+=" doc" - -# Call the correct setup function -case "${DOCBUILDER}" in - "sphinx") - python_append_deps - sphinx_setup - ;; - "mkdocs") - python_append_deps - mkdocs_setup - ;; - "doxygen") - doxygen_setup - ;; -esac - -if [[ ${EAPI} == [56] ]]; then - DEPEND+=" doc? ( ${DOCDEPEND} )" -else - BDEPEND+=" doc? ( ${DOCDEPEND} )" -fi - -# If this is a python package using distutils-r1 -# then put the compile function in the specific -# python function, else just put it in src_compile -if [[ ${_DISTUTILS_R1} && ( ${DOCBUILDER}="mkdocs" || ${DOCBUILDER}="sphinx" ) ]]; then - python_compile_all() { docs_compile; } -else - src_compile() { docs_compile; } -fi - -_DOCS=1 -fi
next reply other threads:[~2020-12-06 10:46 UTC|newest] Thread overview: 181+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-06 10:46 Andrew Ammerlaan [this message] 2020-12-06 10:49 ` [gentoo-commits] repo/proj/guru:master commit in: eclass/ Andrew Ammerlaan -- strict thread matches above, loose matches on Subject: below -- 2025-10-17 14:29 [gentoo-commits] repo/proj/guru:dev " Anna Vyalkova 2024-11-28 10:44 Anna Vyalkova 2024-11-26 14:15 Anna Vyalkova 2024-10-18 14:25 Anna Vyalkova 2024-07-14 17:47 Florian Schmaus 2024-07-14 7:27 Anna Vyalkova 2024-07-14 7:27 Anna Vyalkova 2024-07-14 7:27 Anna Vyalkova 2024-07-14 7:27 Anna Vyalkova 2024-07-14 7:27 Anna Vyalkova 2024-07-14 7:27 Anna Vyalkova 2024-07-14 7:27 Anna Vyalkova 2024-07-01 2:10 Anna Vyalkova 2024-04-27 9:50 Anna Vyalkova 2024-04-01 11:32 [gentoo-commits] repo/proj/guru:master " Julien Roy 2024-04-01 11:18 ` [gentoo-commits] repo/proj/guru:dev " Julien Roy 2024-03-31 17:57 [gentoo-commits] repo/proj/guru:master " Julien Roy 2024-03-31 17:49 ` [gentoo-commits] repo/proj/guru:dev " Julien Roy 2024-03-31 17:49 Julien Roy 2024-02-04 19:32 Anna Vyalkova 2024-02-04 19:32 Anna Vyalkova 2024-02-04 19:26 Anna Vyalkova 2024-02-04 19:26 Anna Vyalkova 2024-01-22 17:52 Anna Vyalkova 2024-01-22 10:54 Anna Vyalkova 2024-01-21 22:50 Anna Vyalkova 2024-01-20 7:12 Anna Vyalkova 2024-01-01 21:27 Anna Vyalkova 2023-10-05 13:10 David Roman 2023-10-04 20:53 Anna Figueiredo Gomes 2023-08-30 5:30 Viorel Munteanu 2023-08-07 5:59 Haelwenn Monnier 2023-08-06 12:22 Haelwenn Monnier 2023-08-04 7:26 Florian Schmaus 2023-08-04 7:26 Florian Schmaus 2023-07-17 14:24 [gentoo-commits] repo/proj/guru:master " Florian Schmaus 2023-07-17 14:24 ` [gentoo-commits] repo/proj/guru:dev " Florian Schmaus 2023-06-24 19:22 Haelwenn Monnier 2023-05-21 16:27 Anna Vyalkova 2023-05-21 16:27 Anna Vyalkova 2023-05-09 19:30 Anna Vyalkova 2023-05-09 15:43 Anna Vyalkova 2023-05-09 15:43 Anna Vyalkova 2023-05-09 15:43 Anna Vyalkova 2023-05-09 15:43 Anna Vyalkova 2023-05-08 16:45 Anna Vyalkova 2023-05-06 18:00 Anna Vyalkova 2023-05-06 17:52 Anna Vyalkova 2023-05-06 15:55 Anna Vyalkova 2023-04-12 18:44 Jonas Frei 2023-04-06 14:09 Anna Vyalkova 2023-04-06 14:09 Anna Vyalkova 2023-03-31 18:48 Anna Vyalkova 2023-03-31 18:48 Anna Vyalkova 2023-03-31 18:14 Jonas Frei 2023-02-27 3:42 Anna Vyalkova 2023-02-27 3:42 Anna Vyalkova 2023-01-15 15:14 Anna Figueiredo Gomes 2023-01-08 2:17 Anna Vyalkova 2022-12-08 17:02 Anna Figueiredo Gomes 2022-11-26 13:51 Anna Vyalkova 2022-11-26 13:51 Anna Vyalkova 2022-11-26 13:51 Anna Vyalkova 2022-11-26 13:51 Anna Vyalkova 2022-11-25 17:54 Anna Vyalkova 2022-11-25 11:37 Anna Vyalkova 2022-11-25 11:37 Anna Vyalkova 2022-11-25 11:37 Anna Vyalkova 2022-11-25 11:37 Anna Vyalkova 2022-11-25 11:37 Anna Vyalkova 2022-11-25 11:37 Anna Vyalkova 2022-11-25 11:37 Anna Vyalkova 2022-11-25 11:37 Anna Vyalkova 2022-11-25 2:44 Anna Figueiredo Gomes 2022-11-25 2:38 Anna Figueiredo Gomes 2022-11-16 15:09 Anna Vyalkova 2022-11-16 14:30 Anna Vyalkova 2022-11-16 14:30 Anna Vyalkova 2022-11-10 0:50 Anna Figueiredo Gomes 2022-11-09 9:25 Anna Vyalkova 2022-11-08 19:20 Anna Vyalkova 2022-11-08 17:55 Anna Vyalkova 2022-11-08 17:55 Anna Vyalkova 2022-11-05 14:41 Anna Vyalkova 2022-07-20 9:33 Anna Vyalkova 2022-07-19 6:33 Anna Vyalkova 2022-07-19 6:07 Anna Vyalkova 2022-07-19 6:07 Anna Vyalkova 2022-07-16 21:08 Anna Vyalkova 2022-07-16 13:44 Anna Vyalkova 2022-07-16 13:44 Anna Vyalkova 2022-07-16 13:44 Anna Vyalkova 2022-07-16 13:44 Anna Vyalkova 2022-07-16 13:44 Anna Vyalkova 2022-07-16 13:44 Anna Vyalkova 2022-07-13 2:31 Anna Vyalkova 2022-07-13 2:31 Anna Vyalkova 2022-07-13 2:31 Anna Vyalkova 2022-07-13 2:31 Anna Vyalkova 2022-07-13 2:31 Anna Vyalkova 2022-07-13 2:31 Anna Vyalkova 2022-07-13 2:31 Anna Vyalkova 2022-07-13 2:31 Anna Vyalkova 2022-07-13 2:31 Anna Vyalkova 2022-07-13 2:31 Anna Vyalkova 2022-07-13 2:31 Anna Vyalkova 2022-07-12 12:06 Robert Greener 2022-07-12 12:06 Robert Greener 2022-07-12 12:06 Robert Greener 2022-07-12 12:06 Robert Greener 2022-07-10 3:36 Anna Vyalkova 2022-07-05 20:09 Anna Vyalkova 2022-07-05 20:09 Anna Vyalkova 2022-07-05 20:09 Anna Vyalkova 2022-06-30 6:01 Anna Vyalkova 2022-06-30 6:01 Anna Vyalkova 2022-06-30 6:01 Anna Vyalkova 2022-06-29 11:52 Anna Vyalkova 2022-06-29 11:52 Anna Vyalkova 2022-06-26 2:36 Alessandro Barbieri 2022-06-25 19:42 Anna Vyalkova 2022-06-25 17:43 Anna Vyalkova 2022-06-25 17:43 Anna Vyalkova 2022-06-15 22:41 Alessandro Barbieri 2022-06-14 9:12 Alessandro Barbieri 2022-06-14 8:00 Alessandro Barbieri 2022-06-14 8:00 Alessandro Barbieri 2022-06-07 6:26 Anna Vyalkova 2022-06-02 1:23 Alessandro Barbieri 2022-06-02 1:23 Alessandro Barbieri 2022-05-31 13:14 Nicola Smaniotto 2022-05-28 21:19 Alessandro Barbieri 2022-05-11 11:29 Alessandro Barbieri 2022-05-08 1:58 Alessandro Barbieri 2022-05-07 7:25 Alessandro Barbieri 2022-05-07 2:11 Alessandro Barbieri 2022-05-07 2:11 Alessandro Barbieri 2022-05-07 2:11 Alessandro Barbieri 2022-05-07 0:48 Alessandro Barbieri 2022-05-07 0:48 Alessandro Barbieri 2022-05-06 16:34 Alessandro Barbieri 2022-05-05 7:32 Alessandro Barbieri 2022-05-05 7:32 Alessandro Barbieri 2022-05-05 7:32 Alessandro Barbieri 2022-04-24 16:46 Nicola Smaniotto 2022-04-19 18:31 Alessandro Barbieri 2022-04-16 16:20 Alessandro Barbieri 2022-04-15 20:34 Alessandro Barbieri 2022-04-15 20:34 Alessandro Barbieri 2022-04-14 9:26 Nicola Smaniotto 2022-04-11 9:41 Anna Vyalkova 2022-04-11 9:41 Anna Vyalkova 2022-04-11 9:41 Anna Vyalkova 2022-03-31 7:24 Anna Vyalkova 2022-02-17 21:11 Anna Vyalkova 2022-02-17 21:11 Anna Vyalkova 2021-10-05 21:24 Alessandro Barbieri 2021-09-29 13:14 Alessandro Barbieri 2021-09-29 13:08 Alessandro Barbieri 2021-09-08 10:46 Alessandro Barbieri 2021-07-25 18:15 Anna Vyalkova 2021-07-22 8:29 Anna Vyalkova 2021-07-22 8:29 Anna Vyalkova 2021-06-17 16:01 Alessandro Barbieri 2021-05-31 23:15 Alessandro Barbieri 2021-05-24 14:49 Alessandro Barbieri 2021-05-17 10:16 Alessandro Barbieri 2021-03-16 0:55 Alessandro Barbieri 2021-03-14 22:58 Alessandro Barbieri 2021-03-14 22:49 Alessandro Barbieri 2020-05-06 23:36 Alessandro Barbieri 2020-05-06 23:36 Alessandro Barbieri 2020-05-01 11:45 Kurt Kanzenbach 2020-04-28 8:01 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan 2020-04-28 8:00 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan 2020-04-28 7:44 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan 2020-04-28 7:44 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan 2020-04-21 10:23 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan 2020-04-21 10:22 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan 2020-04-21 10:20 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan 2020-04-21 10:20 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan 2020-04-07 7:42 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan 2020-04-06 19:36 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan 2020-04-07 7:42 [gentoo-commits] repo/proj/guru:master " Andrew Ammerlaan 2020-04-06 18:45 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan 2020-04-07 7:27 Andrew Ammerlaan 2020-04-07 7:16 Andrew Ammerlaan 2020-04-06 18:26 Andrew Ammerlaan
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1607251549.bba19fbc646bdafc6a94e2ee6c40de85d6776175.andrewammerlaan@gentoo \ --to=andrewammerlaan@riseup.net \ --cc=gentoo-commits@lists.gentoo.org \ --cc=gentoo-dev@lists.gentoo.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox