2020-04-24 23:36:52 +00:00
|
|
|
. @fix_qmake_libtool@
|
|
|
|
|
|
|
|
qmakeFlags=( ${qmakeFlags-} )
|
|
|
|
|
|
|
|
qmakePrePhase() {
|
2021-02-19 19:06:45 +00:00
|
|
|
qmakeFlags_orig=( "${qmakeFlags[@]}" )
|
|
|
|
|
|
|
|
# These flags must be added _before_ the flags specified in the derivation.
|
2020-04-24 23:36:52 +00:00
|
|
|
qmakeFlags=( \
|
|
|
|
"PREFIX=$out" \
|
|
|
|
"NIX_OUTPUT_OUT=$out" \
|
|
|
|
"NIX_OUTPUT_DEV=${!outputDev}" \
|
|
|
|
"NIX_OUTPUT_BIN=${!outputBin}" \
|
|
|
|
"NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?}" \
|
|
|
|
"NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}" \
|
|
|
|
"NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}" \
|
|
|
|
)
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
if [ -n "@debug@" ]; then
|
|
|
|
qmakeFlags+=( "CONFIG+=debug" )
|
|
|
|
else
|
|
|
|
qmakeFlags+=( "CONFIG+=release" )
|
|
|
|
fi
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
# do the stripping ourselves (needed for separateDebugInfo)
|
|
|
|
qmakeFlags+=( "CONFIG+=nostrip" )
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
qmakeFlags+=( "${qmakeFlags_orig[@]}" )
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|
|
|
|
prePhases+=" qmakePrePhase"
|
|
|
|
|
|
|
|
qmakeConfigurePhase() {
|
|
|
|
runHook preConfigure
|
|
|
|
|
|
|
|
echo "QMAKEPATH=$QMAKEPATH"
|
|
|
|
echo qmake "${qmakeFlags[@]}"
|
|
|
|
qmake "${qmakeFlags[@]}"
|
|
|
|
|
|
|
|
if ! [[ -v enableParallelBuilding ]]; then
|
|
|
|
enableParallelBuilding=1
|
|
|
|
echo "qmake: enabled parallel building"
|
|
|
|
fi
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
if ! [[ -v enableParallelInstalling ]]; then
|
|
|
|
enableParallelInstalling=1
|
|
|
|
echo "qmake: enabled parallel installing"
|
|
|
|
fi
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
runHook postConfigure
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ -z "${dontUseQmakeConfigure-}" -a -z "${configurePhase-}" ]; then
|
|
|
|
configurePhase=qmakeConfigurePhase
|
|
|
|
fi
|