commit:     d8f5520122c8e0257e8981cbaa2b5a3e0c1dec0a
Author:     Thibaud CANALE <thican <AT> thican <DOT> net>
AuthorDate: Wed Mar 19 09:41:33 2025 +0000
Commit:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Thu Mar 20 15:16:29 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8f55201

app-crypt/certbot: fix documentation

Create dedicated directory to store each modules’ documentation.

Closes: https://bugs.gentoo.org/950581
Signed-off-by: Thibaud CANALE <thican <AT> thican.net>
Closes: https://github.com/gentoo/gentoo/pull/41160
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>

 ...rtbot-9999.ebuild => certbot-3.2.0-r101.ebuild} | 27 ++++++++++++++++++-
 ...certbot-9999.ebuild => certbot-3.3.0-r1.ebuild} | 31 ++++++++++++++++++----
 app-crypt/certbot/certbot-9999.ebuild              | 25 +++++++++++++++++
 3 files changed, 77 insertions(+), 6 deletions(-)

diff --git a/app-crypt/certbot/certbot-9999.ebuild 
b/app-crypt/certbot/certbot-3.2.0-r101.ebuild
similarity index 89%
copy from app-crypt/certbot/certbot-9999.ebuild
copy to app-crypt/certbot/certbot-3.2.0-r101.ebuild
index c14b47d5ff54..4e60db29f49f 100644
--- a/app-crypt/certbot/certbot-9999.ebuild
+++ b/app-crypt/certbot/certbot-3.2.0-r101.ebuild
@@ -23,7 +23,7 @@ else
        # Only for amd64, arm64 and x86 because of dev-python/python-augeas
        #KEYWORDS="~amd64 ~arm64 ~x86"
        # Only for amd64 and x86 because of dev-python/dns-lexicon
-       KEYWORDS="~amd64 ~x86"
+       KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
 fi
 
 DESCRIPTION="Let’s Encrypt client to automate deployment of X.509 certificates"
@@ -151,6 +151,9 @@ RDEPEND="
 #      )
 # "
 
+# Note: "docs" is not an actual directory under "S", they are actually
+# under each modules, see python_compile_all redefinition, but keep
+# this instruction enabled for dependency configuration.
 distutils_enable_sphinx docs \
        dev-python/sphinx-rtd-theme
 distutils_enable_tests pytest
@@ -204,6 +207,13 @@ src_configure() {
 }
 
 src_compile() {
+       # Used for building documentation
+       # Stores temporary modules docs in each subdirectories, will be used 
for HTML_DOCS
+       local temp_docs="${T}/docs"
+       use doc && {
+               mkdir "${temp_docs}" || die
+       }
+
        local S_BACKUP="${S}"
 
        local certbot_dirs=()
@@ -225,6 +235,21 @@ src_compile() {
 
        # Restore S
        S="${S_BACKUP}"
+
+       use doc && {
+               # Replace HTML_DOCS with one single entry to avoid merging
+               HTML_DOCS=( "${temp_docs}" )
+       }
+}
+
+python_compile_all() {
+       # Used to build documentation
+       use doc && {
+               sphinx_compile_all
+
+               # Subdirectory "_build/html" from build_sphinx in 
eclass/python-utils-r1.eclass
+               mv "${_DISTUTILS_SPHINX_SUBDIR}/_build/html" 
"${temp_docs}/${dir}" || die
+       }
 }
 
 python_test() {

diff --git a/app-crypt/certbot/certbot-9999.ebuild 
b/app-crypt/certbot/certbot-3.3.0-r1.ebuild
similarity index 88%
copy from app-crypt/certbot/certbot-9999.ebuild
copy to app-crypt/certbot/certbot-3.3.0-r1.ebuild
index c14b47d5ff54..7ef8f571d5cd 100644
--- a/app-crypt/certbot/certbot-9999.ebuild
+++ b/app-crypt/certbot/certbot-3.3.0-r1.ebuild
@@ -19,11 +19,7 @@ else
                https://github.com/certbot/certbot/archive/v${PV}.tar.gz
                        -> ${P}.gh.tar.gz
        "
-       #KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
-       # Only for amd64, arm64 and x86 because of dev-python/python-augeas
-       #KEYWORDS="~amd64 ~arm64 ~x86"
-       # Only for amd64 and x86 because of dev-python/dns-lexicon
-       KEYWORDS="~amd64 ~x86"
+       KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
 fi
 
 DESCRIPTION="Let’s Encrypt client to automate deployment of X.509 certificates"
@@ -151,6 +147,9 @@ RDEPEND="
 #      )
 # "
 
+# Note: "docs" is not an actual directory under "S", they are actually
+# under each modules, see python_compile_all redefinition, but keep
+# this instruction enabled for dependency configuration.
 distutils_enable_sphinx docs \
        dev-python/sphinx-rtd-theme
 distutils_enable_tests pytest
@@ -204,6 +203,13 @@ src_configure() {
 }
 
 src_compile() {
+       # Used for building documentation
+       # Stores temporary modules docs in each subdirectories, will be used 
for HTML_DOCS
+       local temp_docs="${T}/docs"
+       use doc && {
+               mkdir "${temp_docs}" || die
+       }
+
        local S_BACKUP="${S}"
 
        local certbot_dirs=()
@@ -225,6 +231,21 @@ src_compile() {
 
        # Restore S
        S="${S_BACKUP}"
+
+       use doc && {
+               # Replace HTML_DOCS with one single entry to avoid merging
+               HTML_DOCS=( "${temp_docs}" )
+       }
+}
+
+python_compile_all() {
+       # Used to build documentation
+       use doc && {
+               sphinx_compile_all
+
+               # Subdirectory "_build/html" from build_sphinx in 
eclass/python-utils-r1.eclass
+               mv "${_DISTUTILS_SPHINX_SUBDIR}/_build/html" 
"${temp_docs}/${dir}" || die
+       }
 }
 
 python_test() {

diff --git a/app-crypt/certbot/certbot-9999.ebuild 
b/app-crypt/certbot/certbot-9999.ebuild
index c14b47d5ff54..d04710518faf 100644
--- a/app-crypt/certbot/certbot-9999.ebuild
+++ b/app-crypt/certbot/certbot-9999.ebuild
@@ -151,6 +151,9 @@ RDEPEND="
 #      )
 # "
 
+# Note: "docs" is not an actual directory under "S", they are actually
+# under each modules, see python_compile_all redefinition, but keep
+# this instruction enabled for dependency configuration.
 distutils_enable_sphinx docs \
        dev-python/sphinx-rtd-theme
 distutils_enable_tests pytest
@@ -204,6 +207,13 @@ src_configure() {
 }
 
 src_compile() {
+       # Used for building documentation
+       # Stores temporary modules docs in each subdirectories, will be used 
for HTML_DOCS
+       local temp_docs="${T}/docs"
+       use doc && {
+               mkdir "${temp_docs}" || die
+       }
+
        local S_BACKUP="${S}"
 
        local certbot_dirs=()
@@ -225,6 +235,21 @@ src_compile() {
 
        # Restore S
        S="${S_BACKUP}"
+
+       use doc && {
+               # Replace HTML_DOCS with one single entry to avoid merging
+               HTML_DOCS=( "${temp_docs}" )
+       }
+}
+
+python_compile_all() {
+       # Used to build documentation
+       use doc && {
+               sphinx_compile_all
+
+               # Subdirectory "_build/html" from build_sphinx in 
eclass/python-utils-r1.eclass
+               mv "${_DISTUTILS_SPHINX_SUBDIR}/_build/html" 
"${temp_docs}/${dir}" || die
+       }
 }
 
 python_test() {

Reply via email to