summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamil <kamil@pkgsrc.org>2016-06-18 21:46:07 +0000
committerkamil <kamil@pkgsrc.org>2016-06-18 21:46:07 +0000
commit9b7487a094497b1c72cf720d355565a624a3e4b3 (patch)
tree8485b90f07f705e993bd7373a7e5c5210e171785
parent68a0b6080a0ba092601e9f51dd1bef83c05f7366 (diff)
downloadpkgsrc-9b7487a094497b1c72cf720d355565a624a3e4b3.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