source: pst/ps/fop.xml@ 8159f350

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 8159f350 was 8159f350, checked in by Randy McMurchy <randy@…>, 14 years ago

Modified the dependencies for the FOP package and updated the hyphenation patterns

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

  • Property mode set to 100644
File size: 17.1 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 "http://archive.apache.org/dist/xmlgraphics/fop/source/fop-&fop-version;-src.tar.gz">
8 <!-- <!ENTITY fop-download-ftp "ftp://apache.mirrors.pair.com/xmlgraphics/fop/fop-&fop-version;-src.tar.gz"> -->
9 <!ENTITY fop-download-ftp "&sources-anduin-ftp;/f/fop-&fop-version;-src.tar.gz">
10 <!ENTITY fop-md5sum "58593e6c86be17d7dc03c829630fd152">
11 <!ENTITY fop-size "13.1 MB">
12 <!ENTITY fop-buildsize "356 MB">
13 <!ENTITY fop-time "1.4 SBU">
14
15 <!ENTITY jai-version "1_1_3">
16 <!ENTITY jai-download "http://download.java.net/media/jai/builds/release/&jai-version;/jai-&jai-version;-lib-linux-i586-jdk.bin">
17 <!ENTITY jai-md5sum "a63b661c4940582aa1679233e5f518b2">
18 <!ENTITY jai-size "3.4 MB">
19
20 <!ENTITY offo-download "&sourceforge-repo;/offo/offo-hyphenation_v1.2.zip">
21 <!ENTITY offo-md5sum "b2e64872ab0b5e6ada1d37778f8a1935">
22 <!ENTITY offo-size "378 KB">
23]>
24
25<sect1 id="fop" xreflabel="FOP-&fop-version;">
26 <?dbhtml filename="fop.html"?>
27
28 <sect1info>
29 <othername>$LastChangedBy$</othername>
30 <date>$Date$</date>
31 </sect1info>
32
33 <title>FOP-&fop-version;</title>
34
35 <indexterm zone="fop">
36 <primary sortas="a-FOP">FOP</primary>
37 </indexterm>
38
39 <sect2 role="package">
40 <title>Introduction to FOP</title>
41
42 <para>The <application>FOP</application> (Formatting Objects Processor)
43 package contains a print formatter driven by XSL formatting objects
44 (XSL-FO). It is a <application>Java</application> application that reads
45 a formatting object tree and renders the resulting pages to a specified
46 output. Output formats currently supported include PDF, PCL, PostScript,
47 SVG, XML (area tree representation), print, AWT, MIF and ASCII text. The
48 primary output target is PDF.</para>
49
50 <bridgehead renderas="sect3">Package Information</bridgehead>
51 <itemizedlist spacing="compact">
52 <listitem>
53 <para>Download (HTTP): <ulink url="&fop-download-http;"/></para>
54 </listitem>
55 <listitem>
56 <para>Download (FTP): <ulink url="&fop-download-ftp;"/></para>
57 </listitem>
58 <listitem>
59 <para>Download MD5 sum: &fop-md5sum;</para>
60 </listitem>
61 <listitem>
62 <para>Download size: &fop-size;</para>
63 </listitem>
64 <listitem>
65 <para>Estimated disk space required: &fop-buildsize;</para>
66 </listitem>
67 <listitem>
68 <para>Estimated build time: &fop-time;</para>
69 </listitem>
70 </itemizedlist>
71
72 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
73
74 <itemizedlist spacing="compact">
75 <title>Required packages</title>
76 <listitem>
77 <para>Objects for Formatting Objects (OFFO) hyphenation patterns:
78 <simplelist>
79 <member><ulink url="&offo-download;"/></member>
80 <member>&offo-md5sum;</member>
81 <member>&offo-size;</member>
82 </simplelist>
83 </para>
84 </listitem>
85 <listitem>
86 <para>Java Advanced Imaging (JAI) API components:
87 <simplelist>
88 <member><ulink url="&jai-download;"/></member>
89 <member>&jai-md5sum;</member>
90 <member>&jai-size;</member>
91 </simplelist>
92 </para>
93 </listitem>
94 </itemizedlist>
95
96 <!-- <itemizedlist spacing='compact'>
97 <title>Required patch</title>
98 <listitem>
99 <para><ulink
100 url="&patch-root;/fop-&fop-version;-jdk_1.5.0-1.patch"/></para>
101 </listitem>
102 </itemizedlist> -->
103
104 <bridgehead renderas="sect3">FOP Dependencies</bridgehead>
105
106 <bridgehead renderas="sect4">Required</bridgehead>
107 <para role="required"><xref linkend="xorg7"/>,
108 <xref linkend="apache-ant"/>, and
109 <ulink url="http://java.sun.com/javase/technologies/desktop/media/jai/">Java
110 Advanced Imaging (JAI) API components</ulink></para>
111
112 <bridgehead renderas="sect4">Optional</bridgehead>
113 <para role="optional"><ulink url="http://java.sun.com/products/jimi/">JIMI SDK</ulink>,
114 <ulink url="http://xmlunit.sourceforge.net/">XMLUnit</ulink>, and
115 <ulink url="http://forrest.apache.org/">Forrest</ulink> (only used to rebuild
116 the documentation)</para>
117
118 <para condition="html" role="usernotes">User Notes:
119 <ulink url="&blfs-wiki;/fop"/></para>
120
121 </sect2>
122
123 <sect2 role="installation">
124 <title>Installation of FOP</title>
125
126 <para>You must run this installation from an X-window using a GL-aware
127 Xorg server or some of the JUnit tests will hang. Using an X-window from
128 the console is the preferred method.</para>
129
130 <para>Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
131 the build. To build the <application>JIMI SDK</application> and/or
132 <application>XMLUnit</application> extension classes, ensure the
133 corresponding <filename class='extension'>.jar</filename> files are
134 identified in the <envar>CLASSPATH</envar> environment variable.</para>
135
136 <!-- <para>Some versions of tar will display a message similar to
137 <quote><computeroutput>tar: A lone zero block at 33476</computeroutput></quote>
138 when unpacking the source tarball. You may safely ignore this message.</para> -->
139
140 <sect3>
141 <title>Installing OFFO Hyphenation Patterns</title>
142
143 <para>Before beginning the build, unpack the
144 <application>FOP</application> source tarball and the hyphenation zipfile
145 from the same directory, then change directories into the root of the
146 <application>FOP</application> source tree. The XML Hyphenation patterns
147 will be copied into the <application>FOP</application> source tree by
148 running the following commands:</para>
149
150<screen><userinput>cp ../offo-hyphenation/hyph/* hyph &amp;&amp;
151rm -rf ../offo-hyphenation</userinput></screen>
152
153 </sect3>
154
155 <sect3>
156 <title>Installing JAI</title>
157
158 <tip>
159 <para>The <command>$FOP_PKG_DIR/jai-&jai-version;-lib-linux-i586-jdk.bin</command>
160 command below installs the JAI components in the JDK tree. You will be
161 required to view, and then accept (by entering a <keycap>y</keycap>
162 keypress), a license agreement before the installation will continue.
163 If you are scripting (automating) the build, you'll need to account for
164 this. There is information about automating build commands in the
165 <xref linkend="automating-builds"/> section of Chapter 2. Towards the
166 end of this section, specific information for automating this type of
167 installation is discussed.</para>
168 </tip>
169
170 <para>Install the JAI components by running the following commands as
171 the <systemitem class="username">root</systemitem> user while in the
172 root of the <application>FOP</application> source tree:</para>
173
174<!-- JAI make tail +nnn only for SunOS now
175<screen role="root"><userinput>install -m755 ../jai-&jai-version;-lib-linux-i586-jdk.bin JAI.bin &amp;&amp;
176sed -i 's/tail +122/tail -n +122/' JAI.bin &amp;&amp;
177-->
178<screen role="root"><userinput>FOP_PKG_DIR=$(pwd)/.. &amp;&amp;
179pushd $JAVA_HOME &amp;&amp;
180sh $FOP_PKG_DIR/jai-&jai-version;-lib-linux-i586-jdk.bin &amp;&amp;
181popd</userinput></screen>
182
183 </sect3>
184
185 <sect3>
186 <title>Installing FOP Components</title>
187
188 <para>In case of not having <application>forrest</application> installed, remove
189 a reference to it in the build.xml:</para>
190<screen><userinput>sed -i -e "s/all,javadocs,docs/all,javadocs/" \
191 -e '\#${dist.bin.result.dir}/docs#,\#&lt;/copy&gt;#d' build.xml</userinput></screen>
192
193 <para>Compile <application>FOP</application> by running the
194 following commands:</para>
195
196<screen><userinput>ant dist</userinput></screen>
197
198 <para>The unit regression tests were performed in the build step
199 above.</para>
200
201 <para>Now install FOP as the <systemitem class="username">root</systemitem> user:</para>
202
203<screen role="root"><userinput>install -v -d -m755 /opt/fop-&fop-version; &amp;&amp;
204pushd dist-bin/fop-&fop-version; &amp;&amp;
205cp -v -R * /opt/fop-&fop-version; &amp;&amp;
206popd &amp;&amp;
207ln -v -sf fop-&fop-version; /opt/fop</userinput></screen>
208
209 </sect3>
210
211 <!-- <sect3>
212 <title>Installing the Batik JAR</title>
213
214 <para>You'll need to install one additional <application>Java</application>
215 class library to process SVG objects. This library is part of the
216 <ulink url="http://xml.apache.org/batik/">Batik</ulink> package, but is
217 also included with the <application>FOP</application> package. If you
218 have <application>Batik</application> installed, ensure the
219 <filename>batik.jar</filename> library is included in your
220 <envar>$CLASSPATH</envar> environment variable. Alternatively, create a
221 symbolic link from <filename>/opt/fop-&fop-version;/lib/batik.jar</filename>
222 pointing to the full path of the installed <filename>batik.jar</filename>
223 file so that the <command>fop.sh</command> script will automatically pick it
224 up.</para>
225
226 <para>If you don't have the <application>Batik</application> package
227 installed, run the following commands as the <systemitem
228 class="username">root</systemitem> user:</para>
229
230<screen role="root"><userinput>install -v -m644 lib/batik.jar /opt/fop-&fop-version;/lib &amp;&amp;
231install -v -m644 lib/batik.LICENSE.txt \
232 /opt/fop-&fop-version;/docs/lib</userinput></screen>
233
234 </sect3>
235
236 <sect3>
237 <title>Installing the Xalan-Java components</title>
238
239 <para>The components of <application>FOP</application> required to
240 process FO files created by an XSL transformation engine (also known
241 as an XSLT processor) is now complete. An XSL transformation engine
242 (<command>xsltproc</command>) is included with the
243 <xref linkend="libxslt"/> package in BLFS. The
244 <application>FOP</application> package includes components of
245 <ulink url="http://xml.apache.org/xalan-j/">Xalan-Java</ulink> to
246 accomplish XSL transformations. If you have the
247 <application>Xalan-Java</application> package installed, skip to
248 the next section.</para>
249
250 <para>If you wish to install the <application>Xalan-Java</application>
251 components provided by the <application>FOP</application>
252 package, run the following commands as the <systemitem
253 class="username">root</systemitem> user:</para>
254
255<screen role="root"><userinput>sed -i "s/build/lib/" xalan.sh &amp;&amp;
256install -v -m755 xalan.sh /opt/fop-&fop-version;/bin &amp;&amp;
257install -v -m644 lib/xml-apis.jar \
258 lib/xercesImpl-2.2.1.jar \
259 lib/xalan-2.4.1.jar \
260 /opt/fop-&fop-version;/lib &amp;&amp;
261install -v -m644 lib/{xml-apis,xerces,xalan}.LICENSE.txt \
262 lib/xml-apis.README.txt \
263 /opt/fop-&fop-version;/docs/lib</userinput></screen>
264
265 </sect3>
266
267 <sect3>
268 <title>Installing the Jimi SDK JAR</title>
269
270 <para>If you installed the Java Image I/O class library
271 (<application>Jimi SDK</application>) into the
272 <application>FOP</application> source tree
273 <filename class='directory'>lib</filename> directory before building
274 <application>FOP</application> (this will enable Jimi
275 support), ensure you also install this JAR file into
276 <filename class='directory'>/opt/fop-&fop-version;/lib</filename>.</para>
277
278 </sect3> -->
279
280 </sect2>
281
282 <sect2 role="commands">
283 <title>Command Explanations</title>
284
285 <para><command>FOP_PKG_DIR=$(pwd)/..</command>: Assuming that the source packages
286 are stored one level above of the current working directory. This is the allways default - but
287 may be different because of personal tast. Change this to match the directory where the
288 FOP tarball can be found.</para>
289
290 <para><command>sh $FOP_PKG_DIR/jai-&jai-version;-lib-linux-i586-jdk.bin</command>: This
291 command installs the <application>JAI</application> components
292 into the <application>JDK</application> file structure.
293 <envar>$FOP_PKG_DIR</envar> is used as a reference point to the source
294 executable.</para>
295
296 <!-- <para><command>sed -i "s/build/lib/" ...</command>: These commands modify
297 the installed shell scripts so that the location of the installed
298 <filename>fop.jar</filename> file is correctly identified.</para> -->
299
300 <!-- <para><command>install -v ...; cp -v ...</command>: There is no installation
301 script provided by the <application>FOP</application>
302 package. These commands install the package.</para> -->
303
304 <para><command>ant dist</command>: This reads the <filename>build.xml</filename>
305 file and performs the <option>dist</option> target which builds the
306 package and runs the unit regression tests. It also creates the Java API documentation
307 and a directory where the newly created binaries are placed into. This directory is
308 used to install <application>FOP</application> to its final place.</para>
309
310 <para><command>ln -v -sf fop-&fop-version; /opt/fop</command>: This is
311 optional and creates a convenience symlink so that <envar>$FOP_HOME</envar>
312 doesn't have to be changed each time there's a package version change.</para>
313
314 </sect2>
315
316 <sect2 role="configuration">
317 <title>Configuring FOP</title>
318
319 <sect3 id="fop-config">
320 <title>Config Files</title>
321
322 <para><filename>~/.foprc</filename></para>
323
324 <indexterm zone="fop fop-config">
325 <primary sortas="e-AA.foprc">~/.foprc</primary>
326 </indexterm>
327
328 </sect3>
329
330 <sect3>
331 <title>Configuration Information</title>
332
333 <para>Using <application>FOP</application> to process some large FO's
334 (including the FO derived from the BLFS XML sources), can lead to memory
335 errors. Unless you add a parameter to the <command>java</command> command
336 used in the <command>fop</command> script you may receive messages
337 similar to the one shown below:</para>
338
339 <para><computeroutput>Exception in thread "main" java.lang.OutOfMemoryError:
340 Java heap space</computeroutput></para>
341
342 <para>To avoid errors like this, you need to pass an extra parameter to
343 the <command>java</command> command used in the <command>fop</command>
344 script. This can be accomplished by creating a
345 <filename>~/.foprc</filename> (which is sourced by the
346 <command>fop</command> script) and adding the parameter to the
347 <envar>FOP_OPTS</envar> environment variable.</para>
348
349 <para>The <command>fop</command> script looks for a
350 <envar>FOP_HOME</envar> environment variable to locate the
351 <application>FOP</application> class libraries. You can create this
352 variable using the <filename>~/.foprc</filename> file as well. Create
353 a <filename>~/.foprc</filename> file using the following commands:</para>
354
355<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
356<literal>FOP_OPTS="-Xmx<replaceable>&lt;RAM_Installed&gt;</replaceable>m"
357FOP_HOME="/opt/fop"</literal>
358
359EOF</userinput></screen>
360
361 <para>Replace <replaceable>&lt;RAM_Installed&gt;</replaceable> with a
362 number representing the amount of RAM installed in your computer (in
363 megabytes). An example would be
364 <userinput>FOP_OPTS="-Xmx768m"</userinput>. For more information about
365 memory issues running <application>FOP</application>, see
366 <ulink url="http://xml.apache.org/fop/running.html#memory"/>.</para>
367
368 <para>To include the <command>fop</command> script in your path,
369 update your personal or system-wide profile with the following:</para>
370
371<screen><literal>PATH=$PATH:/opt/fop</literal></screen>
372
373 </sect3>
374
375 </sect2>
376
377 <sect2 role="content">
378 <title>Contents</title>
379
380 <segmentedlist>
381 <segtitle>Installed Programs</segtitle>
382 <segtitle>Installed Libraries</segtitle>
383 <segtitle>Installed Directory</segtitle>
384
385 <seglistitem>
386 <seg>fop</seg>
387 <seg>fop.jar and numerous support library classes located in
388 <filename class='directory'>/opt/fop/{build,lib}</filename>; JAI
389 components include libmlib_jai.so, jai_codec.jar, jai_core.jar, and
390 mlibwrapper_jai.jar</seg>
391 <seg>/opt/fop-&fop-version;</seg>
392 </seglistitem>
393 </segmentedlist>
394
395 <variablelist>
396 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
397 <?dbfo list-presentation="list"?>
398 <?dbhtml list-presentation="table"?>
399
400 <varlistentry id="fop-prog">
401 <term><command>fop</command></term>
402 <listitem>
403 <para>is a wrapper script to the <command>java</command> command
404 which sets up the <application>FOP</application>
405 environment and passes the required parameters.</para>
406 <indexterm zone="fop fop-prog">
407 <primary sortas="b-fop">fop</primary>
408 </indexterm>
409 </listitem>
410 </varlistentry>
411
412 <varlistentry id="fop.jar">
413 <term><filename class='libraryfile'>fop.jar</filename></term>
414 <listitem>
415 <para>contains all the <application>FOP</application>
416 <application>Java</application> classes.</para>
417 <indexterm zone="fop fop.jar">
418 <primary sortas="c-fop.jar">fop.jar</primary>
419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 </variablelist>
424
425 </sect2>
426
427</sect1>
Note: See TracBrowser for help on using the repository browser.