1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-18 10:56:53 +00:00
nixpkgs/pkgs/development/libraries/qt-5/hooks/move-qt-dev-tools.sh
Thomas Tuegel fe0ab944db
qt5: factor out common definitions and remove symlink farm
The module definitions are factored out and shared between qt56 and qt59. The
symlink farm which was created during builds is no longer needed.
2017-11-07 07:18:46 -06:00

35 lines
1,014 B
Bash

updateToolPath() {
local tool="$1"
local target="$2"
local original="${!outputBin}/$tool"
local actual="${!outputDev}/$tool"
if grep -q "$original" "$target"; then
echo "updateToolPath: Updating \`$original' in \`$target\'..."
sed -i "$target" -e "s|$original|$actual|"
fi
}
moveQtDevTools() {
if [ -n "$devTools" ]; then
for tool in $devTools; do
moveToOutput "$tool" "${!outputDev}"
done
if [ -d "${!outputDev}/mkspecs" ]; then
find "${!outputDev}/mkspecs" -name '*.pr?' | while read pr_; do
for tool in $devTools; do
updateToolPath "$tool" "$pr_"
done
done
fi
if [ -d "${!outputDev}/lib/cmake" ]; then
find "${!outputDev}/lib/cmake" -name '*.cmake' | while read cmake; do
for tool in $devTools; do
updateToolPath "$tool" "$cmake"
done
done
fi
fi
}