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.
This commit is contained in:
Matthew Bauer
2019-04-09 23:44:37 -04:00
parent 52566c3b7b
commit a79a8f29bc
12 changed files with 16 additions and 33 deletions
@@ -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[@]}"