mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 13:57:10 +03:00
7a9400d338
- qtbase builds on darwin - Downstream qmake and cmake build configurations supported Darwin-specific changes: Prevent `qmake -project` from adding build support files in the temp directory to the project. Shrink the temp directory used for building with qmake. The issue here is that `lndir` recreates the entire directory structure of the module we are merging into the temporary build environment. On darwin, the framework directory structures mean that this shadow directory tree is 17MB even though the file contents are all symlinks into the store. To address this, we symlink the framework directories explicitly and use `lndir` for everything else.
43 lines
1.2 KiB
Bash
43 lines
1.2 KiB
Bash
qmakeConfigurePhase() {
|
|
runHook preConfigure
|
|
|
|
qmake PREFIX=$out $qmakeFlags
|
|
|
|
runHook postConfigure
|
|
}
|
|
|
|
if [ -z "$dontUseQmakeConfigure" -a -z "$configurePhase" ]; then
|
|
configurePhase=qmakeConfigurePhase
|
|
fi
|
|
|
|
_qtModuleMultioutDevsPre() {
|
|
# We cannot simply set these paths in configureFlags because libQtCore retains
|
|
# references to the paths it was built with.
|
|
moveToOutput "bin" "${!outputDev}"
|
|
moveToOutput "include" "${!outputDev}"
|
|
|
|
# The destination directory must exist or moveToOutput will do nothing
|
|
mkdir -p "${!outputDev}/share"
|
|
moveToOutput "share/doc" "${!outputDev}"
|
|
}
|
|
|
|
_qtModuleMultioutDevsPost() {
|
|
# Move libtool archives and qmake project files to $dev/lib
|
|
if [ "z${!outputLib}" != "z${!outputDev}" ]; then
|
|
pushd "${!outputLib}"
|
|
if [ -d "lib" ]; then
|
|
find lib \( -name '*.a' -o -name '*.la' \) -print0 | \
|
|
while read -r -d $'\0' file; do
|
|
mkdir -p "${!outputDev}/$(dirname "$file")"
|
|
mv "${!outputLib}/$file" "${!outputDev}/$file"
|
|
done
|
|
fi
|
|
popd
|
|
fi
|
|
}
|
|
|
|
if [ -n "$NIX_QT_SUBMODULE" ]; then
|
|
preFixupHooks+=(_qtModuleMultioutDevsPre)
|
|
postFixupHooks+=(_qtModuleMultioutDevsPost)
|
|
fi
|