summaryrefslogtreecommitdiff
path: root/source/ap/ghostscript
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/ghostscript')
-rw-r--r--source/ap/ghostscript/cidfmap118
-rwxr-xr-xsource/ap/ghostscript/ghostscript.SlackBuild176
-rw-r--r--source/ap/ghostscript/slack-desc19
3 files changed, 313 insertions, 0 deletions
diff --git a/source/ap/ghostscript/cidfmap b/source/ap/ghostscript/cidfmap
new file mode 100644
index 00000000..0303f66f
--- /dev/null
+++ b/source/ap/ghostscript/cidfmap
@@ -0,0 +1,118 @@
+%!
+% $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 :
+%
+% /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 :
+%
+% /substituted << /FileType /TrueType /Path (path) /SunfontID 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.
+%
+% Examples :
+%
+% /ShinGo-Bold /HeiseiKakuGo-W5 ;
+% /Ryumin-Medium << /FileType /TrueType /Path (H:/AuxFiles/Fonts/BATANG.TTC) /SubfontID 3 /CSI [(Japan1) 2] >> ;
+%
+
+
+%% cidfmap.zh_CN (simplified Chinese ; zh_CN)
+%% This font will produce better results than the wqy-zenhei.ttf that we use
+%% to get out-of-the-box output.
+%% If you install it, uncomment the line below and comment the one below that.
+%/BousungEG-Light-GB << /FileType /TrueType /Path (uming.ttf) /CSI [(GB1) 4] >> ;
+/BousungEG-Light-GB << /FileType /TrueType /Path (wqy-zenhei.ttf) /CSI [(GB1) 4] >> ;
+%% This font will produce better results than the wqy-zenhei.ttf that we use
+%% to get out-of-the-box output.
+%% If you install it, uncomment the line below and comment the one below that.
+%/GBZenKai-Medium << /FileType /TrueType /Path (ukai.ttf) /CSI [(GB1) 4] >> ;
+/GBZenKai-Medium << /FileType /TrueType /Path (wqy-zenhei.ttf) /CSI [(GB1) 4] >> ;
+/MSungGBK-Light << /FileType /TrueType /Path (wqy-zenhei.ttf) /CSI [(GB1) 4] >> ;
+/MSung-Light /MSungGBK-Light ;
+/MSung-Medium /GBZenKai-Medium ;
+/MHei-Medium /BousungEG-Light-GB ;
+/MKai-Medium /GBZenKai-Medium ;
+/STSong-Light /BousungEG-Light-GB ;
+/STFangsong-Light /BousungEG-Light-GB ;
+/STHeiti-Regular /MSungGBK-Light ;
+/STKaiti-Regular /GBZenKai-Medium ;
+/Adobe-GB1 /BousungEG-Light-GB ;
+
+%% cidfmap.zh_TW (traditional Chinese ; zh_TW)
+%% To use this example, install the missing uming.ttf and ukai.ttf fonts, and
+%% uncomment everything in the block below. Also, fix the simplified Chinese
+%% block as described above for "better output" so that there is no
+%% interference (or comment the whole block out).
+%/BousungEG-Light-GB << /FileType /TrueType /Path (uming.ttf) /CSI [(CNS1) 4] >> ;
+%/ZenKai-Medium << /FileType /TrueType /Path (ukai.ttf) /CSI [(CNS1) 4] >> ;
+%/ShanHeiSun-Light << /FileType /TrueType /Path (wqy-zenhei.ttf) /CSI [(CNS1) 4] >> ;
+%/STSong-Light /BousungEG-Light-GB ;
+%/STKaiti-Regular /ZenKai-Medium-GB ;
+%/STFangsong-Light /BousungEG-Light ;
+%/STHeiti-Regular /MHei-Medium ;
+%/MSung-Light /BousungEG-Light-GB ;
+%/MSung-Medium /ZenKai-Medium ;
+%/MHei-Medium /ShanHeiSun-Light ;
+%/MKai-Medium /ZenKai-Medium ;
+%/Adobe-CNS1 /BousungEG-Light-GB ;
+
+%% cidfmap.ja
+/Sazanami-Gothic << /FileType /TrueType /Path (sazanami-gothic.ttf) /CSI [(Japan1) 6] >> ;
+/Sazanami-Gothic-Regular /Sazanami-Gothic ;
+/Sazanami-Gothic-JaH << /FileType /TrueType /Path (sazanami-gothic.ttf) /CSI [(Japan2) 0] >> ;
+/Sazanami-Gothic-Regular-JaH /Sazanami-Gothic-JaH ;
+/Sazanami-Mincho << /FileType /TrueType /Path (sazanami-mincho.ttf) /CSI [(Japan1) 6] >> ;
+/Sazanami-Mincho-Regular /Sazanami-Mincho ;
+/Sazanami-Mincho-JaH << /FileType /TrueType /Path (sazanami-mincho.ttf) /CSI [(Japan2) 0] >> ;
+/Sazanami-Mincho-Regular-JaH /Sazanami-Mincho-JaH ;
+/Ryumin-Light /Sazanami-Mincho ;
+/Ryumin-Light-H /Sazanami-Mincho ;
+/GothicBBB-Medium /Sazanami-Gothic ;
+/GothicBBB-Medium-V /Sazanami-Gothic ;
+/HeiseiMin-W3 /Ryumin-Light ;
+/HeiseiKakuGo-W5 /GothicBBB-Medium ;
+/HeiseiMin-W3-Acro /Ryumin-Light ;
+/HeiseiKaKuGo-W5-Acro /GothicBBB-Medium ;
+/Kochi-Gothic /Sazanami-Gothic ;
+/Kochi-Mincho /Sazanami-Mincho ;
+/WadaMin-Regular /Sazanami-Mincho ;
+/WadaMin-Bold /Sazanami-Mincho ;
+/WadaGo-Regular /Sazanami-Gothic ;
+/WadaGo-Bold /Sazanami-Gothic ;
+/Adobe-Japan1 /Sazanami-Gothic ;
+/Adobe-Japan2 /Sazanami-Gothic-JaH ;
+
+%% cidfmap.ko
+%% To enable Korean printing support, install the fonts shown in the example
+%% here and uncomment the block below:
+%/Baekmuk-Batang << /FileType /TrueType /Path (batang.ttf) /CSI [(Korea1) 2] >> ;
+%/Baekmuk-Batang-Regular /Baekmuk-Batang ;
+%/Baekmuk-Dotum << /FileType /TrueType /Path (dotum.ttf) /CSI [(Korea1) 2] >> ;
+%/Baekmuk-Dotum-Regular /Baekmuk-Dotum ;
+%/Baekmuk-Gulim << /FileType /TrueType /Path (gulim.ttf) /CSI [(Korea1) 2] >> ;
+%/Baekmuk-Gulim-Regular /Baekmuk-Gulim ;
+%/Baekmuk-Headline << /FileType /TrueType /Path (hline.ttf) /CSI [(Korea1) 2] >> ;
+%/Baekmuk-Headline-Regular /Baekmuk-Headline ;
+%/Adobe-Korea1 /Baekmuk-Batang ;
+
+%/BousungEG-Light-GB << /FileType /TrueType /Path (uming.ttf) /CSI [(GB1) 4] >> ;
+%/GBZenKai-Medium << /FileType /TrueType /Path (ukai.ttf) /CSI [(GB1) 4] >> ;
+%/MSungGBK-Light /BousungEG-Light-GB ;
+%/Adobe-GB1 /BousungEG-Light-GB ;
+
+%/ZenKai-Medium << /FileType /TrueType /Path (ukai.ttf) /CSI [(CNS1) 4] >> ;
+%/ShanHeiSun-Light << /FileType /TrueType /Path (uming.ttf) /CSI [(CNS1) 4] >> ;
+%/Adobe-CNS1 /ShanHeiSun-Light ;
+
diff --git a/source/ap/ghostscript/ghostscript.SlackBuild b/source/ap/ghostscript/ghostscript.SlackBuild
new file mode 100755
index 00000000..b0bb34ba
--- /dev/null
+++ b/source/ap/ghostscript/ghostscript.SlackBuild
@@ -0,0 +1,176 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=ghostscript
+VERSION=${VERSION:-8.70}
+ARCH=${ARCH:-x86_64}
+BUILD=${BUILD:-1}
+
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
+cd ${PKGNAM}-$VERSION
+
+## Regenerate ./configure:
+#sh autogen.sh
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Build/install IJS:
+( cd ijs
+ if [ ! -r configure ]; then
+ sh autogen.sh
+ fi
+ CFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux
+ make
+ make install
+ make install DESTDIR=$PKG
+) || exit 1
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --with-fontpath=/usr/share/fonts/TTF \
+ --with-ijs \
+ --disable-compile-inits \
+ --enable-dynamic \
+ --enable-cairo=no \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux
+
+# Build and install:
+make || exit 1
+make install DESTDIR=$PKG || exit 1
+make clean || exit 1
+make so || exit 1
+make soinstall DESTDIR=$PKG || exit 1
+
+# Replace the default cidfmap with one containing additional
+# support for CJK printing:
+
+if [ -r $PKG/usr/share/ghostscript/${VERSION}/Resource/Init/cidfmap ]; then
+ mv $PKG/usr/share/ghostscript/${VERSION}/Resource/Init/cidfmap $PKG/usr/share/ghostscript/${VERSION}/Resource/Init/cidfmap.default.ghostscript-${VERSION}
+ zcat $CWD/cidfmap.gz > $PKG/usr/share/ghostscript/${VERSION}/Resource/Init/cidfmap.new
+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
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+( cd doc
+ cp -a \
+ COPYING ../LICENSE README \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+)
+( cd $PKG/usr/doc/${PKGNAM}-$VERSION
+ ln -sf /usr/share/ghostscript/$VERSION/doc doc
+)
+
+cd $TMP
+cp -a ${PKGNAM}-${VERSION}/examples/cjk $PKG/usr/share/ghostscript/${VERSION}/examples/
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat << EOF > $PKG/install/doinst.sh
+#!/bin/sh
+config() {
+ NEW="\$1"
+ OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r \$OLD ]; then
+ mv \$NEW \$OLD
+ elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then # toss the redundant copy
+ rm \$NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config usr/share/ghostscript/${VERSION}/Resource/Init/cidfmap.new
+EOF
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/source/ap/ghostscript/slack-desc b/source/ap/ghostscript/slack-desc
new file mode 100644
index 00000000..1ac40827
--- /dev/null
+++ b/source/ap/ghostscript/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# 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
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+ghostscript: ghostscript (GPL Ghostscript)
+ghostscript:
+ghostscript: GPL Ghostscript is an interpreter of Adobe Systems' PostScript(tm)
+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: more are supported through add-on packages.
+ghostscript:
+ghostscript:
+ghostscript: