source: pst/ps/fop.xml@ d4277d4

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 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 d4277d4 was d4277d4, checked in by Randy McMurchy <randy@…>, 18 years ago

Removed the piping of 'yes' commands from the installation of the packages containing Sun license agreements (JDK binary, FOP and FreeTTS) and instead provided a note to reference the text about automating builds

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

  • Property mode set to 100644
File size: 15.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY fop-download-http "http://www.apache.org/dist/xml/fop/fop-&fop-version;-src.tar.gz">
8 <!ENTITY fop-download-ftp "ftp://apache.mirrors.pair.com/xml/fop/source/fop-&fop-version;-src.tar.gz">
9 <!ENTITY fop-md5sum "1a31eb1357e5d4b8d32d4cb3edae2da2">
10 <!ENTITY fop-size "7.8 MB">
11 <!ENTITY fop-buildsize "45.3 MB">
12 <!ENTITY fop-time "0.25 SBU">
13
14 <!ENTITY jai-download "http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&amp;PartDetailId=jai-1_1_2_01-oth-JPR&amp;SiteId=JSC&amp;TransactionId=noreg">
15 <!ENTITY jai-md5sum "f2be3619a8d002eff3874355e96327eb">
16 <!ENTITY jai-size "2.6 MB">
17]>
18
19<sect1 id="fop" xreflabel="FOP-&fop-version;">
20 <?dbhtml filename="fop.html"?>
21
22 <sect1info>
23 <othername>$LastChangedBy$</othername>
24 <date>$Date$</date>
25 <keywordset>
26 <keyword role="package">fop-&fop-version;-src.tar</keyword>
27 <keyword role="ftpdir">fop</keyword>
28 </keywordset>
29 </sect1info>
30
31 <title>FOP-&fop-version;</title>
32
33 <indexterm zone="fop">
34 <primary sortas="a-FOP">FOP</primary>
35 </indexterm>
36
37 <sect2 role="package">
38 <title>Introduction to FOP</title>
39
40 <para>The <application>FOP</application> (Formatting Objects Processor)
41 package contains a print formatter driven by XSL formatting objects
42 (XSL-FO). It is a <application>Java</application> application that reads
43 a formatting object tree and renders the resulting pages to a specified
44 output. Output formats currently supported include PDF, PCL, PostScript,
45 SVG, XML (area tree representation), print, AWT, MIF and ASCII text. The
46 primary output target is PDF.</para>
47
48 <bridgehead renderas="sect3">Package Information</bridgehead>
49 <itemizedlist spacing="compact">
50 <listitem>
51 <para>Download (HTTP): <ulink url="&fop-download-http;"/></para>
52 </listitem>
53 <listitem>
54 <para>Download (FTP): <ulink url="&fop-download-ftp;"/></para>
55 </listitem>
56 <listitem>
57 <para>Download MD5 sum: &fop-md5sum;</para>
58 </listitem>
59 <listitem>
60 <para>Download size: &fop-size;</para>
61 </listitem>
62 <listitem>
63 <para>Estimated disk space required: &fop-buildsize;</para>
64 </listitem>
65 <listitem>
66 <para>Estimated build time: &fop-time;</para>
67 </listitem>
68 </itemizedlist>
69
70 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
71
72 <itemizedlist spacing="compact">
73 <title>Required package</title>
74 <listitem>
75 <para><application>Java</application> Advanced Imaging (JAI) API
76 components: <ulink url="&jai-download;">
77 http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&amp;</ulink>
78 <ulink url="&jai-download;">
79 PartDetailId=jai-1_1_2_01-oth-JPR&amp;SiteId=JSC&amp;TransactionId=noreg</ulink>
80 </para>
81 </listitem>
82 <listitem>
83 <para>Download MD5 sum: &jai-md5sum;</para>
84 </listitem>
85 <listitem>
86 <para>Download size: &jai-size;</para>
87 </listitem>
88 </itemizedlist>
89
90 <para>Choose the <quote><application>Linux</application>
91 <application>JDK</application> Install</quote> file after
92 accepting the license agreement.</para>
93
94 <itemizedlist spacing='compact'>
95 <title>Required patch</title>
96 <listitem>
97 <para><ulink
98 url="&patch-root;/fop-&fop-version;-jdk_1.5.0-1.patch"/></para>
99 </listitem>
100 </itemizedlist>
101
102 <bridgehead renderas="sect3">FOP Dependencies</bridgehead>
103
104 <bridgehead renderas="sect4">Required</bridgehead>
105 <para role="required"><xref linkend="jdk"/></para>
106
107 <bridgehead renderas="sect4">Optional</bridgehead>
108 <para role="optional"><xref linkend="libxslt"/>,
109 <ulink url="http://java.sun.com/products/jimi/">JIMI SDK</ulink>,
110 <ulink url="http://xml.apache.org/batik/">Batik</ulink> and
111 <ulink url="http://forrest.apache.org/">Forrest</ulink> (only used to rebuild
112 the documentation)</para>
113
114 </sect2>
115
116 <sect2 role="installation">
117 <title>Installation of FOP</title>
118
119 <note>
120 <para>Ensure <envar>$JAVA_HOME</envar> is set correctly before beginning
121 the build.</para>
122 </note>
123
124 <para>Some versions of tar will display a message similar to
125 <quote><computeroutput>tar: A lone zero block at 33476</computeroutput></quote>
126 when unpacking the source tarball. You may safely ignore this message.</para>
127
128 <sect3>
129 <title>Installing JAI</title>
130
131 <tip>
132 <para>The
133 <command>$FOP_BUILD_DIR/../jai-1_1_2_01-lib-linux-i586-jdk.bin</command>
134 command below installs the JAI components in the JDK tree. You will be
135 required to view, and then accept (by entering a <keycap>y</keycap>
136 keypress), a license agreement before the installation will continue.
137 If you are scripting (automating) the build, you'll need to account for
138 this. There is information about automating build commands in the
139 <xref linkend="automating-builds"/> section of Chapter 2. Towards the
140 end of this section, specific information for automating this type of
141 installation is discussed.</para>
142 </tip>
143
144 <para>Install the JAI components by running the following commands as
145 the <systemitem class="username">root</systemitem> user while in the
146 root of the <application>FOP</application> source tree:</para>
147
148<screen role="root"><userinput>sed -i 's/tail +122/tail -n +122/' \
149 ../jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
150chmod 755 ../jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
151FOP_BUILD_DIR=$(pwd) &amp;&amp;
152cd $JAVA_HOME &amp;&amp;
153$FOP_BUILD_DIR/../jai-1_1_2_01-lib-linux-i586-jdk.bin &amp;&amp;
154cd $FOP_BUILD_DIR</userinput></screen>
155
156 </sect3>
157
158 <sect3>
159 <title>Installing FOP required components</title>
160
161 <para>Install <application>FOP</application> by running the
162 following commands:</para>
163
164<screen><userinput>patch -Np1 -i ../fop-&fop-version;-jdk_1.5.0-1.patch &amp;&amp;
165./build.sh &amp;&amp;
166sed -i "s/build/lib/" fop.sh</userinput></screen>
167
168 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
169
170<screen role="root"><userinput>install -v -d -m755 \
171 /opt/fop-&fop-version;/{bin,lib,docs/{general,lib,site}} &amp;&amp;
172install -v -m755 fop.sh /opt/fop-&fop-version;/bin &amp;&amp;
173install -v -m644 build/fop.jar lib/avalon-framework-cvs-20020806.jar \
174 /opt/fop-&fop-version;/lib &amp;&amp;
175install -v -m644 docs/* /opt/fop-&fop-version;/docs &amp;&amp;
176install -v -m644 CHANGES LICENSE README ReleaseNotes.html STATUS \
177 /opt/fop-&fop-version;/docs/general &amp;&amp;
178install -v -m644 lib/{avalon.LICENSE.txt,readme} \
179 /opt/fop-&fop-version;/docs/lib &amp;&amp;
180cp -v -R build/site/* /opt/fop-&fop-version;/docs/site &amp;&amp;
181ln -svf fop-&fop-version; /opt/fop</userinput></screen>
182
183 </sect3>
184
185 <sect3>
186 <title>Installing the Batik JAR</title>
187
188 <para>You'll need to install one additional <application>Java</application>
189 class library to process SVG objects. This library is part of the
190 <ulink url="http://xml.apache.org/batik/">Batik</ulink> package, but is
191 also included with the <application>FOP</application> package. If you
192 have <application>Batik</application> installed, ensure the
193 <filename>batik.jar</filename> library is included in your
194 <envar>$CLASSPATH</envar> environment variable. Alternatively, create a
195 symbolic link from <filename>/opt/fop-&fop-version;/lib/batik.jar</filename>
196 pointing to the full path of the installed <filename>batik.jar</filename>
197 file so that the <command>fop.sh</command> script will automatically pick it
198 up.</para>
199
200 <para>If you don't have the <application>Batik</application> package
201 installed, run the following commands as the <systemitem
202 class="username">root</systemitem> user:</para>
203
204<screen role="root"><userinput>install -v -m644 lib/batik.jar /opt/fop-&fop-version;/lib &amp;&amp;
205install -v -m644 lib/batik.LICENSE.txt \
206 /opt/fop-&fop-version;/docs/lib</userinput></screen>
207
208 </sect3>
209
210 <sect3>
211 <title>Installing the Xalan-Java components</title>
212
213 <para>The components of <application>FOP</application> required to
214 process FO files created by an XSL transformation engine (also known
215 as an XSLT processor) is now complete. An XSL transformation engine
216 (<command>xsltproc</command>) is included with the
217 <xref linkend="libxslt"/> package in BLFS. The
218 <application>FOP</application> package includes components of
219 <ulink url="http://xml.apache.org/xalan-j/">Xalan-Java</ulink> to
220 accomplish XSL transformations. If you have the
221 <application>Xalan-Java</application> package installed, skip to
222 the next section.</para>
223
224 <para>If you wish to install the <application>Xalan-Java</application>
225 components provided by the <application>FOP</application>
226 package, run the following commands as the <systemitem
227 class="username">root</systemitem> user:</para>
228
229<screen role="root"><userinput>sed -i "s/build/lib/" xalan.sh &amp;&amp;
230install -v -m755 xalan.sh /opt/fop-&fop-version;/bin &amp;&amp;
231install -v -m644 lib/xml-apis.jar \
232 lib/xercesImpl-2.2.1.jar \
233 lib/xalan-2.4.1.jar \
234 /opt/fop-&fop-version;/lib &amp;&amp;
235install -v -m644 lib/{xml-apis,xerces,xalan}.LICENSE.txt \
236 lib/xml-apis.README.txt \
237 /opt/fop-&fop-version;/docs/lib</userinput></screen>
238
239 </sect3>
240
241 <sect3>
242 <title>Installing the Jimi SDK JAR</title>
243
244 <para>If you installed the Java Image I/O class library
245 (<application>Jimi SDK</application>) into the
246 <application>FOP</application> source tree
247 <filename class='directory'>lib</filename> directory before building
248 <application>FOP</application> (this will enable Jimi
249 support), ensure you also install this JAR file into
250 <filename class='directory'>/opt/fop-&fop-version;/lib</filename>.</para>
251
252 </sect3>
253
254 </sect2>
255
256 <sect2 role="commands">
257 <title>Command Explanations</title>
258
259 <para><command>sed -i 's/tail +122/tail -n +122/' ...</command>:
260 The <application>JAI</application> binary file has a <command>tail</command>
261 command imbedded in the file which uses obsolete syntax and causes the
262 file to not unpack correctly. This command fixes the obsolete
263 syntax.</para>
264
265 <para><command>$FOP_BUILD_DIR/../jai-...-jdk.bin</command>: This
266 command installs the <application>JAI</application> components
267 into the <application>JDK</application> file structure.
268 <envar>$FOP_BUILD_DIR</envar> is used as a reference point to the source
269 executable and as a method to return back to the
270 <application>FOP</application> source tree.</para>
271
272 <para><command>sed -i "s/build/lib/" ...</command>: These commands modify
273 the installed shell scripts so that the location of the installed
274 <filename>fop.jar</filename> file is correctly identified.</para>
275
276 <para><command>install -v ...; cp -v ...</command>: There is no installation
277 script provided by the <application>FOP</application>
278 package. These commands install the package.</para>
279
280 <para><command>ln -svf fop-&fop-version; /opt/fop</command>: This creates a
281 convenience symlink so that <envar>$FOP_HOME</envar> doesn't have to be
282 changed each time there's a package version change.</para>
283
284 </sect2>
285
286 <sect2 role="configuration">
287 <title>Configuring FOP</title>
288
289 <sect3 id="fop-config">
290 <title>Config Files</title>
291
292 <para><filename>~/.foprc</filename></para>
293
294 <indexterm zone="fop fop-config">
295 <primary sortas="e-AA.foprc">~/.foprc</primary>
296 </indexterm>
297
298 </sect3>
299
300 <sect3>
301 <title>Configuration Information</title>
302
303 <para>Using <application>FOP</application> to process some large FO's
304 (including the FO derived from the BLFS XML sources), can lead to memory
305 errors. Unless you add a parameter to the <command>java</command> command
306 used in the <command>fop.sh</command> script you may receive messages
307 similar to the one shown below:</para>
308
309 <para><computeroutput>Exception in thread "main" java.lang.OutOfMemoryError:
310 Java heap space</computeroutput></para>
311
312 <para>To avoid errors like this, you need to pass an extra parameter to the
313 <command>java</command> command used in the <command>fop.sh</command> script.
314 This can be accomplished by creating a <filename>~/.foprc</filename> (which
315 is sourced by the <command>fop.sh</command> script) and adding the parameter
316 to the <envar>FOP_OPTS</envar> environment variable.</para>
317
318 <para>The <command>fop.sh</command> script looks for a
319 <envar>FOP_HOME</envar> environment variable to locate the
320 <application>FOP</application> class libraries. You can create this
321 variable using the <filename>~/.foprc</filename> file as well. Create
322 a <filename>~/.foprc</filename> file using the following commands:</para>
323
324<screen><userinput>cat &gt; ~/.foprc &lt;&lt; "EOF"
325<literal>FOP_OPTS="-Xmx<replaceable>[RAM_Installed]</replaceable>m"
326FOP_HOME="/opt/fop"</literal>
327
328EOF</userinput></screen>
329
330 <para>Replace <replaceable>[RAM_Installed]</replaceable> with a number
331 representing the amount of RAM installed in your computer. An example would
332 be <userinput>FOP_OPTS="-Xmx768m"</userinput>. For more information about
333 memory issues running <application>FOP</application>, see
334 <ulink url="http://xml.apache.org/fop/running.html#memory"/>.</para>
335
336 <para>To include the <command>fop.sh</command> script in your path, update
337 your personal or system-wide profile with the following:</para>
338
339<screen><literal>PATH=$PATH:/opt/fop/bin</literal></screen>
340
341 </sect3>
342
343 </sect2>
344
345 <sect2 role="content">
346 <title>Contents</title>
347
348 <segmentedlist>
349 <segtitle>Installed Programs</segtitle>
350 <segtitle>Installed Libraries</segtitle>
351 <segtitle>Installed Directory</segtitle>
352
353 <seglistitem>
354 <seg>fop.sh and xalan.sh</seg>
355 <seg>avalon-framework-cvs-20020806.jar, batik.jar, fop.jar,
356 xalan-2.4.1.jar, xercesImpl-2.2.1.jar, and xml-apis.jar. JAI components
357 include libmlib_jai.so, jai_codec.jar, jai_core.jar, and
358 mlibwrapper_jai.jar</seg>
359 <seg>/opt/fop-&fop-version;</seg>
360 </seglistitem>
361 </segmentedlist>
362
363 <variablelist>
364 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
365 <?dbfo list-presentation="list"?>
366 <?dbhtml list-presentation="table"?>
367
368 <varlistentry id="fop.sh">
369 <term><command>fop.sh</command></term>
370 <listitem>
371 <para>is a wrapper script to the <command>java</command> command
372 which sets up the <application>FOP</application>
373 environment and passes the required parameters.</para>
374 <indexterm zone="fop fop.sh">
375 <primary sortas="b-fop.sh">fop.sh</primary>
376 </indexterm>
377 </listitem>
378 </varlistentry>
379
380 <varlistentry id="fop.jar">
381 <term><filename class='libraryfile'>fop.jar</filename></term>
382 <listitem>
383 <para>contains all the <application>FOP</application>
384 <application>Java</application> classes.</para>
385 <indexterm zone="fop fop.jar">
386 <primary sortas="c-fop.jar">fop.jar</primary>
387 </indexterm>
388 </listitem>
389 </varlistentry>
390
391 </variablelist>
392
393 </sect2>
394
395</sect1>
Note: See TracBrowser for help on using the repository browser.