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