about summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2019-04-09 23:44:37 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2019-04-09 23:44:37 -0400
commita79a8f29bc509b2d51158846c9562e64e1239b4c (patch)
treeaad21af4ec95ec19091ab9c9e813baa544948e27 /pkgs/development/tools
parent52566c3b7b5f96d198dd6e57e2db37012fd9b71b (diff)
downloadnixlib-a79a8f29bc509b2d51158846c9562e64e1239b4c.tar
nixlib-a79a8f29bc509b2d51158846c9562e64e1239b4c.tar.gz
nixlib-a79a8f29bc509b2d51158846c9562e64e1239b4c.tar.bz2
nixlib-a79a8f29bc509b2d51158846c9562e64e1239b4c.tar.lz
nixlib-a79a8f29bc509b2d51158846c9562e64e1239b4c.tar.xz
nixlib-a79a8f29bc509b2d51158846c9562e64e1239b4c.tar.zst
nixlib-a79a8f29bc509b2d51158846c9562e64e1239b4c.zip
waf: use wafConfigureFlags for waf flags
This avoids the potential conflict between autoconf flags and the waf
flags. There is some overlap between the two but waf errors when it
doesn’t recognize the flag.
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/build-managers/waf/setup-hook.sh27
1 files changed, 5 insertions, 22 deletions
diff --git a/pkgs/development/tools/build-managers/waf/setup-hook.sh b/pkgs/development/tools/build-managers/waf/setup-hook.sh
index 6e9fac0200d1..3da86d3201f5 100644
--- a/pkgs/development/tools/build-managers/waf/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/waf/setup-hook.sh
@@ -6,31 +6,14 @@ wafConfigurePhase() {
         cp @waf@ "$wafPath"
     fi
 
-    if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then
-        configureFlags="${prefixKey:---prefix=}$prefix $configureFlags"
+    if [ -z "${dontAddPrefix:-}" ] && [ -n "$prefix" ]; then
+        wafConfigureFlags="${prefixKey:---prefix=}$prefix $wafConfigureFlags"
     fi
 
-    local flagsArray=(@crossFlags@);
-    for flag in $configureFlags "${configureFlagsArray[@]}";
-    do
-        if [[
-        # waf does not support these flags, but they are "blindly" added by the
-        # pkgsStatic overlay, for example.
-              $flag != "--enable-static"
-           && $flag != "--disable-static"
-           && $flag != "--enable-shared"
-           && $flag != "--disable-shared"
-        # these flags are added by configurePlatforms but waf just uses them
-        # to bail out in cross compilation cases
-           && $flag != --build=* 
-           && $flag != --host=* 
-           ]];
-        then
-            flagsArray=("${flagsArray[@]}" "$flag");
-        fi;
-    done
-    flagsArray=(
+    local flagsArray=(
+        @crossFlags@
         "${flagsArray[@]}"
+        $wafConfigureFlags "${wafConfigureFlagsArray[@]}"
         ${configureTargets:-configure}
     )
     echoCmd 'configure flags' "${flagsArray[@]}"