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

# source: post BLFS 7.8 2015-12-29
TARBALL=pcre-$PKGVER.tar.bz2
MD5SUM=00aabbfe56d5a48b270f999b508c5ad2
SRC_URL=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="libpcre32: libpcre32 $PKGVER (PCRE library)  
libpcre32:  
libpcre32: The PCRE package contains Perl Compatible Regular Expression 
libpcre32: libraries. These are useful for implementing regular expression 
libpcre32: pattern matching using the same syntax and semantics as Perl 5.  
libpcre32: 
libpcre32: This contains 32-bit version of the library.
libpcre32: 
libpcre32: 
libpcre32: 
libpcre32: 
"

### 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/pcre-config-32 usr/bin
}

### build
pkg_build() {
	cd /tmp/pcre*
	./configure --prefix=/usr --libdir=/usr/lib \
            --docdir=/usr/share/doc/pcre-$PKGVER \
            --enable-unicode-properties       \
            --enable-pcre16                   \
            --enable-pcre32                   \
            --enable-pcregrep-libz            \
            --enable-pcregrep-libbz2          \
            --enable-pcretest-libreadline     \
            --disable-static                 &&
	make $MAKEFLAGS &&
	make $MAKEINSTALLFLAGS install &&
	pkg_build_slackdesc &&

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


