git: 344cf9384c54 - main - lang/ghc: Introduce PDFDOCS option.

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Sat, 21 Dec 2024 12:30:57 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=344cf9384c54007933590e02c6a9758615dbb5e4

commit 344cf9384c54007933590e02c6a9758615dbb5e4
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2024-12-21 12:29:54 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2024-12-21 12:30:53 +0000

    lang/ghc: Introduce PDFDOCS option.
    
    PR:             283368
---
 lang/ghc/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile
index eacc43eb2540..73d1b7b5e094 100644
--- a/lang/ghc/Makefile
+++ b/lang/ghc/Makefile
@@ -31,7 +31,7 @@ NO_CCACHE=		yes
 OPTIONS_SUB=		yes
 SHEBANG_FILES=		${BOOT_SCRIPT}
 
-OPTIONS_DEFINE?=	DYNAMIC GMP PROFILE DOCS
+OPTIONS_DEFINE?=	DYNAMIC GMP PROFILE DOCS PDFDOCS
 OPTIONS_DEFAULT=	DYNAMIC PROFILE GMP
 
 OPTIONS_GROUP=		BOOTSTRAP
@@ -39,7 +39,8 @@ BOOTSTRAP_DESC=		Bootsrap using installed ghc
 OPTIONS_GROUP_BOOTSTRAP=BOOT
 
 BOOT_DESC=		Use installed GHC for bootstrapping
-DOCS_DESC=		Install HTML documentation
+DOCS_DESC=		Build and install HTML documentation
+PDFDOCS_DESC=		Build and install PDF documentation
 DYNAMIC_DESC=		Add support for dynamic linking
 GMP_DESC=		Use GNU Multi-precision Library from Ports
 PROFILE_DESC=		Add support for performance profiling
@@ -51,6 +52,11 @@ DOCS_BUILD_DEPENDS=	sphinx-build:textproc/py-sphinx
 DOCS_VARS=		enable_docs=YES hadrian_docs_arg=--docs=no-sphinx-pdfs
 DOCS_VARS_OFF=		enable_docs=NO hadrian_docs_arg=--docs=none
 
+PDFDOCS_IMPLIES=	DOCS
+PDFDOCS_BUILD_DEPENDS=	xelatex:print/tex-xetex \
+			${LOCALBASE}/share/fonts/dejavu/DejaVuSans.ttf:x11-fonts/dejavu
+PDFDOCS_VARS=		hadrian_docs_arg=
+
 DYNAMIC_CONFIGURE_WITH=	system-libffi \
 			ffi-includes=${LOCALBASE}/include \
 			ffi-libraries=${LOCALBASE}/lib