diff --git a/mingw-w64-pcre2/PKGBUILD b/mingw-w64-pcre2/PKGBUILD index 9df9ae7b7f1f7..16eb797ddfd9c 100644 --- a/mingw-w64-pcre2/PKGBUILD +++ b/mingw-w64-pcre2/PKGBUILD @@ -73,7 +73,28 @@ build() { check() { cd "${srcdir}/build-${MSYSTEM}" - make check + + # Work around bug in PCRE2 10.44 + case "${MINGW_CHOST}" in + *-w64-mingw32) + for f in testdata/testoutput8-8-2 testdata/testoutput8-16-2 testdata/testoutput8-32-2 + do + cp "$f" "$f.backup" + perl -pi -e 's{^(Memory allocation - compiled block : )(\d+)$}{$1 . ($2 - 24)}e' "$f" + done + ;; + esac + + make check || return 1 + + case "${MINGW_CHOST}" in + *-w64-mingw32) + for f in testdata/testoutput8-8-2 testdata/testoutput8-16-2 testdata/testoutput8-32-2 + do + cp "$f.backup" "$f" + done + ;; + esac } package() {