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