%general-entities; ]> $LastChangedBy$ $Date$ GPL Ghostscript-&gs-version; GPL Ghostscript Introduction to Ghostscript Ghostscript is a versatile processor for PostScript data with the ability to render PostScript to different targets. &lfs67_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &gs-md5sum; Download size: &gs-size; Estimated disk space required: &gs-buildsize; Estimated build time: &gs-time; Additional Downloads Standard Fonts Download (FTP): Download MD5 sum: &gs-standard-fonts-md5sum; Download size: &gs-standard-fonts-size; Other Fonts Download (HTTP): Download MD5 sum: &gs-other-fonts-md5sum; Download size: &gs-other-fonts-size; Patches Required patch: Recommended patch (unless you build without JPEG2000 support) : Ghostscript Dependencies Recommended , , , , , and Optional , , , , , , and libpaper User Notes: Installation of Ghostscript Install GPL Ghostscript by running the following commands: 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. Begin by patching some vulnerabilities: patch -Np1 -i ../ghostscript-&gs-version;-security_fixes-1.patch 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 build the released versions of these libraries and then configure GPL Ghostscript to link to them. This configuration has several steps. Unless you intend to build GPL Ghostscript without support for JPEG2000 files, apply a patch to allow it to build against a current system-installed version of JasPer: patch -Np1 -i ../ghostscript-&gs-version;-system_jasper-1.patch Remove the local copies of expat, JasPer, lcms, libjpeg, libpng, libtiff, and zlib: rm -rf expat jasper lcms jpeg libpng tiff zlib Run the configure command: ./configure --prefix=/usr --enable-dynamic --with-drivers=ALL,x11 --with-system-libtiff --disable-compile-inits To ensure the build is able to use the system versions of expat, freetype, and lcms it is necessary to make some changes and an addition to the Makefile before building the package: sed -i -e 's|SHARE_LCMS=0|SHARE_LCMS=1|' \ -e 's|LCMSSRCDIR=lcms|LCMSSRCDIR=/usr|' \ -e 's|=imdi|&\n\n# Use system expat library\n\nSHARE_EXPAT=1|' \ -e 's|SHARE_FT=0|SHARE_FT=1|' Makefile && make 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 && for INSTFILE in `ls doc` do if [ ! -f /usr/share/ghostscript/&gs-version;/doc/$INSTFILE ]; then install -v -m644 doc/$INSTFILE \ /usr/share/ghostscript/&gs-version;/doc fi done && install -v -m755 -d /usr/share/ghostscript/&gs-version;/doc/figures && install -v -m644 doc/figures/* \ /usr/share/ghostscript/&gs-version;/doc/figures && ln -sv ../ghostscript/&gs-version;/doc /usr/share/doc/ghostscript-&gs-version; To install the shared library libgs.so, run the following additional command as an unprivileged user: make so And again as the root user: make soinstall docdir=/usr/share/doc/ghostscript-&gs-version; && install -v -m644 base/*.h /usr/include/ghostscript && ln -v -s ghostscript /usr/include/ps The shared library depends on . It is only used in external programs like and . 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 --with-drivers=ALL,x11: This parameter adds the x11 output device to the default (ALL) selection so that the test to render the tiger will work on 32-bit systems (this does no harm on the x86_64 architecture, although it is not required there). --disable-compile-inits: This parameter is intended to avoid compiling initialization files into the executables. It is used here to simplify building agaisnt the system version of zlib. : If you know you do not wish to print any JPEG2000 files, this switch (and removing the jasper/ source) will achieve this. : The JBIG2 decompression code (used for some faxes) can be disabled by using this switch and removing the jbig2dec/ source. install ...: 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 ... /usr/share/doc/ghostscript-&gs-version;: This puts 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 Installed Library Installed Directories 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 libgs.so /usr/include/ghostscript, /usr/lib/ghostscript, /usr/share/ghostscript, and /usr/share/doc/ghostscript-&gs-version; Short Descriptions gs is an interpreter for Adobe Systems' PostScript(tm) and Portable Document Format (PDF). gs libgs.so provides Ghostscript functionality to other programs, such as GSView, ImageMagick, and libspectre. libgs.so 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.