source: pst/ps/fop.xml@ 75d969ad

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gimp3 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/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 75d969ad 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
RevLine 
[634c636c]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[634c636c]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[4634c7a]7 <!ENTITY fop-download-http "https://archive.apache.org/dist/xmlgraphics/fop/source/fop-&fop-version;-src.tar.gz">
[75d53372]8 <!ENTITY fop-download-ftp " ">
[bf7a1821]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)">
[460e986]13
[50cc5ad]14 <!ENTITY jai-version "1_1_3">
[75d53372]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">
[50cc5ad]17 <!ENTITY jai-size "3.4 MB">
[492000e]18
[75d53372]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">
[bf7a1821]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">
[634c636c]25]>
26
[75d53372]27<sect1 id="fop" xreflabel="fop-&fop-version;">
[f570280]28 <?dbhtml filename="fop.html"?>
29
30 <sect1info>
31 <othername>$LastChangedBy$</othername>
32 <date>$Date$</date>
33 </sect1info>
34
[75d53372]35 <title>fop-&fop-version;</title>
[f570280]36
37 <indexterm zone="fop">
[75d53372]38 <primary sortas="a-fop">fop</primary>
[f570280]39 </indexterm>
40
41 <sect2 role="package">
[75d53372]42 <title>Introduction to fop</title>
[f570280]43
[6fe6db6]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>
[f570280]53
[e570555]54 &lfs80_checked;
[50929e8]55
[f570280]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">
[0ebd681c]80 <title>Recommended packages</title>
[cbfc7b61]81
[f570280]82 <listitem>
[492000e]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>
[f570280]89 </para>
90 </listitem>
[bf7a1821]91
[f570280]92 <listitem>
[75d53372]93 <para>Java Advanced Imaging (JAI) API components (architecture dependent):
[492000e]94 <simplelist>
[50cc5ad]95 <member><ulink url="&jai-download;"/></member>
[492000e]96 <member>&jai-md5sum;</member>
97 <member>&jai-size;</member>
98 </simplelist>
[6e994229]99 <literallayout>or</literallayout> <!-- Force some space -->
[75d53372]100 <simplelist>
101 <member><ulink url="&jai64-download;"/></member>
102 <member>&jai64-md5sum;</member>
103 <member>&jai64-size;</member>
104 </simplelist>
[492000e]105 </para>
[f570280]106 </listitem>
107 </itemizedlist>
[bf7a1821]108<!-- <itemizedlist spacing="compact">
[0ebd681c]109 <title>Required patch</title>
110 <listitem>
111 <para>
112 <ulink url="&patch-root;/fop-&fop-version;-listNPE-1.patch"/>
113 </para>
114 </listitem>
[bf7a1821]115 </itemizedlist>-->
[f570280]116
[75d53372]117 <bridgehead renderas="sect3">fop Dependencies</bridgehead>
[f570280]118
119 <bridgehead renderas="sect4">Required</bridgehead>
[75d53372]120 <para role="required">
121 <xref linkend="apache-ant"/>
122 </para>
[f570280]123
124 <bridgehead renderas="sect4">Optional</bridgehead>
[75d53372]125 <para role="optional">
[cbfc7b61]126 <xref linkend="junit"/> (to run tests),
[adf80ef]127 <xref linkend="x-window-system"/> (to run tests),
[bf7a1821]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. -->
[75d53372]135 </para>
[f570280]136
[977061b0]137 <para condition="html" role="usernotes">User Notes:
138 <ulink url="&blfs-wiki;/fop"/></para>
139
[f570280]140 </sect2>
141
142 <sect2 role="installation">
[75d53372]143 <title>Installation of fop</title>
[f570280]144
[6fe6db6]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>
[bf7a1821]152
[492000e]153 <sect3>
154 <title>Installing OFFO Hyphenation Patterns</title>
155
[6fe6db6]156 <para>
[bf7a1821]157 Copy the XML hyphenation patterns into the fop source tree by running
158 the following commands:
[6fe6db6]159 </para>
[492000e]160
[bf7a1821]161<screen><userinput>unzip ../offo-hyphenation.zip &amp;&amp;
162cp offo-hyphenation/hyph/* fop/hyph &amp;&amp;
163rm -rf offo-hyphenation</userinput></screen>
[492000e]164
165 </sect3>
[bf7a1821]166
[f570280]167 <sect3>
[75d53372]168 <title>Installing Java Advanced Imaging (JAI) API components</title>
169
[6fe6db6]170 <para>
171 Install the JAI API components. As the <systemitem
172 class="username">root</systemitem> user:
173 </para>
[75d53372]174
[c66063b]175<screen role="root"><userinput>case `uname -m` in
[0d7900a]176 i?86)
177 tar -xf ../jai-&jai-version;-lib-linux-i586.tar.gz
[75d53372]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
[0d7900a]182 x86_64)
183 tar -xf ../jai-&jai-version;-lib-linux-amd64.tar.gz
[75d53372]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>
[f570280]188 </sect3>
[634c636c]189
[f570280]190 <sect3>
[75d53372]191 <title>Installing fop Components</title>
[f570280]192
[6fe6db6]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
[ba7be716]201<screen><userinput>sed -i '\@&lt;/javad@i\
202&lt;arg value="-Xdoclint:none"/&gt;\
[bf7a1821]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>
[6fe6db6]209
[bf7a1821]210<screen><userinput>sed -e '/hyph\.stack/s/512k/1M/' \
211 -i fop/build.xml</userinput></screen>
[6fe6db6]212 <para>
213 Then, compile <application>fop</application> by running the
214 following commands:
215 </para>
[f570280]216
[bf7a1821]217<screen><userinput>cd fop &amp;&amp;
218export LC_ALL=en_US.UTF-8 &amp;&amp;
[9e3d18a7]219
[bf7a1821]220ant compile &amp;&amp;
221ant jar-main &amp;&amp;
222ant jar-hyphenation &amp;&amp;
223ant javadocs &amp;&amp;
[cbfc7b61]224mv build/javadocs .</userinput></screen>
225
[6fe6db6]226 <para>
[bf7a1821]227 To test the application, first modify <filename>build.xml</filename>
228 so that tests do not stop when an error is encountered:
[6fe6db6]229 </para>
[bf7a1821]230
231<screen><userinput>sed -e '/haltonfailure/s/yes/off/' \
232 -i build.xml</userinput></screen>
[cbfc7b61]233
[6fe6db6]234 <para>
[bf7a1821]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.
[6fe6db6]240 </para>
[d260aaf4]241
[6fe6db6]242 <para>
243 Now, as the <systemitem class="username">root</systemitem> user:
244 </para>
[d260aaf4]245
[2612183a]246<screen role="root"><userinput>install -v -d -m755 -o root -g root /opt/fop-&fop-version; &amp;&amp;
[bf7a1821]247cp -v ../{KEYS,LICENSE,NOTICE,README} /opt/fop-&fop-version; &amp;&amp;
[2612183a]248cp -vR build conf examples fop* javadocs lib /opt/fop-&fop-version; &amp;&amp;
[bf7a1821]249chmod a+x /opt/fop-&fop-version;/fop &amp;&amp;
[cbfc7b61]250
[bf7a1821]251ln -v -sfn fop-&fop-version; /opt/fop</userinput></screen>
[f570280]252
253 </sect3>
254
255 </sect2>
[634c636c]256
[f570280]257 <sect2 role="commands">
258 <title>Command Explanations</title>
259
[ba7be716]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>
[bf7a1821]267 <command>export LC_ALL=en_US.UTF-8</command>: the compiler fails if using
268 an ASCII locale.
[ba7be716]269 </para>
270
[6fe6db6]271 <para>
272 <command>ant <option>target</option></command>: This reads the file
[ba7be716]273 <filename>build.xml</filename> and builds the target: <option>compile
274 </option> compiles the java sources, <option>jar-main</option> generates
[bf7a1821]275 jar archives, <option>jar-hyphenation</option> generates the hyphenation
276 patterns for FOP, and <option>javadocs</option> builds the documentation.
[6fe6db6]277 </para>
[f570280]278
[6fe6db6]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>
[f570280]285
286 </sect2>
287
288 <sect2 role="configuration">
[75d53372]289 <title>Configuring fop</title>
[f570280]290
291 <sect3 id="fop-config">
292 <title>Config Files</title>
293
[6fe6db6]294 <para>
295 <filename>~/.foprc</filename>
296 </para>
[f570280]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
[6fe6db6]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>
[f570280]314
[6fe6db6]315 <para>
316 <computeroutput>
317 Exception in thread "main" java.lang.OutOfMemoryError: Java heap
318 space
319 </computeroutput>
320 </para>
[f570280]321
[6fe6db6]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>
[f570280]330
[6fe6db6]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>
[f570280]338
339<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
[977061b0]340<literal>FOP_OPTS="-Xmx<replaceable>&lt;RAM_Installed&gt;</replaceable>m"
[f570280]341FOP_HOME="/opt/fop"</literal>
342EOF</userinput></screen>
343
[6fe6db6]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 -->
[a754ee2b]354 </para>
[f570280]355
[6fe6db6]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>
[f570280]360
[492000e]361<screen><literal>PATH=$PATH:/opt/fop</literal></screen>
[f570280]362
[6fe6db6]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
[ba7be716]370 the entries for <option>.level</option> and
[6fe6db6]371 <option>java.util.logging.ConsoleHandler.level</option> to
372 the desired value.
373 </para>
374 </note>
[cbfc7b61]375
[f570280]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>
[492000e]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
[f570280]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
[492000e]403 <varlistentry id="fop-prog">
404 <term><command>fop</command></term>
[f570280]405 <listitem>
406 <para>is a wrapper script to the <command>java</command> command
[75d53372]407 which sets up the <application>fop</application>
[f570280]408 environment and passes the required parameters.</para>
[492000e]409 <indexterm zone="fop fop-prog">
410 <primary sortas="b-fop">fop</primary>
[f570280]411 </indexterm>
412 </listitem>
413 </varlistentry>
414
415 <varlistentry id="fop.jar">
416 <term><filename class='libraryfile'>fop.jar</filename></term>
417 <listitem>
[75d53372]418 <para>contains all the <application>fop</application>
[f570280]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.