biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / tools / build-managers / build2 / setup-hook.sh
blob1259fabc0548aded00e08cc66c58ae0cfc216776
1 build2ConfigurePhase() {
2 runHook preConfigure
4 local flagsArray=(
5 "config.c=$CC"
6 "config.cxx=$CXX"
7 "config.cc.coptions+=-O2"
8 "config.cc.poptions+=-DNDEBUG"
9 "config.install.root=$prefix"
10 "config.install.bin=${!outputBin}/bin"
11 "config.install.doc=${!outputDoc}/share/doc/${shareDocName}"
12 "config.install.exec_root=${!outputBin}"
13 "config.install.include=${!outputInclude}/include"
14 "config.install.lib=${!outputLib}/lib"
15 "config.install.libexec=${!outputLib}/libexec"
16 "config.install.man=${!outputDoc}/share/man"
17 "config.install.sbin=${!outputBin}/sbin"
18 "config.install.bin.mode=755"
19 $build2ConfigureFlags "${build2ConfigureFlagsArray[@]}"
22 if [ -n "@isTargetDarwin@" ]; then
23 flagsArray+=("config.bin.ld=ld64-lld")
24 flagsArray+=("config.cc.loptions+=-fuse-ld=lld")
25 flagsArray+=("config.cc.loptions+=-headerpad_max_install_names")
28 echo 'configure flags' "${flagsArray[@]}"
30 b configure "${flagsArray[@]}"
32 runHook postConfigure
35 build2BuildPhase() {
36 runHook preBuild
38 local flagsArray=(
39 $build2BuildFlags "${build2BuildFlagsArray[@]}"
42 echo 'build flags' "${flagsArray[@]}"
43 b "${flagsArray[@]}"
45 runHook postBuild
48 build2CheckPhase() {
49 runHook preCheck
51 local flagsArray=(
52 $build2CheckFlags "${build2CheckFlags[@]}"
55 echo 'check flags' "${flagsArray[@]}"
57 b test ${build2Dir:-.} "${flagsArray[@]}"
59 runHook postCheck
62 build2InstallPhase() {
63 runHook preInstall
65 local flagsArray=(
66 $build2InstallFlags "${build2InstallFlagsArray[@]}"
67 ${installTargets:-}
70 echo 'install flags' "${flagsArray[@]}"
71 b install "${flagsArray[@]}"
73 runHook postInstall
76 if [ -z "${dontUseBuild2Configure-}" -a -z "${configurePhase-}" ]; then
77 setOutputFlags=
78 configurePhase=build2ConfigurePhase
81 if [ -z "${dontUseBuild2Build-}" -a -z "${buildPhase-}" ]; then
82 buildPhase=build2BuildPhase
85 if [ -z "${dontUseBuild2Check-}" -a -z "${checkPhase-}" ]; then
86 checkPhase=build2CheckPhase
89 if [ -z "${dontUseBuild2Install-}" -a -z "${installPhase-}" ]; then
90 installPhase=build2InstallPhase