GPL Ghostscript-9.04

Introduction to Ghostscript

Ghostscript is a versatile processor for PostScript data with the ability to render PostScript to different targets.

This package is known to build and work properly using an LFS-7.0 platform.

Package Information

Additional Downloads

Standard Fonts

Other Fonts

Ghostscript Dependencies

Recommended

expat-2.0.1, FreeType-2.4.8, JasPer-1.900.1 libjpeg-8c, libpng-1.5.7, LibTIFF-4.0.0, and little cms-1.19

Optional

cairo-1.10.2, Fontconfig-2.8.0, gtk+-2.24.8, Cups-1.5.0, libidn-1.22, X Window System, and libpaper.

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/gs

Installation of Ghostscript

Install GPL Ghostscript by running the following commands:

[Note]

Note

The Ghostscript build system is not user-friendly. In order to use system copies of various graphics libraries, you must do it using unconventional methods.

GPL Ghostscript includes (old) copies of several libraries. Some of these seem to have been patched to fix known vulnerabilities, but others of these copies are less-well maintained. To ensure that any future fixes are applied throughout the whole system, it is recommended that you install the released versions of these libraries and then configure GPL Ghostscript to link to them.

If you have installed these dependencies on your system, remove the copies of expat, freetype, JasPer, lcms, libjpeg, libpng, libtiff and zlib:

rm -rf expat freetype jasper lcms jpeg libpng tiff zlib

Run the configure command:

./configure --prefix=/usr --enable-dynamic --with-system-libtiff

To ensure the build is able to use the system versions of expat, freetype, and zlib it is necessary to make some changes and an addition to the Makefile before building the package:

sed -i '/^EXTRALIBS/s# -ldl# -lfreetype -lz#;/=imdi/aSHARE_EXPAT=1' Makefile &&
make
[Warning]

Warning

If you have a multiprocessor computer and try to run make with multiple jobs (eg, -j4) then the build may fail due to race conditions in the Ghostscript build system.

[Note]

Note

The shared library depends on gtk+-2.24.8. It is only used in external programs like ImageMagick-6.7.3-10.

To compile the shared library libgs.so, run the following additional command as an unprivileged user:

make so

This package does not come with a test suite. However, you may test the operation of the newly built gs program by issuing the following command (issue from an X Windows terminal):

bin/gs -Ilib -dBATCH examples/tiger.eps

Now, as the root user:

make install

If you want the shared library too:

make soinstall &&
install -v -m644 base/*.h /usr/include/ghostscript &&
ln -v -s ghostscript /usr/include/ps

Now install the documentation:

cp -rf doc /usr/share/ghostscript/9.04 &&
ln -sv ../ghostscript/9.04/doc /usr/share/doc/ghostscript-9.04

To finish the installation, unpack all fonts you've downloaded to /usr/share/ghostscript and ensure the ownerships of the files are root: root. Substitute <font-tarball> appropriately in the command below for the fonts you wish to install:

tar -xvf ../<font-tarball> -C /usr/share/ghostscript --no-same-owner

Command Explanations

--without-jasper: If you know you do not wish to print any JPEG2000 files, this switch (and removing the jasper folder in the source) will disable JPEG2000 support in Ghostscript.

--without-jbig2dec: The JBIG2 decompression code (used for some faxes) can be disabled by using this switch and removing the jbig2dec/ source.

install -v -m644 base/*.h...: Some packages (ImageMagick is one) need the Ghostscript interface headers in place to link to the shared library. These commands install the headers.

ln -sv ../ghostscript-9.04/doc ...: This puts a symbolic link to the documentation where it is expected to be found.

ln -v -s ghostscript /usr/include/ps: Some packages expect to find the interface headers in an alternate location.

Contents

Installed Programs: bdftops, dumphint, dvipdf, eps2eps, fixmswrd.pl, font2c, gs, gsbj, gsc (from soinstall), gsdj, gsdj500, gslj, gslp, gsnd, gsx (from soinstall), lprsetup.sh, pdf2dsc, pdf2ps, pdfopt, pf2afm, pfbtopfa, printafm, ps2ascii, ps2epsi, ps2pdf, ps2pdf12, ps2pdf13, ps2pdf14, ps2pdfwr, ps2ps, ps2ps2, pv.sh, unix-lpr.sh, and wftopfa
Installed Library: libgs.so
Installed Directories: /usr/include/ghostscript, /usr/lib/ghostscript, /usr/share/ghostscript, and /usr/share/doc/ghostscript-9.04

Short Descriptions

gs

is an interpreter for Adobe Systems' PostScript(tm) and Portable Document Format (PDF).

libgs.so

provides Ghostscript functionality to other programs, such as GSView, ImageMagick, and libspectre.

GPL Ghostscript provides many different scripts used to convert PostScript, PDF, and other formats. Please refer to the HTML documentation or the man pages for information about the capabilities provided.

Last updated on 2011-12-03 21:09:26 +0000