From 562e0a68825fd84181e0398c80025b3ee478abb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20A=C3=9Fhauer?= Date: Fri, 7 Jun 2024 17:19:28 +0000 Subject: [PATCH 1/2] mingw-w64-pcre2: update to 10.44 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Aßhauer --- mingw-w64-pcre2/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mingw-w64-pcre2/PKGBUILD b/mingw-w64-pcre2/PKGBUILD index bc006c87e597f..9df9ae7b7f1f7 100644 --- a/mingw-w64-pcre2/PKGBUILD +++ b/mingw-w64-pcre2/PKGBUILD @@ -3,7 +3,7 @@ _realname=pcre2 pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=10.43 +pkgver=10.44 pkgrel=1 pkgdesc="A library that implements Perl 5-style regular expressions (mingw-w64)" arch=('any') @@ -26,7 +26,7 @@ source=(https://github.com/PhilipHazel/pcre2/releases/download/${_realname}-${pk 0006-RunGrepTest-work-around-Unix-vs-Windows-path-issues.patch 0007-RunGrepTest-Windows-does-not-have-a-bin-echo.patch 0008-RunGrepTest-work-around-MSYS2-idiosyncrasy.patch) -sha256sums=('e2a53984ff0b07dfdb5ae4486bbb9b21cca8e7df2434096cc9bf1b728c350bcb' +sha256sums=('d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96' 'SKIP' 'bf9f757e17f72009ee04af33c4e5d153ce6f4181e3ad8381d9306019f395048d' 'ab57fb231b459365311c77de051481bfd4b589029e5011a24a0326898a4e018d' From abf0707c92dd608466796f5e859de2dfa704c4eb Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 7 Jun 2024 23:27:50 +0200 Subject: [PATCH 2/2] pcre2: work around incorrect assumptions in the test suite The tests verify that a certain amount of memory is allocated for given patterns. The way those tests are implemented, these sizes are hardcoded, and they work well as long as the code is compiled using a 64-bit CPU architecture. However, when compiling for i686, all of those numbers are off by 24. Work around this for now. Signed-off-by: Johannes Schindelin --- mingw-w64-pcre2/PKGBUILD | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/mingw-w64-pcre2/PKGBUILD b/mingw-w64-pcre2/PKGBUILD index 9df9ae7b7f1f7..e6cf08e40a23f 100644 --- a/mingw-w64-pcre2/PKGBUILD +++ b/mingw-w64-pcre2/PKGBUILD @@ -73,7 +73,22 @@ build() { check() { cd "${srcdir}/build-${MSYSTEM}" - make check + + # Work around bug in PCRE2 10.44 + test i686 != "$CARCH" || + for f in testdata/testoutput8-8-2 testdata/testoutput8-16-2 testdata/testoutput8-32-2 + do + cp "../${_realname}-${pkgver}/$f" "../${_realname}-${pkgver}/$f.backup" + perl -pi -e 's{^(Memory allocation - compiled block : )(\d+)$}{$1 . ($2 - 24)}e' "../${_realname}-${pkgver}/$f" + done + + make check || return 1 + + for f in testdata/testoutput8-8-2 testdata/testoutput8-16-2 testdata/testoutput8-32-2 + do + test ! -f "../${_realname}-${pkgver}/$f.backup" || + mv "../${_realname}-${pkgver}/$f.backup" "../${_realname}-${pkgver}/$f" + done } package() {