Skip to content

Commit

Permalink
sci-mathematics/sage-doc: revise makefile patch for 10.2rc4
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwifb committed Nov 30, 2023
1 parent 56e886b commit 16b3d13
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
38 changes: 38 additions & 0 deletions sci-mathematics/sage-doc/files/sage-doc-10.2-makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/src/doc/Makefile b/src/doc/Makefile
index 2f76dfb9cb..4688125b44 100644
--- a/src/doc/Makefile
+++ b/src/doc/Makefile
@@ -32,10 +32,6 @@ doc-html--%:
sage --docbuild --no-pdf-links $(subst -,/,$(subst doc-html--,,$@)) html $(SAGE_DOCBUILD_OPTS)

# reference manual, inventory
-ifndef SAGE_ROOT
-doc-inventory-reference:
- $(error SAGE_ROOT undefined. This Makefile needs to be invoked by build/make/install)
-else
doc-inventory-reference: doc-src
$(eval DOCS = $(shell sage --docbuild --all-documents reference))
@if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi
@@ -44,7 +40,6 @@ doc-inventory-reference: doc-src
$(MAKE) doc-inventory--$(subst /,-,$(BIBLIO))
$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" $(foreach doc, $(OTHER_DOCS), doc-inventory--$(subst /,-,$(doc)))
$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-inventory--reference_top
-endif

# reference manual, html
doc-html-reference: doc-inventory-reference
@@ -65,11 +60,12 @@ doc-html-other: doc-html-reference
doc-html: doc-html-reference doc-html-other

# Matches doc-pdf--developer, doc-pdf--reference-manifolds etc.
+# Note that in Gentoo, things will fail if we do not pass the MAKE definition
doc-pdf--%:
- sage --docbuild $(subst -,/,$(subst doc-pdf--,,$@)) pdf $(SAGE_DOCBUILD_OPTS)
+ MAKE=$(MAKE) sage --docbuild $(subst -,/,$(subst doc-pdf--,,$@)) pdf $(SAGE_DOCBUILD_OPTS)

# reference manual, pdf
-doc-pdf-reference: doc-inventory-reference
+doc-pdf-reference:
$(eval DOCS = $(shell sage --docbuild --all-documents reference))
@if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi
$(eval BIBLIO = $(firstword $(DOCS)))
2 changes: 1 addition & 1 deletion sci-mathematics/sage-doc/sage-doc-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ RDEPEND=""

PATCHES=(
"${FILESDIR}"/${PN}-9.5-neutering.patch
"${FILESDIR}"/${PN}-10.1-makefile.patch
"${FILESDIR}"/${PN}-10.2-makefile.patch
)

HTML_DOCS="${WORKDIR}/build_doc/html/*"
Expand Down

0 comments on commit 16b3d13

Please sign in to comment.