pcre2 - Library for Perl Compatible Regular Expressions ChangeLog


# PCRE2 10.42
# ===========
# The EoL original PCRE is covered in a separate HOWTO

# Slackware <= 14.2 'pcre' package is the original PCRE
# Slackware >= 15.0 has a 'pcre' package and a 'pcre2' package
# Slackware 14.0: pcre 8.12
# Slackware 14.1: pcre 8.33
# Slackware 14.2: pcre 8.39
# Slackware 15.0: pcre 8.45, pcre2 10.39

# Prerequisites:
# pkg-config
# zlib (if you don't leave off --enable-pcregrep-libz)
# bzip2 (if you don't leave off --enable-pcregrep-libbz2)
# readline

# Apache, KDE, PHP, and other significant things use this library, so I
# would suggest shutting them down before upgrading this library or at least
# knowing what is running that uses it before beginning.
# Try running 'lsof /usr/lib*/libpcre*'
# (if you have lsof installed) to see if anything else is running that
# uses the PCRE shared library.

# If you have any trouble downloading it from the URL below, try this unofficial mirror
# https://sourceforge.net/projects/pcre/files/

# GitHub release page PCRE2-10.42
# pcre2-dev: PCRE2 10.42 is released

# Get the source tarball
test -f installed/pcre2-10.42.tar.bz2 && mv installed/pcre2-10.42.tar.bz2 .
test ! -f pcre2-10.42.tar.bz2 &&
wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/\

# Verify tarball w/ sha256sum:
# (this came from my gpg-verified tarball)
echo "8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e8\
40  pcre2-10.42.tar.bz2" | sha256sum -c

# Verify tarball w/ gpg:
( gpg --list-keys FB0F43D8 > /dev/null 2>&1 || gpg --recv-keys FB0F43D8 ) &&
wget -nc https://github.com/PCRE2Project/pcre2/releases/download/\
pcre2-10.42/pcre2-10.42.tar.bz2.sig &&
  gpg --verify pcre2-10.42.tar.bz2.sig && rm pcre2-10.42.tar.bz2.sig

# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "pcre-*" -exec rm -r {} \;
tar xjvf ~/pcre2-10.42.tar.bz2
cd pcre2-10.42
test $UID = 0 && chown -R root:root .

# Configure the build - 64-bit
test $(uname -m) = 'x86_64' &&
./configure --prefix=/usr --docdir=/usr/doc/pcre2 --libdir=/usr/lib64 \
--mandir=/usr/man --disable-static --enable-jit \
--enable-pcre2-16 --enable-pcre2-32 \
--enable-pcre2grep-libz --enable-pcre2grep-libbz2 \

# Configure the build - anything else
test $(uname -m) != 'x86_64' &&
./configure --prefix=/usr --docdir=/usr/doc/pcre2 --mandir=/usr/man \
--disable-static --enable-jit \
--enable-pcre2-16 --enable-pcre2-32 \
--enable-pcre2grep-libz --enable-pcre2grep-libbz2 \

# Build it

# Become root to clean up old files and to install it

# Remove the Slackware package, if there is one
text -x /sbin/removepkg && /sbin/removepkg pcre2

# Remove old shared library files
# The safer option would be to NOT DO THIS
find /usr/lib* -type f -name "libpcre2-*" -exec rm {} \;

# Install it
make install

# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .

# Now if you want, remove old versions of libpcre2-8.so.* and
# libpcre2-posix.* in /usr/lib*/, if there are any.  This is purely to avoid
# clutter, so if you feel like leaving them there, that's fine.  Normally
# you'd be weary of programs that are linked to libpcre2-8.so.1 when
# you upgrade to libpcre2.so.2 (remove .1 and break that program)
# As you restart things that use libpcre2, check output of 'lsof
# /usr/lib*/libpcre2*' and restart everything until they are all using the
# new one.  If they don't, you may need to recompile and reinstall it.

# Run ldd on any non-running program that is linked with libpcre2 to
# verify that it is still OK

# Become yourself again

# Save the source for later
mkdir -p -m 0700 installed
rm -f installed/pcre2-*.tar.*
mv pcre2-10.42.tar.bz2 installed/

# If you ever want to uninstall PCRE2, this should do it:
# ('make uninstall' as root will do it, if you have the source)
test -d src/pcre2-* && ( cd src/pcre2-* ; make uninstall )
( /usr/bin ; rm -f pcre2-config pcre2grep pcre2test )
test -d /usr/doc/pcre2 && rm -r /usr/doc/pcre2
( cd /usr/include ; rm -f pcre2.h pcre2posix.h )
for libdir in /usr/lib /usr/lib64;
  rm -f libpcre2-8.* libpcre2-16.* libpcre2-32.* libpcre2-posix.* \
   pkgconfig/libpcre2-8.pc pkgconfig/libpcre2-16.pc \
   pkgconfig/libpcre2-32.pc pkgconfig/libpcre2-posix.pc
( cd /usr/man/man1 ; rm -f pcre2-config.1 pcre2grep.1 pcre2test.1 )
( cd /usr/man/man3
  rm -f pcre2.3 pcre2_*.3 pcre2api.3 pcre2build.3 pcre2callout.3 \
   pcre2compat.3 pcre2convert.3 pcre2demo.3 pcre2jit.3 pcre2limits.3 \
   pcre2matching.3 pcre2partial.3 pcre2pattern.3 pcre2perform.3 \
   pcre2posix.3 pcre2sample.3 pcre2serialize.3 pcre2syntax.3 pcre2unicode.3 )
find ~/src -maxdepth 1 -type d -name "pcre2-*" -exec rm -r {} \;
rm -f ~/installed/pcre2-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2024-02-09 4:53pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.