[ed30f09] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[73ddd1a0] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[00b6675] | 6 |
|
---|
[6b58d592] | 7 | <!ENTITY gs-download-http
|
---|
| 8 | "http://downloads.ghostscript.com/public/ghostscript-&gs-version;.tar.bz2">
|
---|
[de109d93] | 9 | <!ENTITY gs-download-ftp " ">
|
---|
[6b58d592] | 10 | <!ENTITY gs-md5sum "8bcef1f33ddf8a4d12b2cf8da385c191">
|
---|
| 11 | <!ENTITY gs-size "27 MB">
|
---|
| 12 | <!ENTITY gs-buildsize "252 MB (includes installing libgs.so and both font tarballs)">
|
---|
[d453af5] | 13 | <!ENTITY gs-time "2.5 SBU (includes building and installing libgs.so)">
|
---|
[100786d] | 14 |
|
---|
| 15 | <!ENTITY gs-standard-fonts-download "&sourceforge-repo;/gs-fonts/ghostscript-fonts-std-8.11.tar.gz">
|
---|
[00b6675] | 16 | <!ENTITY gs-standard-fonts-md5sum "6865682b095f8c4500c54b285ff05ef6">
|
---|
[100786d] | 17 | <!ENTITY gs-standard-fonts-size "3.7 MB">
|
---|
[00b6675] | 18 |
|
---|
[100786d] | 19 | <!ENTITY gs-other-fonts-download "&sourceforge-repo;/gs-fonts/gnu-gs-fonts-other-6.0.tar.gz">
|
---|
| 20 | <!ENTITY gs-other-fonts-md5sum "33457d3f37de7ef03d2eea05a9e6aa4f">
|
---|
| 21 | <!ENTITY gs-other-fonts-size "796 KB">
|
---|
[73ddd1a0] | 22 | ]>
|
---|
| 23 |
|
---|
[aa8ef3bc] | 24 | <sect1 id="gs" xreflabel="GPL Ghostscript-&gs-version;">
|
---|
[ed30f09] | 25 | <?dbhtml filename="gs.html"?>
|
---|
| 26 |
|
---|
| 27 | <sect1info>
|
---|
| 28 | <othername>$LastChangedBy$</othername>
|
---|
| 29 | <date>$Date$</date>
|
---|
| 30 | </sect1info>
|
---|
| 31 |
|
---|
[aa8ef3bc] | 32 | <title>GPL Ghostscript-&gs-version;</title>
|
---|
[ed30f09] | 33 |
|
---|
| 34 | <indexterm zone="gs">
|
---|
[aa8ef3bc] | 35 | <primary sortas="a-GPL-Ghostscript">GPL Ghostscript</primary>
|
---|
[ed30f09] | 36 | </indexterm>
|
---|
| 37 |
|
---|
| 38 | <sect2 role="package">
|
---|
| 39 | <title>Introduction to Ghostscript</title>
|
---|
| 40 |
|
---|
| 41 | <para><application>Ghostscript</application> is a versatile processor
|
---|
| 42 | for PostScript data with the ability to render PostScript to different
|
---|
| 43 | targets.</para>
|
---|
| 44 |
|
---|
[d453af5] | 45 | &lfs70_checked;
|
---|
[aa8ef3bc] | 46 |
|
---|
[ed30f09] | 47 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 48 | <itemizedlist spacing="compact">
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download (HTTP): <ulink url="&gs-download-http;"/></para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Download (FTP): <ulink url="&gs-download-ftp;"/></para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Download MD5 sum: &gs-md5sum;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
| 59 | <para>Download size: &gs-size;</para>
|
---|
| 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
| 62 | <para>Estimated disk space required: &gs-buildsize;</para>
|
---|
| 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
| 65 | <para>Estimated build time: &gs-time;</para>
|
---|
| 66 | </listitem>
|
---|
| 67 | </itemizedlist>
|
---|
| 68 |
|
---|
| 69 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 70 |
|
---|
[6b58d592] | 71 | <itemizedlist spacing="compact">
|
---|
[ed30f09] | 72 | <title>Standard Fonts</title>
|
---|
| 73 | <listitem>
|
---|
| 74 | <para>Download (FTP): <ulink url="&gs-standard-fonts-download;"/></para>
|
---|
| 75 | </listitem>
|
---|
| 76 | <listitem>
|
---|
| 77 | <para>Download MD5 sum: &gs-standard-fonts-md5sum;</para>
|
---|
| 78 | </listitem>
|
---|
| 79 | <listitem>
|
---|
| 80 | <para>Download size: &gs-standard-fonts-size;</para>
|
---|
| 81 | </listitem>
|
---|
| 82 | </itemizedlist>
|
---|
| 83 |
|
---|
[6b58d592] | 84 | <itemizedlist spacing="compact">
|
---|
[ed30f09] | 85 | <title>Other Fonts</title>
|
---|
| 86 | <listitem>
|
---|
| 87 | <para>Download (HTTP): <ulink url="&gs-other-fonts-download;"/></para>
|
---|
| 88 | </listitem>
|
---|
| 89 | <listitem>
|
---|
| 90 | <para>Download MD5 sum: &gs-other-fonts-md5sum;</para>
|
---|
| 91 | </listitem>
|
---|
| 92 | <listitem>
|
---|
| 93 | <para>Download size: &gs-other-fonts-size;</para>
|
---|
| 94 | </listitem>
|
---|
| 95 | </itemizedlist>
|
---|
| 96 |
|
---|
[b29ed97c] | 97 | <bridgehead renderas="sect3">Ghostscript Dependencies</bridgehead>
|
---|
[ed30f09] | 98 |
|
---|
[de109d93] | 99 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 100 | <para role="optional"><xref linkend="expat"/>,
|
---|
| 101 | <xref linkend="freetype2"/>,
|
---|
| 102 | <xref linkend="libjpeg"/>,
|
---|
[ed30f09] | 103 | <xref linkend="libpng"/>,
|
---|
[de109d93] | 104 | <xref linkend="libtiff"/>, and
|
---|
[6b58d592] | 105 | <xref linkend="lcms2"/>.</para>
|
---|
[de109d93] | 106 |
|
---|
| 107 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[6b58d592] | 108 | <para role="optional"><xref linkend="cairo"/>,
|
---|
[100786d] | 109 | <xref linkend="fontconfig"/>,
|
---|
| 110 | <xref linkend="gtk2"/>,
|
---|
| 111 | <xref linkend="cups"/>,
|
---|
[6b58d592] | 112 | <xref linkend="jasper"/>,
|
---|
| 113 | <xref linkend="lcms"/>,
|
---|
[8070bb0c] | 114 | <xref linkend="libidn"/>,
|
---|
[6b58d592] | 115 | <xref linkend="x-window-system"/>, and <ulink
|
---|
| 116 | url="http://packages.debian.org/unstable/source/libpaper">libpaper</ulink>.</para>
|
---|
[ed30f09] | 117 |
|
---|
[977061b0] | 118 | <para condition="html" role="usernotes">User Notes:
|
---|
| 119 | <ulink url="&blfs-wiki;/gs"/></para>
|
---|
| 120 |
|
---|
[ed30f09] | 121 | </sect2>
|
---|
| 122 |
|
---|
| 123 | <sect2 role="installation">
|
---|
| 124 | <title>Installation of Ghostscript</title>
|
---|
| 125 |
|
---|
[de109d93] | 126 | <para>Install <application>GPL Ghostscript</application> by running the
|
---|
| 127 | following commands:</para>
|
---|
| 128 |
|
---|
| 129 | <note>
|
---|
[100786d] | 130 | <para>The <application>Ghostscript</application> build system is not
|
---|
| 131 | user-friendly. In order to use system copies of various graphics
|
---|
| 132 | libraries, you must do it using unconventional methods.</para>
|
---|
[de109d93] | 133 | </note>
|
---|
[100786d] | 134 |
|
---|
[de109d93] | 135 | <para><application>GPL Ghostscript</application> includes (old) copies of
|
---|
| 136 | several libraries. Some of these seem to have been patched to fix known
|
---|
| 137 | vulnerabilities, but others of these copies are less-well maintained.
|
---|
| 138 | To ensure that any future fixes are applied throughout the whole system,
|
---|
[d453af5] | 139 | it is recommended that you install the released versions of these
|
---|
| 140 | libraries and then configure <application>GPL Ghostscript</application>
|
---|
| 141 | to link to them.</para>
|
---|
| 142 |
|
---|
| 143 | <para>If you have installed these dependencies on your system, remove the
|
---|
| 144 | copies of <application>expat</application>,
|
---|
[6b58d592] | 145 | <application>freetype</application>, <application>lcms2</application>,
|
---|
| 146 | <application>libjpeg</application>, <application>libpng</application>,
|
---|
| 147 | and <application>libtiff</application>:
|
---|
[de109d93] | 148 | </para>
|
---|
[ed30f09] | 149 |
|
---|
[6b58d592] | 150 | <screen><userinput>rm -rf expat freetype jpeg lcms2 libpng tiff</userinput></screen>
|
---|
[de109d93] | 151 |
|
---|
[6b58d592] | 152 | <note>
|
---|
| 153 | <para>If you have a multicore computer and try to run make with multiple
|
---|
| 154 | jobs (eg, make -j4) then the build may fail due to race conditions in the
|
---|
| 155 | <application>Ghostscript</application> build system.</para>
|
---|
| 156 | </note>
|
---|
[de109d93] | 157 |
|
---|
[6b58d592] | 158 | <para>Compile <application>Ghostscript</application>:</para>
|
---|
[de109d93] | 159 |
|
---|
[6b58d592] | 160 | <screen><userinput>rm -rf jasper lcms zlib &&
|
---|
| 161 | ./configure --prefix=/usr --enable-dynamic --with-system-libtiff &&
|
---|
| 162 | sed -i '/^EXTRALIBS/s# -ldl# -lz#' Makefile &&
|
---|
[038ea6ba] | 163 | make</userinput></screen>
|
---|
| 164 |
|
---|
[d453af5] | 165 | <note>
|
---|
| 166 | <para>The shared library depends on <xref linkend="gtk2"/>. It is
|
---|
| 167 | only used in external programs like <xref linkend="imagemagick"/>.</para>
|
---|
| 168 | </note>
|
---|
[038ea6ba] | 169 |
|
---|
[d453af5] | 170 | <para>To compile the shared library
|
---|
[6b58d592] | 171 | <filename class="libraryfile">libgs.so</filename>, run the
|
---|
[e615d9b] | 172 | following additional command as an unprivileged user:</para>
|
---|
[038ea6ba] | 173 |
|
---|
| 174 | <screen><userinput>make so</userinput></screen>
|
---|
[73ddd1a0] | 175 |
|
---|
[d453af5] | 176 | <para>This package does not come with a test suite. However, you may test
|
---|
| 177 | the operation of the newly built <command>gs</command> program by
|
---|
| 178 | issuing the following command (issue from an X Windows terminal):</para>
|
---|
| 179 |
|
---|
[6b58d592] | 180 | <screen><userinput>bin/gs -Ilib -dBATCH examples/tiger.eps</userinput></screen>
|
---|
[d453af5] | 181 |
|
---|
| 182 | <para>Now, as the <systemitem class="username">root</systemitem>
|
---|
[e615d9b] | 183 | user:</para>
|
---|
[038ea6ba] | 184 |
|
---|
[d453af5] | 185 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 186 |
|
---|
| 187 | <para>If you want the shared library too:</para>
|
---|
| 188 |
|
---|
| 189 | <screen role="root"><userinput>make soinstall &&
|
---|
[aa8ef3bc] | 190 | install -v -m644 base/*.h /usr/include/ghostscript &&
|
---|
| 191 | ln -v -s ghostscript /usr/include/ps</userinput></screen>
|
---|
[73ddd1a0] | 192 |
|
---|
[d453af5] | 193 | <para>Now install the documentation:</para>
|
---|
| 194 |
|
---|
[6b58d592] | 195 | <screen role="root"><userinput>ln -sfv ../ghostscript/&gs-version;/doc /usr/share/doc/ghostscript-&gs-version;</userinput></screen>
|
---|
[73ddd1a0] | 196 |
|
---|
[ed30f09] | 197 | <para>To finish the installation, unpack all fonts you've downloaded to
|
---|
[038ea6ba] | 198 | <filename class="directory">/usr/share/ghostscript</filename> and ensure
|
---|
[100786d] | 199 | the ownerships of the files are
|
---|
[d453af5] | 200 | <systemitem class="username">root</systemitem>:
|
---|
| 201 | <systemitem class="groupname">root</systemitem>. Substitute
|
---|
[977061b0] | 202 | <replaceable><font-tarball></replaceable> appropriately in
|
---|
[038ea6ba] | 203 | the command below for the fonts you wish to install:</para>
|
---|
| 204 |
|
---|
[d453af5] | 205 | <screen role="root"><userinput>tar -xvf ../<replaceable><font-tarball></replaceable> -C /usr/share/ghostscript --no-same-owner</userinput></screen>
|
---|
[ed30f09] | 206 | </sect2>
|
---|
[73ddd1a0] | 207 |
|
---|
[2ddf71a5] | 208 | <sect2 role="commands">
|
---|
| 209 | <title>Command Explanations</title>
|
---|
| 210 |
|
---|
[6b58d592] | 211 | <para><command>rm -rf jasper lcms zlib</command>: The
|
---|
| 212 | <application>Ghostscript</application> build system defaults to using its
|
---|
| 213 | own version of <ulink url="http://www.openjpeg.org/">OpenJpeg</ulink> for
|
---|
| 214 | JPEG 2000 files <!-- I can't get it to compile using a system installed
|
---|
| 215 | version of openjpeg. I'll come back to this, it seems the ghostscript
|
---|
| 216 | version is quite old --> so we can all remove the jasper source. The
|
---|
| 217 | default color management system is now <application>lcms2</application> so
|
---|
| 218 | the <application>lcms</application> source is not needed.
|
---|
| 219 | <application>Zlib</application> was installed as part of LFS.</para>
|
---|
| 220 |
|
---|
| 221 | <para><option>--with-system-libtiff</option>: Remove this option if you've
|
---|
| 222 | not installed <xref linkend="libtiff"/>.</para>
|
---|
| 223 |
|
---|
| 224 | <para><command>sed -i '/^EXTRALIBS/s# -ldl# -lz#' Makefile</command>:
|
---|
| 225 | This sed is needed to get it to link against the system installed
|
---|
| 226 | <application>zlib</application>.</para>
|
---|
[d453af5] | 227 |
|
---|
[de109d93] | 228 | <para><option>--without-jbig2dec</option>: The <literal>JBIG2</literal>
|
---|
[d453af5] | 229 | decompression code (used for some faxes) can be disabled by using this
|
---|
| 230 | switch and removing the <filename class="directory">jbig2dec/</filename>
|
---|
| 231 | source.</para>
|
---|
| 232 |
|
---|
| 233 | <para><command>install -v -m644 base/*.h...</command>: Some packages
|
---|
[2ddf71a5] | 234 | (<application>ImageMagick</application> is one) need the
|
---|
| 235 | <application>Ghostscript</application> interface headers in place to link
|
---|
| 236 | to the shared library. These commands install the headers.</para>
|
---|
| 237 |
|
---|
[d453af5] | 238 | <para><command>ln -v -s ghostscript /usr/include/ps</command>: Some packages
|
---|
| 239 | expect to find the interface headers in an alternate location.</para>
|
---|
[2ddf71a5] | 240 |
|
---|
[6b58d592] | 241 | <para><command>ln -sfv ../ghostscript-&gs-version;/doc ...</command>:
|
---|
| 242 | This puts a symbolic link to the documentation where it is expected to be
|
---|
| 243 | found.</para>
|
---|
| 244 |
|
---|
[2ddf71a5] | 245 | </sect2>
|
---|
| 246 |
|
---|
[ed30f09] | 247 | <sect2 role="content">
|
---|
| 248 | <title>Contents</title>
|
---|
[038ea6ba] | 249 | <segmentedlist>
|
---|
| 250 | <segtitle>Installed Programs</segtitle>
|
---|
| 251 | <segtitle>Installed Library</segtitle>
|
---|
| 252 | <segtitle>Installed Directories</segtitle>
|
---|
| 253 |
|
---|
| 254 | <seglistitem>
|
---|
[aa8ef3bc] | 255 | <seg>bdftops, dumphint, dvipdf, eps2eps, fixmswrd.pl, font2c, gs, gsbj,
|
---|
[d453af5] | 256 | gsc (from soinstall), gsdj, gsdj500, gslj, gslp, gsnd, gsx
|
---|
| 257 | (from soinstall), lprsetup.sh, pdf2dsc, pdf2ps, pdfopt,
|
---|
[a41f643] | 258 | pf2afm, pfbtopfa, printafm, ps2ascii, ps2epsi, ps2pdf, ps2pdf12,
|
---|
[aa8ef3bc] | 259 | ps2pdf13, ps2pdf14, ps2pdfwr, ps2ps, ps2ps2, pv.sh, unix-lpr.sh, and
|
---|
[038ea6ba] | 260 | wftopfa</seg>
|
---|
[6b58d592] | 261 | <seg>libgs.so</seg>
|
---|
[d453af5] | 262 | <seg>/usr/include/ghostscript, /usr/lib/ghostscript,
|
---|
[6b58d592] | 263 | /usr/share/ghostscript, and
|
---|
| 264 | /usr/share/doc/ghostscript-&gs-version;</seg>
|
---|
[038ea6ba] | 265 | </seglistitem>
|
---|
| 266 | </segmentedlist>
|
---|
| 267 |
|
---|
| 268 | <variablelist>
|
---|
| 269 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 270 | <?dbfo list-presentation="list"?>
|
---|
| 271 | <?dbhtml list-presentation="table"?>
|
---|
| 272 |
|
---|
[d891148c] | 273 | <varlistentry id="gplgs-prog">
|
---|
[038ea6ba] | 274 | <term><command>gs</command></term>
|
---|
| 275 | <listitem>
|
---|
[d453af5] | 276 | <para>is an interpreter for Adobe Systems' PostScript(tm) and Portable
|
---|
| 277 | Document Format (PDF).</para>
|
---|
[d891148c] | 278 | <indexterm zone="gs gplgs-prog">
|
---|
[038ea6ba] | 279 | <primary sortas="b-gs">gs</primary>
|
---|
| 280 | </indexterm>
|
---|
| 281 | </listitem>
|
---|
| 282 | </varlistentry>
|
---|
| 283 |
|
---|
[d891148c] | 284 | <varlistentry id="libgs.so">
|
---|
| 285 | <term><filename class="libraryfile">libgs.so</filename></term>
|
---|
| 286 | <listitem>
|
---|
| 287 | <para>provides <application>Ghostscript</application> functionality
|
---|
| 288 | to other programs, such as <application>GSView</application>,
|
---|
| 289 | <application>ImageMagick</application>, and
|
---|
| 290 | <application>libspectre</application>.</para>
|
---|
| 291 | <indexterm zone="gs libgs.so">
|
---|
| 292 | <primary sortas="c-libgs.so">libgs.so</primary>
|
---|
| 293 | </indexterm>
|
---|
| 294 | </listitem>
|
---|
| 295 | </varlistentry>
|
---|
| 296 |
|
---|
[038ea6ba] | 297 | </variablelist>
|
---|
| 298 |
|
---|
[d891148c] | 299 | <para><application>GPL Ghostscript</application> provides many different
|
---|
[a41f643] | 300 | scripts used to convert PostScript, PDF, and other formats. Please refer to
|
---|
| 301 | the HTML documentation or the man pages for information about the
|
---|
[d891148c] | 302 | capabilities provided.</para>
|
---|
[73ddd1a0] | 303 |
|
---|
[ed30f09] | 304 | </sect2>
|
---|
[cabb2de] | 305 |
|
---|
| 306 | </sect1>
|
---|