From 359922024eef6ff2a5c46d5891aeb3015e8bdb01 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 3 Nov 2025 17:25:38 +0100 Subject: [PATCH 1/3] ci: skip i686 builds for PCRE2 For some reason, PCRE2 v10.47 fails the test suite on i686. Since Git for Windows does not support i686 assets other than MinGit anymore (and i686 MinGit does not use the MSYS variant of the `pcre2` library), it is not actually needed. Signed-off-by: Johannes Schindelin --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d32abc9d1dc..6cb1eaa224c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: name: msys2-packages path: artifacts/*.pkg.tar.* build-i686: - if: "!contains(github.event.pull_request.title, 'msys2-runtime') || contains(github.event.pull_request.title, 'msys2-runtime-3.3')" + if: "(!contains(github.event.pull_request.title, 'pcre2') && !contains(github.event.pull_request.title, 'msys2-runtime')) || contains(github.event.pull_request.title, 'msys2-runtime-3.3')" runs-on: windows-latest steps: - uses: actions/checkout@v5 From f6e3b34e69ca1e2421b47bc496f7af26d0edacbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20A=C3=9Fhauer?= Date: Tue, 21 Oct 2025 11:08:32 +0000 Subject: [PATCH 2/3] pcre2: update to 10.47 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Aßhauer --- pcre2/PKGBUILD | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcre2/PKGBUILD b/pcre2/PKGBUILD index c1ab64e2b34..f0a329fdda0 100644 --- a/pcre2/PKGBUILD +++ b/pcre2/PKGBUILD @@ -2,7 +2,7 @@ pkgbase=pcre2 pkgname=('pcre2' 'libpcre2_8' 'libpcre2_16' 'libpcre2_32' 'libpcre2posix' 'pcre2-devel') -pkgver=10.46 +pkgver=10.47 pkgrel=1 pkgdesc="A library that implements Perl 5-style regular expressions" arch=('i686' 'x86_64') @@ -13,7 +13,7 @@ source=(https://github.com/PCRE2project/pcre2/releases/download/${pkgbase}-${pkg 0001-Allow-building-an-MSYS-DLL.patch 0002-RunTest-adjust-ISO-8859-1-tests-for-Cygwin.patch 0003-pcre2-10.40-cygwin-jit.patch) -sha256sums=('15fbc5aba6beee0b17aecb04602ae39432393aba1ebd8e39b7cabf7db883299f' +sha256sums=('47fe8c99461250d42f89e6e8fdaeba9da057855d06eb7fc08d9ca03fd08d7bc7' 'SKIP' '75d0b002035698d427b31a81c2efc518beea17e0e410f59185ef02e599b45f04' '0edaf45f742d388ddf96313e92d44f4942da2b0dc24ca0a0b47b5b223b6eee67' @@ -57,7 +57,7 @@ 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 + for f in testdata/testoutput8-8-2 testdata/testoutput8-16-2 do cp "../${pkgname}-${pkgver}/$f" "../${pkgname}-${pkgver}/$f.backup" perl -pi -e 's{^(Memory allocation - compiled block : )(\d+)$}{$1 . ($2 - 24)}e' "../${pkgname}-${pkgver}/$f" @@ -65,7 +65,7 @@ check() { make -j1 check - for f in testdata/testoutput8-8-2 testdata/testoutput8-16-2 testdata/testoutput8-32-2 + for f in testdata/testoutput8-8-2 testdata/testoutput8-16-2 do test ! -f "../${pkgname}-${pkgver}/$f.backup" || mv "../${pkgname}-${pkgver}/$f.backup" "../${pkgname}-${pkgver}/$f" From 4d4091be25c2206b7675afca6573899fedf43bd7 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 4 Nov 2025 09:32:34 +0100 Subject: [PATCH 3/3] pcre2: skip that pesky `fr_FR` test altogether There is a test in PCRE2 that has given us grief for long enough when building the MSYS variant of PCRE2: The ISO-8859-1 one. The problem is a difference in assumptions between PCRE2 and the Cygwin runtime (or for that matter, the MSYS2 runtime). For years, we tried to work around it, but it is finally time to admit that keeping the workaround working is not worth the effort. All it would do would be to continually document the difference in opinion, and it would not add the confidence a test should add. So let's drop the workaround, and skip the ISO-8859-1 test at long last. Signed-off-by: Johannes Schindelin --- ...t-adjust-ISO-8859-1-tests-for-Cygwin.patch | 83 ------------------- ...est-skip-ISO-8859-1-tests-for-Cygwin.patch | 53 ++++++++++++ pcre2/PKGBUILD | 6 +- 3 files changed, 56 insertions(+), 86 deletions(-) delete mode 100644 pcre2/0002-RunTest-adjust-ISO-8859-1-tests-for-Cygwin.patch create mode 100644 pcre2/0002-RunTest-skip-ISO-8859-1-tests-for-Cygwin.patch diff --git a/pcre2/0002-RunTest-adjust-ISO-8859-1-tests-for-Cygwin.patch b/pcre2/0002-RunTest-adjust-ISO-8859-1-tests-for-Cygwin.patch deleted file mode 100644 index f7e996a9423..00000000000 --- a/pcre2/0002-RunTest-adjust-ISO-8859-1-tests-for-Cygwin.patch +++ /dev/null @@ -1,83 +0,0 @@ -From f4312bcb770b4c11e451dbe70807a8624c48c73e Mon Sep 17 00:00:00 2001 -From: Johannes Schindelin -Date: Fri, 2 Jun 2017 17:54:57 +0200 -Subject: [PATCH 2/3] RunTest: adjust ISO-8859-1 tests for Cygwin -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -PCRE2 has a test that verifies the "starting code unit" for several -ISO-8859-1 tests. In particular, it wants to verify that the code points -0xAA, 0xB5 and 0xBA in ISO-8859-1 (which translate to ª, µ and º, -respectively) are considered to be word characters, 0xB5 even a -lower-case one. - -However, Cygwin does _not_ consider those characters to be word -characters, but considers them _punctuation_ characters: -https://github.com/cygwin/cygwin/blob/cygwin-3.4.2/newlib/libc/ctype/ctype_iso.h#L10-L12 -(punctuation characters are marked up with a `_P`, see -https://github.com/cygwin/cygwin/blob/cygwin-3.4.2/newlib/libc/include/ctype.h#L98, -and alphanumerical characters are marked up with `_U` for upper-case, -`_L` for lower-case and `_N` for numerical characters: -https://github.com/cygwin/cygwin/blob/cygwin-3.4.2/newlib/libc/include/ctype.h#L99). - -Therefore, these tests will always fail. - -Let's work around this by specifically testing whether the mu character -is considered a word character, and if not, edit the expectations -accordingly. - -Signed-off-by: Johannes Schindelin ---- - RunTest | 38 ++++++++++++++++++++++++++++++++++++++ - 1 file changed, 38 insertions(+) - -diff --git a/RunTest b/RunTest -index dafef3e..9f3e7a6 100755 ---- a/RunTest -+++ b/RunTest -@@ -572,6 +572,44 @@ for bmode in "$test8" "$test16" "$test32"; do - sed "s/fr_FR/$loc/" $testdata/testoutput3A >test3outputA - sed "s/fr_FR/$loc/" $testdata/testoutput3B >test3outputB - fi -+ # On Cygwin, the `mu` character (\xaa) in ISO-8859-1 is not -+ # considered to be an alphanumerical character. Likewise -+ # \xb5 and \xba. Work around PCRE2's expectation that they are. -+ case "$(LC_CTYPE=C \ -+ printf '/\\w/locale=fr_FR\n\xb5\n' | -+ pcre2test)" in -+ *"No match"*) -+ for f in $infile $outfile $outfile2 $outfile3; do -+ LC_CTYPE=C \ -+ sed -e ' -+ # remove the three characters from -+ # [A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\xff] and from -+ # [a-z\xb5\xdf-\xf6\xf8-\xff] -+ s/a-z\(\\x[ab][0-9a-f]\)*/a-z/ -+ -+ # remove the three characters from the "Starting code units" -+ # character range -+ /\xaa \xb5 \xba /{ -+ s/\xaa \xb5 \xba // -+ # rewrap after removing three characters -+ N;N -+ s/\(\n *\)\( . . .\)/\2\1/g -+ } -+ -+ # test E-circumflex and U-acute which Cygwin considers -+ # alphanumerical characters instead of the ordinal indicators -+ # that Cygwin does not consider to be alphanumerical, both -+ # in the \x... form as well as in the encoded form -+ s/xaa/xca/g' -e 's/xba/xda/g -+ s/\xaa/\xca/g' -e 's/\xba/\xda/g' \ -+ <$f >$f-cygwin -+ done -+ infile=$infile-cygwin -+ outfile=$outfile-cygwin -+ outfile2=$outfile2-cygwin -+ outfile3=$outfile3-cygwin -+ ;; -+ esac - break - fi - fi diff --git a/pcre2/0002-RunTest-skip-ISO-8859-1-tests-for-Cygwin.patch b/pcre2/0002-RunTest-skip-ISO-8859-1-tests-for-Cygwin.patch new file mode 100644 index 00000000000..627e4cd6309 --- /dev/null +++ b/pcre2/0002-RunTest-skip-ISO-8859-1-tests-for-Cygwin.patch @@ -0,0 +1,53 @@ +From 826499cc1f0d7b484a510bcc07004a7d88d6267a Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Fri, 2 Jun 2017 17:54:57 +0200 +Subject: [PATCH 2/3] RunTest: skip ISO-8859-1 tests for Cygwin +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +PCRE2 has a test that verifies the "starting code unit" for several +ISO-8859-1 tests. In particular, it wants to verify that the code points +0xAA, 0xB5 and 0xBA in ISO-8859-1 (which translate to ª, µ and º, +respectively) are considered to be word characters, 0xB5 even a +lower-case one. + +However, Cygwin (and for the same reason, MSYS) does _not_ consider +those characters to be word characters, but considers them _punctuation_ +characters: +https://github.com/cygwin/cygwin/blob/cygwin-3.4.2/newlib/libc/ctype/ctype_iso.h#L10-L12 +(punctuation characters are marked up with a `_P`, see +https://github.com/cygwin/cygwin/blob/cygwin-3.4.2/newlib/libc/include/ctype.h#L98, +and alphanumerical characters are marked up with `_U` for upper-case, +`_L` for lower-case and `_N` for numerical characters: +https://github.com/cygwin/cygwin/blob/cygwin-3.4.2/newlib/libc/include/ctype.h#L99). + +Therefore, these tests will always fail. + +Git for Windows' fork of MSYS2-packages worked around this for years by +specifically testing whether the mu character is considered a word +character, and if not, edit the expectations accordingly. These +workarounds were always finicky, though, and it became too cumbersome to +maintain them. + +As a consequence, PCRE2's ISO-8859-1 tests will now be skipped in Git +for Windows. + +Signed-off-by: Johannes Schindelin +--- + RunTest | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/RunTest b/RunTest +index 57a0345..d53903d 100755 +--- a/RunTest ++++ b/RunTest +@@ -470,7 +470,7 @@ if [ $do0 = no -a $do1 = no -a $do2 = no -a $do3 = no -a \ + do0=yes + do1=yes + do2=yes +- do3=yes ++ do3=no # Expected to fail with Cygwin/MSYS + do4=yes + do5=yes + do6=yes diff --git a/pcre2/PKGBUILD b/pcre2/PKGBUILD index f0a329fdda0..ec6b7068263 100644 --- a/pcre2/PKGBUILD +++ b/pcre2/PKGBUILD @@ -11,12 +11,12 @@ license=('BSD') makedepends=('libreadline-devel' 'libbz2-devel' 'zlib-devel') source=(https://github.com/PCRE2project/pcre2/releases/download/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.bz2{,.sig} 0001-Allow-building-an-MSYS-DLL.patch - 0002-RunTest-adjust-ISO-8859-1-tests-for-Cygwin.patch + 0002-RunTest-skip-ISO-8859-1-tests-for-Cygwin.patch 0003-pcre2-10.40-cygwin-jit.patch) sha256sums=('47fe8c99461250d42f89e6e8fdaeba9da057855d06eb7fc08d9ca03fd08d7bc7' 'SKIP' '75d0b002035698d427b31a81c2efc518beea17e0e410f59185ef02e599b45f04' - '0edaf45f742d388ddf96313e92d44f4942da2b0dc24ca0a0b47b5b223b6eee67' + 'c4e1c22bf0eca8ceaceaa1888bc1cd545adf1c5e93e2a83fb89eadc9d4b748f5' 'e90e776d43a57767ac551e896e6191920577bbfc659bbd6fc6b48380c2c8fd44') validpgpkeys=('A95536204A3BB489715231282A98E77EB6F24CA8') # Nicholas Wilson @@ -24,7 +24,7 @@ prepare() { cd "${srcdir}"/${pkgname}-${pkgver} patch -p1 -i "${srcdir}"/0001-Allow-building-an-MSYS-DLL.patch - patch -p1 -i "${srcdir}"/0002-RunTest-adjust-ISO-8859-1-tests-for-Cygwin.patch + patch -p1 -i "${srcdir}"/0002-RunTest-skip-ISO-8859-1-tests-for-Cygwin.patch patch -p1 -i "${srcdir}"/0003-pcre2-10.40-cygwin-jit.patch autoreconf -fi