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