diff --git a/debian/changelog b/debian/changelog index f22fb4573..3a32f7768 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ cmake (2.6.4-2) UNRELEASED; urgency=low * Prefer *-qt3 binary names to generic ones in FinqQt3.cmake (Closes: #538864). + * Fix bashisms in CMake scripts (Closes: #530056). - -- Modestas Vainius Sat, 08 Aug 2009 10:34:21 +0300 + -- Modestas Vainius Sat, 08 Aug 2009 10:48:28 +0300 cmake (2.6.4-1) unstable; urgency=low diff --git a/debian/patches/fix_bashisms.diff b/debian/patches/fix_bashisms.diff new file mode 100644 index 000000000..583888db1 --- /dev/null +++ b/debian/patches/fix_bashisms.diff @@ -0,0 +1,35 @@ +Fix bashisms in CMake scripts. Thanks to Raphael Geissert for heads up. + +--- a/Modules/CPack.RuntimeScript.in ++++ b/Modules/CPack.RuntimeScript.in +@@ -3,10 +3,10 @@ + # Modified from: Aaron Voisine + + 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 diff --git a/debian/patches/series b/debian/patches/series index d2396e740..779082b41 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ findmpeg2-addpath.diff kfreebsd-Platform.diff executables-dont-need-fpic.diff manpage_friendly_docs.diff +fix_bashisms.diff