pkgsrc/print/ghostscript/patches/patch-ad
joerg b9eee2dcca Update to ghostscript-8.60:
The major milestone of this release is a merge from the ESP Ghostscript
fork, used to support the CUPS printing system. This means that free
operating systems can now ship a single copy of upstream Ghostscript with
their releases. Thanks to Till Kamppeter and Mike Sweet for making this
possible.

This release also includes numerous important bug fixes over the previous
stable versions, as well as improvements to performance, memory footprint,
shading and image handling. We recommend this upgrade to all free users.

While here, add DESTDIR support.
2007-08-08 17:32:06 +00:00

31 lines
808 B
Text

$NetBSD: patch-ad,v 1.3 2007/08/08 17:32:07 joerg Exp $
--- lib/pv.sh.orig 2007-07-05 12:41:52.000000000 +0200
+++ lib/pv.sh
@@ -30,21 +30,13 @@ fi
# executable name set in the makefile
GS_EXECUTABLE=gs
-TEMPDIR=.
PAGE=$1
shift
FILE="$1"
+TEMPFILE=`mktemp -t ${FILE}XXXXXX` || exit 1
shift
-if test -z "$TEMPDIR"; then
- TEMPDIR=/tmp
-fi
-if which mktemp >/dev/null 2>/dev/null; then
- tmpfile="`mktemp $TEMPDIR/\"$FILE\".pv.XXXXXX`"
-else
- tmpfile="$TEMPDIR/$FILE.$$.pv"
-fi
-trap "rm -rf $tmpfile" 0 1 2 15
-#dvips -D$RESOLUTION -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile
-dvips -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile
-$GS_EXECUTABLE $tmpfile
+trap "rm -rf $TEMPFILE" 0 1 2 15
+#dvips -D$RESOLUTION -p $PAGE -n 1 $FILE $* -o $TEMPFILE
+dvips -p $PAGE -n 1 $FILE $* -o $TEMPFILE
+gs $TEMPFILE
exit 0