pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bdfresize: use the SUBST framework instead of calling sed directly.



Module Name:	pkgsrc-wip
Committed By:	Frederic Cambus <fred%statdns.com@localhost>
Pushed By:	fcambus
Date:		Fri May 3 14:48:08 2019 +0200
Changeset:	96066d144a8b414978df7758ec93736c464667cb

Modified Files:
	bdfresize/Makefile

Log Message:
bdfresize: use the SUBST framework instead of calling sed directly.

Pointed out by leot@, thanks!

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=96066d144a8b414978df7758ec93736c464667cb

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 bdfresize/Makefile | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diffs:
diff --git a/bdfresize/Makefile b/bdfresize/Makefile
index efa42d2c7d..9aa76e48e0 100644
--- a/bdfresize/Makefile
+++ b/bdfresize/Makefile
@@ -8,11 +8,20 @@ MAINTAINER=	fred%statdns.com@localhost
 COMMENT=	Tool for resizing BDF format fonts
 LICENSE=	gnu-gpl-v2
 
-GNU_CONFIGURE=	yes
+# Do not build embedded getopt
+SUBST_CLASSES+=		makefile
+SUBST_STAGE.makefile=	post-configure
+SUBST_MESSAGE.makefile=	Do not build embedded getopt
+SUBST_FILES.makefile=	Makefile
+SUBST_SED.makefile+=	-e 's,charresize.o getopt.o,charresize.o,'
+
+# Fix getopt includes
+SUBST_CLASSES+=		includes
+SUBST_STAGE.includes=	post-configure
+SUBST_MESSAGE.includes=	Fix getopt includes
+SUBST_FILES.includes=	bdfresize.c
+SUBST_SED.includes+=	-e 's,"getopt.h",<getopt.h>,'
 
-post-configure:
-	# Do not build embedded getopt
-	sed -i 's|"getopt.h"|<getopt.h>|' ${WRKSRC}/bdfresize.c
-	sed -i 's|charresize.o getopt.o|charresize.o|' ${WRKSRC}/Makefile
+GNU_CONFIGURE=	yes
 
 .include "../../mk/bsd.pkg.mk"


Home | Main Index | Thread Index | Old Index