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

View File

@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
patchShebangs ./tools/
'';
configureFlags = [
wafConfigureFlags = [
"--optimize"
"--docs"
"--with-backends=jack,alsa,dummy"

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
zita-resampler curl
];
configureFlags = [
wafConfigureFlags = [
"--shared-lib"
"--no-desktop-update"
"--enable-nls"

View File

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
export SWORD_HOME=${sword};
'';
configureFlags= [ "--enable-webkit2" ];
wafConfigureFlags = [ "--enable-webkit2" ];
meta = with stdenv.lib; {
description = "A GTK Bible study tool";

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
sed -i '/target[ ]*= "ttl2c"/ ilib=["boost_system"],' tools/wscript_build
'';
configureFlags = [
wafConfigureFlags = [
"--boost-includes=${boost.dev}/include"
"--boost-libs=${boost.out}/lib"
];

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation {
};
nativeBuildInputs = [ pkgconfig wafHook ];
buildInputs = [ openssl doxygen boost sqlite python pythonPackages.sphinx];
configureFlags = [
wafConfigureFlags = [
"--with-openssl=${openssl.dev}"
"--boost-includes=${boost.dev}/include"
"--boost-libs=${boost.out}/lib"

View File

@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
patchShebangs doc/ns3_html_theme/get_version.sh
'';
configureFlags = with stdenv.lib; [
wafConfigureFlags = with stdenv.lib; [
"--enable-modules=${stdenv.lib.concatStringsSep "," modules}"
"--with-python=${pythonEnv.interpreter}"
]

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
wafPath = "buildtools/bin/waf";
configureFlags = [
wafConfigureFlags = [
"--enable-talloc-compat1"
"--bundled-libraries=NONE"
"--builtin-libraries=replace"

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
wafPath = "buildtools/bin/waf";
configureFlags = [
wafConfigureFlags = [
"--bundled-libraries=NONE"
"--builtin-libraries=replace"
];

View File

@ -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[@]}"

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation {
export CXXFLAGS="-I${libX11.dev}/include/X11 -DLIBDIR=\\\"${mupen64plus}/lib/\\\""
export LDFLAGS="-lwx_gtk2u_adv-2.9"
configureFlagsArray+=("--mupenapi=$APIDIR" "--wxconfig=`type -P wx-config`")
wafConfigureFlagsArray+=("--mupenapi=$APIDIR" "--wxconfig=`type -P wx-config`")
'';
NIX_CFLAGS_COMPILE = "-fpermissive";

View File

@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
export NIX_CFLAGS_COMPILE="-F${CoreFoundation}/Library/Frameworks $NIX_CFLAGS_COMPILE"
'';
configureFlags = [
wafConfigureFlags = [
"--classic"
"--autostart=${if (optDbus != null) then "dbus" else "classic"}"
] ++ optional (optDbus != null) "--dbus"

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
libjpeg libpng xorg.libxcb libX11 libGL libdrm python27 wayland udev mesa_noglu
];
configureFlags = ["--with-flavors=x11-gl,x11-glesv2,drm-gl,drm-glesv2,wayland-gl,wayland-glesv2"];
wafConfigureFlags = ["--with-flavors=x11-gl,x11-glesv2,drm-gl,drm-glesv2,wayland-gl,wayland-glesv2"];
meta = with stdenv.lib; {
description = "OpenGL (ES) 2.0 benchmark";