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
RevLine 
[ab4fdfc]1<?xml version="1.0" encoding="UTF-8"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[52d29f7]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[382abcaf]7 <!-- Also update the download, md5, size entities in libxml2py2.xml -->
[13f97a40]8 <!ENTITY libxml2-download-http "https://download.gnome.org/sources/libxml2/2.13/libxml2-&libxml2-version;.tar.xz">
[b4282bdb]9<!-- <!ENTITY libxml2-download-http "http://xmlsoft.org/sources/libxml2-&libxml2-version;.tar.xz">-->
[1a699f7]10 <!ENTITY libxml2-download-ftp " ">
[2e31189]11 <!ENTITY libxml2-md5sum "aeb92dc58cea91c95a10751327193a11">
[0c73385b]12 <!ENTITY libxml2-size "2.5 MB">
[2e31189]13 <!ENTITY libxml2-buildsize "111 MB (with tests)">
[3c74fb72]14 <!ENTITY libxml2-time "0.4 SBU (Using parallelism=4; with tests)">
[6b262734]15 <!ENTITY testsuite-version "20130923">
[52d29f7]16]>
17
[f45b1953]18<sect1 id="libxml2" xreflabel="libxml2-&libxml2-version;">
[1515ed8a]19 <?dbhtml filename="libxml2.html"?>
[8e75f8b9]20
21
[437700ae]22 <title>libxml2-&libxml2-version;</title>
[8e75f8b9]23
[1515ed8a]24 <indexterm zone="libxml2">
[8180b89]25 <primary sortas="a-libxml2">libxml2</primary>
[1515ed8a]26 </indexterm>
27
28 <sect2 role="package">
[437700ae]29 <title>Introduction to libxml2</title>
[8e75f8b9]30
[325113f8]31 <para>
[8180b89]32 The <application>libxml2</application> package contains libraries
33 and utilities used for parsing XML files.
[325113f8]34 </para>
[8e75f8b9]35
[e375445]36 &lfs122_checked;
[7f4cdbc0]37
[1515ed8a]38 <bridgehead renderas="sect3">Package Information</bridgehead>
39 <itemizedlist spacing="compact">
40 <listitem>
[8180b89]41 <para>
42 Download (HTTP): <ulink url="&libxml2-download-http;"/>
43 </para>
[1515ed8a]44 </listitem>
45 <listitem>
[8180b89]46 <para>
47 Download (FTP): <ulink url="&libxml2-download-ftp;"/>
48 </para>
[1515ed8a]49 </listitem>
50 <listitem>
[8180b89]51 <para>
52 Download MD5 sum: &libxml2-md5sum;
53 </para>
[1515ed8a]54 </listitem>
55 <listitem>
[8180b89]56 <para>
57 Download size: &libxml2-size;
58 </para>
[1515ed8a]59 </listitem>
60 <listitem>
[8180b89]61 <para>
62 Estimated disk space required: &libxml2-buildsize;
63 </para>
[1515ed8a]64 </listitem>
65 <listitem>
[8180b89]66 <para>
67 Estimated build time: &libxml2-time;
68 </para>
[1515ed8a]69 </listitem>
70 </itemizedlist>
[8e75f8b9]71
[9a788838]72 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
[8180b89]73 <itemizedlist spacing="compact">
[d0c749c]74 <listitem>
[3175b9e]75 <para>
76 Required patch:
[a995fe0]77 <ulink url="&patch-root;/libxml2-&libxml2-version;-upstream_fix-2.patch"/>
[3175b9e]78 </para>
[d0c749c]79 </listitem>
[5da63eb]80 <listitem>
[325113f8]81 <para>
[48771ae]82 Optional Test Suite:
[c6b192c]83 <ulink url="https://www.w3.org/XML/Test/xmlts&testsuite-version;.tar.gz"/> - This
[325113f8]84 enables <command>make check</command> to do complete testing.
85 </para>
[5da63eb]86 </listitem>
[9a788838]87 </itemizedlist>
[5da63eb]88
[437700ae]89 <bridgehead renderas="sect3">libxml2 Dependencies</bridgehead>
[44b3f440]90
[ead4657]91 <bridgehead renderas="sect4">Recommended</bridgehead>
92 <para role="recommended">
93 <xref linkend="icu"/>
94 </para>
95
[60ddbaf]96 <bridgehead renderas="sect4">Optional</bridgehead>
97 <para role="optional">
[0b312a7]98 <xref linkend="valgrind"/> (may be used in the tests)
[325113f8]99 </para>
[1515ed8a]100 </sect2>
[8e75f8b9]101
[1515ed8a]102 <sect2 role="installation">
[437700ae]103 <title>Installation of libxml2</title>
[d0c749c]104
[3175b9e]105 <para>
[d0c749c]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:
[3175b9e]110 </para>
111
[a995fe0]112 <screen><userinput>patch -Np1 -i ../libxml2-&libxml2-version;-upstream_fix-2.patch</userinput></screen>
[d0c749c]113
[325113f8]114 <para>
115 Install <application>libxml2</application> by running the following
116 commands:
117 </para>
[1515ed8a]118
[f0505850]119<screen><userinput>./configure --prefix=/usr \
120 --sysconfdir=/etc \
121 --disable-static \
122 --with-history \
[ead4657]123 --with-icu \
[c78420c]124 PYTHON=/usr/bin/python3 \
[3f6cf45]125 --docdir=/usr/share/doc/libxml2-&libxml2-version; &amp;&amp;
[1515ed8a]126make</userinput></screen>
127
[d56e7df]128 <para>
[48771ae]129 If you downloaded the test suite, issue the following command:
[d56e7df]130 </para>
[6000a3e]131
132<screen><userinput>tar xf ../xmlts&testsuite-version;.tar.gz</userinput></screen>
133
[8180b89]134 <para>
[beee921]135 To test the results, issue: <command>make check &gt; check.log</command>.
[808f2b85]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.
[beee921]140 A summary of the results can be obtained with <command>grep -E
[808f2b85]141 '^Total|expected|Ran' check.log</command>. If <xref linkend="valgrind"/> is
[cbb1dd2]142 installed and you want to check for memory leaks, replace
[beee921]143 <command>check</command> with <command>check-valgrind</command>.
[8180b89]144 </para>
[8e75f8b9]145
[cf83ea8]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>
[0b312a7]160
[325113f8]161 <para>
162 Now, as the <systemitem class="username">root</systemitem> user:
163 </para>
[8e75f8b9]164
[1515ed8a]165<screen role="root"><userinput>make install</userinput></screen>
[ead4657]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
[1515ed8a]175 </sect2>
[8e75f8b9]176
[1515ed8a]177 <sect2 role="commands">
178 <title>Command Explanations</title>
179
[325113f8]180 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
181 href="../../xincludes/static-libraries.xml"/>
[0b312a7]182
[325113f8]183 <para>
[f48df219]184 <parameter>--with-history</parameter>: This switch enables
[325113f8]185 <application>Readline</application> support when running
186 <command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
187 </para>
[8180b89]188
[ead4657]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
[f48df219]195 <para>
[16f7f0e]196 <parameter>PYTHON=/usr/bin/python3</parameter>: Allows building
[6c6f393]197 the libxml2 module with Python3 instead of Python2.
[f48df219]198 </para>
199
[ead4657]200<!--
[ca25773c]201 <para>
[ead4657]202 <option>- -with-icu</option>: Add this switch if you have built
[ca25773c]203 <xref linkend="icu"/>, for better unicode support.
204 </para>
205
[f6061807]206 <note>
207 <para>
[ead4657]208 If the <option>- -with-icu</option> switch is used, the BLFS editors
[58acc3e]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:
[f6061807]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>
[ead4657]219-->
[f6061807]220
[1515ed8a]221 </sect2>
[8e75f8b9]222
[1515ed8a]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>
[8e75f8b9]230
[1515ed8a]231 <seglistitem>
[325113f8]232 <seg>
[8558044]233 xml2-config,
234 xmlcatalog, and
[6cd8a9a]235 xmllint
[325113f8]236 </seg>
237 <seg>
[6cd8a9a]238 libxml2.so
[325113f8]239 </seg>
240 <seg>
241 /usr/include/libxml2,
[ec91d9f2]242 /usr/lib/cmake/libxml2,
[6cd8a9a]243 /usr/share/doc/libxml2-&libxml2-version;, and
[325113f8]244 /usr/share/gtk-doc/html/libxml2
245 </seg>
[1515ed8a]246 </seglistitem>
247 </segmentedlist>
[8e75f8b9]248
[1515ed8a]249 <variablelist>
250 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
251 <?dbfo list-presentation="list"?>
252 <?dbhtml list-presentation="table"?>
[8e75f8b9]253
[1515ed8a]254 <varlistentry id="xml2-config">
255 <term><command>xml2-config</command></term>
256 <listitem>
[325113f8]257 <para>
258 determines the compile and linker flags that should be used to
259 compile and link programs that use
[4c24eb0a]260 <filename class="libraryfile">libxml2</filename>
[325113f8]261 </para>
[1515ed8a]262 <indexterm zone="libxml2 xml2-config">
263 <primary sortas="b-xml2-config">xml2-config</primary>
264 </indexterm>
265 </listitem>
266 </varlistentry>
[8e75f8b9]267
[1515ed8a]268 <varlistentry id="xmlcatalog">
269 <term><command>xmlcatalog</command></term>
270 <listitem>
[325113f8]271 <para>
[4c24eb0a]272 is used to monitor and manipulate XML and SGML catalogs
[325113f8]273 </para>
[1515ed8a]274 <indexterm zone="libxml2 xmlcatalog">
275 <primary sortas="b-xmlcatalog">xmlcatalog</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
[8e75f8b9]279
[1515ed8a]280 <varlistentry id="xmllint">
281 <term><command>xmllint</command></term>
282 <listitem>
[325113f8]283 <para>
284 parses XML files and outputs reports (based upon options) to detect
[4c24eb0a]285 errors in XML coding
[325113f8]286 </para>
[1515ed8a]287 <indexterm zone="libxml2 xmllint">
288 <primary sortas="b-xmllint">xmllint</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
[cd964c8]292
[1515ed8a]293 <varlistentry id="libxml2-lib">
[8180b89]294 <term><filename class="libraryfile">libxml2.so</filename></term>
[1515ed8a]295 <listitem>
[325113f8]296 <para>
297 provides functions for programs to parse files that use the XML
[4c24eb0a]298 format
[325113f8]299 </para>
[1515ed8a]300 <indexterm zone="libxml2 libxml2-lib">
[325113f8]301 <primary sortas="c-libxml2">libxml2.so</primary>
[1515ed8a]302 </indexterm>
303 </listitem>
304 </varlistentry>
[8180b89]305
[1515ed8a]306 </variablelist>
[8180b89]307
[1515ed8a]308 </sect2>
[8180b89]309
[f45b1953]310</sect1>
Note: See TracBrowser for help on using the repository browser.