| # Maintainer: Alexey Pavlov <alexpux@gmail.com> |
| |
| _realname=pcre |
| pkgbase=mingw-w64-${_realname} |
| pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" |
| pkgver=8.44 |
| pkgrel=3 |
| pkgdesc="A library that implements Perl 5-style regular expressions (mingw-w64)" |
| arch=('any') |
| mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') |
| url="https://pcre.org/" |
| license=("BSD") |
| makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config") |
| depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" |
| "${MINGW_PACKAGE_PREFIX}-bzip2" |
| #"${MINGW_PACKAGE_PREFIX}-readline" |
| "${MINGW_PACKAGE_PREFIX}-wineditline" |
| "${MINGW_PACKAGE_PREFIX}-zlib") |
| options=('staticlibs' 'strip') |
| source=(https://ftp.pcre.org/pub/pcre/${_realname}-${pkgver}.tar.bz2{,.sig}) |
| sha256sums=('19108658b23b3ec5058edc9f66ac545ea19f9537234be1ec62b714c84399366d' |
| 'SKIP') |
| validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8') |
| |
| prepare() { |
| cd "${srcdir}/${_realname}-${pkgver}" |
| autoreconf -fiv |
| } |
| |
| build() { |
| [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} |
| mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" |
| |
| "${srcdir}"/${_realname}-${pkgver}/configure \ |
| --prefix=${MINGW_PREFIX} \ |
| --build=${MINGW_CHOST} \ |
| --host=${MINGW_CHOST} \ |
| --target=${MINGW_CHOST} \ |
| --enable-unicode-properties \ |
| --enable-utf \ |
| --enable-pcre8 \ |
| --enable-pcre16 \ |
| --enable-pcre32 \ |
| --enable-pcregrep-libz \ |
| --enable-pcregrep-libbz2 \ |
| --enable-pcretest-libedit |
| |
| make |
| } |
| |
| check() { |
| cd "${srcdir}/build-${MINGW_CHOST}" |
| make check || true |
| } |
| |
| package() { |
| cd "${srcdir}/build-${MINGW_CHOST}" |
| make DESTDIR="${pkgdir}" install |
| |
| # License files |
| cd "${pkgdir}${MINGW_PREFIX}/share" |
| mkdir -p licenses/${_realname} |
| mv doc/${_realname}/COPYING licenses/${_realname} |
| mv doc/${_realname}/LICENCE licenses/${_realname} |
| } |