2015-02-21 16:54:12 +00:00
|
|
|
addQtModule() {
|
|
|
|
if [[ -d "$1/mkspecs" ]]; then
|
|
|
|
|
|
|
|
@lndir@/bin/lndir -silent "$1/mkspecs" "$qtOut/mkspecs"
|
|
|
|
if [[ -n $qtSubmodule ]]; then
|
|
|
|
find "$1/mkspecs" -printf 'mkspecs/%P\n' >> "$qtOut/nix-support/qt-inputs"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -d "$1/bin" ]]; then
|
|
|
|
@lndir@/bin/lndir -silent "$1/bin" "$qtOut/bin"
|
|
|
|
if [[ -n $qtSubmodule ]]; then
|
|
|
|
find "$1/bin" -printf 'bin/%P\n' >> "$qtOut/nix-support/qt-inputs"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -d "$1/include" ]]; then
|
|
|
|
@lndir@/bin/lndir -silent "$1/include" "$qtOut/include"
|
|
|
|
if [[ -n $qtSubmodule ]]; then
|
|
|
|
find "$1/include" -printf 'include/%P\n' >> "$qtOut/nix-support/qt-inputs"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-07-01 19:38:03 +01:00
|
|
|
if [[ -d "$1/lib" ]]; then
|
2015-02-21 16:54:12 +00:00
|
|
|
@lndir@/bin/lndir -silent "$1/lib" "$qtOut/lib"
|
2015-07-01 19:38:03 +01:00
|
|
|
if [[ -n $qtSubmodule ]]; then
|
|
|
|
find "$1/lib" -printf 'lib/%P\n' >> "$qtOut/nix-support/qt-inputs"
|
|
|
|
fi
|
2015-02-21 16:54:12 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2015-03-24 15:31:27 +00:00
|
|
|
setQMakePath() {
|
|
|
|
export PATH="$qtOut/bin${PATH:+:}$PATH"
|
|
|
|
}
|
|
|
|
|
2015-02-21 16:54:12 +00:00
|
|
|
qtOut=""
|
|
|
|
if [[ -z $qtSubmodule ]]; then
|
|
|
|
qtOut="$PWD/qmake-$name"
|
|
|
|
else
|
|
|
|
qtOut=$out
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p "$qtOut/bin" "$qtOut/mkspecs" "$qtOut/include" "$qtOut/nix-support" "$qtOut/lib"
|
|
|
|
|
|
|
|
cp "@out@/bin/qmake" "$qtOut/bin"
|
|
|
|
cat >"$qtOut/bin/qt.conf" <<EOF
|
|
|
|
[Paths]
|
|
|
|
Prefix = $qtOut
|
2015-07-01 18:14:33 +01:00
|
|
|
Plugins = lib/qt5/plugins
|
|
|
|
Imports = lib/qt5/imports
|
|
|
|
Qml2Imports = lib/qt5/qml
|
2015-02-21 16:54:12 +00:00
|
|
|
EOF
|
2015-07-01 18:14:43 +01:00
|
|
|
export QMAKE="$qtOut/bin/qmake"
|
2015-02-21 16:54:12 +00:00
|
|
|
|
|
|
|
envHooks+=(addQtModule)
|
2015-03-24 15:31:27 +00:00
|
|
|
preConfigurePhases+=" setQMakePath"
|