source: general/genlib/libxml2.xml@ 2ecff2c5

12.2 gimp3 lazarus trunk xry111/for-12.3 xry111/spidermonkey128
Last change on this file since 2ecff2c5 was 09fa92ee, checked in by Xi Ruoyao <xry111@…>, 3 months ago

libxml2: Bump upstream fixes patch to -2

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