mmctl: 9.11.7 -> 9.11.8 (#376561)
[NixPkgs.git] / pkgs / development / libraries / qt-5 / hooks / qmake-hook.sh
blob855efb5e6c0fdab8970c5c13f3466bc856729339
1 . @fix_qmake_libtool@
3 qmakePrePhase() {
4 # These flags must be added _before_ the flags specified in the derivation.
5 prependToVar qmakeFlags \
6 "PREFIX=$out" \
7 "NIX_OUTPUT_OUT=$out" \
8 "NIX_OUTPUT_DEV=${!outputDev}" \
9 "NIX_OUTPUT_BIN=${!outputBin}" \
10 "NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?}" \
11 "NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}" \
12 "NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}"
14 if [ -n "@debug@" ]; then
15 prependToVar qmakeFlags "CONFIG+=debug"
16 else
17 prependToVar qmakeFlags "CONFIG+=release"
20 # do the stripping ourselves (needed for separateDebugInfo)
21 prependToVar qmakeFlags "CONFIG+=nostrip"
23 appendToVar prePhases qmakePrePhase
25 qmakeConfigurePhase() {
26 runHook preConfigure
28 local flagsArray=()
29 concatTo flagsArray qmakeFlags
31 echo "QMAKEPATH=$QMAKEPATH"
32 echo qmake "${flagsArray[@]}"
33 qmake "${flagsArray[@]}"
35 if ! [[ -v enableParallelBuilding ]]; then
36 enableParallelBuilding=1
37 echo "qmake: enabled parallel building"
40 if ! [[ -v enableParallelInstalling ]]; then
41 enableParallelInstalling=1
42 echo "qmake: enabled parallel installing"
45 runHook postConfigure
48 if [ -z "${dontUseQmakeConfigure-}" -a -z "${configurePhase-}" ]; then
49 configurePhase=qmakeConfigurePhase