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