git: b253eb3a1ac0 - main - graphics/netpbm: Unbreak build WITH_PIE

From: Craig Leres <leres_at_FreeBSD.org>
Date: Mon, 21 Aug 2023 21:32:26 UTC
The branch main has been updated by leres:

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

commit b253eb3a1ac05342e8f9232e8fe8e92ccc4b24a6
Author:     Craig Leres <leres@FreeBSD.org>
AuthorDate: 2023-08-21 21:30:59 +0000
Commit:     Craig Leres <leres@FreeBSD.org>
CommitDate: 2023-08-21 21:30:59 +0000

    graphics/netpbm: Unbreak build WITH_PIE
    
    While we're here fix portlint nit.
    
    Reported by:    netchild
    PR:             268982
---
 graphics/netpbm/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/graphics/netpbm/Makefile b/graphics/netpbm/Makefile
index 8618dbdb26f3..e28f2b2430b3 100644
--- a/graphics/netpbm/Makefile
+++ b/graphics/netpbm/Makefile
@@ -82,6 +82,12 @@ post-patch:
 	@${REINPLACE_CMD} -e 's|pkg-config|false|g' ${WRKSRC}/GNUmakefile
 	@${REINPLACE_CMD} ${_DISABLE_TESTS:@.test.@-e '/${.test.}/d'@} \
 		${WRKSRC}/test/Test-Order
+.ifdef WITH_PIE
+.for dn in buildtools test
+	@${REINPLACE_CMD} -e '/^all:/s/^/CFLAGS_FOR_BUILD+=${PIE_CFLAGS}\n/' \
+	    ${WRKSRC}/${dn}/Makefile
+.endfor
+.endif
 
 post-patch-STATIC-on:
 	@${REINPLACE_CMD} -e 's|$$(LD)|$$(LD) -static|g' \
@@ -122,7 +128,7 @@ NETPBM_SERIES=	advanced
 
 netpbm-version-check:
 	@REV=`svnlite info ${NETPBM_REPO}/${NETPBM_SERIES}/version.mk | ${SED} -n 's/Last Changed Rev: //p'`; \
-	VERSION=`(svnlite cat -r$$REV ${NETPBM_REPO}/${NETPBM_SERIES}/version.mk; \
+	VERSION=`(svnlite ${CAT} -r$$REV ${NETPBM_REPO}/${NETPBM_SERIES}/version.mk; \
 			echo 'all:'; \
 			echo '	@printf "%02d.%02d.%02d" \'; \
 			echo '		$${NETPBM_MAJOR_RELEASE} \' ; \