summaryrefslogtreecommitdiffstats
path: root/source/ap/ghostscript
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/ghostscript')
-rw-r--r--source/ap/ghostscript/cidfmap29
-rwxr-xr-xsource/ap/ghostscript/dump.unused.internal.libraries.from.sources.sh6
-rwxr-xr-xsource/ap/ghostscript/ghostscript.SlackBuild90
-rw-r--r--source/ap/ghostscript/ghostscript.url1
-rw-r--r--source/ap/ghostscript/ijs-config56
-rw-r--r--source/ap/ghostscript/slack-desc10
6 files changed, 144 insertions, 48 deletions
diff --git a/source/ap/ghostscript/cidfmap b/source/ap/ghostscript/cidfmap
index 28d69ad88..ef18631f5 100644
--- a/source/ap/ghostscript/cidfmap
+++ b/source/ap/ghostscript/cidfmap
@@ -1,30 +1,49 @@
%!
-% $Id: cidfmap 6300 2005-12-28 19:56:24Z giles $
% This is a sample map file for CIDFont category.
%
% The map is a set of records, which must use one of the two formats :
%
-% 1. A substutution of a CIF font with another CID font :
+% 1. A substutution of a CIDFont font with another CIDFont :
%
% /substituted /original ;
%
% Where 'substituted' is a name being used in a document,
% 'original' is a name of an available resource.
%
-% 2. A substutution of a CIF font with a True Type font :
+% 2. A substutution of a CIDFont font with a True Type font :
%
-% /substituted << /FileType /TrueType /Path (path) /SunfontID 1 /CSI [(ordering) supplement] >> ;
+% /substituted << /FileType /TrueType /Path (path) /SubfontID 1 /CSI [(ordering) supplement] >> ;
%
% Where 'substituted' is a name being used in a document,
% 'path' is a path to a True Type font file,
% 'ordering' is a value of Ordering required for CIDSystemInfo dictionary,
% 'supplement' is a value of Supplement required for CIDSystemInfo dictionary.
+% 'SubfontID' is the index of the desired font in a TTC - ignored if the target is not a TTC.
+%
+% The Ordering, and Registry (if present) entries should be PostScript string types
+% ie enclosed in parentheses, not PostScript name type (initial character '/'). See
+% gs/doc/Use.htm#CIDFontSubstitution
+%
+% Alternatively:
+% (substituted name) << /FileType /TrueType /Path (path) /SubfontID 1 /CSI [(ordering) supplement] >> ;
+%
+% This is where the CIDFont name in the document contains a space character. Using a string instead of a name
+% allows this work - Ghostscript will internally convert the key string with a space to a name.
%
-% Examples :
%
+% Examples :
+%
% /ShinGo-Bold /HeiseiKakuGo-W5 ;
% /Ryumin-Medium << /FileType /TrueType /Path (H:/AuxFiles/Fonts/BATANG.TTC) /SubfontID 3 /CSI [(Japan1) 2] >> ;
+% /Ryumin-Medium << /FileType /TrueType /Path (windir) getenv not {(c:/windows)}if (/Fonts/BATANG.TTC)concatstrings /SubfontID 3 /CSI [(Japan1) 2] >> ;
+%
+% NOTE: getenv returns a boolean to indicate success of or failure, as well as the value on success. In the example, it uses this
+% to include a default value should getenv fail.
+%
+% (Century Gothic) << /FileType /TrueType /Path (/usr/share/fonts/truetype/fonts-japanese-gothic.ttf) /CSI [(Identity) 1] >> ;
+%
+% Note the use of a string to cope with the name containing a space.
%
diff --git a/source/ap/ghostscript/dump.unused.internal.libraries.from.sources.sh b/source/ap/ghostscript/dump.unused.internal.libraries.from.sources.sh
index d952ac07f..0f28fe3fb 100755
--- a/source/ap/ghostscript/dump.unused.internal.libraries.from.sources.sh
+++ b/source/ap/ghostscript/dump.unused.internal.libraries.from.sources.sh
@@ -7,9 +7,9 @@ VERSION=${VERSION:-$(echo ghostscript-*.tar.?z* | rev | cut -f 3- -d . | cut -f
tar xf ghostscript-${VERSION}.tar.xz || exit 1
mv ghostscript-${VERSION}.tar.xz ghostscript-${VERSION}.tar.xz.orig
-( cd ghostscript-${VERSION} && rm -rf freetype jpeg lcms2 libpng libtiff png tiff zlib )
+( cd ghostscript-${VERSION} && rm -rf freetype jpeg lcms2 lcms2art/doc/* libpng libtiff png tiff zlib )
tar cf ghostscript-${VERSION}.tar ghostscript-${VERSION}
rm -r ghostscript-${VERSION}
-xz -9 ghostscript-${VERSION}.tar
-touch -r ghostscript-${VERSION}.tar.xz.orig ghostscript-${VERSION}.tar.xz
+plzip -9 -n 6 ghostscript-${VERSION}.tar
+touch -r ghostscript-${VERSION}.tar.xz.orig ghostscript-${VERSION}.tar.lz
rm ghostscript-${VERSION}.tar.xz.orig
diff --git a/source/ap/ghostscript/ghostscript.SlackBuild b/source/ap/ghostscript/ghostscript.SlackBuild
index 7007cc21c..947524911 100755
--- a/source/ap/ghostscript/ghostscript.SlackBuild
+++ b/source/ap/ghostscript/ghostscript.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,13 +20,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=ghostscript
-if [ -r gnu-ghostscript-*.tar.xz ]; then
+if [ -r gnu-ghostscript-*.tar.?z ]; then
SRCPREFIX="gnu-"
fi
-VERSION=${VERSION:-$(echo $SRCPREFIX$PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-$(echo $SRCPREFIX$PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -38,9 +39,16 @@ if [ -z "$ARCH" ]; then
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
rm -rf $PKG
@@ -62,8 +70,8 @@ fi
cd $TMP
rm -rf ${SRCPREFIX}${PKGNAM}-${VERSION}
-tar xvf $CWD/${SRCPREFIX}${PKGNAM}-$VERSION.tar.xz || exit 1
-cd ${SRCPREFIX}${PKGNAM}-$VERSION
+tar xvf $CWD/${SRCPREFIX}${PKGNAM}-$VERSION.tar.?z || exit 1
+cd ${SRCPREFIX}${PKGNAM}-$VERSION || exit 1
# Remove unmaintained garbage:
rm -rf freetype jpeg lcms2 libpng libtiff png tiff zlib
@@ -93,7 +101,7 @@ find . \
--enable-static=no \
--program-prefix= \
--program-suffix= \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install || exit 1
make install DESTDIR=$PKG || exit 1
@@ -106,6 +114,7 @@ CFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--mandir=/usr/man \
+ --docdir=/usr/share/ghostscript/$VERSION/tmpdoc \
--with-fontpath=/usr/share/fonts/TTF \
--with-ijs \
--disable-compile-inits \
@@ -114,7 +123,7 @@ CFLAGS="$SLKCFLAGS" \
--enable-cups \
--program-prefix= \
--program-suffix= \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
# Build and install:
make $NUMJOBS || make || exit 1
@@ -123,6 +132,11 @@ make clean || exit 1
make $NUMJOBS so || make so || exit 1
make soinstall DESTDIR=$PKG || exit 1
+# Add back ijs-config, which is needed by at least gutenprint to find IJS
+# and produce a ghostscript driver:
+cat $CWD/ijs-config | sed -e "s/lib64/lib${LIBDIRSUFFIX}/g" > $PKG/usr/bin/ijs-config
+chmod 755 $PKG/usr/bin/ijs-config
+
# Replace the default cidfmap with one containing additional
# support for CJK printing:
@@ -132,34 +146,25 @@ if [ -r $PKG/usr/share/ghostscript/*.*/Resource/Init/cidfmap ]; then
zcat $CWD/cidfmap.gz > $PKG/usr/share/ghostscript/${SHARE_VERSION}/Resource/Init/cidfmap.new
fi
-### Moved to cups-filters...
-## Many programs expect to find this filter with the old name:
-#( cd $PKG/usr/lib${LIBDIRSUFFIX}/cups/filter
-# if [ ! -e pstoraster ]; then
-# ln -sf gstoraster pstoraster
-# fi
-#)
-
# Strip binaries:
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
-# Compress and link manpages, if any:
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
- for manpagedir in $(find . -type d -name "man*") ; do
- ( cd $manpagedir
- for eachpage in $( find . -type l -maxdepth 1) ; do
- ln -s $( readlink $eachpage ).gz $eachpage.gz
- rm $eachpage
- done
- gzip -9 *.*
- )
- done
- )
-fi
+# Don't ship .la files:
+pushd $PKG
+ for lafile in usr/lib${LIBDIRSUFFIX}/*.la ; do
+ rm -f ${lafile} /${lafile}
+ done
+popd
+
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
# Compress info files, if any:
if [ -d $PKG/usr/info ]; then
@@ -169,6 +174,16 @@ if [ -d $PKG/usr/info ]; then
)
fi
+# gs9.23 fails if you try to have --docdir put things in the proper place.
+# Not much choice but to have things put in the wrong place and then move them.
+# First, remove broken symlinks:
+rm -f $PKG/usr/share/ghostscript/$VERSION/doc $PKG/usr/share/ghostscript/$VERSION/tmpdoc/$VERSION/$VERSION
+# Then, move the docs to the proper location:
+mv $PKG/usr/share/ghostscript/$VERSION/tmpdoc/$VERSION $PKG/usr/share/ghostscript/$VERSION/doc
+# Remove this (probably empty) directory:
+rm -rf $PKG/usr/share/ghostscript/$VERSION/tmpdoc
+# And finally, pray for upstream to quit drinking while coding. ;-)
+
# Add a documentation directory:
mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
( cd doc
@@ -187,17 +202,22 @@ mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
History*.htm \
$PKG/usr/share/ghostscript/$VERSION/doc
rm -f $PKG/usr/share/ghostscript/$VERSION/doc/History{1,2,3,4,5,6,7,8}.htm
+ # More cruft:
+ rm -f $PKG/usr/share/ghostscript/$VERSION/doc/Details{1,2,3,4,5,6,7,8}.htm
+ # This is also bloat:
+ rm -f $PKG/usr/share/ghostscript/$VERSION/doc/*.pdf
chown root:root $PKG/usr/share/ghostscript/$VERSION/doc/History*htm
chmod 644 $PKG/usr/share/ghostscript/$VERSION/doc/History*htm
)
-cd $TMP
-cp -a ${PKGNAM}-${VERSION}/examples/cjk $PKG/usr/share/ghostscript/${VERSION}/examples/
+# Install example files:
+rm -rf $PKG/usr/share/ghostscript/${VERSION}/examples
+cp -a $TMP/${PKGNAM}-${VERSION}/examples $PKG/usr/share/ghostscript/${VERSION}
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat << EOF > $PKG/install/doinst.sh
-#!/bin/sh
+#!/bin/bash
config() {
NEW="\$1"
OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
diff --git a/source/ap/ghostscript/ghostscript.url b/source/ap/ghostscript/ghostscript.url
new file mode 100644
index 000000000..de0a950b6
--- /dev/null
+++ b/source/ap/ghostscript/ghostscript.url
@@ -0,0 +1 @@
+https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs923/ghostscript-9.23.tar.xz
diff --git a/source/ap/ghostscript/ijs-config b/source/ap/ghostscript/ijs-config
new file mode 100644
index 000000000..4c3a0043c
--- /dev/null
+++ b/source/ap/ghostscript/ijs-config
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+prefix=/usr
+exec_prefix=${prefix}
+exec_prefix_set=no
+
+usage="\
+Usage: ijs-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
+
+if test $# -eq 0; then
+ echo "${usage}" 1>&2
+ exit 1
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ if test $exec_prefix_set = no ; then
+ exec_prefix=$optarg
+ fi
+ ;;
+ --prefix)
+ echo $prefix
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ exec_prefix_set=yes
+ ;;
+ --exec-prefix)
+ echo $exec_prefix
+ ;;
+ --version)
+ echo 0.35
+ ;;
+ --cflags)
+ includes=-I${prefix}/include/ijs
+ echo $includes
+ ;;
+ --libs)
+ libdirs=-L/usr/lib64
+ echo $libdirs -lijs
+ ;;
+ *)
+ echo "${usage}" 1>&2
+ exit 1
+ ;;
+ esac
+ shift
+done
+
diff --git a/source/ap/ghostscript/slack-desc b/source/ap/ghostscript/slack-desc
index 41ffbcbe4..06d1a4a88 100644
--- a/source/ap/ghostscript/slack-desc
+++ b/source/ap/ghostscript/slack-desc
@@ -1,18 +1,18 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
ghostscript: ghostscript (Postscript and PDF interpreter)
ghostscript:
ghostscript: Ghostscript is an interpreter of Adobe Systems' PostScript(tm)
-ghostscript: and Portable Document Format (PDF) languages. Ghostscript is an
+ghostscript: and Portable Document Format (PDF) languages. Ghostscript is an
ghostscript: essential part of the printing subsystem, taking PostScript output
ghostscript: from applications and converting it into an appropriate printer or
-ghostscript: display format. Ghostscript supports many printers directly, and
+ghostscript: display format. Ghostscript supports many printers directly, and
ghostscript: more are supported through add-on packages.
ghostscript:
ghostscript: