source: pst/printing/gs.xml@ c8585068

10.1 11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since c8585068 was c8585068, checked in by Ken Moffat <ken@…>, 4 years ago

· freetype-2.10.4 (security fix)
· patch ghostscript for build breakage introduced by freetype-2.10.3.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@23829 af4574ff-66df-0310-9fd7-8a98e5e911e0

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