[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 |
|
---|
[c297610] | 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">
|
---|
[83f6c770] | 10 | <!ENTITY pcre-md5sum "00aabbfe56d5a48b270f999b508c5ad2">
|
---|
[7de152b] | 11 | <!ENTITY pcre-size "1.5 MB">
|
---|
[83f6c770] | 12 | <!ENTITY pcre-buildsize "25 MB (with tests)">
|
---|
| 13 | <!ENTITY pcre-time "0.3 SBU (with tests)">
|
---|
[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 |
|
---|
[0928035] | 41 | &lfs79_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>
|
---|
[02d46cb] | 76 |
|
---|
[83f6c770] | 77 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 78 | <itemizedlist spacing='compact'>
|
---|
| 79 | <listitem>
|
---|
| 80 | <para>Required patch: <ulink
|
---|
| 81 | url="&patch-root;/pcre-&pcre-version;-upstream_fixes-1.patch"/></para>
|
---|
| 82 | </listitem>
|
---|
[02d46cb] | 83 | </itemizedlist>
|
---|
[4c3474fe] | 84 |
|
---|
[33a9814] | 85 | <bridgehead renderas="sect3">PCRE Dependencies</bridgehead>
|
---|
| 86 |
|
---|
| 87 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 88 | <para role="optional">
|
---|
[f1607a4] | 89 | <xref linkend="valgrind"/>
|
---|
[33a9814] | 90 | </para>
|
---|
| 91 |
|
---|
[1039de3] | 92 | <para condition="html" role="usernotes">User Notes:
|
---|
[ea16306] | 93 | <ulink url="&blfs-wiki;/pcre"/>
|
---|
| 94 | </para>
|
---|
[469ad5d0] | 95 | </sect2>
|
---|
[4c3474fe] | 96 |
|
---|
[469ad5d0] | 97 | <sect2 role="installation">
|
---|
| 98 | <title>Installation of PCRE</title>
|
---|
| 99 |
|
---|
[ea16306] | 100 | <para>
|
---|
| 101 | Install <application>PCRE</application> by running
|
---|
| 102 | the following commands:
|
---|
| 103 | </para>
|
---|
| 104 |
|
---|
[02d46cb] | 105 | <screen><userinput>patch -Np1 -i ../pcre-&pcre-version;-upstream_fixes-1.patch &&
|
---|
| 106 | ./configure --prefix=/usr \
|
---|
[ea16306] | 107 | --docdir=/usr/share/doc/pcre-&pcre-version; \
|
---|
[500d604a] | 108 | --enable-unicode-properties \
|
---|
[0eba16e] | 109 | --enable-pcre16 \
|
---|
| 110 | --enable-pcre32 \
|
---|
[500d604a] | 111 | --enable-pcregrep-libz \
|
---|
| 112 | --enable-pcregrep-libbz2 \
|
---|
[839ac504] | 113 | --enable-pcretest-libreadline \
|
---|
[500d604a] | 114 | --disable-static &&
|
---|
[469ad5d0] | 115 | make</userinput></screen>
|
---|
[4fa8bf55] | 116 |
|
---|
[ea16306] | 117 | <para>
|
---|
| 118 | To test the results, issue: <command>make check</command>.
|
---|
| 119 | </para>
|
---|
[4c3474fe] | 120 |
|
---|
[ea16306] | 121 | <para>
|
---|
| 122 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 123 | </para>
|
---|
[4c3474fe] | 124 |
|
---|
[500d604a] | 125 | <screen role="root"><userinput>make install &&
|
---|
[ea16306] | 126 | mv -v /usr/lib/libpcre.so.* /lib &&
|
---|
[0eba16e] | 127 | ln -sfv ../../lib/$(readlink /usr/lib/libpcre.so) /usr/lib/libpcre.so</userinput></screen>
|
---|
[e959f37] | 128 |
|
---|
[469ad5d0] | 129 | </sect2>
|
---|
[4c3474fe] | 130 |
|
---|
[469ad5d0] | 131 | <sect2 role="commands">
|
---|
| 132 | <title>Command Explanations</title>
|
---|
| 133 |
|
---|
[ea16306] | 134 | <para>
|
---|
[4edb9a6] | 135 | <parameter>--enable-unicode-properties</parameter>: This switch enables
|
---|
[e81d71b] | 136 | Unicode properties support and includes the code for handling UTF-8/16/32
|
---|
[4edb9a6] | 137 | character strings in the library. You need this switch if you are going to
|
---|
| 138 | build <xref linkend="glib2"/> with the
|
---|
[ea16306] | 139 | <parameter>--with-pcre=system</parameter> switch.
|
---|
| 140 | </para>
|
---|
| 141 |
|
---|
[0eba16e] | 142 | <para>
|
---|
[4edb9a6] | 143 | <parameter>--enable-pcre16</parameter>: This switch enables 16 bit
|
---|
[0eba16e] | 144 | character support.
|
---|
| 145 | </para>
|
---|
| 146 |
|
---|
| 147 | <para>
|
---|
[4edb9a6] | 148 | <parameter>--enable-pcre32</parameter>: This switch enables 32 bit
|
---|
[0eba16e] | 149 | character support.
|
---|
| 150 | </para>
|
---|
| 151 |
|
---|
[ea16306] | 152 | <para>
|
---|
[4edb9a6] | 153 | <parameter>--enable-pcregrep-libz</parameter>: This switch adds
|
---|
[ea16306] | 154 | support to <command>pcregrep</command> to read
|
---|
| 155 | <filename class="extension">.gz</filename> compressed files.
|
---|
| 156 | </para>
|
---|
| 157 |
|
---|
| 158 | <para>
|
---|
[4edb9a6] | 159 | <parameter>--enable-pcregrep-libbz2</parameter>: This switch adds
|
---|
[ea16306] | 160 | support to <command>pcregrep</command> to read
|
---|
| 161 | <filename class="extension">.bz2</filename> compressed files.
|
---|
| 162 | </para>
|
---|
| 163 |
|
---|
[839ac504] | 164 | <para>
|
---|
[4edb9a6] | 165 | <parameter>--enable-pcretest-libreadline</parameter>: This switch adds line
|
---|
[839ac504] | 166 | editing and history features to <command>pcretest</command> program.
|
---|
| 167 | </para>
|
---|
| 168 |
|
---|
[ea16306] | 169 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 170 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 171 |
|
---|
| 172 | <para>
|
---|
[500d604a] | 173 | <command>mv -v /usr/lib/libpcre.so.* /lib</command>: Moves the
|
---|
[ea16306] | 174 | <application>PCRE</application> library on the root filesystem
|
---|
| 175 | so that it is available in case <command>grep</command>
|
---|
| 176 | gets reinstalled with <application>PCRE</application> support.
|
---|
| 177 | </para>
|
---|
| 178 |
|
---|
[469ad5d0] | 179 | </sect2>
|
---|
[4c3474fe] | 180 |
|
---|
[469ad5d0] | 181 | <sect2 role="content">
|
---|
| 182 | <title>Contents</title>
|
---|
| 183 |
|
---|
| 184 | <segmentedlist>
|
---|
| 185 | <segtitle>Installed Programs</segtitle>
|
---|
| 186 | <segtitle>Installed Libraries</segtitle>
|
---|
[4c288b0] | 187 | <segtitle>Installed Directory</segtitle>
|
---|
[4c3474fe] | 188 |
|
---|
[469ad5d0] | 189 | <seglistitem>
|
---|
[ea16306] | 190 | <seg>
|
---|
| 191 | pcregrep, pcretest and pcre-config
|
---|
| 192 | </seg>
|
---|
| 193 | <seg>
|
---|
[0eba16e] | 194 | libpcre.so, libpcre16.so, libpcre32.so,
|
---|
| 195 | libpcrecpp.so and libpcreposix.so
|
---|
[ea16306] | 196 | </seg>
|
---|
| 197 | <seg>
|
---|
| 198 | /usr/share/doc/pcre-&pcre-version;
|
---|
| 199 | </seg>
|
---|
[469ad5d0] | 200 | </seglistitem>
|
---|
| 201 | </segmentedlist>
|
---|
[4c3474fe] | 202 |
|
---|
[469ad5d0] | 203 | <variablelist>
|
---|
| 204 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 205 | <?dbfo list-presentation="list"?>
|
---|
| 206 | <?dbhtml list-presentation="table"?>
|
---|
[4c3474fe] | 207 |
|
---|
[469ad5d0] | 208 | <varlistentry id="pcregrep">
|
---|
| 209 | <term><command>pcregrep</command></term>
|
---|
| 210 | <listitem>
|
---|
[ea16306] | 211 | <para>
|
---|
| 212 | is a <command>grep</command> that understands
|
---|
| 213 | <application>Perl</application> compatible regular expressions.
|
---|
| 214 | </para>
|
---|
[469ad5d0] | 215 | <indexterm zone="pcre pcregrep">
|
---|
| 216 | <primary sortas="b-pcregrep">pcregrep</primary>
|
---|
| 217 | </indexterm>
|
---|
| 218 | </listitem>
|
---|
| 219 | </varlistentry>
|
---|
[4c3474fe] | 220 |
|
---|
[469ad5d0] | 221 | <varlistentry id="pcretest">
|
---|
| 222 | <term><command>pcretest</command></term>
|
---|
| 223 | <listitem>
|
---|
[ea16306] | 224 | <para>
|
---|
| 225 | can test a <application>Perl</application> compatible
|
---|
| 226 | regular expression.
|
---|
| 227 | </para>
|
---|
[469ad5d0] | 228 | <indexterm zone="pcre pcretest">
|
---|
| 229 | <primary sortas="b-pcretest">pcretest</primary>
|
---|
| 230 | </indexterm>
|
---|
| 231 | </listitem>
|
---|
| 232 | </varlistentry>
|
---|
[4c3474fe] | 233 |
|
---|
[469ad5d0] | 234 | <varlistentry id="pcre-config">
|
---|
| 235 | <term><command>pcre-config</command></term>
|
---|
| 236 | <listitem>
|
---|
[ea16306] | 237 | <para>
|
---|
| 238 | is used during the compile process of programs linking to
|
---|
| 239 | the <application>PCRE</application> libraries.
|
---|
| 240 | </para>
|
---|
[469ad5d0] | 241 | <indexterm zone="pcre pcre-config">
|
---|
| 242 | <primary sortas="b-pcre-config">pcre-config</primary>
|
---|
| 243 | </indexterm>
|
---|
| 244 | </listitem>
|
---|
| 245 | </varlistentry>
|
---|
[ea16306] | 246 |
|
---|
[469ad5d0] | 247 | </variablelist>
|
---|
[ea16306] | 248 |
|
---|
[469ad5d0] | 249 | </sect2>
|
---|
[ea16306] | 250 |
|
---|
[f45b1953] | 251 | </sect1>
|
---|