git: 0f960bc918b4 - main - math/gri: Fix build with llvm16

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Thu, 20 Jul 2023 17:43:15 UTC
The branch main has been updated by bofh:

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

commit 0f960bc918b489abb26ec39db1552d270ffbc1f3
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-07-20 13:55:34 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-07-20 17:42:34 +0000

    math/gri: Fix build with llvm16
    
    - Pet portclippy
    - Utilize USES=localbase
    - Utilize OPTIONSNG whiere possible
    
    Sponsored by:   The FreeBSD Foundation
---
 math/gri/Makefile | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/math/gri/Makefile b/math/gri/Makefile
index 38147dd9d81d..d4219c2da87a 100644
--- a/math/gri/Makefile
+++ b/math/gri/Makefile
@@ -4,25 +4,25 @@ PORTREVISION=	13
 CATEGORIES=	math
 MASTER_SITES=	SF
 
-LICENSE=	GPLv2
-
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Extensible plotting language for producing scientific graphs
 WWW=		http://gri.sourceforge.net/
 
+LICENSE=	GPLv2
+
 LIB_DEPENDS=	libnetcdf.so:science/netcdf
 
-USES=		cpe gmake readline shebangfix makeinfo tex
+USES=		cpe gmake localbase:ldflags readline shebangfix makeinfo tex
+CPE_VENDOR=	gri_project
+USE_CXXSTD=	c++14
+USE_TEX=	formats:build dvipsk:build
+
 SHEBANG_FILES=	doc/examples/FEM.pl src/gri_merge src/gri_unpage
+
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--enable-FreeBSD
-CPE_VENDOR=	gri_project
-
-CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib
 
 INFO=		gri
-USE_TEX=	formats:build dvipsk:build
 PORTDOCS=	*
 PORTEXAMPLES=	*
 
@@ -49,11 +49,11 @@ post-build:
 	(cd ${WRKSRC}/doc && makeinfo gri.texi)
 .endif
 
-post-install:
-.if ${PORT_OPTIONS:MDOCS}
+post-install-DOCS-on:
 	(cd ${WRKSRC}/doc && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
 		${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
-.else
+
+post-install-DOCS-off:
 	${INSTALL_MAN} ${WRKSRC}/doc/gri-manpage.1 \
 		${STAGEDIR}${MANPREFIX}/man/man1/gri.1
 	${INSTALL_MAN} ${WRKSRC}/doc/gri_merge.1-skel \
@@ -61,13 +61,12 @@ post-install:
 	${INSTALL_MAN} ${WRKSRC}/doc/gri_unpage.1-skel \
 		${STAGEDIR}${MANPREFIX}/man/man1/gri_unpage.1
 	${INSTALL_DATA} ${WRKSRC}/doc/gri.info* ${STAGEDIR}${PREFIX}/${INFO_PATH}
-.endif
-.if ${PORT_OPTIONS:MEXAMPLES}
+
+post-install-EXAMPLES-on:
 	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 	(cd ${WRKSRC}/doc/examples && ${INSTALL_DATA} model* *.dat *.gri e*.ps \
 		${STAGEDIR}${EXAMPLESDIR})
 	(cd ${WRKSRC}/doc/examples \
 		&& ${INSTALL_SCRIPT} FEM.pl ${STAGEDIR}${EXAMPLESDIR})
-.endif
 
 .include <bsd.port.mk>