summaryrefslogtreecommitdiff
path: root/graphics/djvulibre-nox11/files/patch-tools_any2djvu
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/djvulibre-nox11/files/patch-tools_any2djvu')
-rw-r--r--graphics/djvulibre-nox11/files/patch-tools_any2djvu95
1 files changed, 95 insertions, 0 deletions
diff --git a/graphics/djvulibre-nox11/files/patch-tools_any2djvu b/graphics/djvulibre-nox11/files/patch-tools_any2djvu
new file mode 100644
index 000000000000..b906d741f7de
--- /dev/null
+++ b/graphics/djvulibre-nox11/files/patch-tools_any2djvu
@@ -0,0 +1,95 @@
+--- tools/any2djvu.orig 2008-02-17 20:18:08.000000000 +0300
++++ tools/any2djvu 2008-02-17 20:20:31.000000000 +0300
+@@ -1,11 +1,11 @@
+-#! /bin/bash -f
++#!/bin/sh
+ # CVS version control block - do not edit manually
+ # $RCSfile: any2djvu,v $
+ # $Revision: 1.3 $
+ # $Date: 2007/08/10 08:08:55 $
+ # $Source: /cvsroot/djvu/djvulibre-3.5/tools/any2djvu,v $
+
+-function copyright()
++copyright()
+ {
+ echo "Copyright (C) 2002 David Kreil <D.Kreil@IEEE.Org>"
+ echo "Modified by Barak A. Pearlmutter <bap@debian.org>"
+@@ -14,7 +14,7 @@
+ echo "Released under the GNU GPL v2, 21-Oct-2002."
+ }
+
+-function warranty()
++warranty()
+ {
+ echo "This program is distributed in the hope that it will be useful,"
+ echo "but WITHOUT ANY WARRANTY; without even the implied warranty of"
+@@ -22,7 +22,7 @@
+ echo "GNU General Public License for more details."
+ }
+
+-function disclaimer()
++disclaimer()
+ {
+ echo "By using this tool you accept the following disclaimer:"
+ echo " Because the any2djvu service is free of charge, there is no"
+@@ -40,7 +40,7 @@
+ ocr=1
+ docformat=2
+
+-function warn()
++warn()
+ {
+ echo "Notes:"
+ echo " - Internet connection is required."
+@@ -53,7 +53,7 @@
+ echo " - This software comes with NO WARRANTY."
+ }
+
+-function format_help()
++format_help()
+ {
+ echo "Codes for the formats of the input documents to use with -f"
+ echo " 1 - DjVu Document (for verification or OCR)"
+@@ -67,7 +67,7 @@
+ echo " 9 - Scanned Document - Color/Mixed - >400 dpi"
+ }
+
+-function usage()
++usage()
+ {
+ echo "Convert files from .ps/.ps.gz/.pdf to .djvu"
+ echo "Usage: $0 [options] [url] {filename(s)}"
+@@ -123,13 +123,13 @@
+ fi
+
+ # check OCR option
+-if [ ! "x$ocr" == x0 ] && [ ! "x$ocr" == x1 ]; then
++if [ ! "x$ocr" = x0 ] && [ ! "x$ocr" = x1 ]; then
+ echo 'error: -o OCR must be 0 or 1'
+ exit 2
+ fi
+
+ # if help is requested or docformat is not specified right - show help
+-if [ "x$docformat" == x'help' ]; then
++if [ "x$docformat" = x'help' ]; then
+ format_help
+ exit 0
+ fi
+@@ -215,7 +215,7 @@
+ -F ocr=$ocr -F legal=1 "$rurl/$rcgi" \
+ | eval tee "'$log'" $shellopts
+ else
+- wget $wgetopts -O - "$rurl/$rcgi?urlupload=$lurl/$in$cgiopts" \
++ /usr/bin/fetch$wgetopts -o - "$rurl/$rcgi?urlupload=$lurl/$in$cgiopts" \
+ | eval tee "'$log'" $shellopts
+ fi
+ l=`egrep 'href=djvu/.*\.djvu' "$log"`
+@@ -225,7 +225,7 @@
+ echo "error: something got wrong. check log file"
+ exit 1
+ fi
+- wget $wgetopts -O "$b.djvu" "$rurl/$l"
++ /usr/bin/fetch $wgetopts -o $b.djvu "$rurl/$l"
+
+ [ -z "$doclean" ] || rm "$log"
+ [ -z $silent ] && ls -l "$b.djvu"