cmake/debian/patches/fix_bashisms.diff
Modestas Vainius b152287dce Update patches.
- FindQt4.cmake2.6.diff - remove, no longer needed as original bug has been
  fixed since 2.6;
- FindQt3.cmake.diff - refresh, add DEP-3 headers;
- findmpeg2-addpath.diff - remove, bug fixed upstream (in other way);
- kfreebsd-Platform.diff - refresh, add DEP-3 headers;
- executables-dont-need-fpic.diff - refresh, app DEP-3 headers;
- manpage_friendly_docs.diff - remove, merged upstream;
- FindPerlLibs.cmake-perl-5.10.diff - remove, fixed upstream differently;
- FindJNI.cmake-more-arches.diff - remove, was taken from upstream;
- FindVTK.cmake-vtk-5.4.diff - remove, was taken from upstream.
2009-10-04 14:38:08 +03:00

40 lines
1.3 KiB
Diff

From: Modestas Vainius <modestas@vainius.eu>
Subject: Fix bashisms in CMake scripts.
Fix bashisms found in /bin/sh scripts. Thanks to Raphael Geissert for heads
up.
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530056
--- a/Modules/CPack.RuntimeScript.in
+++ b/Modules/CPack.RuntimeScript.in
@@ -3,10 +3,10 @@
# Modified from: Aaron Voisine <aaron@voisine.org>
CWD="`dirname \"$0\"`"
-TMP=/tmp/$UID/TemporaryItems
+TMP=/tmp/$(id -ru)/TemporaryItems
version=`sw_vers -productVersion`
-if [ "$?" == "0" ]; then
+if [ "$?" = "0" ]; then
major=${version%%\.*}
rest=${version#*\.}
minor=${rest%%\.*}
@@ -24,7 +24,7 @@
# if 10.5 or greater, then all the open-x11 stuff need not occur
-if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then
+if [ "$major" -lt 10 ] || ([ "$major" -eq 10 ] && [ "$minor" -lt 5 ]); then
version=`sw_vers -productVersion`
if [ "$?" = "0" ]; then
major=${version%%\.*}
@@ -44,7 +44,7 @@
# if 10.5 or greater, then all the open-x11 stuff need not occur
-if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then
+if [ "$major" -lt 10 ] || ([ "$major" -eq 10 ] && [ "$minor" -lt 5 ]); then
ps -wx -ocommand | grep -e '[X]11.app' > /dev/null
if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
echo "rm -f ~/.xinitrc" > ~/.xinitrc