Accepting request 261983 from home:Ledest:bashisms

fix ksh-specific constrictions in gvmap.sh script

OBS-URL: https://build.opensuse.org/request/show/261983
OBS-URL: https://build.opensuse.org/package/show/graphics/graphviz?expand=0&rev=97
This commit is contained in:
Philipp Thomas 2014-11-18 06:54:00 +00:00 committed by Git OBS Bridge
parent 3df79f6415
commit 3f9b65974d
3 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,56 @@
diff -Ndur graphviz-2.38.0/cmd/gvmap/gvmap.sh graphviz-2.38.0-fix-gvmap/cmd/gvmap/gvmap.sh
--- graphviz-2.38.0/cmd/gvmap/gvmap.sh 2014-04-13 23:40:25.000000000 +0300
+++ graphviz-2.38.0-fix-gvmap/cmd/gvmap/gvmap.sh 2014-11-17 05:10:56.554829928 +0200
@@ -60,41 +60,41 @@
FLAGS3="$FLAGS3 -o$OPTARG"
;;
:)
- print -u 2 $OPTARG requires a value
+ echo "$OPTARG requires a value" >&2
exit 2
;;
\? )
- if [[ "$OPTARG" == '?' ]]
+ if [ "$OPTARG" = '?' ]
then
getopts -a gvmap "$OPTSTR" x '-?'
exit 0
else
- print -u 2 "gvmap: unknown flag $OPTARG - ignored"
+ echo "gvmap: unknown flag $OPTARG - ignored" >&2
fi
;;
esac
done
shift $((OPTIND-1))
-if [[ $# == 0 ]]
+if [ $# = 0 ]
then
- if [[ -n $VERBOSE ]]
+ if [ -n "$VERBOSE" ]
then
- print -u 2 "$LAYOUT -Goverlap=prism $FLAGS1 | gvmap $FLAGS2 | neato -n2 $FLAGS3"
+ echo "$LAYOUT -Goverlap=prism $FLAGS1 | gvmap $FLAGS2 | neato -n2 $FLAGS3" >&2
fi
$LAYOUT -Goverlap=prism $FLAGS1 | gvmap $FLAGS2 | neato -n2 $FLAGS3
else
- while (( $# > 0 ))
+ while [ $# -gt 0 ]
do
- if [[ -f $1 ]]
+ if [ -f "$1" ]
then
- if [[ -n $VERBOSE ]]
+ if [ -n "$VERBOSE" ]
then
- print -u 2 "$LAYOUT -Goverlap=prism $FLAGS1 $1 | gvmap $FLAGS2 | neato -n2 $FLAGS3"
+ echo "$LAYOUT -Goverlap=prism $FLAGS1 $1 | gvmap $FLAGS2 | neato -n2 $FLAGS3" >&2
fi
$LAYOUT -Goverlap=prism $FLAGS1 $1 | gvmap $FLAGS2 | neato -n2 $FLAGS3
else
- print -u 2 "gvmap: unknown input file $1 - ignored"
+ echo "gvmap: unknown input file $1 - ignored" >&2
fi
shift
done

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Nov 17 03:14:00 UTC 2014 - Led <ledest@gmail.com>
- fix ksh-specific constrictions in gvmap.sh script
- add patches:
+ graphviz-2.38.0-fix-gvmap.patch
-------------------------------------------------------------------
Tue Jul 15 11:33:27 UTC 2014 - toddrme2178@gmail.com

View File

@ -28,6 +28,7 @@ Group: Applications/Productivity
Url: http://www.graphviz.org/
Source: http://graphviz.org/pub/graphviz/stable/SOURCES/graphviz-%{version}.tar.gz
Source2: graphviz-rpmlintrc
Patch1: graphviz-2.38.0-fix-gvmap.patch
Patch2: graphviz-fix-pkgIndex.patch
#PATCH-FIX-UPSTREAM There are too many type-punnings in the vmalloc sources
Patch3: graphviz-no_strict_aliasing.patch
@ -89,6 +90,7 @@ Note: If you need output in png format you also need to install
%prep
%setup -q
%patch1 -p1
%patch2
%patch3
%patch4