git: 0da13d75dcaa - main - devel/cxxtest: take maintainership, add docs/examples

From: Matthias Andree <mandree_at_FreeBSD.org>
Date: Sat, 22 Jul 2023 14:36:25 UTC
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0da13d75dcaa2156678745e43f2aaf156945c9f7

commit 0da13d75dcaa2156678745e43f2aaf156945c9f7
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2023-07-22 14:26:13 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2023-07-22 14:36:23 +0000

    devel/cxxtest: take maintainership, add docs/examples
    
    This port is in need of a new maintainer, Hans Petter Selasky who was
    the previous maintainer has passed away in June 2023.
    https://lists.freebsd.org/archives/freebsd-announce/2023-July/000076.html
    
    We thank Hans Petter for maintaining this port and his other contributions,
    which have been countless.
    
    I am taking maintainership of this port, which is
    Approved by:    portmgr@ (discussed with bofh@ → blanket)
    
    Apparently the home page is currently unavailable due to configuration
    issues (no DNS A nor AAAA RR), so add a different WWW for now.
    Issue reported upstream to https://github.com/CxxTest/cxxtest/issues/157
    
    Add DOCS and EXAMPLES options, and install the relevant bits
    (for docs: the guide.txt in asciidoc from the tarball,
    and the .pdf downloaded separately from Github [1];
    for examples: these are part of the distribution's tarball).
    
    [1] NOTE: DOCS_DISTFILES needs an explicit DISTFILES. portlint does not know
    this currently and will complain. We still need it, see the warning box at the end of
    https://docs.freebsd.org/en/books/porters-handbook/makefiles/#options-variables
    
    Bump PORTREVISION to make the DOCS/EXAMPLES addition effective.
---
 devel/cxxtest/Makefile | 29 ++++++++++++++++++++++++++---
 devel/cxxtest/distinfo |  8 +++++---
 2 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/devel/cxxtest/Makefile b/devel/cxxtest/Makefile
index d4b4e64e1b10..648fb2d87279 100644
--- a/devel/cxxtest/Makefile
+++ b/devel/cxxtest/Makefile
@@ -1,11 +1,18 @@
 PORTNAME=	cxxtest
 PORTVERSION=	4.4
+PORTREVISION=	1
 CATEGORIES=	devel
-MASTER_SITES=	SF
+MASTER_SITES=	SF:DEFAULT \
+		https://github.com/CxxTest/cxxtest.github.com/raw/8505a9c37bdf17d9167f0b946c82ccb032d3cd4c/:docs
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
+DIST_SUBDIR=	${PORTNAME}
+EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
-MAINTAINER=	hselasky@FreeBSD.org
+MAINTAINER=	mandree@FreeBSD.org
 COMMENT=	Simple and powerful JUnit/CppUnit/xUnit-like framework for C++
-WWW=		http://cxxtest.sourceforge.net/
+#WWW=		http://cxxtest.com/ # unavailable, https://github.com/CxxTest/cxxtest/issues/157
+#WWW=		https://github.com/CxxTest/cxxtest.github.com
+WWW=		https://github.com/CxxTest/cxxtest
 
 LICENSE=	LGPL3+
 
@@ -16,9 +23,25 @@ NO_ARCH=	yes
 
 WRKSRC_SUBDIR=		python
 
+OPTIONS_DEFINE=		DOCS EXAMPLES
+OPTIONS_DEFAULT=	DOCS EXAMPLES
+
+DOCS_DISTFILES=		guide.pdf:docs
+DOCS_PORTDOCS=		*
+EXAMPLES_PORTEXAMPLES=	*
+
 post-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/include/cxxtest
 	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/cxxtest/* \
 		${STAGEDIR}${PREFIX}/include/cxxtest/
 
+post-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/guide.pdf ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/doc/guide.txt ${STAGEDIR}${DOCSDIR}
+
+post-install-EXAMPLES-on:
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	( cd ${WRKSRC}/../sample/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} )
+
 .include <bsd.port.mk>
diff --git a/devel/cxxtest/distinfo b/devel/cxxtest/distinfo
index 052107e7ef56..51b162de3079 100644
--- a/devel/cxxtest/distinfo
+++ b/devel/cxxtest/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1567682856
-SHA256 (cxxtest-4.4.tar.gz) = 1c154fef91c65dbf1cd4519af7ade70a61d85a923b6e0c0b007dc7f4895cf7d8
-SIZE (cxxtest-4.4.tar.gz) = 330076
+TIMESTAMP = 1690034322
+SHA256 (cxxtest/cxxtest-4.4.tar.gz) = 1c154fef91c65dbf1cd4519af7ade70a61d85a923b6e0c0b007dc7f4895cf7d8
+SIZE (cxxtest/cxxtest-4.4.tar.gz) = 330076
+SHA256 (cxxtest/guide.pdf) = 05d4afa4ca48113a2d2d6c6efc9cf88297986204a74aad4caa70a8211bdd1cf8
+SIZE (cxxtest/guide.pdf) = 270989