summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Loeser <halcy0n@gentoo.org>2005-08-16 01:31:56 +0000
committerMark Loeser <halcy0n@gentoo.org>2005-08-16 01:31:56 +0000
commitfb19d0de0fadbd4d90d91e0ec0261cc4387688de (patch)
treed473ac26286be721dbe0144baf1a1283df606ed4 /media-gfx/aview/files
parentStable amd64. (diff)
downloadhistorical-fb19d0de0fadbd4d90d91e0ec0261cc4387688de.tar.gz
historical-fb19d0de0fadbd4d90d91e0ec0261cc4387688de.tar.bz2
historical-fb19d0de0fadbd4d90d91e0ec0261cc4387688de.zip
Adding patch to fix using asciiview with files that have spaces in the name,
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'media-gfx/aview/files')
-rw-r--r--media-gfx/aview/files/aview-1.3.0_rc1-filename-spaces.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/media-gfx/aview/files/aview-1.3.0_rc1-filename-spaces.patch b/media-gfx/aview/files/aview-1.3.0_rc1-filename-spaces.patch
new file mode 100644
index 000000000000..e42ed0d5c583
--- /dev/null
+++ b/media-gfx/aview/files/aview-1.3.0_rc1-filename-spaces.patch
@@ -0,0 +1,53 @@
+diff -ur aview-1.3.0-orig/asciiview aview-1.3.0/asciiview
+--- aview-1.3.0-orig/asciiview 2005-08-15 21:20:16.000000000 -0400
++++ aview-1.3.0/asciiview 2005-08-15 21:20:19.000000000 -0400
+@@ -7,9 +7,9 @@
+ }
+ myconvert()
+ {
+- if anytopnm $1 >/tmp/aview$$.pgm 2>/dev/null ; then
++ if anytopnm "$1" >/tmp/aview$$.pgm 2>/dev/null ; then
+ exit
+- elif convert -colorspace gray $1 pgm:- 2>/dev/null ; then
++ elif convert -colorspace gray "$1" pgm:- 2>/dev/null ; then
+ exit
+ fi
+ echo "Failed to convert file format to PNM by both convert and anytopnm" >&2
+@@ -44,8 +44,13 @@
+ options="$options $1"
+ shift
+ ;;
+- *)
+- filenames="$filenames $1"
++ *)
++ if [ "$filenames" = "" ]
++ then
++ filenames=$1 #avoid leading null
++ else
++ filenames=$(echo -e "$filenames\000$1")
++ fi
+ shift
+ ;;
+ esac
+@@ -53,15 +58,16 @@
+ trap clear 0
+ mkfifo /tmp/aview$$.pgm
+ outfile=/tmp/aview$$.pgm
+-for name in $filenames ; do
+-if test -r $name ; then
+-case $name in
++IFS=$(echo -e "\000")
++echo $filenames | while read name; do
++if test -r "$name" ; then
++case "$name" in
+ *.fli | *.lfc | *.flic )
+ PATH="$PATH:."
+- aaflip $options $name
++ aaflip $options "$name"
+ ;;
+ *)
+- myconvert $name >/tmp/aview$$.pgm &
++ myconvert "$name" >/tmp/aview$$.pgm &
+ pid=$!
+ PATH="$PATH:."
+ aview $options /tmp/aview$$.pgm