Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
83 changes: 0 additions & 83 deletions pcre2/0002-RunTest-adjust-ISO-8859-1-tests-for-Cygwin.patch

This file was deleted.

53 changes: 53 additions & 0 deletions pcre2/0002-RunTest-skip-ISO-8859-1-tests-for-Cygwin.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
From 826499cc1f0d7b484a510bcc07004a7d88d6267a Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <[email protected]>
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 <[email protected]>
---
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
14 changes: 7 additions & 7 deletions pcre2/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -11,20 +11,20 @@ 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=('15fbc5aba6beee0b17aecb04602ae39432393aba1ebd8e39b7cabf7db883299f'
sha256sums=('47fe8c99461250d42f89e6e8fdaeba9da057855d06eb7fc08d9ca03fd08d7bc7'
'SKIP'
'75d0b002035698d427b31a81c2efc518beea17e0e410f59185ef02e599b45f04'
'0edaf45f742d388ddf96313e92d44f4942da2b0dc24ca0a0b47b5b223b6eee67'
'c4e1c22bf0eca8ceaceaa1888bc1cd545adf1c5e93e2a83fb89eadc9d4b748f5'
'e90e776d43a57767ac551e896e6191920577bbfc659bbd6fc6b48380c2c8fd44')
validpgpkeys=('A95536204A3BB489715231282A98E77EB6F24CA8') # Nicholas Wilson <[email protected]>

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
Expand Down Expand Up @@ -57,15 +57,15 @@ 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"
done

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"
Expand Down