mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
qt: support structuredAttrs in qmake hook
Tested qbs with and without __structuredAttrs.
This commit is contained in:
parent
5b370227d1
commit
1bcca7d66b
@ -1,40 +1,36 @@
|
||||
. @fix_qmake_libtool@
|
||||
|
||||
qmakeFlags=( ${qmakeFlags-} )
|
||||
|
||||
qmakePrePhase() {
|
||||
qmakeFlags_orig=( "${qmakeFlags[@]}" )
|
||||
|
||||
# These flags must be added _before_ the flags specified in the derivation.
|
||||
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:?}" \
|
||||
)
|
||||
prependToVar 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:?}"
|
||||
|
||||
if [ -n "@debug@" ]; then
|
||||
qmakeFlags+=( "CONFIG+=debug" )
|
||||
prependToVar qmakeFlags "CONFIG+=debug"
|
||||
else
|
||||
qmakeFlags+=( "CONFIG+=release" )
|
||||
prependToVar qmakeFlags "CONFIG+=release"
|
||||
fi
|
||||
|
||||
# do the stripping ourselves (needed for separateDebugInfo)
|
||||
qmakeFlags+=( "CONFIG+=nostrip" )
|
||||
|
||||
qmakeFlags+=( "${qmakeFlags_orig[@]}" )
|
||||
prependToVar qmakeFlags "CONFIG+=nostrip"
|
||||
}
|
||||
prePhases+=" qmakePrePhase"
|
||||
|
||||
qmakeConfigurePhase() {
|
||||
runHook preConfigure
|
||||
|
||||
local flagsArray=()
|
||||
concatTo flagsArray qmakeFlags
|
||||
|
||||
echo "QMAKEPATH=$QMAKEPATH"
|
||||
echo qmake "${qmakeFlags[@]}"
|
||||
qmake "${qmakeFlags[@]}"
|
||||
echo qmake "${flagsArray[@]}"
|
||||
qmake "${flagsArray[@]}"
|
||||
|
||||
if ! [[ -v enableParallelBuilding ]]; then
|
||||
enableParallelBuilding=1
|
||||
|
@ -1 +1 @@
|
||||
qmakeFlags+=( "QMAKE_LRELEASE=@dev@/bin/lrelease" )
|
||||
appendToVar qmakeFlags "QMAKE_LRELEASE=@dev@/bin/lrelease"
|
||||
|
@ -1,33 +1,29 @@
|
||||
. @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:?}"
|
||||
)
|
||||
|
||||
qmakeFlags+=("${qmakeFlags_orig[@]}")
|
||||
prependToVar 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:?}"
|
||||
}
|
||||
prePhases+=" qmakePrePhase"
|
||||
|
||||
qmakeConfigurePhase() {
|
||||
runHook preConfigure
|
||||
|
||||
local flagsArray=()
|
||||
concatTo flagsArray qmakeFlags
|
||||
|
||||
echo "QMAKEPATH=$QMAKEPATH"
|
||||
echo qmake "${qmakeFlags[@]}"
|
||||
qmake "${qmakeFlags[@]}"
|
||||
echo qmake "${flagsArray[@]}"
|
||||
qmake "${flagsArray[@]}"
|
||||
|
||||
if ! [[ -v enableParallelBuilding ]]; then
|
||||
enableParallelBuilding=1
|
||||
|
Loading…
Reference in New Issue
Block a user