diff options
author | Thomas Tuegel <ttuegel@gmail.com> | 2016-04-18 08:43:37 -0500 |
---|---|---|
committer | Thomas Tuegel <ttuegel@gmail.com> | 2016-04-20 10:01:06 -0500 |
commit | 8727485e08f404d62b286deab39c6f588b517e28 (patch) | |
tree | b28a391ce0edf65b5f105503585db22b6c47a2c7 /pkgs/development | |
parent | 51fe07711f3c0bbf378748de75e137548886dc11 (diff) |
qt55.qtbase: canonicalize paths in addToSearchPathOnce
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh b/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh index 9cf1ef9ccb614..e6b34b40292c9 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh @@ -2,7 +2,7 @@ if [[ -z "$QMAKE" ]]; then _qtLinkDependencyDir() { @lndir@/bin/lndir -silent "$1/$2" "$qtOut/$2" - if [[ -n "$NIX_QT_SUBMODULE" ]]; then + if [ -n "$NIX_QT_SUBMODULE" ]; then find "$1/$2" -printf "$2/%P\n" >> "$out/nix-support/qt-inputs" fi } @@ -22,13 +22,13 @@ _qtLinkModule() { _qtRmModules() { cat "$out/nix-support/qt-inputs" | while read file; do - if [[ -h "$out/$file" ]]; then + if [ -h "$out/$file" ]; then rm "$out/$file" fi done cat "$out/nix-support/qt-inputs" | while read file; do - if [[ -d "$out/$file" ]]; then + if [ -d "$out/$file" ]; then rmdir --ignore-fail-on-non-empty -p "$out/$file" fi done @@ -43,11 +43,14 @@ addToSearchPathOnceWithCustomDelimiter() { local dirs local exported IFS="$delim" read -a dirs <<< "${!search}" - for dir in ${dirs[@]}; do - if [ "z$dir" == "z$target" ]; then exported=1; fi - done - if [ -z $exported ]; then - eval "export ${search}=\"${!search}${!search:+$delim}$target\"" + local canonical + if canonical=$(readlink -e "$target"); then + for dir in ${dirs[@]}; do + if [ "z$dir" == "z$canonical" ]; then exported=1; fi + done + if [ -z $exported ]; then + eval "export ${search}=\"${!search}${!search:+$delim}$canonical\"" + fi fi } @@ -97,7 +100,7 @@ _qtMultioutDevs() { } qtOut="" -if [[ -z "$NIX_QT_SUBMODULE" ]]; then +if [ -z "$NIX_QT_SUBMODULE" ]; then qtOut=`mktemp -d` else qtOut=$out |