summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD42
1 files changed, 42 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..0f42ce5ef57
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+pkgname=mingw-w64-pcre2
+pkgver=10.22
+pkgrel=1
+pkgdesc=" A library that implements Perl 5-style regular expressions. 2nd version (mingw-w64)"
+arch=(any)
+url="http://www.pcre.org/"
+license=("BSD")
+makedepends=(mingw-w64-configure mingw-w64-readline mingw-w64-bzip2 mingw-w64-zlib)
+depends=(mingw-w64-crt)
+options=(staticlibs !strip !buildflags)
+optdepends=(mingw-w64-readline mingw-w64-bzip2 mingw-w64-zlib)
+source=("ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-$pkgver.tar.bz2")
+md5sums=('c0c02517938ee2b0d350d53edf450664')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+build() {
+ cd "$srcdir/pcre2-$pkgver"
+ for _arch in ${_architectures}; do
+ unset LDFLAGS
+ mkdir -p build-${_arch} && pushd build-${_arch}
+ ${_arch}-configure \
+ --enable-jit \
+ --enable-pcre2-16 \
+ --enable-pcre2-32 \
+ --enable-pcre2grep-libz \
+ --enable-pcre2grep-libbz2 \
+ --enable-pcre2test-libreadline
+ make
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/pcre2-$pkgver/build-${_arch}"
+ make DESTDIR="$pkgdir" install
+ find "$pkgdir/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip {} \;
+ find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
+ find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
+ done
+}