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