diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-03-22 01:59:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-22 01:59:41 -0400 |
commit | 46f8756aee25ec58a4552a2c2213760a34c73726 (patch) | |
tree | e970e1b5163555f1104c042032bda6758655d2a8 | |
parent | b67aafe8b8830f621ac4905cd481539a028ef414 (diff) | |
parent | 03ffda3d1e5db136543f4d5c1aa196bb8cd93774 (diff) | |
download | nixpkgs-46f8756aee25ec58a4552a2c2213760a34c73726.tar nixpkgs-46f8756aee25ec58a4552a2c2213760a34c73726.tar.gz nixpkgs-46f8756aee25ec58a4552a2c2213760a34c73726.tar.bz2 nixpkgs-46f8756aee25ec58a4552a2c2213760a34c73726.tar.lz nixpkgs-46f8756aee25ec58a4552a2c2213760a34c73726.tar.xz nixpkgs-46f8756aee25ec58a4552a2c2213760a34c73726.tar.zst nixpkgs-46f8756aee25ec58a4552a2c2213760a34c73726.zip |
Merge pull request #79593 from thefloweringash/wafhook-phases
wafHook: allow overriding phases and disabling of cross flags
-rw-r--r-- | pkgs/development/tools/build-managers/wafHook/setup-hook.sh | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/pkgs/development/tools/build-managers/wafHook/setup-hook.sh b/pkgs/development/tools/build-managers/wafHook/setup-hook.sh index 38998e8db34..439350c3abc 100644 --- a/pkgs/development/tools/build-managers/wafHook/setup-hook.sh +++ b/pkgs/development/tools/build-managers/wafHook/setup-hook.sh @@ -11,17 +11,23 @@ wafConfigurePhase() { fi local flagsArray=( - @crossFlags@ "${flagsArray[@]}" $wafConfigureFlags "${wafConfigureFlagsArray[@]}" ${configureTargets:-configure} ) + if [ -z "${dontAddWafCrossFlags:-}" ]; then + flagsArray+=(@crossFlags@) + fi echoCmd 'configure flags' "${flagsArray[@]}" python "$wafPath" "${flagsArray[@]}" runHook postConfigure } +if [ -z "${dontUseWafConfigure-}" -a -z "${configurePhase-}" ]; then + configurePhase=wafConfigurePhase +fi + wafBuildPhase () { runHook preBuild @@ -41,6 +47,10 @@ wafBuildPhase () { runHook postBuild } +if [ -z "${dontUseWafBuild-}" -a -z "${buildPhase-}" ]; then + buildPhase=wafBuildPhase +fi + wafInstallPhase() { runHook preInstall @@ -51,7 +61,7 @@ wafInstallPhase() { local flagsArray=( $wafFlags ${wafFlagsArray[@]} $installFlags ${installFlagsArray[@]} - ${installTargets:-install} + ${installTargets:-install} ) echoCmd 'install flags' "${flagsArray[@]}" @@ -60,6 +70,6 @@ wafInstallPhase() { runHook postInstall } -configurePhase=wafConfigurePhase -buildPhase=wafBuildPhase -installPhase=wafInstallPhase +if [ -z "${dontUseWafInstall-}" -a -z "${installPhase-}" ]; then + installPhase=wafInstallPhase +fi |