git: 84b31e6165a2 - main - devel/valgrind{,-devel}: Use option helpers; pet port{clippy,fmt}

From: Joseph Mingrone <jrm_at_FreeBSD.org>
Date: Mon, 31 Oct 2022 14:01:03 UTC
The branch main has been updated by jrm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=84b31e6165a2945a3391e00cdb3e5f15f65c8a6d

commit 84b31e6165a2945a3391e00cdb3e5f15f65c8a6d
Author:     Joseph Mingrone <jrm@FreeBSD.org>
AuthorDate: 2022-10-28 20:43:25 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2022-10-31 13:44:26 +0000

    devel/valgrind{,-devel}: Use option helpers; pet port{clippy,fmt}
    
    Approved by:    pjfloyd@wanadoo.fr (maintainer)
    Differential Revision:  https://reviews.freebsd.org/D37201
---
 devel/valgrind-devel/Makefile | 48 ++++++++++++++++++-------------------------
 devel/valgrind/Makefile       | 39 +++++++++++++++--------------------
 2 files changed, 36 insertions(+), 51 deletions(-)

diff --git a/devel/valgrind-devel/Makefile b/devel/valgrind-devel/Makefile
index adbe0bf1bb80..306e0b2647c5 100644
--- a/devel/valgrind-devel/Makefile
+++ b/devel/valgrind-devel/Makefile
@@ -14,23 +14,20 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 ONLY_FOR_ARCHS=	amd64 i386
 
-USES=		cpe pathfix pkgconfig gmake perl5 shebangfix autoreconf
-USE_PERL5=	build
-
-GNU_CONFIGURE=	yes
-SHEBANG_FILES=	callgrind/callgrind_annotate.in callgrind/callgrind_control.in
-SSP_UNSAFE=	yes
-LIB32_PATH?=	/usr/lib32/libc.so
-
+USES=		autoreconf cpe gmake pathfix perl5 pkgconfig shebangfix
 USE_GITHUB=	yes
 GH_ACCOUNT=	paulfloyd
 GH_PROJECT=	freebsd_valgrind
 GH_TAGNAME=	8d64ffab7
-
-CONFLICTS=	valgrind
-
+USE_PERL5=	build
+SHEBANG_FILES=	callgrind/callgrind_annotate.in callgrind/callgrind_control.in
+GNU_CONFIGURE=	yes
 CONFIGURE_ENV+=	ac_cv_path_PERL=${PERL}
 
+SSP_UNSAFE=	yes
+LIB32_PATH?=	/usr/lib32/libc.so
+
+CONFLICTS=	valgrind
 PORTDOCS=	html
 
 OPTIONS_DEFINE=		DOCS MANPAGES MPI
@@ -39,7 +36,7 @@ OPTIONS_DEFAULT=	MANPAGES
 .if exists(${LIB32_PATH})
 OPTIONS_DEFAULT_amd64=	32BIT
 .endif
-OPTIONS_SUB=	yes
+OPTIONS_SUB=		yes
 
 32BIT_DESC=	Enable debugging of 32-bit programs (requires lib32)
 MPI_DESC=	Enable build of MPI wrappers
@@ -53,33 +50,28 @@ MPI_LIB_DEPENDS=	libmpich.so:net/mpich
 .include <bsd.port.options.mk>
 
 .if ${ARCH} == "amd64"
-PLIST_SUB+=	AMD64=""
+PLIST_SUB+=		AMD64=""
 . if !${PORT_OPTIONS:M32BIT}
 CONFIGURE_ARGS+=	--enable-only64bit
-PLIST_SUB+=	X86="@comment "
+PLIST_SUB+=		X86="@comment "
 . else
 .  if !exists(${LIB32_PATH})
-IGNORE=The lib32 distribution was not found. Please install the lib32\
-distribution or run 'make config' and uncheck 32BIT option
+IGNORE=			please either install the lib32 distribution or unset the 32BIT option
 .  endif
-PLIST_SUB+=	X86=""
+PLIST_SUB+=		X86=""
 . endif
 .else
-PLIST_SUB+=	AMD64="@comment "
-PLIST_SUB+=	X86=""
+PLIST_SUB+=		AMD64="@comment " \
+			X86=""
 .endif
 
-.if !${PORT_OPTIONS:MDOCS}
-post-patch:
+post-patch-DOCS-off:
 	@${RM} -r ${WRKSRC}/docs/html
-.endif
 
-post-build:
-.if ${PORT_OPTIONS:MMANPAGES}
-	cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} man-pages
-.endif
-.if ${PORT_OPTIONS:MDOCS}
+post-build-DOCS-on:
 	cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} html-docs
-.endif
+
+post-build-MANPAGES-on:
+	cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} man-pages
 
 .include <bsd.port.mk>
diff --git a/devel/valgrind/Makefile b/devel/valgrind/Makefile
index 12378e711623..eca7126db466 100644
--- a/devel/valgrind/Makefile
+++ b/devel/valgrind/Makefile
@@ -13,18 +13,16 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 ONLY_FOR_ARCHS=	amd64 i386
 
-USES=		cpe pathfix pkgconfig gmake perl5 shebangfix autoreconf tar:bz2
+USES=		autoreconf cpe gmake pathfix perl5 pkgconfig shebangfix tar:bz2
 USE_PERL5=	build
-
-GNU_CONFIGURE=	yes
 SHEBANG_FILES=	callgrind/callgrind_annotate.in callgrind/callgrind_control.in
+GNU_CONFIGURE=	yes
+CONFIGURE_ENV+=	ac_cv_path_PERL=${PERL}
+
 SSP_UNSAFE=	yes
 LIB32_PATH?=	/usr/lib32/libc.so
 
 CONFLICTS=	valgrind-devel
-
-CONFIGURE_ENV+=	ac_cv_path_PERL=${PERL}
-
 PORTDOCS=	html
 
 OPTIONS_DEFINE=		DOCS MANPAGES MPI
@@ -33,7 +31,7 @@ OPTIONS_DEFAULT=	MANPAGES
 .if exists(${LIB32_PATH})
 OPTIONS_DEFAULT_amd64=	32BIT
 .endif
-OPTIONS_SUB=	yes
+OPTIONS_SUB=		yes
 
 32BIT_DESC=	Enable debugging of 32-bit programs (requires lib32)
 MPI_DESC=	Enable build of MPI wrappers
@@ -47,33 +45,28 @@ MPI_LIB_DEPENDS=	libmpich.so:net/mpich
 .include <bsd.port.options.mk>
 
 .if ${ARCH} == "amd64"
-PLIST_SUB+=	AMD64=""
+PLIST_SUB+=		AMD64=""
 . if !${PORT_OPTIONS:M32BIT}
 CONFIGURE_ARGS+=	--enable-only64bit
-PLIST_SUB+=	X86="@comment "
+PLIST_SUB+=		X86="@comment "
 . else
 .  if !exists(${LIB32_PATH})
-IGNORE=The lib32 distribution was not found. Please install the lib32\
-distribution or run 'make config' and uncheck 32BIT option
+IGNORE=			please either install the lib32 distribution or unset the 32BIT option
 .  endif
-PLIST_SUB+=	X86=""
+PLIST_SUB+=		X86=""
 . endif
 .else
-PLIST_SUB+=	AMD64="@comment "
-PLIST_SUB+=	X86=""
+PLIST_SUB+=		AMD64="@comment " \
+			X86=""
 .endif
 
-.if !${PORT_OPTIONS:MDOCS}
-post-patch:
+post-patch-DOCS-off:
 	@${RM} -r ${WRKSRC}/docs/html
-.endif
 
-post-build:
-.if ${PORT_OPTIONS:MMANPAGES}
-	cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} man-pages
-.endif
-.if ${PORT_OPTIONS:MDOCS}
+post-build-DOCS-on:
 	cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} html-docs
-.endif
+
+post-build-MANPAGES-on:
+	cd ${WRKSRC}/docs && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} man-pages
 
 .include <bsd.port.mk>