source: pst/ps/fop.xml@ bf7a1821

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules 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 bf7a1821 was bf7a1821, checked in by Pierre Labastie <pieere@…>, 7 years ago

OpenJDK-1.8.0.131
FOP-2.2

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

  • Property mode set to 100644
File size: 15.0 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 <!ENTITY fop-download-http "https://archive.apache.org/dist/xmlgraphics/fop/source/fop-&fop-version;-src.tar.gz">
8 <!ENTITY fop-download-ftp " ">
9 <!ENTITY fop-md5sum "6d2388bd8851b4883d3258c0afc96895">
10 <!ENTITY fop-size "24 MB">
11 <!ENTITY fop-buildsize "493 MB (add 39 MB for tests)">
12 <!ENTITY fop-time "0.7 SBU (add 0.7 SBU for tests)">
13
14 <!ENTITY jai-version "1_1_3">
15 <!ENTITY jai-download "http://download.java.net/media/jai/builds/release/&jai-version;/jai-&jai-version;-lib-linux-i586.tar.gz">
16 <!ENTITY jai-md5sum "a2cbc155ef3899bcde9c74a8035764b3">
17 <!ENTITY jai-size "3.4 MB">
18
19 <!ENTITY jai64-download "http://download.java.net/media/jai/builds/release/&jai-version;/jai-&jai-version;-lib-linux-amd64.tar.gz">
20 <!ENTITY jai64-md5sum "4a906db35612f668aeef2c0606d7075b">
21 <!ENTITY jai64-size "3.4 MB">
22 <!ENTITY offo-download "&sourceforge-repo;/projects/offo/files/offo-hyphenation/2.2/offo-hyphenation.zip">
23 <!ENTITY offo-md5sum "bf9c09bf05108ef9661b8f08d91c2336">
24 <!ENTITY offo-size "862 KB">
25]>
26
27<sect1 id="fop" xreflabel="fop-&fop-version;">
28 <?dbhtml filename="fop.html"?>
29
30 <sect1info>
31 <othername>$LastChangedBy$</othername>
32 <date>$Date$</date>
33 </sect1info>
34
35 <title>fop-&fop-version;</title>
36
37 <indexterm zone="fop">
38 <primary sortas="a-fop">fop</primary>
39 </indexterm>
40
41 <sect2 role="package">
42 <title>Introduction to fop</title>
43
44 <para>
45 The <application>FOP</application> (Formatting Objects Processor)
46 package contains a print formatter driven by XSL formatting objects
47 (XSL-FO). It is a <application>Java</application> application that reads
48 a formatting object tree and renders the resulting pages to a specified
49 output. Output formats currently supported include PDF, PCL, PostScript,
50 SVG, XML (area tree representation), print, AWT, MIF and ASCII text. The
51 primary output target is PDF.
52 </para>
53
54 &lfs80_checked;
55
56 <bridgehead renderas="sect3">Package Information</bridgehead>
57 <itemizedlist spacing="compact">
58 <listitem>
59 <para>Download (HTTP): <ulink url="&fop-download-http;"/></para>
60 </listitem>
61 <listitem>
62 <para>Download (FTP): <ulink url="&fop-download-ftp;"/></para>
63 </listitem>
64 <listitem>
65 <para>Download MD5 sum: &fop-md5sum;</para>
66 </listitem>
67 <listitem>
68 <para>Download size: &fop-size;</para>
69 </listitem>
70 <listitem>
71 <para>Estimated disk space required: &fop-buildsize;</para>
72 </listitem>
73 <listitem>
74 <para>Estimated build time: &fop-time;</para>
75 </listitem>
76 </itemizedlist>
77
78 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
79 <itemizedlist spacing="compact">
80 <title>Recommended packages</title>
81
82 <listitem>
83 <para>Objects for Formatting Objects (OFFO) hyphenation patterns:
84 <simplelist>
85 <member><ulink url="&offo-download;"/></member>
86 <member>&offo-md5sum;</member>
87 <member>&offo-size;</member>
88 </simplelist>
89 </para>
90 </listitem>
91
92 <listitem>
93 <para>Java Advanced Imaging (JAI) API components (architecture dependent):
94 <simplelist>
95 <member><ulink url="&jai-download;"/></member>
96 <member>&jai-md5sum;</member>
97 <member>&jai-size;</member>
98 </simplelist>
99 <literallayout>or</literallayout> <!-- Force some space -->
100 <simplelist>
101 <member><ulink url="&jai64-download;"/></member>
102 <member>&jai64-md5sum;</member>
103 <member>&jai64-size;</member>
104 </simplelist>
105 </para>
106 </listitem>
107 </itemizedlist>
108<!-- <itemizedlist spacing="compact">
109 <title>Required patch</title>
110 <listitem>
111 <para>
112 <ulink url="&patch-root;/fop-&fop-version;-listNPE-1.patch"/>
113 </para>
114 </listitem>
115 </itemizedlist>-->
116
117 <bridgehead renderas="sect3">fop Dependencies</bridgehead>
118
119 <bridgehead renderas="sect4">Required</bridgehead>
120 <para role="required">
121 <xref linkend="apache-ant"/>
122 </para>
123
124 <bridgehead renderas="sect4">Optional</bridgehead>
125 <para role="optional">
126 <xref linkend="junit"/> (to run tests),
127 <xref linkend="x-window-system"/> (to run tests),
128 <ulink url="https://maven.apache.org/">Maven</ulink>,
129 <ulink url="https://java.net/projects/jai-imageio">JAI Image I/O Tools</ulink>, and
130 <ulink url="http://jeuclid.sourceforge.net/">JEuclid</ulink>
131<!-- [pierre 2017-04-29] Note to devs: there are a lot of bundled dependencies.
132 Some were listed here, but not all. I am not sure it is possible to
133 use system ones. So, I have removed them, an kept only those which
134 are not bundled. -->
135 </para>
136
137 <para condition="html" role="usernotes">User Notes:
138 <ulink url="&blfs-wiki;/fop"/></para>
139
140 </sect2>
141
142 <sect2 role="installation">
143 <title>Installation of fop</title>
144
145 <para>
146 Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
147 the build. To build the <application>JIMI SDK</application> and/or
148 <application>XMLUnit</application> extension classes, ensure the
149 corresponding <filename class='extension'>.jar</filename> files can be
150 found via the <envar>CLASSPATH</envar> environment variable.
151 </para>
152
153 <sect3>
154 <title>Installing OFFO Hyphenation Patterns</title>
155
156 <para>
157 Copy the XML hyphenation patterns into the fop source tree by running
158 the following commands:
159 </para>
160
161<screen><userinput>unzip ../offo-hyphenation.zip &amp;&amp;
162cp offo-hyphenation/hyph/* fop/hyph &amp;&amp;
163rm -rf offo-hyphenation</userinput></screen>
164
165 </sect3>
166
167 <sect3>
168 <title>Installing Java Advanced Imaging (JAI) API components</title>
169
170 <para>
171 Install the JAI API components. As the <systemitem
172 class="username">root</systemitem> user:
173 </para>
174
175<screen role="root"><userinput>case `uname -m` in
176 i?86)
177 tar -xf ../jai-&jai-version;-lib-linux-i586.tar.gz
178 cp -v jai-&jai-version;/lib/{jai*,mlibwrapper_jai.jar} $JAVA_HOME/jre/lib/ext/
179 cp -v jai-&jai-version;/lib/libmlib_jai.so $JAVA_HOME/jre/lib/i386/
180 ;;
181
182 x86_64)
183 tar -xf ../jai-&jai-version;-lib-linux-amd64.tar.gz
184 cp -v jai-&jai-version;/lib/{jai*,mlibwrapper_jai.jar} $JAVA_HOME/jre/lib/ext/
185 cp -v jai-&jai-version;/lib/libmlib_jai.so $JAVA_HOME/jre/lib/amd64/
186 ;;
187esac</userinput></screen>
188 </sect3>
189
190 <sect3>
191 <title>Installing fop Components</title>
192
193 <para>
194 The <command>javadoc</command> command coming with OpenJDK 8 has
195 become much stricter than before regarding the conformance of the
196 Javadoc comments in source code to HTML. The FOP documentation does
197 not meet those standard, so the conformance checks have to be
198 disabled. This can be done with the following command:
199 </para>
200
201<screen><userinput>sed -i '\@&lt;/javad@i\
202&lt;arg value="-Xdoclint:none"/&gt;\
203&lt;arg value="--allow-script-in-comments"/&gt;' fop/build.xml</userinput></screen>
204
205 <para>
206 The stack size set in <filename>build.xml</filename> for building the
207 hyphenation patterns is not enough. Change it by running:
208 </para>
209
210<screen><userinput>sed -e '/hyph\.stack/s/512k/1M/' \
211 -i fop/build.xml</userinput></screen>
212 <para>
213 Then, compile <application>fop</application> by running the
214 following commands:
215 </para>
216
217<screen><userinput>cd fop &amp;&amp;
218export LC_ALL=en_US.UTF-8 &amp;&amp;
219
220ant compile &amp;&amp;
221ant jar-main &amp;&amp;
222ant jar-hyphenation &amp;&amp;
223ant javadocs &amp;&amp;
224mv build/javadocs .</userinput></screen>
225
226 <para>
227 To test the application, first modify <filename>build.xml</filename>
228 so that tests do not stop when an error is encountered:
229 </para>
230
231<screen><userinput>sed -e '/haltonfailure/s/yes/off/' \
232 -i build.xml</userinput></screen>
233
234 <para>
235 Then, run <command>ant junit</command>. The hyphenation tests will
236 fail if OFFO hyphenation has not been compiled. To see a list of other
237 test targets, use <command>ant -p</command>. You must run the tests
238 from an X-window using a GL-aware <application>Xorg</application>
239 server or some of the <application>JUnit</application> tests will hang.
240 </para>
241
242 <para>
243 Now, as the <systemitem class="username">root</systemitem> user:
244 </para>
245
246<screen role="root"><userinput>install -v -d -m755 -o root -g root /opt/fop-&fop-version; &amp;&amp;
247cp -v ../{KEYS,LICENSE,NOTICE,README} /opt/fop-&fop-version; &amp;&amp;
248cp -vR build conf examples fop* javadocs lib /opt/fop-&fop-version; &amp;&amp;
249chmod a+x /opt/fop-&fop-version;/fop &amp;&amp;
250
251ln -v -sfn fop-&fop-version; /opt/fop</userinput></screen>
252
253 </sect3>
254
255 </sect2>
256
257 <sect2 role="commands">
258 <title>Command Explanations</title>
259
260 <para>
261 <command>sed -i ... build.xml</command>: This adds two switches to the
262 <command>javadoc</command> command, preventing some errors to occur when
263 building the documentation.
264 </para>
265
266 <para>
267 <command>export LC_ALL=en_US.UTF-8</command>: the compiler fails if using
268 an ASCII locale.
269 </para>
270
271 <para>
272 <command>ant <option>target</option></command>: This reads the file
273 <filename>build.xml</filename> and builds the target: <option>compile
274 </option> compiles the java sources, <option>jar-main</option> generates
275 jar archives, <option>jar-hyphenation</option> generates the hyphenation
276 patterns for FOP, and <option>javadocs</option> builds the documentation.
277 </para>
278
279 <para>
280 <command>ln -v -sf fop-&fop-version; /opt/fop</command>: This is
281 optional and creates a convenience symlink so that
282 <envar>$FOP_HOME</envar> doesn't have to be changed each time there's a
283 package version change.
284 </para>
285
286 </sect2>
287
288 <sect2 role="configuration">
289 <title>Configuring fop</title>
290
291 <sect3 id="fop-config">
292 <title>Config Files</title>
293
294 <para>
295 <filename>~/.foprc</filename>
296 </para>
297
298 <indexterm zone="fop fop-config">
299 <primary sortas="e-AA.foprc">~/.foprc</primary>
300 </indexterm>
301
302 </sect3>
303
304 <sect3>
305 <title>Configuration Information</title>
306
307 <para>
308 Using <application>fop</application> to process some large FO's
309 (including the FO derived from the BLFS XML sources), can lead to
310 memory errors. Unless you add a parameter to the
311 <command>java</command> command used in the <command>fop</command>
312 script you may receive messages similar to the one shown below:
313 </para>
314
315 <para>
316 <computeroutput>
317 Exception in thread "main" java.lang.OutOfMemoryError: Java heap
318 space
319 </computeroutput>
320 </para>
321
322 <para>
323 To avoid errors like this, you need to pass an extra parameter to
324 the <command>java</command> command used in the <command>fop</command>
325 script. This can be accomplished by creating a
326 <filename>~/.foprc</filename> (which is sourced by the
327 <command>fop</command> script) and adding the parameter to the
328 <envar>FOP_OPTS</envar> environment variable.
329 </para>
330
331 <para>
332 The <command>fop</command> script looks for a
333 <envar>FOP_HOME</envar> environment variable to locate the
334 <application>fop</application> class libraries. You can create this
335 variable using the <filename>~/.foprc</filename> file as well. Create
336 a <filename>~/.foprc</filename> file using the following commands:
337 </para>
338
339<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
340<literal>FOP_OPTS="-Xmx<replaceable>&lt;RAM_Installed&gt;</replaceable>m"
341FOP_HOME="/opt/fop"</literal>
342EOF</userinput></screen>
343
344 <para>
345 Replace <replaceable>&lt;RAM_Installed&gt;</replaceable> with a
346 number representing the amount of RAM installed in your computer (in
347 megabytes). An example would be
348 <userinput>FOP_OPTS="-Xmx768m"</userinput>.
349 <!-- the URL is broken
350 For more information about
351 memory issues running <application>fop</application>, see
352 <ulink url="http://xml.apache.org/fop/running.html#memory"/>.
353 -->
354 </para>
355
356 <para>
357 To include the <command>fop</command> script in your path,
358 update your personal or system-wide profile with the following:
359 </para>
360
361<screen><literal>PATH=$PATH:/opt/fop</literal></screen>
362
363 <note>
364 <para>
365 Running <command>fop</command> can be somewhat verbose.
366 The default logging level can be changed from INFO to any of
367 FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, ALL, or OFF.
368 To do this, edit
369 <filename>$JAVA_HOME/jre/lib/logging.properties</filename> and change
370 the entries for <option>.level</option> and
371 <option>java.util.logging.ConsoleHandler.level</option> to
372 the desired value.
373 </para>
374 </note>
375
376 </sect3>
377
378 </sect2>
379
380 <sect2 role="content">
381 <title>Contents</title>
382
383 <segmentedlist>
384 <segtitle>Installed Programs</segtitle>
385 <segtitle>Installed Libraries</segtitle>
386 <segtitle>Installed Directory</segtitle>
387
388 <seglistitem>
389 <seg>fop</seg>
390 <seg>fop.jar and numerous support library classes located in
391 <filename class='directory'>/opt/fop/{build,lib}</filename>; JAI
392 components include libmlib_jai.so, jai_codec.jar, jai_core.jar, and
393 mlibwrapper_jai.jar</seg>
394 <seg>/opt/fop-&fop-version;</seg>
395 </seglistitem>
396 </segmentedlist>
397
398 <variablelist>
399 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
400 <?dbfo list-presentation="list"?>
401 <?dbhtml list-presentation="table"?>
402
403 <varlistentry id="fop-prog">
404 <term><command>fop</command></term>
405 <listitem>
406 <para>is a wrapper script to the <command>java</command> command
407 which sets up the <application>fop</application>
408 environment and passes the required parameters.</para>
409 <indexterm zone="fop fop-prog">
410 <primary sortas="b-fop">fop</primary>
411 </indexterm>
412 </listitem>
413 </varlistentry>
414
415 <varlistentry id="fop.jar">
416 <term><filename class='libraryfile'>fop.jar</filename></term>
417 <listitem>
418 <para>contains all the <application>fop</application>
419 <application>Java</application> classes.</para>
420 <indexterm zone="fop fop.jar">
421 <primary sortas="c-fop.jar">fop.jar</primary>
422 </indexterm>
423 </listitem>
424 </varlistentry>
425
426 </variablelist>
427
428 </sect2>
429
430</sect1>
Note: See TracBrowser for help on using the repository browser.