pkgsrc-WIP-changes archive

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

farbfeld: Honors both user's *FLAGS and reuse upstream ones



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Sun Feb 14 11:37:20 2021 +0100
Changeset:	76cd58c9f9bc0100691aa4f9a709ca394314c52d

Modified Files:
	farbfeld/Makefile

Log Message:
farbfeld: Honors both user's *FLAGS and reuse upstream ones

With farbfeld-4 more {C,LD}FLAGS were added and it is probably better
to honors them instead of completely overwriting them by passing as
make flags.

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

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

diffstat:
 farbfeld/Makefile | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diffs:
diff --git a/farbfeld/Makefile b/farbfeld/Makefile
index b049144e21..f3798ed267 100644
--- a/farbfeld/Makefile
+++ b/farbfeld/Makefile
@@ -15,8 +15,16 @@ DEPENDS+=	ImageMagick-[0-9]*:../../graphics/ImageMagick
 MAKE_FLAGS+=	PREFIX=${PREFIX}
 MAKE_FLAGS+=	MANPREFIX=${PREFIX}/${PKGMANDIR}
 
-MAKE_FLAGS+=	CFLAGS=${CFLAGS:Q}
-MAKE_FLAGS+=	LDFLAGS=${LDFLAGS:Q}
+SUBST_CLASSES+=		configmk
+SUBST_STAGE.configmk=	pre-configure
+SUBST_MESSAGE.configmk=	Adjusting config.mk
+SUBST_FILES.configmk=	config.mk
+SUBST_SED.configmk+=	-e '/^CPPFLAGS/s/=/+=/'
+SUBST_SED.configmk+=	-e '/^CFLAGS/s/=/+=/'
+SUBST_SED.configmk+=	-e '/^LDFLAGS/s/=/+=/'
+SUBST_SED.configmk+=	-e '/^CFLAGS/s/-Os//'
+SUBST_SED.configmk+=	-e '/^LDFLAGS/s/-s//'
+SUBST_SED.configmk+=	-e 's/cc/${CC:Q}/'
 
 USE_LANGUAGES=	c99
 


Home | Main Index | Thread Index | Old Index