2004-06-13 06:56:28 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-04-05 03:42:53 +08:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-06-13 06:56:28 +08:00
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2008-03-08 01:52:58 +08:00
|
|
|
<!ENTITY pcre-download-http "http://downloads.sourceforge.net/pcre/pcre-&pcre-version;.tar.bz2">
|
2007-07-02 22:44:34 +08:00
|
|
|
<!ENTITY pcre-download-ftp "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-&pcre-version;.tar.bz2">
|
2008-03-08 01:52:58 +08:00
|
|
|
<!ENTITY pcre-md5sum "2af38e083fb90ef60fa9eda7cc290e86">
|
|
|
|
<!ENTITY pcre-size "780 KB">
|
2007-07-02 22:44:34 +08:00
|
|
|
<!ENTITY pcre-buildsize "11 MB">
|
|
|
|
<!ENTITY pcre-time "0.3 SBU">
|
2004-06-13 06:56:28 +08:00
|
|
|
]>
|
|
|
|
|
2003-12-26 00:10:09 +08:00
|
|
|
<sect1 id="pcre" xreflabel="PCRE-&pcre-version;">
|
2005-05-01 23:34:33 +08:00
|
|
|
<?dbhtml filename="pcre.html"?>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<title>PCRE-&pcre-version;</title>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<indexterm zone="pcre">
|
|
|
|
<primary sortas="a-PCRE">PCRE</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to PCRE</title>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<para>The <application>PCRE</application> package contains
|
|
|
|
<application>Perl</application> Compatible Regular Expression
|
|
|
|
libraries. These are useful for implementing regular expression pattern
|
|
|
|
matching using the same syntax and semantics as
|
|
|
|
<application>Perl</application> 5.</para>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>Download (HTTP): <ulink url="&pcre-download-http;"/></para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download (FTP): <ulink url="&pcre-download-ftp;"/></para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download MD5 sum: &pcre-md5sum;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download size: &pcre-size;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Estimated disk space required: &pcre-buildsize;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Estimated build time: &pcre-time;</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2008-03-08 01:52:58 +08:00
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
|
|
|
<itemizedlist spacing='compact'>
|
|
|
|
<listitem>
|
|
|
|
<para>Required Patch: <ulink
|
|
|
|
url="&patch-root;/pcre-&pcre-version;-abi_breakage-1.patch"/></para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2006-04-11 02:35:56 +08:00
|
|
|
<para condition="html" role="usernotes">User Notes:
|
|
|
|
<ulink url="&blfs-wiki;/pcre"/></para>
|
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
</sect2>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of PCRE</title>
|
|
|
|
|
2005-05-31 05:33:35 +08:00
|
|
|
<para>Install <application>PCRE</application> by running
|
2005-05-01 23:34:33 +08:00
|
|
|
the following commands:</para>
|
|
|
|
|
2008-03-08 01:52:58 +08:00
|
|
|
<screen><userinput>patch -Np1 -i ../pcre-&pcre-version;-abi_breakage-1.patch &&
|
|
|
|
./configure --prefix=/usr \
|
2007-07-02 23:48:47 +08:00
|
|
|
--docdir=/usr/share/doc/pcre-&pcre-version; \
|
2008-03-08 01:52:58 +08:00
|
|
|
--enable-utf8 \
|
|
|
|
--enable-pcregrep-libz \
|
|
|
|
--enable-pcregrep-libbz2 &&
|
2005-05-01 23:34:33 +08:00
|
|
|
make</userinput></screen>
|
2005-05-12 03:10:27 +08:00
|
|
|
|
2008-03-08 02:45:54 +08:00
|
|
|
<para>To test the results, issue: <command>make check</command>. Note:
|
|
|
|
The third set of the tests cannot be run if the "fr_FR" locale is missing
|
|
|
|
from the system.</para>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2007-07-02 23:48:47 +08:00
|
|
|
<screen role="root"><userinput>make install</userinput></screen>
|
2005-05-01 23:34:33 +08:00
|
|
|
|
2005-07-28 00:35:22 +08:00
|
|
|
<para>If you reinstall <application>Grep</application> after installing
|
|
|
|
<application>PCRE</application>, <application>Grep</application> will get
|
|
|
|
linked against <application>PCRE</application> and may cause problems if
|
2005-05-31 05:33:35 +08:00
|
|
|
<filename class="directory">/usr</filename> is a separate mount point. To avoid
|
|
|
|
this, either pass the option <option>--disable-perl-regexp</option> when executing
|
2005-07-28 00:35:22 +08:00
|
|
|
<command>./configure</command> for <application>Grep</application> or move
|
2005-05-31 05:33:35 +08:00
|
|
|
<filename class="libraryfile">libpcre</filename> to <filename
|
2005-05-01 23:34:33 +08:00
|
|
|
class="directory">/lib</filename> as follows.</para>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>mv -v /usr/lib/libpcre.so.* /lib/ &&
|
|
|
|
ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so</userinput></screen>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
</sect2>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
2005-05-31 05:33:35 +08:00
|
|
|
<para><parameter>--enable-utf8</parameter>: This switch includes the code for
|
2005-05-01 23:34:33 +08:00
|
|
|
handling UTF-8 character strings in the library.</para>
|
2008-03-08 01:52:58 +08:00
|
|
|
|
|
|
|
<para><parameter>--enable-unicode-properties</parameter>: This switch
|
|
|
|
enables Unicode properties support. Note: You need this switch if you are
|
2008-03-08 02:23:18 +08:00
|
|
|
going to build <xref linkend="glib2"/> with the
|
2008-03-08 01:52:58 +08:00
|
|
|
<parameter>--with-pcre=system</parameter> switch.</para>
|
|
|
|
|
|
|
|
<para><parameter>--enable-pcregrep-libz</parameter>: This switch adds
|
2008-03-08 02:23:18 +08:00
|
|
|
support to <command>pcregrep</command> to read
|
|
|
|
<filename class='extension'>.gz</filename> compressed files.</para>
|
2008-03-08 01:52:58 +08:00
|
|
|
|
|
|
|
<para><parameter>--enable-pcregrep-libbz2</parameter>: This switch adds
|
2008-03-08 02:23:18 +08:00
|
|
|
support to <command>pcregrep</command> to read
|
|
|
|
<filename class='extension'>.bz2</filename> compressed files.</para>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
</sect2>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Libraries</segtitle>
|
2005-07-28 00:35:22 +08:00
|
|
|
<segtitle>Installed Directory</segtitle>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<seglistitem>
|
|
|
|
<seg>pcregrep, pcretest, and pcre-config</seg>
|
2006-04-11 02:35:56 +08:00
|
|
|
<seg>libpcre.{so,a}, libpcrecpp.{so,a} and libpcreposix.{so,a}</seg>
|
2005-06-08 22:58:28 +08:00
|
|
|
<seg>/usr/share/doc/pcre-&pcre-version;</seg>
|
2005-05-01 23:34:33 +08:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<varlistentry id="pcregrep">
|
|
|
|
<term><command>pcregrep</command></term>
|
|
|
|
<listitem>
|
2005-05-31 05:33:35 +08:00
|
|
|
<para>is a <command>grep</command> that understands
|
2005-05-01 23:34:33 +08:00
|
|
|
<application>Perl</application> compatible regular expressions.</para>
|
|
|
|
<indexterm zone="pcre pcregrep">
|
|
|
|
<primary sortas="b-pcregrep">pcregrep</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<varlistentry id="pcretest">
|
|
|
|
<term><command>pcretest</command></term>
|
|
|
|
<listitem>
|
2005-05-31 05:33:35 +08:00
|
|
|
<para>can test a <application>Perl</application> compatible
|
2005-05-01 23:34:33 +08:00
|
|
|
regular expression.</para>
|
|
|
|
<indexterm zone="pcre pcretest">
|
|
|
|
<primary sortas="b-pcretest">pcretest</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
<varlistentry id="pcre-config">
|
|
|
|
<term><command>pcre-config</command></term>
|
|
|
|
<listitem>
|
2005-05-31 05:33:35 +08:00
|
|
|
<para>is used during the compile process of programs linking to
|
2005-05-01 23:34:33 +08:00
|
|
|
the <application>PCRE</application> libraries.</para>
|
|
|
|
<indexterm zone="pcre pcre-config">
|
|
|
|
<primary sortas="b-pcre-config">pcre-config</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2005-05-31 00:29:22 +08:00
|
|
|
|
2005-05-01 23:34:33 +08:00
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
|
|
|
</sect1>
|