source: general/genlib/libxml2.xml

trunk
Last change on this file was 73f3b99, checked in by Thomas Trepl <thomas@…>, 6 weeks ago

Upgrade libxml2-2.12.6

  • Property mode set to 100644
File size: 9.4 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.12/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 "37fab9ace78d8a085af81dc9a19f36d9">
12 <!ENTITY libxml2-size "2.5 MB">
13 <!ENTITY libxml2-buildsize "103 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 &lfs121_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 Optional Test Suite:
77 <ulink url="https://www.w3.org/XML/Test/xmlts&testsuite-version;.tar.gz"/> - This
78 enables <command>make check</command> to do complete testing.
79 </para>
80 </listitem>
81 </itemizedlist>
82
83 <bridgehead renderas="sect3">libxml2 Dependencies</bridgehead>
84
85 <bridgehead renderas="sect4">Recommended</bridgehead>
86 <para role="recommended">
87 <xref linkend="icu"/>
88 </para>
89
90 <bridgehead renderas="sect4">Optional</bridgehead>
91 <para role="optional">
92 <xref linkend="valgrind"/> (may be used in the tests)
93 </para>
94 </sect2>
95
96 <sect2 role="installation">
97 <title>Installation of libxml2</title>
98
99 <para>
100 Install <application>libxml2</application> by running the following
101 commands:
102 </para>
103
104<screen><userinput>./configure --prefix=/usr \
105 --sysconfdir=/etc \
106 --disable-static \
107 --with-history \
108 --with-icu \
109 PYTHON=/usr/bin/python3 \
110 --docdir=/usr/share/doc/libxml2-&libxml2-version; &amp;&amp;
111make</userinput></screen>
112
113 <para>
114 If you downloaded the test suite, issue the following command:
115 </para>
116
117<screen><userinput>tar xf ../xmlts&testsuite-version;.tar.gz</userinput></screen>
118
119 <para>
120 To test the results, issue: <command>make check &gt; check.log</command>.
121 This command will print several lines of error messages like
122 <quote><computeroutput>Failed to parse
123 xstc/...</computeroutput></quote> because some test files are missing
124 and these messages can be safely ignored.
125 A summary of the results can be obtained with <command>grep -E
126 '^Total|expected|Ran' check.log</command>. If <xref linkend="valgrind"/> is
127 installed and you want to check for memory leaks, replace
128 <command>check</command> with <command>check-valgrind</command>.
129 </para>
130
131 <note>
132 <para>
133 The tests use <ulink url="http://localhost/">http://localhost/</ulink>
134 to test parsing of external entities. If the machine where you run the
135 tests serves as a web site, the tests may hang, depending on the
136 content of the file served. It is therefore recommended to shut down
137 the server during the tests, as the <systemitem
138 class="username">root</systemitem> user:
139 </para>
140
141<screen role="nodump" revision="sysv"><userinput>/etc/init.d/httpd stop</userinput></screen>
142<screen role="nodump" revision="systemd"><userinput>systemctl stop httpd.service</userinput></screen>
143
144 </note>
145
146 <para>
147 Now, as the <systemitem class="username">root</systemitem> user:
148 </para>
149
150<screen role="root"><userinput>make install</userinput></screen>
151
152 <para>
153 Finally, prevent some packages from unnecessarily linking to ICU using
154 the following commands as the &root; user:
155 </para>
156
157<screen role="root"><userinput>rm -vf /usr/lib/libxml2.la &amp;&amp;
158sed '/libs=/s/xml2.*/xml2"/' -i /usr/bin/xml2-config</userinput></screen>
159
160 </sect2>
161
162 <sect2 role="commands">
163 <title>Command Explanations</title>
164
165 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
166 href="../../xincludes/static-libraries.xml"/>
167
168 <para>
169 <parameter>--with-history</parameter>: This switch enables
170 <application>Readline</application> support when running
171 <command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
172 </para>
173
174 <para>
175 <parameter>--with-icu</parameter>: This switch enables support for
176 <application>ICU</application>, which provides additional Unicode support.
177 This is needed for some packages in BLFS, such as for QtWebEngine.
178 </para>
179
180 <para>
181 <parameter>PYTHON=/usr/bin/python3</parameter>: Allows building
182 the libxml2 module with Python3 instead of Python2.
183 </para>
184
185<!--
186 <para>
187 <option>- -with-icu</option>: Add this switch if you have built
188 <xref linkend="icu"/>, for better unicode support.
189 </para>
190
191 <note>
192 <para>
193 If the <option>- -with-icu</option> switch is used, the BLFS editors
194 recommend removing unneeded references to the ICU libraries. This
195 will prevent many packages that use libxml2 from unnecessarily linking
196 to the ICU libraries. This, in turn, will prevent the need for
197 rebuilding many packages when upgrading ICU to a new major version.
198 After installing libxml2, as the &root; user, issue:
199 </para>
200
201<screen role="nodump"><userinput>rm -vf /usr/lib/libxml2.la &amp;&amp;
202sed '/libs=/s/xml2.*/xml2"/' -i /usr/bin/xml2-config</userinput></screen>
203 </note>
204-->
205
206 </sect2>
207
208 <sect2 role="content">
209 <title>Contents</title>
210
211 <segmentedlist>
212 <segtitle>Installed Programs</segtitle>
213 <segtitle>Installed Libraries</segtitle>
214 <segtitle>Installed Directories</segtitle>
215
216 <seglistitem>
217 <seg>
218 xml2-config,
219 xmlcatalog, and
220 xmllint
221 </seg>
222 <seg>
223 libxml2.so
224 </seg>
225 <seg>
226 /usr/include/libxml2,
227 /usr/lib/cmake/libxml2,
228 /usr/share/doc/libxml2-&libxml2-version;, and
229 /usr/share/gtk-doc/html/libxml2
230 </seg>
231 </seglistitem>
232 </segmentedlist>
233
234 <variablelist>
235 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
236 <?dbfo list-presentation="list"?>
237 <?dbhtml list-presentation="table"?>
238
239 <varlistentry id="xml2-config">
240 <term><command>xml2-config</command></term>
241 <listitem>
242 <para>
243 determines the compile and linker flags that should be used to
244 compile and link programs that use
245 <filename class="libraryfile">libxml2</filename>
246 </para>
247 <indexterm zone="libxml2 xml2-config">
248 <primary sortas="b-xml2-config">xml2-config</primary>
249 </indexterm>
250 </listitem>
251 </varlistentry>
252
253 <varlistentry id="xmlcatalog">
254 <term><command>xmlcatalog</command></term>
255 <listitem>
256 <para>
257 is used to monitor and manipulate XML and SGML catalogs
258 </para>
259 <indexterm zone="libxml2 xmlcatalog">
260 <primary sortas="b-xmlcatalog">xmlcatalog</primary>
261 </indexterm>
262 </listitem>
263 </varlistentry>
264
265 <varlistentry id="xmllint">
266 <term><command>xmllint</command></term>
267 <listitem>
268 <para>
269 parses XML files and outputs reports (based upon options) to detect
270 errors in XML coding
271 </para>
272 <indexterm zone="libxml2 xmllint">
273 <primary sortas="b-xmllint">xmllint</primary>
274 </indexterm>
275 </listitem>
276 </varlistentry>
277
278 <varlistentry id="libxml2-lib">
279 <term><filename class="libraryfile">libxml2.so</filename></term>
280 <listitem>
281 <para>
282 provides functions for programs to parse files that use the XML
283 format
284 </para>
285 <indexterm zone="libxml2 libxml2-lib">
286 <primary sortas="c-libxml2">libxml2.so</primary>
287 </indexterm>
288 </listitem>
289 </varlistentry>
290
291 </variablelist>
292
293 </sect2>
294
295</sect1>
Note: See TracBrowser for help on using the repository browser.