commit:     80321876fb80dd0dbc14c6281c2710ba6f3bbd2a
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Sun Feb 18 19:49:50 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 19 04:04:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80321876

dev-libs/mathjax: fix build error for 2.x built without docs

The sed did not apply because the docs aren't extracted unless USE=doc.
In that case there's no point running it anyway.

Closes: https://bugs.gentoo.org/924879
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/mathjax/mathjax-2.7.7-r1.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dev-libs/mathjax/mathjax-2.7.7-r1.ebuild 
b/dev-libs/mathjax/mathjax-2.7.7-r1.ebuild
index 9fea30af9a03..7c3e85efd7b3 100644
--- a/dev-libs/mathjax/mathjax-2.7.7-r1.ebuild
+++ b/dev-libs/mathjax/mathjax-2.7.7-r1.ebuild
@@ -62,7 +62,9 @@ pkg_setup() {
 
 src_prepare() {
        default
-       sed -e 's/add_stylesheet/add_css_file/' -i "${DOCS_S}"/conf.py || die
+       if use doc; then
+               sed -e 's/add_stylesheet/add_css_file/' -i "${DOCS_S}"/conf.py 
|| die
+       fi
 }
 
 src_compile() {

Reply via email to