January 1993 Howdy! Here is GNU ghostscript version 2.5.2 for the Amiga. I built it with gcc 2.2.2 and many support programs from folks all over the internet. I have built this version of gs to support as many devices as I thought were relevant to the land of Amiga. Some I was not sure about but threw them in anyway. Typing gs -? will give you a list of supported devices. Please see the files (*.doc) in the gs252 subdirectory for information on invoking and using gs. You might look at use.doc first. You will most certainly want to get the ghostscript fonts to install along with this package. I excluded them in the name of archive size sanity. This package is already huge! You can get the fonts from ftp.uu.net (packages/gnu) or dec.gatekeeper.com (pub/GNU). All fonts install in usr/lib/fonts. Just drop them there, ghostscript is already configured to use them. Please also read README.AMIGA.FIX1, some of the info in that file supercedes information in this file. ------------------------------------------------------------------------ Installation: 1. Assign usr: to some directory (if not already assigned) 2. Assign tmp: to some directory (if not already assigned). The code in ixemul.library will convert pathnames of the sort /tmp/foo to tmp:foo. So, tmp: should be a scratch directory. If you have lots of RAM, you can try assigning tmp: to RAM: 3. Put all the files/directories in usr/lib/ghostcript in usr:lib/ghostscript 4. Copy the files usr/bin to some bin directory on your system. I use the usr:bin directory where the gcc executables live. 5. Put libs/ixemul.library in your sys:libs directory. ------------------------------------------------------------------------ Usage: I have no recommendation for stack setting to use gs. I have done a little observation of gs using Steve Koren's JM package. JM reports that stack usage is in the range of 3000 to 4000. I think this sounds low. I use 200000 as a default for my CLI's, and have had no trouble. Setting it high would not hurt. I would like to hear from anyone who discovers a tolerance level... There is no Amiga display (i.e. Intuition) support in this version. I simply built gs with as many of the output devices as I felt might be relavant to Amiga users. As it stands now, you can use gs to print directly to an output device by using syntax like: gs -q -dNOPAUSE -sOutputFile=par: -sDEVICE= Alternatively, you can tell gs to write to a file and then use some other program to display it: gs -q -dNOPAUSE -sOutputFile=foo.out -sDEVICE=gif8 GIF_view foo.out If you specify no -sOutputFile argument, gs leaves the output in a file in /tmp/gs_ (tmp:gs_ in amigaDOS terms). You can edit the file gslp to act as a generic line printing program for your printer. It is a one line pdksh script. Edit at least the -sDEVICE=epson argument. Using gslp is as simple as: sh gslp Beware of shells that convert pathnames (sksh 2.1 does). You can run these command lines safely from the CLI and from inside a pdksh shell. ------------------------------------------------------------------------ Debugging: Try running gs interactively, to debug output for a deskjet device: gs GS> (deskjet) selectdevice GS> (/usr/lib/ghostscript/examples/golfer.ps) run Hit return at the <> prompts. Any failures should be apparent. If the interpreter fails, you will get a stack trace with the failing command. If there some other problem, you might get an error message from gs or you might get a requester from ixemul.library. Error messages from gs are things like 'no such file' or 'cannot open scratch file'. Errors from ixemul.library are (as far as I know) requesters (see problem 2 in known problems below). The -A switch gives a useful trace of memory allocations made by gs. If you see that an allocation fails, you might need to change the assignment of tmp: or you might not have enough RAM to process the file. Gs makes some pretty big allocations (I saw one for 3MB!), but it will try and use scratch files if it can't get the memory it needs. ------------------------------------------------------------------------ Problems: NOTE: There are now work-arounds for these problems! See the file README.AMIGA.FIX1 for more information!! In the first release of 2.5.2 there were a few problems. Hopefully, this patched release fixes a few of them: 1. Printing to certain output devices (e.g. djet500C) would generate an error message about not being able to open scratch file. This is a bug in ixemul.library (v39.45). I have built this version of gs with a new mktemp() function that works correctly. 2. With at least the epsonc output device, ixemul.library displays a requester: free: end of block corrupt! I am still investigating this one: ------------------------------------------------------------------------ Building: Surprisingly, ghostscript 2.5.2 compiled with relatively little headache on my A500. I have provided the patches to ghostscript in the directory gs252. A quick tour: 1. Unpack the original ghostscript-2.5.2.tar file to some directory. 2. Copy the files from the gs252 directory in this archive to the gs252 directory created in the previous step. 3. Make a link from amiga-gcc.make to Makefile 4. 'dmake all' will build everything and 'dmake install' will install the files in usr:bin and usr:lib/ghostscript. Ignore the numerous warning messages dmake outputs. Worry about the errors you get though. You need the dmake program to compile with the supplied makefile. If you do not have dmake, you will need to edit the makefile. Also, there are a number of commands like mv, cp, and sed that get called during the course of building. You also need pdksh. I suggest you get this and apply the patch which allows pdksh to source etc:profile automatically every time it is run. This is *very* useful feature. I have provided a couple of files you may find useful in building this package: uniq.rexx -- A kludge version of uniq command. I used arexx to do this so I could learn how to read/write stdin/stdout with AREXX. You could easily make this a shell script. I also don't think it is quite the same as Unix uniq, but it serves the role its needed for in this build (deleting duplicate entries from sorted input). etc:profile -- A profile file used by pdksh. This file provides all the support need to talk to programs that do not understand Unix pathnames. There are numerous functions and aliases in here. You most certainly will need to customize this file to your environment. You are well advised to recompile your pdksh program to automatically source etc:profile on startup. pdksh/main.c.patch -- a patch to accomplish auto-sourcing of etc:profile. It's a no-brainer! Change etc:profile to whatever you like (you might like s:profile instead, I don't know). ------------------------------------------------------------------------ Miscellaneous: OK, here is a list of stuff I used to build gs. gcc - version 2.2.2 ixemul.library - version 39.45 touch - amiga-fileutils-3.3 mv - amiga-fileutils-3.3 rm - amiga-fileutils-3.3 rmdir - amiga-fileutils-3.3 ar - in gcc 2.2.2 package dmake - in gcc 2.2.2 package pdksh - pdksh package sed - GNU sed compiled by me with gcc awk - GNU awk compiled by me with gcc grep - GNU grep-1.6 package for the Amiga (sksh grep failed me here) sksh - sksh v. 2.1 (cp, tee, grep, et al) arexx - comes with AmigaDOS 2.04! elvis - (vi clone) version 1.5 and 1.6 compiled by me with gcc grep - gnu grep v1.6. It looks like grep broke in sksh 2.1 so I used this one. tr - BSD tr (not the net2 one! it's busted!!) Not all of these programs are used explicitly in building gs, but all played some part. I am sure this list is incomplete. Please e-mail me with any questions or problems you are having with ghostscript. I'll try and fix what I can. Rob Tulloh INTERACTIVE / SHL Tel: (512) 343 0376 Ext. 116 9442 Capital of Texas Hwy. North Fax: (512) 343 1414 Arboretum Plaza One, Suite 700 Net: robtu@itx.isc.com Austin, Texas 78759