#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi GS_VERSION=7.05 echo "+=========================+" echo "| ghostscript-$GS_VERSION |" echo "+=========================+" # OK, first we need the IJS library and include files. # Since it doesn't use an soname, and is very small (about 20K) # there's no good reason to compile it shared, and it would be # likely to be a bad idea anyway as the author says the protocol # is still very much in flux. cd $TMP tar xjvf $CWD/ghostscript-$GS_VERSION.tar.bz2 cd ghostscript-$GS_VERSION/ijs ./configure --prefix=/usr make CFLAGS="-ansi -pedantic -Wmissing-prototypes" cat libijs.a > /usr/lib/libijs.a #strip --strip-unneeded libijs.so #cat libijs.so > /usr/lib/libijs.so #chmod 755 /usr/lib/libijs.so cat ijs-config > /usr/bin/ijs-config chown root.bin /usr/bin/ijs-config chmod 755 /usr/bin/ijs-config mkdir -p /usr/include/ijs cp -a ijs.h ijs_client.h ijs_server.h /usr/include/ijs ( cd /usr/include/ijs chmod 644 ijs.h ijs_client.h ijs_server.h chown root.root ijs.h ijs_client.h ijs_server.h ) # Now the main source is compiled: cd $TMP # This should have been untarred when we compiled libijs. #tar xjvf $CWD/ghostscript-$GS_VERSION.tar.bz2 cd ghostscript-$GS_VERSION # Never use the system JPEG library, as Ghostscript compiles it differently # (#define D_MAX_BLOCKS_IN_MCU 64) to be compatible with Adobe's interpreters. tar xzvf $CWD/jpegsrc.v6b.tar.gz ln -sf jpeg-6b jpeg # Use system's shared libpng and zlib: zcat $CWD/ghostscript.libpng.zlib.so.diff.gz | patch -p1 --verbose --backup --suffix=.orig # Add a googol (well, not quite ;-) of additional drivers. # We're no longer supporting libvga, BTW. zcat $CWD/ghostscript.device.devs.diff.gz | patch -p1 --verbose --backup --suffix=.orig # These drivers are obsolete and are no longer shipped with Ghostscript. # We aren't hanging on to them very long either, as I think all these printers are # supported through IJS servers. IJS is rapidly taking over, so try to use an IJS # driver for your printer instead of one of these. You're only getting a one-release # warning. ;-) ( cd src tar xzf $CWD/obsolete.tar.gz ) # Build no-X11 version: ./configure --prefix=/usr \ --with-ijs \ --without-x \ i386-slackware-linux make clean make make install # This is now obsolete!: # # --with-gimp-print # # Gimp-print is phasing out this interface (stp) soon, and we're not hanging it even that long. # Ghostscript now uses the IJS interface with gimp-print. This is a Good Thing(TM), # because ghostscript no longer requires libgimpprint.so in order to run, and # gimp-print can be unbundled into it's own package. ( cd /usr/bin ; rm -f gs-no-x11 ; mv gs gs-no-x11 ) # Build the version with X11 support: ./configure --prefix=/usr \ --with-ijs \ --with-x \ i386-slackware-linux make clean make make install mkdir -p /usr/doc/ghostscript-$GS_VERSION ( cd /usr/doc/ghostscript-$GS_VERSION ; rm -rf doc ) ( cd /usr/doc/ghostscript-$GS_VERSION ; ln -sf /usr/share/ghostscript/${GS_VERSION}/doc doc ) ( cd /usr/doc/ghostscript-$GS_VERSION ; rm -rf examples ) ( cd /usr/doc/ghostscript-$GS_VERSION ; ln -sf /usr/share/ghostscript/${GS_VERSION}/examples examples ) mkdir -p /install cat $CWD/slack-desc > /install/slack-desc