git: 0796c5abcb20 - main - lang/yap: improve documentation handling

Eugene Grosbein eugen at FreeBSD.org
Fri May 14 13:15:44 UTC 2021


The branch main has been updated by eugen:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0796c5abcb20711c7ed7fe828cff6db78e41a82c

commit 0796c5abcb20711c7ed7fe828cff6db78e41a82c
Author:     Eugene Grosbein <eugen at FreeBSD.org>
AuthorDate: 2021-05-14 13:14:30 +0000
Commit:     Eugene Grosbein <eugen at FreeBSD.org>
CommitDate: 2021-05-14 13:14:30 +0000

    lang/yap: improve documentation handling
    
    Install pre-built yap.html and yap.pdf to avoid heavy TeX dependency
    and still have documentation handy. Make it possible to rebuild
    these documentation files with new port option BUILDDOCS.
    
    Take maintainership. While here, add LICENSE section: dual ART20 LGPL20.
---
 lang/yap/Makefile  | 34 +++++++++++++++++++++++++++++-----
 lang/yap/distinfo  |  3 +++
 lang/yap/pkg-plist |  9 +++++++++
 3 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/lang/yap/Makefile b/lang/yap/Makefile
index 2da682940329..435bc346616a 100644
--- a/lang/yap/Makefile
+++ b/lang/yap/Makefile
@@ -2,31 +2,55 @@
 
 PORTNAME=	yap
 PORTVERSION=	6.2.2
-PORTREVISION=	10
+PORTREVISION=	11
 CATEGORIES=	lang
 MASTER_SITES=	https://mirrors.dotsrc.org/mirrors/exherbo/	\
 		http://ftp.lyx.org/pub/minix/distfiles/backup/	\
 		http://tenampak.izt.uam.mx/programas/
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	eugen at FreeBSD.org
 COMMENT=	High-performance Prolog compiler
 
+LICENSE=		ART20 LGPL20
+LICENSE_COMB=		dual
+LICENSE_FILE_ART20=	${WRKSRC}/Artistic
+LICENSE_FILE_LGPL20=	${WRKSRC}/COPYING
+
 BROKEN_riscv64=		fails to build: procedure chr_translate/2 is undefined, called from context  prolog:once/1
 
 LIB_DEPENDS=	libgmp.so:math/gmp
 
+USES=		gmake localbase readline
 PORTSCOUT=	limit:^6\.2\.
 
-USES=		gmake localbase readline
-USE_LDCONFIG=	yes
+OPTIONS_DEFINE=		DOCS BUILDDOCS
+BUILDDOCS_DESC=	Rebuild documentation (requires TeX)
+DOCS_DESC=	Install documentation
+
+BUILDDOCS_USE=		TEX=formats:build,dvipsk:build
+BUILDDOCS_BUILD_DEPENDS=${LOCALBASE}/bin/texi2html:textproc/texi2html \
+			${LOCALBASE}/bin/texi2pdf:print/texinfo
+
+DOCS_INSTALL_TARGET=	install install_docs
+
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--enable-max-performance \
 		--disable-myddas
 
+DOCSDIR=	${PREFIX}/share/doc/Yap
 DATADIR=	${PREFIX}/share/Yap
+DOCS_PACKAGE=	yap-doc-${PORTVERSION}
 
-post-configure:
+post-build-DOCS-off:
 	# prevent the instalation of three docs files
 	${REINPLACE_CMD} -e '559,562d' ${WRKSRC}/Makefile
 
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS} && !${PORT_OPTIONS:MBUILDDOCS}
+MASTER_SITES+=	http://www.grosbein.net/freebsd/distfiles/:docs \
+		LOCAL/eugen:docs
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${DOCS_PACKAGE}${EXTRACT_SUFX}:docs
+.endif
+
 .include <bsd.port.mk>
diff --git a/lang/yap/distinfo b/lang/yap/distinfo
index c7019045ef67..34c45f7b809b 100644
--- a/lang/yap/distinfo
+++ b/lang/yap/distinfo
@@ -1,2 +1,5 @@
+TIMESTAMP = 1620985788
 SHA256 (yap-6.2.2.tar.gz) = f15f8382104443319a5883eafce5f52f4143b526c7f1cd88d19c1f63fc06d750
 SIZE (yap-6.2.2.tar.gz) = 5499811
+SHA256 (yap-doc-6.2.2.tar.gz) = 1e3ccaad4f90f06ce91dcb0b26e501f48a55b33ded88e88a0e0db8fa31179ae2
+SIZE (yap-doc-6.2.2.tar.gz) = 1270419
diff --git a/lang/yap/pkg-plist b/lang/yap/pkg-plist
index f5ef0a9d8880..e43f78085439 100644
--- a/lang/yap/pkg-plist
+++ b/lang/yap/pkg-plist
@@ -115,6 +115,15 @@ lib/Yap/pl-minisat.so
 lib/libYap.a
 lib/web/css/dirindex.css
 lib/web/css/openid.css
+%%PORTDOCS%%%%DOCSDIR%%/Artistic
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/COPYING
+%%PORTDOCS%%%%DOCSDIR%%/yap.html
+%%PORTDOCS%%%%DOCSDIR%%/yap.pdf
+%%PORTDOCS%%%%DOCSDIR%%/changes4.3.html
+%%PORTDOCS%%%%DOCSDIR%%/changes-5.0.html
+%%PORTDOCS%%%%DOCSDIR%%/changes-5.1.html
+%%PORTDOCS%%%%DOCSDIR%%/changes-6.0.html
 %%DATADIR%%/pl/arith.yap
 %%DATADIR%%/pl/arrays.yap
 %%DATADIR%%/pl/attributes.yap


More information about the dev-commits-ports-all mailing list