### this file is sourced not run
PKGVER=10.35
PKGBUILD=1
PKGARCH=i686

# source: post BLFS 9.1 2020-05-19
TARBALL=pcre2-$PKGVER.tar.bz2
MD5SUM=a0674e2cc5941d738c1afddf43fb8745
SRC_URL=https://ftp.pcre.org/pub/pcre/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="libpcre2_32: libpcre2_32 $PKGVER (PCRE2 library)
libpcre2_32:
libpcre2_32: The PCRE2 package contains a new generation of the Perl Compatible
libpcre2_32: Regular Expression libraries. These are useful for implementing
libpcre2_32: regular expression pattern matching using the same syntax and
libpcre2_32: semantics as Perl 5.  Any new features will be added to PCRE2, and
libpcre2_32: not to the PCRE 8.x series.
libpcre2_32:
libpcre2_32:
libpcre2_32: This contains 32-bit version of the library.
libpcre2_32:
libpcre2_32:
libpcre2_32:
"

### default pkg_download
### default pkg_prepare
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
	mkdir -p usr/bin &&
	mv -v tmp/pcre2-config-32 usr/bin
}

### build
pkg_build() {
	cd /tmp/pcre*
	CONFFLAGS="$CONFFLAGS \
		--docdir=/usr/share/doc/pcre2-$PKGVER \
        --enable-unicode                  \
        --enable-jit                      \
        --enable-pcre2-16                 \
        --enable-pcre2-32                 \
        --enable-pcre2grep-libz           \
        --enable-pcre2grep-libbz2         \
        --enable-pcre2test-libreadline    \
        --disable-static" &&
	pkg_build_autoconf &&
	pkg_build_slackdesc &&

	# multilib
	mv /usr/bin/pcre2-config /tmp/pcre2-config-32
}


