[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
|
---|
[f7153b6] | 8 | "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs920/ghostscript-&gs-version;.tar.gz">
|
---|
[de109d93] | 9 | <!ENTITY gs-download-ftp " ">
|
---|
[f7153b6] | 10 | <!ENTITY gs-md5sum "93c5987cd3ab341108be1ebbaadc24fe">
|
---|
| 11 | <!ENTITY gs-size "34 MB">
|
---|
| 12 | <!ENTITY gs-buildsize "240 MB (with fonts and libgs.so)">
|
---|
| 13 | <!ENTITY gs-time "2.2 SBU (with libgs.so)">
|
---|
[100786d] | 14 |
|
---|
[95b8c6d] | 15 | <!ENTITY gs-standard-fonts-download
|
---|
| 16 | "&sourceforge-repo;/gs-fonts/ghostscript-fonts-std-8.11.tar.gz">
|
---|
[00b6675] | 17 | <!ENTITY gs-standard-fonts-md5sum "6865682b095f8c4500c54b285ff05ef6">
|
---|
[100786d] | 18 | <!ENTITY gs-standard-fonts-size "3.7 MB">
|
---|
[00b6675] | 19 |
|
---|
[95b8c6d] | 20 | <!ENTITY gs-other-fonts-download
|
---|
| 21 | "&sourceforge-repo;/gs-fonts/gnu-gs-fonts-other-6.0.tar.gz">
|
---|
[100786d] | 22 | <!ENTITY gs-other-fonts-md5sum "33457d3f37de7ef03d2eea05a9e6aa4f">
|
---|
| 23 | <!ENTITY gs-other-fonts-size "796 KB">
|
---|
[73ddd1a0] | 24 | ]>
|
---|
| 25 |
|
---|
[a027d7d3] | 26 | <sect1 id="gs" xreflabel="ghostscript-&gs-version;">
|
---|
[ed30f09] | 27 | <?dbhtml filename="gs.html"?>
|
---|
| 28 |
|
---|
| 29 | <sect1info>
|
---|
| 30 | <othername>$LastChangedBy$</othername>
|
---|
| 31 | <date>$Date$</date>
|
---|
| 32 | </sect1info>
|
---|
| 33 |
|
---|
[a027d7d3] | 34 | <title>ghostscript-&gs-version;</title>
|
---|
[ed30f09] | 35 |
|
---|
| 36 | <indexterm zone="gs">
|
---|
[aa8ef3bc] | 37 | <primary sortas="a-GPL-Ghostscript">GPL Ghostscript</primary>
|
---|
[ed30f09] | 38 | </indexterm>
|
---|
| 39 |
|
---|
| 40 | <sect2 role="package">
|
---|
| 41 | <title>Introduction to Ghostscript</title>
|
---|
| 42 |
|
---|
| 43 | <para><application>Ghostscript</application> is a versatile processor
|
---|
| 44 | for PostScript data with the ability to render PostScript to different
|
---|
[4118724f] | 45 | targets. It is a mandatory part of the cups printing stack.</para>
|
---|
[ed30f09] | 46 |
|
---|
[c480c33] | 47 | &lfs7a_checked;
|
---|
[aa8ef3bc] | 48 |
|
---|
[ed30f09] | 49 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 50 | <itemizedlist spacing="compact">
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Download (HTTP): <ulink url="&gs-download-http;"/></para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Download (FTP): <ulink url="&gs-download-ftp;"/></para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>Download MD5 sum: &gs-md5sum;</para>
|
---|
| 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>Download size: &gs-size;</para>
|
---|
| 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>Estimated disk space required: &gs-buildsize;</para>
|
---|
| 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
| 67 | <para>Estimated build time: &gs-time;</para>
|
---|
| 68 | </listitem>
|
---|
| 69 | </itemizedlist>
|
---|
| 70 |
|
---|
| 71 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 72 |
|
---|
[0fdb14c] | 73 | <itemizedlist spacing="compact">
|
---|
| 74 | <listitem>
|
---|
| 75 | <para>
|
---|
| 76 | Required Patch: <ulink
|
---|
| 77 | url="&patch-root;/ghostscript-&gs-version;-security_fixes-1.patch"/>
|
---|
| 78 | </para>
|
---|
| 79 | </listitem>
|
---|
| 80 | </itemizedlist>
|
---|
[0ffa371] | 81 |
|
---|
[933ceec] | 82 | <para>If you wish, you can download additional fonts.</para>
|
---|
| 83 |
|
---|
[6b58d592] | 84 | <itemizedlist spacing="compact">
|
---|
[ed30f09] | 85 | <title>Standard Fonts</title>
|
---|
| 86 | <listitem>
|
---|
[01c2a351] | 87 | <para>Download (HTTP): <ulink url="&gs-standard-fonts-download;"/></para>
|
---|
[ed30f09] | 88 | </listitem>
|
---|
| 89 | <listitem>
|
---|
| 90 | <para>Download MD5 sum: &gs-standard-fonts-md5sum;</para>
|
---|
| 91 | </listitem>
|
---|
| 92 | <listitem>
|
---|
| 93 | <para>Download size: &gs-standard-fonts-size;</para>
|
---|
| 94 | </listitem>
|
---|
| 95 | </itemizedlist>
|
---|
| 96 |
|
---|
[6b58d592] | 97 | <itemizedlist spacing="compact">
|
---|
[ed30f09] | 98 | <title>Other Fonts</title>
|
---|
| 99 | <listitem>
|
---|
| 100 | <para>Download (HTTP): <ulink url="&gs-other-fonts-download;"/></para>
|
---|
| 101 | </listitem>
|
---|
| 102 | <listitem>
|
---|
| 103 | <para>Download MD5 sum: &gs-other-fonts-md5sum;</para>
|
---|
| 104 | </listitem>
|
---|
| 105 | <listitem>
|
---|
| 106 | <para>Download size: &gs-other-fonts-size;</para>
|
---|
| 107 | </listitem>
|
---|
| 108 | </itemizedlist>
|
---|
| 109 |
|
---|
[b29ed97c] | 110 | <bridgehead renderas="sect3">Ghostscript Dependencies</bridgehead>
|
---|
[ed30f09] | 111 |
|
---|
[de109d93] | 112 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[2d37d32] | 113 | <para role="recommended">
|
---|
| 114 | <xref linkend="freetype2"/>,
|
---|
| 115 | <xref linkend="libjpeg"/>,
|
---|
[933ceec] | 116 | <xref linkend="libpng"/>,
|
---|
[1df1b16] | 117 | <xref linkend="libtiff"/>, and
|
---|
| 118 | <xref linkend="lcms2"/>
|
---|
[2d37d32] | 119 | </para>
|
---|
[de109d93] | 120 |
|
---|
| 121 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[2d37d32] | 122 | <para role="optional">
|
---|
| 123 | <xref linkend="cairo"/>,
|
---|
[4118724f] | 124 | <xref linkend="cups"/> (required for building the <quote>cups</quote>
|
---|
| 125 | device backend, which is needed by
|
---|
| 126 | <application>cups-filters</application>),
|
---|
[142f958b] | 127 | <xref linkend="fontconfig"/> (required, if you are installing any
|
---|
| 128 | suggested font),
|
---|
[f7153b6] | 129 | <xref linkend="gtk3"/>,
|
---|
[2d37d32] | 130 | <xref linkend="libidn"/>,
|
---|
[1ecdb18] | 131 | <xref linkend="libpaper"/>,
|
---|
| 132 | <xref linkend="lcms"/> (not used by default, nor if lcms2 is present or found), and
|
---|
| 133 | <xref linkend="x-window-system"/>
|
---|
[2d37d32] | 134 | </para>
|
---|
| 135 |
|
---|
| 136 | <para condition="html" role="usernotes">
|
---|
| 137 | User Notes: <ulink url="&blfs-wiki;/gs"/>
|
---|
| 138 | </para>
|
---|
[ed30f09] | 139 | </sect2>
|
---|
| 140 |
|
---|
| 141 | <sect2 role="installation">
|
---|
| 142 | <title>Installation of Ghostscript</title>
|
---|
| 143 |
|
---|
[2d37d32] | 144 | <note>
|
---|
| 145 | <para>
|
---|
| 146 | The <application>Ghostscript</application> build system is not
|
---|
| 147 | user-friendly. In order to use system copies of various graphics
|
---|
| 148 | libraries, you must do it using unconventional methods.
|
---|
| 149 | </para>
|
---|
| 150 | </note>
|
---|
[100786d] | 151 |
|
---|
[2d37d32] | 152 | <para>
|
---|
| 153 | <application>GPL Ghostscript</application> includes (old) copies of
|
---|
[de109d93] | 154 | several libraries. Some of these seem to have been patched to fix known
|
---|
| 155 | vulnerabilities, but others of these copies are less-well maintained.
|
---|
| 156 | To ensure that any future fixes are applied throughout the whole system,
|
---|
[2d37d32] | 157 | it is recommended that you first install the released versions of these
|
---|
[d453af5] | 158 | libraries and then configure <application>GPL Ghostscript</application>
|
---|
[2d37d32] | 159 | to link to them.
|
---|
| 160 | </para>
|
---|
[d453af5] | 161 |
|
---|
[2d37d32] | 162 | <para>
|
---|
[4886a74] | 163 | If you have installed the recommended dependencies on your system,
|
---|
| 164 | remove the copies of
|
---|
[1df1b16] | 165 | <application>freetype</application>, <application>lcms2</application>,
|
---|
[933ceec] | 166 | <application>libjpeg</application>, and <application>libpng</application>:
|
---|
[2d37d32] | 167 | </para>
|
---|
[ed30f09] | 168 |
|
---|
[4886a74] | 169 | <screen><userinput>rm -rf freetype lcms2 jpeg libpng</userinput></screen>
|
---|
[2d37d32] | 170 |
|
---|
[6b58d592] | 171 | <para>Compile <application>Ghostscript</application>:</para>
|
---|
[de109d93] | 172 |
|
---|
[0ffa371] | 173 | <screen><userinput>patch -Np1 -i ../ghostscript-&gs-version;-security_fixes-1.patch &&
|
---|
| 174 |
|
---|
| 175 | rm -rf zlib &&
|
---|
[60d53ec3] | 176 |
|
---|
| 177 | ./configure --prefix=/usr \
|
---|
| 178 | --disable-compile-inits \
|
---|
| 179 | --enable-dynamic \
|
---|
| 180 | --with-system-libtiff &&
|
---|
[038ea6ba] | 181 | make</userinput></screen>
|
---|
| 182 |
|
---|
[d453af5] | 183 | <note>
|
---|
[2d37d32] | 184 | <para>
|
---|
| 185 | The shared library depends on <xref linkend="gtk2"/>. It is only used in
|
---|
[347e59c] | 186 | external programs like <xref linkend="asymptote"/> and
|
---|
| 187 | <xref linkend="imagemagick"/>.
|
---|
[2d37d32] | 188 | </para>
|
---|
[d453af5] | 189 | </note>
|
---|
[038ea6ba] | 190 |
|
---|
[2d37d32] | 191 | <para>
|
---|
| 192 | To compile the shared library
|
---|
| 193 | <filename class="libraryfile">libgs.so</filename>, run the following
|
---|
| 194 | additional command as an unprivileged user:
|
---|
| 195 | </para>
|
---|
[038ea6ba] | 196 |
|
---|
| 197 | <screen><userinput>make so</userinput></screen>
|
---|
[73ddd1a0] | 198 |
|
---|
[2d37d32] | 199 | <para>
|
---|
[a2a37c7] | 200 | This package does not come with a test suite. A set of example files
|
---|
| 201 | may be used for testing, but it is only possible after installation
|
---|
| 202 | of the package.
|
---|
[2d37d32] | 203 | </para>
|
---|
[d453af5] | 204 |
|
---|
[2d37d32] | 205 | <para>
|
---|
| 206 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 207 | </para>
|
---|
[038ea6ba] | 208 |
|
---|
[d453af5] | 209 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 210 |
|
---|
| 211 | <para>If you want the shared library too:</para>
|
---|
| 212 |
|
---|
| 213 | <screen role="root"><userinput>make soinstall &&
|
---|
[aa8ef3bc] | 214 | install -v -m644 base/*.h /usr/include/ghostscript &&
|
---|
| 215 | ln -v -s ghostscript /usr/include/ps</userinput></screen>
|
---|
[73ddd1a0] | 216 |
|
---|
[933ceec] | 217 | <para>Now make the documentation accessible from the normal place:</para>
|
---|
[d453af5] | 218 |
|
---|
[41d241e] | 219 | <screen role="root"><userinput>ln -sfvn ../ghostscript/&gs-version;/doc /usr/share/doc/ghostscript-&gs-version;</userinput></screen>
|
---|
[73ddd1a0] | 220 |
|
---|
[2d37d32] | 221 | <para>
|
---|
[933ceec] | 222 | If you have downloaded any fonts, unpack them to
|
---|
[2d37d32] | 223 | <filename class="directory">/usr/share/ghostscript</filename> and ensure
|
---|
| 224 | the ownerships of the files are
|
---|
| 225 | <systemitem class="username">root</systemitem>:
|
---|
| 226 | <systemitem class="groupname">root</systemitem>. Substitute
|
---|
| 227 | <replaceable><font-tarball></replaceable> appropriately in the
|
---|
| 228 | command below for the fonts you wish to install:
|
---|
| 229 | </para>
|
---|
[038ea6ba] | 230 |
|
---|
[142f958b] | 231 | <screen role="root"><userinput>tar -xvf ../<replaceable><font-tarball></replaceable> -C /usr/share/ghostscript --no-same-owner &&
|
---|
| 232 | fc-cache -v /usr/share/ghostscript/fonts/</userinput></screen>
|
---|
[a2a37c7] | 233 |
|
---|
| 234 | <para>
|
---|
| 235 | You can now test the rendering of various postscript and pdf files from the
|
---|
| 236 | <filename class="directory">/usr/share/ghostscript/&gs-version;/examples
|
---|
| 237 | </filename>, for example (you need an X window system display):
|
---|
| 238 | </para>
|
---|
| 239 |
|
---|
| 240 | <screen><userinput>gs -q -dBATCH /usr/share/ghostscript/&gs-version;/examples/tiger.eps</userinput></screen>
|
---|
| 241 |
|
---|
[ed30f09] | 242 | </sect2>
|
---|
[73ddd1a0] | 243 |
|
---|
[2ddf71a5] | 244 | <sect2 role="commands">
|
---|
| 245 | <title>Command Explanations</title>
|
---|
| 246 |
|
---|
[2d37d32] | 247 | <para>
|
---|
[f19b432b] | 248 | <command>rm -rf zlib </command>: <application>zlib</application>
|
---|
| 249 | was installed as part of LFS.
|
---|
[2d37d32] | 250 | </para>
|
---|
| 251 |
|
---|
| 252 | <para>
|
---|
[2bb5c32] | 253 | <parameter>--disable-compile-inits</parameter>: This option makes
|
---|
[933ceec] | 254 | <command>gs</command> and <filename>libgs.so</filename> slightly smaller.
|
---|
[2d37d32] | 255 | </para>
|
---|
| 256 |
|
---|
| 257 | <para>
|
---|
[142f958b] | 258 | <parameter>--with-system-libtiff</parameter>: Remove this option if
|
---|
| 259 | you've not installed <xref linkend="libtiff"/>.
|
---|
[2d37d32] | 260 | </para>
|
---|
| 261 |
|
---|
| 262 | <para>
|
---|
[81f0120] | 263 | <command>install -v -m644 base/*.h... </command>: Some packages
|
---|
[2d37d32] | 264 | (<application>ImageMagick</application> is one) need the
|
---|
| 265 | <application>Ghostscript</application> interface headers in place to link
|
---|
| 266 | to the shared library. These commands install the headers.
|
---|
| 267 | </para>
|
---|
| 268 |
|
---|
| 269 | <para>
|
---|
| 270 | <command>ln -v -s ghostscript /usr/include/ps</command>: Some packages
|
---|
| 271 | expect to find the interface headers in an alternate location.
|
---|
| 272 | </para>
|
---|
| 273 |
|
---|
| 274 | <para>
|
---|
[81f0120] | 275 | <command>ln -sfv ../ghostscript-&gs-version;/doc ... </command>: This puts
|
---|
[2d37d32] | 276 | a symbolic link to the documentation where it is expected to be found.
|
---|
| 277 | </para>
|
---|
[933ceec] | 278 |
|
---|
| 279 | <para>
|
---|
| 280 | <option>--disable-cups</option>: this option will save a tiny amount of
|
---|
| 281 | space by not linking <command>gs</command> and <filename>libgs.so</filename>
|
---|
| 282 | to the <xref linkend="cups"/> libraries if you have installed those.
|
---|
| 283 | </para>
|
---|
[2ddf71a5] | 284 | </sect2>
|
---|
| 285 |
|
---|
[ed30f09] | 286 | <sect2 role="content">
|
---|
| 287 | <title>Contents</title>
|
---|
[038ea6ba] | 288 | <segmentedlist>
|
---|
| 289 | <segtitle>Installed Programs</segtitle>
|
---|
| 290 | <segtitle>Installed Library</segtitle>
|
---|
| 291 | <segtitle>Installed Directories</segtitle>
|
---|
| 292 |
|
---|
| 293 | <seglistitem>
|
---|
[2d37d32] | 294 | <seg>
|
---|
[81f0120] | 295 | dvipdf, eps2eps, font2c, gs, gsbj, gsc (from soinstall), gsdj,
|
---|
| 296 | gsdj500, gslj, gslp, gsnd, gsx (from soinstall), lprsetup.sh,
|
---|
| 297 | pdf2dsc, pdf2ps, pf2afm, pfbtopfa, pphs, printafm, ps2ascii,
|
---|
| 298 | ps2epsi, ps2pdf, ps2pdf12, ps2pdf13, ps2pdf14, ps2pdfwr,
|
---|
| 299 | ps2ps, ps2ps2, unix-lpr.sh, and wftopfa
|
---|
[933ceec] | 300 | <!-- I don't see bdftops,fixmswrd.pl or pv.sh on my builds [ I don't
|
---|
| 301 | have any bdf tools from xorg ] but they are still referenced in
|
---|
| 302 | base/unixinst.mak -->
|
---|
[2d37d32] | 303 | </seg>
|
---|
[81f0120] | 304 | <seg>libgs.so and
|
---|
| 305 | /usr/lib/ghostscript/&gs-version;/X11.so</seg>
|
---|
[2d37d32] | 306 | <seg>
|
---|
| 307 | /usr/include/ghostscript,
|
---|
| 308 | /usr/lib/ghostscript,
|
---|
[019052a1] | 309 | /usr/share/ghostscript, and
|
---|
[2d37d32] | 310 | /usr/share/doc/ghostscript-&gs-version;
|
---|
| 311 | </seg>
|
---|
[038ea6ba] | 312 | </seglistitem>
|
---|
| 313 | </segmentedlist>
|
---|
| 314 |
|
---|
| 315 | <variablelist>
|
---|
| 316 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 317 | <?dbfo list-presentation="list"?>
|
---|
| 318 | <?dbhtml list-presentation="table"?>
|
---|
| 319 |
|
---|
[d891148c] | 320 | <varlistentry id="gplgs-prog">
|
---|
[038ea6ba] | 321 | <term><command>gs</command></term>
|
---|
| 322 | <listitem>
|
---|
[2d37d32] | 323 | <para>
|
---|
| 324 | is an interpreter for Adobe Systems' PostScript(tm) and Portable
|
---|
| 325 | Document Format (PDF).
|
---|
| 326 | </para>
|
---|
[d891148c] | 327 | <indexterm zone="gs gplgs-prog">
|
---|
[038ea6ba] | 328 | <primary sortas="b-gs">gs</primary>
|
---|
| 329 | </indexterm>
|
---|
| 330 | </listitem>
|
---|
| 331 | </varlistentry>
|
---|
| 332 |
|
---|
[d891148c] | 333 | <varlistentry id="libgs.so">
|
---|
| 334 | <term><filename class="libraryfile">libgs.so</filename></term>
|
---|
| 335 | <listitem>
|
---|
[2d37d32] | 336 | <para>
|
---|
| 337 | provides <application>Ghostscript</application> functionality to
|
---|
| 338 | other programs, such as <application>GSView</application>,
|
---|
| 339 | <application>ImageMagick</application>, and
|
---|
| 340 | <application>libspectre</application>.
|
---|
| 341 | </para>
|
---|
[d891148c] | 342 | <indexterm zone="gs libgs.so">
|
---|
| 343 | <primary sortas="c-libgs.so">libgs.so</primary>
|
---|
| 344 | </indexterm>
|
---|
| 345 | </listitem>
|
---|
| 346 | </varlistentry>
|
---|
[038ea6ba] | 347 | </variablelist>
|
---|
| 348 |
|
---|
[2d37d32] | 349 | <para>
|
---|
| 350 | <application>GPL Ghostscript</application> provides many different
|
---|
| 351 | scripts used to convert PostScript, PDF, and other formats. Please refer to
|
---|
| 352 | the HTML documentation or the man pages for information about the
|
---|
| 353 | capabilities provided.
|
---|
| 354 | </para>
|
---|
[ed30f09] | 355 | </sect2>
|
---|
[cabb2de] | 356 | </sect1>
|
---|