git: 151b473480 - main - documentation: Remove asciidoctor-pdf from default requirements

"Danilo G. Baio" <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by dbaio:

URL: https://cgit.FreeBSD.org/doc/commit/?id=151b473480373cea7cdc1af86a1e7837976429a1

commit 151b473480373cea7cdc1af86a1e7837976429a1
Author:     Danilo G. Baio <[email protected]>
AuthorDate: 2021-10-09 21:13:16 +0000
Commit:     Danilo G. Baio <[email protected]>
CommitDate: 2021-10-09 21:13:16 +0000

    documentation: Remove asciidoctor-pdf from default requirements
    
    With the current requirements, if textproc/docproj is built with PDF
    option disabled, you can't build the documentation.
    
    This fixes that, and now asciidoctor-pdf will be checked only when
    building PDF.
    
    Reported by:    jhb
---
 documentation/Makefile | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/documentation/Makefile b/documentation/Makefile
index c8c4f4322d..44bb80fa28 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -52,7 +52,6 @@ RUBYLIB =	../shared/lib
 RUN_DEPENDS=	${PYTHON_CMD} \
 		${HUGO_CMD} \
 		${LOCALBASE}/bin/asciidoctor \
-		${LOCALBASE}/bin/asciidoctor-pdf \
 		${LOCALBASE}/bin/rougify
 
 .ifndef HOSTNAME
@@ -108,6 +107,12 @@ requirements:
 .endif
 .endfor
 
+requirements-pdf:
+.if !exists(${LOCALBASE}/bin/asciidoctor-pdf)
+	@(echo ${LOCALBASE}/bin/asciidoctor-pdf not found, please run 'pkg install rubygem-asciidoctor-pdf'; exit 1)
+.endif
+
+
 starting-message: .PHONY
 	@echo ---------------------------------------------------------------
 	@echo                   Building the documentation
@@ -169,7 +174,7 @@ TTMP += ${.CURDIR}/content/${_lang}/articles/*/
 .endfor
 ARTICLESDIR != echo ${TTMP}
 
-pdf-books: pdf-books-target generate-books-toc
+pdf-books: requirements-pdf pdf-books-target generate-books-toc
 
 # Books build
 #
@@ -213,7 +218,7 @@ pdf-books: pdf-books-target generate-books-toc
 .endif
 .endfor
 
-pdf-articles: pdf-articles-target
+pdf-articles: requirements-pdf pdf-articles-target
 
 # Articles build
 .for _curpdf in ${ARTICLESDIR}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.