summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamil <kamil>2016-06-18 21:46:07 +0000
committerkamil <kamil>2016-06-18 21:46:07 +0000
commitb48eaf6dda83ef751fdd21d5b1f14fa7377220fd (patch)
tree93e261e6c8d5eb6d89258196ad95177d296c664c
parented3dc915478d494d0424237653f2089a728d947f (diff)
downloadpkgsrc-b48eaf6dda83ef751fdd21d5b1f14fa7377220fd.tar.gz
Add WAF_REPLACE_EXECUTABLE in waf.mk
The waf tool has been designed as a bundled 3rd party script in a software tarball. For this reason some vendors freely modify these scripts and are technically incompatible with the stock one. Allow to use waf.mk goodies in such circumstances by specifying "WAF_REPLACE_EXECUTABL=no" in a package's Makefile. Retain the default behavior of replacing or copying waf into a package unchanged. Reviewed by <wiz>
-rw-r--r--devel/waf/waf.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/devel/waf/waf.mk b/devel/waf/waf.mk
index 8635d7037f5..a18d26d2016 100644
--- a/devel/waf/waf.mk
+++ b/devel/waf/waf.mk
@@ -1,4 +1,4 @@
-# $NetBSD: waf.mk,v 1.4 2016/06/18 10:30:14 leot Exp $
+# $NetBSD: waf.mk,v 1.5 2016/06/18 21:46:07 kamil Exp $
WAF_ENV+= CC=${CC:Q}
WAF_ENV+= CFLAGS=${CFLAGS:Q}
@@ -23,8 +23,11 @@ WAF_HAS_MANDIR?= yes
WAF_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
.endif
+WAF_REPLACE_EXECUTABLE?= yes
+.if !empty(WAF_REPLACE_EXECUTABLE:M[yY][eE][sS])
post-extract:
cp ${PREFIX}/bin/waf ${WRKSRC}
+.endif
do-configure:
cd ${WRKSRC} && ${SETENV} ${WAF_ENV} ./waf ${WAF_ARGS} ${WAF_CONFIGURE_ARGS} configure