source: general/genlib/libxml2.xml@ 42f164e

12.2 lazarus trunk
Last change on this file since 42f164e was a995fe0, checked in by Bruce Dubbs <bdubbs@…>, 4 weeks ago

Update libxml2 patch.

  • Property mode set to 100644
File size: 9.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 <!-- Also update the download, md5, size entities in libxml2py2.xml -->
8 <!ENTITY libxml2-download-http "https://download.gnome.org/sources/libxml2/2.13/libxml2-&libxml2-version;.tar.xz">
9<!-- <!ENTITY libxml2-download-http "http://xmlsoft.org/sources/libxml2-&libxml2-version;.tar.xz">-->
10 <!ENTITY libxml2-download-ftp " ">
11 <!ENTITY libxml2-md5sum "aeb92dc58cea91c95a10751327193a11">
12 <!ENTITY libxml2-size "2.5 MB">
13 <!ENTITY libxml2-buildsize "111 MB (with tests)">
14 <!ENTITY libxml2-time "0.4 SBU (Using parallelism=4; with tests)">
15 <!ENTITY testsuite-version "20130923">
16]>
17
18<sect1 id="libxml2" xreflabel="libxml2-&libxml2-version;">
19 <?dbhtml filename="libxml2.html"?>
20
21
22 <title>libxml2-&libxml2-version;</title>
23
24 <indexterm zone="libxml2">
25 <primary sortas="a-libxml2">libxml2</primary>
26 </indexterm>
27
28 <sect2 role="package">
29 <title>Introduction to libxml2</title>
30
31 <para>
32 The <application>libxml2</application> package contains libraries
33 and utilities used for parsing XML files.
34 </para>
35
36 &lfs122_checked;
37
38 <bridgehead renderas="sect3">Package Information</bridgehead>
39 <itemizedlist spacing="compact">
40 <listitem>
41 <para>
42 Download (HTTP): <ulink url="&libxml2-download-http;"/>
43 </para>
44 </listitem>
45 <listitem>
46 <para>
47 Download (FTP): <ulink url="&libxml2-download-ftp;"/>
48 </para>
49 </listitem>
50 <listitem>
51 <para>
52 Download MD5 sum: &libxml2-md5sum;
53 </para>
54 </listitem>
55 <listitem>
56 <para>
57 Download size: &libxml2-size;
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Estimated disk space required: &libxml2-buildsize;
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Estimated build time: &libxml2-time;
68 </para>
69 </listitem>
70 </itemizedlist>
71
72 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
73 <itemizedlist spacing="compact">
74 <listitem>
75 <para>
76 Required patch:
77 <ulink url="&patch-root;/libxml2-&libxml2-version;-upstream_fix-2.patch"/>
78 </para>
79 </listitem>
80 <listitem>
81 <para>
82 Optional Test Suite:
83 <ulink url="https://www.w3.org/XML/Test/xmlts&testsuite-version;.tar.gz"/> - This
84 enables <command>make check</command> to do complete testing.
85 </para>
86 </listitem>
87 </itemizedlist>
88
89 <bridgehead renderas="sect3">libxml2 Dependencies</bridgehead>
90
91 <bridgehead renderas="sect4">Recommended</bridgehead>
92 <para role="recommended">
93 <xref linkend="icu"/>
94 </para>
95
96 <bridgehead renderas="sect4">Optional</bridgehead>
97 <para role="optional">
98 <xref linkend="valgrind"/> (may be used in the tests)
99 </para>
100 </sect2>
101
102 <sect2 role="installation">
103 <title>Installation of libxml2</title>
104
105 <para>
106 At first, fix an issue causing <command>xmlcatalog</command> to emit
107 bogus warnings when a new catalog file is created. The patch will
108 modify the building system, so regenerate the building scripts after
109 applying the patch:
110 </para>
111
112 <screen><userinput>patch -Np1 -i ../libxml2-&libxml2-version;-upstream_fix-2.patch</userinput></screen>
113
114 <para>
115 Install <application>libxml2</application> by running the following
116 commands:
117 </para>
118
119<screen><userinput>./configure --prefix=/usr \
120 --sysconfdir=/etc \
121 --disable-static \
122 --with-history \
123 --with-icu \
124 PYTHON=/usr/bin/python3 \
125 --docdir=/usr/share/doc/libxml2-&libxml2-version; &amp;&amp;
126make</userinput></screen>
127
128 <para>
129 If you downloaded the test suite, issue the following command:
130 </para>
131
132<screen><userinput>tar xf ../xmlts&testsuite-version;.tar.gz</userinput></screen>
133
134 <para>
135 To test the results, issue: <command>make check &gt; check.log</command>.
136 This command will print several lines of error messages like
137 <quote><computeroutput>Failed to parse
138 xstc/...</computeroutput></quote> because some test files are missing
139 and these messages can be safely ignored.
140 A summary of the results can be obtained with <command>grep -E
141 '^Total|expected|Ran' check.log</command>. If <xref linkend="valgrind"/> is
142 installed and you want to check for memory leaks, replace
143 <command>check</command> with <command>check-valgrind</command>.
144 </para>
145
146 <note>
147 <para>
148 The tests use <ulink url="http://localhost/">http://localhost/</ulink>
149 to test parsing of external entities. If the machine where you run the
150 tests serves as a web site, the tests may hang, depending on the
151 content of the file served. It is therefore recommended to shut down
152 the server during the tests, as the <systemitem
153 class="username">root</systemitem> user:
154 </para>
155
156<screen role="nodump" revision="sysv"><userinput>/etc/init.d/httpd stop</userinput></screen>
157<screen role="nodump" revision="systemd"><userinput>systemctl stop httpd.service</userinput></screen>
158
159 </note>
160
161 <para>
162 Now, as the <systemitem class="username">root</systemitem> user:
163 </para>
164
165<screen role="root"><userinput>make install</userinput></screen>
166
167 <para>
168 Finally, prevent some packages from unnecessarily linking to ICU using
169 the following commands as the &root; user:
170 </para>
171
172<screen role="root"><userinput>rm -vf /usr/lib/libxml2.la &amp;&amp;
173sed '/libs=/s/xml2.*/xml2"/' -i /usr/bin/xml2-config</userinput></screen>
174
175 </sect2>
176
177 <sect2 role="commands">
178 <title>Command Explanations</title>
179
180 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
181 href="../../xincludes/static-libraries.xml"/>
182
183 <para>
184 <parameter>--with-history</parameter>: This switch enables
185 <application>Readline</application> support when running
186 <command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
187 </para>
188
189 <para>
190 <parameter>--with-icu</parameter>: This switch enables support for
191 <application>ICU</application>, which provides additional Unicode support.
192 This is needed for some packages in BLFS, such as for QtWebEngine.
193 </para>
194
195 <para>
196 <parameter>PYTHON=/usr/bin/python3</parameter>: Allows building
197 the libxml2 module with Python3 instead of Python2.
198 </para>
199
200<!--
201 <para>
202 <option>- -with-icu</option>: Add this switch if you have built
203 <xref linkend="icu"/>, for better unicode support.
204 </para>
205
206 <note>
207 <para>
208 If the <option>- -with-icu</option> switch is used, the BLFS editors
209 recommend removing unneeded references to the ICU libraries. This
210 will prevent many packages that use libxml2 from unnecessarily linking
211 to the ICU libraries. This, in turn, will prevent the need for
212 rebuilding many packages when upgrading ICU to a new major version.
213 After installing libxml2, as the &root; user, issue:
214 </para>
215
216<screen role="nodump"><userinput>rm -vf /usr/lib/libxml2.la &amp;&amp;
217sed '/libs=/s/xml2.*/xml2"/' -i /usr/bin/xml2-config</userinput></screen>
218 </note>
219-->
220
221 </sect2>
222
223 <sect2 role="content">
224 <title>Contents</title>
225
226 <segmentedlist>
227 <segtitle>Installed Programs</segtitle>
228 <segtitle>Installed Libraries</segtitle>
229 <segtitle>Installed Directories</segtitle>
230
231 <seglistitem>
232 <seg>
233 xml2-config,
234 xmlcatalog, and
235 xmllint
236 </seg>
237 <seg>
238 libxml2.so
239 </seg>
240 <seg>
241 /usr/include/libxml2,
242 /usr/lib/cmake/libxml2,
243 /usr/share/doc/libxml2-&libxml2-version;, and
244 /usr/share/gtk-doc/html/libxml2
245 </seg>
246 </seglistitem>
247 </segmentedlist>
248
249 <variablelist>
250 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
251 <?dbfo list-presentation="list"?>
252 <?dbhtml list-presentation="table"?>
253
254 <varlistentry id="xml2-config">
255 <term><command>xml2-config</command></term>
256 <listitem>
257 <para>
258 determines the compile and linker flags that should be used to
259 compile and link programs that use
260 <filename class="libraryfile">libxml2</filename>
261 </para>
262 <indexterm zone="libxml2 xml2-config">
263 <primary sortas="b-xml2-config">xml2-config</primary>
264 </indexterm>
265 </listitem>
266 </varlistentry>
267
268 <varlistentry id="xmlcatalog">
269 <term><command>xmlcatalog</command></term>
270 <listitem>
271 <para>
272 is used to monitor and manipulate XML and SGML catalogs
273 </para>
274 <indexterm zone="libxml2 xmlcatalog">
275 <primary sortas="b-xmlcatalog">xmlcatalog</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
279
280 <varlistentry id="xmllint">
281 <term><command>xmllint</command></term>
282 <listitem>
283 <para>
284 parses XML files and outputs reports (based upon options) to detect
285 errors in XML coding
286 </para>
287 <indexterm zone="libxml2 xmllint">
288 <primary sortas="b-xmllint">xmllint</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
292
293 <varlistentry id="libxml2-lib">
294 <term><filename class="libraryfile">libxml2.so</filename></term>
295 <listitem>
296 <para>
297 provides functions for programs to parse files that use the XML
298 format
299 </para>
300 <indexterm zone="libxml2 libxml2-lib">
301 <primary sortas="c-libxml2">libxml2.so</primary>
302 </indexterm>
303 </listitem>
304 </varlistentry>
305
306 </variablelist>
307
308 </sect2>
309
310</sect1>
Note: See TracBrowser for help on using the repository browser.