From 45b9ff715a085a493c7c11a7c75d51e4e31bd797 Mon Sep 17 00:00:00 2001
From: Enno Boland <gottox@voidlinux.eu>
Date: Sat, 30 Apr 2016 17:30:57 +0200
Subject: [PATCH 1/2] common/build-style/waf.sh: allow custom waf script

---
 common/build-style/waf.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/common/build-style/waf.sh b/common/build-style/waf.sh
index 6b30d5b3447..505ecd37f8c 100644
--- a/common/build-style/waf.sh
+++ b/common/build-style/waf.sh
@@ -2,13 +2,19 @@
 # This helper is for templates using WAF to build/install.
 #
 do_configure() {
-	python waf configure --prefix=/usr ${configure_args}
+	: ${configure_script:=waf}
+
+	python ${configure_script} configure --prefix=/usr ${configure_args}
 }
 
 do_build() {
-	python waf build ${make_build_args}
+	: ${configure_script:=waf}
+
+	python ${configure_script} build ${make_build_args}
 }
 
 do_install() {
-	python waf install --destdir=${DESTDIR} ${make_install_args}
+	: ${configure_script:=waf}
+
+	python ${configure_script} install --destdir=${DESTDIR} ${make_install_args}
 }

From f6b0e09d9f8e9c0c2b947bdc7ff27120e602002f Mon Sep 17 00:00:00 2001
From: Enno Boland <gottox@voidlinux.eu>
Date: Sat, 30 Apr 2016 17:32:26 +0200
Subject: [PATCH 2/2] common/build-style/waf3.sh: allow custom waf script

---
 common/build-style/waf3.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/common/build-style/waf3.sh b/common/build-style/waf3.sh
index 8701189bf24..30b7dc63071 100644
--- a/common/build-style/waf3.sh
+++ b/common/build-style/waf3.sh
@@ -2,13 +2,19 @@
 # This helper is for templates using WAF with python3 to build/install.
 #
 do_configure() {
-	PYTHON=python3 python3 waf configure --prefix=/usr ${configure_args}
+	: ${configure_script:=waf}
+
+	PYTHON=python3 python3 ${configure_script} configure --prefix=/usr ${configure_args}
 }
 
 do_build() {
-	PYTHON=python3 python3 waf build ${make_build_args}
+	: ${configure_script:=waf}
+
+	PYTHON=python3 python3 ${configure_script} build ${make_build_args}
 }
 
 do_install() {
-	PYTHON=python3 python3 waf install --destdir=${DESTDIR} ${make_install_args}
+	: ${configure_script:=waf}
+
+	PYTHON=python3 python3 ${configure_script} install --destdir=${DESTDIR} ${make_install_args}
 }