source: pst/printing/gs.xml@ 5fcebb8

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 5fcebb8 was 5fcebb8, checked in by Pierre Labastie <pierre.labastie@…>, 3 years ago

Reinstate the "Additional Downloads" for ghostscript

Even if there is no patch, there are two font files that can be
considered "additional downloads". If the bridgehead is removed,
it confuses jhalfs, by making the font files appear on the same
footing as the main package.

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