From 96066d144a8b414978df7758ec93736c464667cb Mon Sep 17 00:00:00 2001 From: Frederic Cambus Date: Fri, 3 May 2019 14:48:08 +0200 Subject: [PATCH] bdfresize: use the SUBST framework instead of calling sed directly. Pointed out by leot@, thanks! --- bdfresize/Makefile | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) 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 COMMENT= Tool for resizing BDF format fonts LICENSE= gnu-gpl-v2 +# 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",,' + GNU_CONFIGURE= yes -post-configure: - # Do not build embedded getopt - sed -i 's|"getopt.h"||' ${WRKSRC}/bdfresize.c - sed -i 's|charresize.o getopt.o|charresize.o|' ${WRKSRC}/Makefile - .include "../../mk/bsd.pkg.mk"