git: e235318f91cf - main - misc/buffer: avoid patching Makefile

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Tue, 09 Jan 2024 15:41:08 UTC
The branch main has been updated by bapt:

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

commit e235318f91cfe5251461a03a052726b6c07ccab4
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2024-01-09 14:28:57 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2024-01-09 15:41:03 +0000

    misc/buffer: avoid patching Makefile
    
    Use MAKE_ARGS to override definition in the Makefile instead of
    patching.
    
    While here eliminate use of MAN1PREFIX and move manpage to share/man
---
 misc/buffer/Makefile | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/misc/buffer/Makefile b/misc/buffer/Makefile
index ae0f4cdeeadb..e04fafd42ec7 100644
--- a/misc/buffer/Makefile
+++ b/misc/buffer/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	buffer
 PORTVERSION=	1.19
+PORTREVISION=	1
 CATEGORIES=	misc
 MASTER_SITES=	GENTOO \
 		http://www.mondorescue.org/download/MondoCD/TGZS/
@@ -9,15 +10,11 @@ COMMENT=	Buffer sporadic I/O for faster tape and pipe throughput
 
 USES=		tar:tgz
 PLIST_FILES=	bin/buffer \
-		man/man1/buffer.1.gz
+		share/man/man1/buffer.1.gz
 CFLAGS+=	-D_WANT_SEMUN
-
-post-patch:
-	@${REINPLACE_CMD} -E \
-		-e 's|^(CC[[:space:]]*=).*$$|\1${CC}|' \
-		-e 's|^(CFLAGS[[:space:]]*=).*$$|\1${CFLAGS}|' \
-		-e 's|^(INSTBIN[[:space:]]*=).*$$|\1${STAGEDIR}${PREFIX}/bin|' \
-		-e 's|^(INSTMAN[[:space:]]*=).*$$|\1${STAGEDIR}${MAN1PREFIX}/man/man1|' \
-		${WRKSRC}/Makefile
+MAKE_ARGS=	CC="${CC}" \
+		CFLAGS="${CFLAGS}" \
+		INSTBIN="${STAGEDIR}${PREFIX}/bin" \
+		INSTMAN="${STAGEDIR}${PREFIX}/share/man/man1"
 
 .include <bsd.port.mk>