summaryrefslogtreecommitdiffstats
path: root/source/ap/ghostscript/ghostscript.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/ghostscript/ghostscript.SlackBuild')
-rwxr-xr-xsource/ap/ghostscript/ghostscript.SlackBuild29
1 files changed, 21 insertions, 8 deletions
diff --git a/source/ap/ghostscript/ghostscript.SlackBuild b/source/ap/ghostscript/ghostscript.SlackBuild
index b0bb34ba3..a17d34286 100755
--- a/source/ap/ghostscript/ghostscript.SlackBuild
+++ b/source/ap/ghostscript/ghostscript.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,18 @@
PKGNAM=ghostscript
-VERSION=${VERSION:-8.70}
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-1}
-
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
@@ -42,6 +50,9 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
cd $TMP
@@ -49,6 +60,8 @@ rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
cd ${PKGNAM}-$VERSION
+zcat $CWD/ghostscript-pdf2dsc.patch.gz | patch -p1 --verbose || exit 1
+
## Regenerate ./configure:
#sh autogen.sh
@@ -74,9 +87,9 @@ find . \
--program-prefix= \
--program-suffix= \
--build=$ARCH-slackware-linux
- make
- make install
- make install DESTDIR=$PKG
+ make || exit 1
+ make install || exit 1
+ make install DESTDIR=$PKG || exit 1
) || exit 1
# Configure: