The PCRE package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl 5.
This package is known to build and work properly using an LFS-7.4 platform.
Download (HTTP): http://downloads.sourceforge.net/pcre/pcre-8.33.tar.bz2
Download (FTP): ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.33.tar.bz2
Download MD5 sum: 21514018448ac10062ece7a668fca949
Download size: 1.4 MB
Estimated disk space required: 24 MB
Estimated build time: 0.3 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pcre
Install PCRE by running the following commands:
./configure --prefix=/usr \ --docdir=/usr/share/doc/pcre-8.33 \ --enable-utf \ --enable-unicode-properties \ --enable-pcre16 \ --enable-pcre32 \ --enable-pcregrep-libz \ --enable-pcregrep-libbz2 \ --enable-pcretest-libreadline \ --disable-static && make
To test the results, issue: make check.
Now, as the root
user:
make install && mv -v /usr/lib/libpcre.so.* /lib && ln -sfv ../../lib/$(readlink /usr/lib/libpcre.so) /usr/lib/libpcre.so
--enable-utf
: This switch includes the
code for handling UTF-8 character strings in the library.
--enable-unicode-properties
: This
switch enables Unicode properties support. Note: You need this
switch if you are going to build GLib-2.36.4 with the --with-pcre=system
switch.
--enable-pcre16
: This switch enables 16
bit character support.
--enable-pcre32
: This switch enables 32
bit character support.
--enable-pcregrep-libz
: This switch
adds support to pcregrep to read .gz
compressed files.
--enable-pcregrep-libbz2
: This switch
adds support to pcregrep to read .bz2
compressed files.
--enable-pcretest-libreadline
: This
switch adds line editing and history features to pcretest program.
--disable-static
: This
switch prevents installation of static versions of the libraries.
mv -v /usr/lib/libpcre.so.* /lib: Moves the PCRE library on the root filesystem so that it is available in case grep gets reinstalled with PCRE support.
Last updated on 2013-08-18 14:52:29 -0700