Skip to content

Commit

Permalink
wafHook: ignore --disable-static and such options
Browse files Browse the repository at this point in the history
These options are forcefully added by pkgsStatic but are not understood
by waf.
  • Loading branch information
symphorien committed Mar 28, 2019
1 parent f075de5 commit f23a215
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions pkgs/development/tools/build-managers/waf/setup-hook.sh
Expand Up @@ -10,8 +10,21 @@ wafConfigurePhase() {
configureFlags="${prefixKey:---prefix=}$prefix $configureFlags"
fi

local flagsArray=(
$configureFlags ${configureFlagsArray[@]}
local flagsArray=();
for flag in $configureFlags "${configureFlagsArray[@]}";
do
# waf does not support these flags, but they are "blindly" added by the
# pkgsStatic overlay, for example.
if [[ $flag != "--enable-static"
&& $flag != "--disable-static"
&& $flag != "--enable-shared"
&& $flag != "--disable-shared" ]];
then
flagsArray=("${flagsArray[@]}" "$flag");
fi;
done
flagsArray=(
"${flagsArray[@]}"
${configureTargets:-configure}
)
echoCmd 'configure flags' "${flagsArray[@]}"
Expand Down

0 comments on commit f23a215

Please sign in to comment.