c594a97518
GitOrigin-RevId: 301aada7a64812853f2e2634a530ef5d34505048
48 lines
1.2 KiB
Bash
48 lines
1.2 KiB
Bash
. @fix_qmake_libtool@
|
|
|
|
qmakeFlags=(${qmakeFlags-})
|
|
|
|
qmakePrePhase() {
|
|
qmakeFlags_orig=("${qmakeFlags[@]}")
|
|
|
|
# These flags must be added _before_ the flags specified in the derivation.
|
|
# TODO: these flags also need a patch which isn't applied
|
|
# can we either remove these flags or update the qt5 patch?
|
|
# "NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?}" \
|
|
qmakeFlags=(
|
|
"PREFIX=$out"
|
|
"NIX_OUTPUT_OUT=$out"
|
|
"NIX_OUTPUT_DEV=${!outputDev}"
|
|
"NIX_OUTPUT_BIN=${!outputBin}"
|
|
"NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}"
|
|
"NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}"
|
|
)
|
|
|
|
if [ -n "@debug@" ]; then
|
|
qmakeFlags+=("CONFIG+=debug")
|
|
else
|
|
qmakeFlags+=("CONFIG+=release")
|
|
fi
|
|
|
|
qmakeFlags+=("${qmakeFlags_orig[@]}")
|
|
}
|
|
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
|
|
|
|
runHook postConfigure
|
|
}
|
|
|
|
if [ -z "${dontUseQmakeConfigure-}" -a -z "${configurePhase-}" ]; then
|
|
configurePhase=qmakeConfigurePhase
|
|
fi
|