[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[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 |
|
---|
[869e0090] | 7 | <!ENTITY pcre-download-http "https://ftp.pcre.org/pub/pcre/pcre-&pcre-version;.tar.bz2">
|
---|
| 8 | <!ENTITY pcre-download-ftp "ftp://ftp.pcre.org/pub/pcre/pcre-&pcre-version;.tar.bz2">
|
---|
[3e9d756] | 9 | <!ENTITY pcre-md5sum "cf7326204cc46c755b5b2608033d9d24">
|
---|
[7de152b] | 10 | <!ENTITY pcre-size "1.5 MB">
|
---|
[3e9d756] | 11 | <!ENTITY pcre-buildsize "20 MB (with tests)">
|
---|
[041db65] | 12 | <!ENTITY pcre-time "0.3 SBU (with tests)">
|
---|
[52d29f7] | 13 | ]>
|
---|
| 14 |
|
---|
[9d0cd203] | 15 | <sect1 id="pcre" xreflabel="PCRE-&pcre-version;">
|
---|
[469ad5d0] | 16 | <?dbhtml filename="pcre.html"?>
|
---|
[4c3474fe] | 17 |
|
---|
[469ad5d0] | 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
[4c3474fe] | 22 |
|
---|
[469ad5d0] | 23 | <title>PCRE-&pcre-version;</title>
|
---|
[4c3474fe] | 24 |
|
---|
[469ad5d0] | 25 | <indexterm zone="pcre">
|
---|
| 26 | <primary sortas="a-PCRE">PCRE</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to PCRE</title>
|
---|
[4c3474fe] | 31 |
|
---|
[ea16306] | 32 | <para>
|
---|
| 33 | The <application>PCRE</application> package contains
|
---|
| 34 | <application>Perl</application> Compatible Regular Expression
|
---|
| 35 | libraries. These are useful for implementing regular expression
|
---|
| 36 | pattern matching using the same syntax and semantics as
|
---|
| 37 | <application>Perl</application> 5.
|
---|
| 38 | </para>
|
---|
[4c3474fe] | 39 |
|
---|
[72592375] | 40 | &lfs10_checked;
|
---|
[7f4cdbc0] | 41 |
|
---|
[469ad5d0] | 42 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 43 | <itemizedlist spacing="compact">
|
---|
| 44 | <listitem>
|
---|
[ea16306] | 45 | <para>
|
---|
| 46 | Download (HTTP): <ulink url="&pcre-download-http;"/>
|
---|
| 47 | </para>
|
---|
| 48 | </listitem>
|
---|
[469ad5d0] | 49 | <listitem>
|
---|
[ea16306] | 50 | <para>
|
---|
| 51 | Download (FTP): <ulink url="&pcre-download-ftp;"/>
|
---|
| 52 | </para>
|
---|
[469ad5d0] | 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
[ea16306] | 55 | <para>
|
---|
| 56 | Download MD5 sum: &pcre-md5sum;
|
---|
| 57 | </para>
|
---|
[469ad5d0] | 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
[ea16306] | 60 | <para>
|
---|
| 61 | Download size: &pcre-size;
|
---|
| 62 | </para>
|
---|
[469ad5d0] | 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
[ea16306] | 65 | <para>
|
---|
| 66 | Estimated disk space required: &pcre-buildsize;
|
---|
| 67 | </para>
|
---|
[469ad5d0] | 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
[ea16306] | 70 | <para>
|
---|
| 71 | Estimated build time: &pcre-time;
|
---|
| 72 | </para>
|
---|
[469ad5d0] | 73 | </listitem>
|
---|
| 74 | </itemizedlist>
|
---|
[1c8a9c9d] | 75 |
|
---|
[33a9814] | 76 | <bridgehead renderas="sect3">PCRE Dependencies</bridgehead>
|
---|
| 77 |
|
---|
| 78 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 79 | <para role="optional">
|
---|
[f1607a4] | 80 | <xref linkend="valgrind"/>
|
---|
[33a9814] | 81 | </para>
|
---|
| 82 |
|
---|
[1039de3] | 83 | <para condition="html" role="usernotes">User Notes:
|
---|
[ea16306] | 84 | <ulink url="&blfs-wiki;/pcre"/>
|
---|
| 85 | </para>
|
---|
[469ad5d0] | 86 | </sect2>
|
---|
[4c3474fe] | 87 |
|
---|
[469ad5d0] | 88 | <sect2 role="installation">
|
---|
| 89 | <title>Installation of PCRE</title>
|
---|
| 90 |
|
---|
[ea16306] | 91 | <para>
|
---|
| 92 | Install <application>PCRE</application> by running
|
---|
| 93 | the following commands:
|
---|
| 94 | </para>
|
---|
| 95 |
|
---|
[2086c106] | 96 | <screen><userinput>./configure --prefix=/usr \
|
---|
[ea16306] | 97 | --docdir=/usr/share/doc/pcre-&pcre-version; \
|
---|
[500d604a] | 98 | --enable-unicode-properties \
|
---|
[0eba16e] | 99 | --enable-pcre16 \
|
---|
| 100 | --enable-pcre32 \
|
---|
[500d604a] | 101 | --enable-pcregrep-libz \
|
---|
| 102 | --enable-pcregrep-libbz2 \
|
---|
[839ac504] | 103 | --enable-pcretest-libreadline \
|
---|
[500d604a] | 104 | --disable-static &&
|
---|
[469ad5d0] | 105 | make</userinput></screen>
|
---|
[4fa8bf55] | 106 |
|
---|
[ea16306] | 107 | <para>
|
---|
| 108 | To test the results, issue: <command>make check</command>.
|
---|
| 109 | </para>
|
---|
[4c3474fe] | 110 |
|
---|
[ea16306] | 111 | <para>
|
---|
| 112 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 113 | </para>
|
---|
[4c3474fe] | 114 |
|
---|
[500d604a] | 115 | <screen role="root"><userinput>make install &&
|
---|
[ea16306] | 116 | mv -v /usr/lib/libpcre.so.* /lib &&
|
---|
[0eba16e] | 117 | ln -sfv ../../lib/$(readlink /usr/lib/libpcre.so) /usr/lib/libpcre.so</userinput></screen>
|
---|
[e959f37] | 118 |
|
---|
[469ad5d0] | 119 | </sect2>
|
---|
[4c3474fe] | 120 |
|
---|
[469ad5d0] | 121 | <sect2 role="commands">
|
---|
| 122 | <title>Command Explanations</title>
|
---|
| 123 |
|
---|
[ea16306] | 124 | <para>
|
---|
[4edb9a6] | 125 | <parameter>--enable-unicode-properties</parameter>: This switch enables
|
---|
[e81d71b] | 126 | Unicode properties support and includes the code for handling UTF-8/16/32
|
---|
[4edb9a6] | 127 | character strings in the library. You need this switch if you are going to
|
---|
| 128 | build <xref linkend="glib2"/> with the
|
---|
[ea16306] | 129 | <parameter>--with-pcre=system</parameter> switch.
|
---|
| 130 | </para>
|
---|
| 131 |
|
---|
[0eba16e] | 132 | <para>
|
---|
[4edb9a6] | 133 | <parameter>--enable-pcre16</parameter>: This switch enables 16 bit
|
---|
[0eba16e] | 134 | character support.
|
---|
| 135 | </para>
|
---|
| 136 |
|
---|
| 137 | <para>
|
---|
[4edb9a6] | 138 | <parameter>--enable-pcre32</parameter>: This switch enables 32 bit
|
---|
[0eba16e] | 139 | character support.
|
---|
| 140 | </para>
|
---|
| 141 |
|
---|
[ea16306] | 142 | <para>
|
---|
[4edb9a6] | 143 | <parameter>--enable-pcregrep-libz</parameter>: This switch adds
|
---|
[ea16306] | 144 | support to <command>pcregrep</command> to read
|
---|
| 145 | <filename class="extension">.gz</filename> compressed files.
|
---|
| 146 | </para>
|
---|
| 147 |
|
---|
| 148 | <para>
|
---|
[4edb9a6] | 149 | <parameter>--enable-pcregrep-libbz2</parameter>: This switch adds
|
---|
[ea16306] | 150 | support to <command>pcregrep</command> to read
|
---|
| 151 | <filename class="extension">.bz2</filename> compressed files.
|
---|
| 152 | </para>
|
---|
| 153 |
|
---|
[839ac504] | 154 | <para>
|
---|
[4edb9a6] | 155 | <parameter>--enable-pcretest-libreadline</parameter>: This switch adds line
|
---|
[839ac504] | 156 | editing and history features to <command>pcretest</command> program.
|
---|
| 157 | </para>
|
---|
| 158 |
|
---|
[ea16306] | 159 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 160 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 161 |
|
---|
| 162 | <para>
|
---|
[500d604a] | 163 | <command>mv -v /usr/lib/libpcre.so.* /lib</command>: Moves the
|
---|
[ea16306] | 164 | <application>PCRE</application> library on the root filesystem
|
---|
| 165 | so that it is available in case <command>grep</command>
|
---|
| 166 | gets reinstalled with <application>PCRE</application> support.
|
---|
| 167 | </para>
|
---|
| 168 |
|
---|
[d86a91f] | 169 | <para>
|
---|
| 170 | <option>--enable-jit</option>: this option enables Just-in-time
|
---|
| 171 | compiling, which can greatly speed up pattern matching.
|
---|
| 172 | </para>
|
---|
| 173 |
|
---|
[469ad5d0] | 174 | </sect2>
|
---|
[4c3474fe] | 175 |
|
---|
[469ad5d0] | 176 | <sect2 role="content">
|
---|
| 177 | <title>Contents</title>
|
---|
| 178 |
|
---|
| 179 | <segmentedlist>
|
---|
| 180 | <segtitle>Installed Programs</segtitle>
|
---|
| 181 | <segtitle>Installed Libraries</segtitle>
|
---|
[4c288b0] | 182 | <segtitle>Installed Directory</segtitle>
|
---|
[4c3474fe] | 183 |
|
---|
[469ad5d0] | 184 | <seglistitem>
|
---|
[ea16306] | 185 | <seg>
|
---|
[041db65] | 186 | pcregrep, pcretest, and pcre-config
|
---|
[ea16306] | 187 | </seg>
|
---|
| 188 | <seg>
|
---|
[0eba16e] | 189 | libpcre.so, libpcre16.so, libpcre32.so,
|
---|
| 190 | libpcrecpp.so and libpcreposix.so
|
---|
[ea16306] | 191 | </seg>
|
---|
| 192 | <seg>
|
---|
| 193 | /usr/share/doc/pcre-&pcre-version;
|
---|
| 194 | </seg>
|
---|
[469ad5d0] | 195 | </seglistitem>
|
---|
| 196 | </segmentedlist>
|
---|
[4c3474fe] | 197 |
|
---|
[469ad5d0] | 198 | <variablelist>
|
---|
| 199 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 200 | <?dbfo list-presentation="list"?>
|
---|
| 201 | <?dbhtml list-presentation="table"?>
|
---|
[4c3474fe] | 202 |
|
---|
[469ad5d0] | 203 | <varlistentry id="pcregrep">
|
---|
| 204 | <term><command>pcregrep</command></term>
|
---|
| 205 | <listitem>
|
---|
[ea16306] | 206 | <para>
|
---|
| 207 | is a <command>grep</command> that understands
|
---|
| 208 | <application>Perl</application> compatible regular expressions.
|
---|
| 209 | </para>
|
---|
[469ad5d0] | 210 | <indexterm zone="pcre pcregrep">
|
---|
| 211 | <primary sortas="b-pcregrep">pcregrep</primary>
|
---|
| 212 | </indexterm>
|
---|
| 213 | </listitem>
|
---|
| 214 | </varlistentry>
|
---|
[4c3474fe] | 215 |
|
---|
[469ad5d0] | 216 | <varlistentry id="pcretest">
|
---|
| 217 | <term><command>pcretest</command></term>
|
---|
| 218 | <listitem>
|
---|
[ea16306] | 219 | <para>
|
---|
| 220 | can test a <application>Perl</application> compatible
|
---|
| 221 | regular expression.
|
---|
| 222 | </para>
|
---|
[469ad5d0] | 223 | <indexterm zone="pcre pcretest">
|
---|
| 224 | <primary sortas="b-pcretest">pcretest</primary>
|
---|
| 225 | </indexterm>
|
---|
| 226 | </listitem>
|
---|
| 227 | </varlistentry>
|
---|
[4c3474fe] | 228 |
|
---|
[469ad5d0] | 229 | <varlistentry id="pcre-config">
|
---|
| 230 | <term><command>pcre-config</command></term>
|
---|
| 231 | <listitem>
|
---|
[ea16306] | 232 | <para>
|
---|
| 233 | is used during the compile process of programs linking to
|
---|
| 234 | the <application>PCRE</application> libraries.
|
---|
| 235 | </para>
|
---|
[469ad5d0] | 236 | <indexterm zone="pcre pcre-config">
|
---|
| 237 | <primary sortas="b-pcre-config">pcre-config</primary>
|
---|
| 238 | </indexterm>
|
---|
| 239 | </listitem>
|
---|
| 240 | </varlistentry>
|
---|
[ea16306] | 241 |
|
---|
[469ad5d0] | 242 | </variablelist>
|
---|
[ea16306] | 243 |
|
---|
[469ad5d0] | 244 | </sect2>
|
---|
[ea16306] | 245 |
|
---|
[f45b1953] | 246 | </sect1>
|
---|