about summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorSymphorien Gibol <symphorien+git@xlumurb.eu>2019-03-28 19:59:16 +0100
committerSymphorien Gibol <symphorien+git@xlumurb.eu>2019-03-28 19:59:16 +0100
commit1001d0034c5fb815fffa66bc25d88ad6761a9d00 (patch)
treeeece70f4de6302c021af7618b9a862855f2bcb81 /pkgs/development/tools
parentf23a21514c99974307aff74946ce1150d5aa3653 (diff)
downloadnixlib-1001d0034c5fb815fffa66bc25d88ad6761a9d00.tar
nixlib-1001d0034c5fb815fffa66bc25d88ad6761a9d00.tar.gz
nixlib-1001d0034c5fb815fffa66bc25d88ad6761a9d00.tar.bz2
nixlib-1001d0034c5fb815fffa66bc25d88ad6761a9d00.tar.lz
nixlib-1001d0034c5fb815fffa66bc25d88ad6761a9d00.tar.xz
nixlib-1001d0034c5fb815fffa66bc25d88ad6761a9d00.tar.zst
nixlib-1001d0034c5fb815fffa66bc25d88ad6761a9d00.zip
wafHook: ignore configurePlatforms
waf does support --build and --host, but the only effect of these
options is an error message telling to use --cross-compile instead.
So we ignore these flags.
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/build-managers/waf/setup-hook.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/development/tools/build-managers/waf/setup-hook.sh b/pkgs/development/tools/build-managers/waf/setup-hook.sh
index 01392c9a3423..a837bfd17f29 100644
--- a/pkgs/development/tools/build-managers/waf/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/waf/setup-hook.sh
@@ -13,12 +13,18 @@ wafConfigurePhase() {
     local flagsArray=();
     for flag in $configureFlags "${configureFlagsArray[@]}";
     do
+        if [[
         # waf does not support these flags, but they are "blindly" added by the
         # pkgsStatic overlay, for example.
-        if [[ $flag != "--enable-static"
+              $flag != "--enable-static"
            && $flag != "--disable-static"
            && $flag != "--enable-shared"
-           && $flag != "--disable-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;