Skip to content

Commit 95a110a

Browse files
committed
impl
1 parent d739629 commit 95a110a

File tree

4 files changed

+46
-4
lines changed

4 files changed

+46
-4
lines changed

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!*.patch
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/ext/pcre/pcre2lib/pcre2_jit_compile.c b/ext/pcre/pcre2lib/pcre2_jit_compile.c
2+
index 175eb68..7fd10d5 100644
3+
--- a/ext/pcre/pcre2lib/pcre2_jit_compile.c
4+
+++ b/ext/pcre/pcre2lib/pcre2_jit_compile.c
5+
@@ -82,7 +82,7 @@ pcre2_memctl *allocator = ((pcre2_memctl*)allocator_data);
6+
allocator->free(ptr, allocator->memory_data);
7+
}
8+
9+
-#include "../deps/sljit/sljit_src/sljitLir.c"
10+
+#include "sljit/sljitLir.c"
11+
12+
#if defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED
13+
#error Unsupported architecture
Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
set -e
2+
set -ex
33
cd "$(dirname "$0")/../../.."
44

55
commit=b2bd4254b379b9d7dc9a3dda060a7e27009ccdff # 10.46 release
@@ -8,6 +8,29 @@ git clone --recurse-submodules --revision=$commit https://github.com/PCRE2Projec
88

99
rm -rf ext/pcre/pcre2lib
1010
cp -R /tmp/php-src-bundled/pcre2/src ext/pcre/pcre2lib
11+
cp -R /tmp/php-src-bundled/pcre2/deps/sljit/sljit_src ext/pcre/pcre2lib/sljit
1112

1213
cd ext/pcre/pcre2lib
13-
git restore config.h
14+
15+
# remove unneeded files
16+
rm pcre2.h.in
17+
rm pcre2_dftables.c
18+
rm pcre2_fuzzsupport.c
19+
rm pcre2_jit_test.c
20+
rm pcre2demo.c
21+
rm pcre2grep.c
22+
rm pcre2posix.c
23+
rm pcre2posix.h
24+
rm pcre2posix_test.c
25+
rm pcre2test.c
26+
27+
# move renamed files
28+
mv config.h.generic config.h
29+
mv pcre2.h.generic pcre2.h
30+
mv pcre2_chartables.c.dist pcre2_chartables.c
31+
32+
# add extra files
33+
git restore config.h # based on config.h.generic but with many changes
34+
35+
# patch customized files
36+
git apply -v ../../../.github/scripts/download-bundled/pcre2-adjust-sljit-directory.patch
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/bin/sh
2-
set -e
2+
set -ex
33
cd "$(dirname "$0")/../../.."
44

5-
cd $1
5+
cd "$1"
6+
7+
# display overview of changed files
8+
git status
9+
10+
# display & detect all changes
611
git add . -N && git diff --cached -a --exit-code . && git diff -a --exit-code .

0 commit comments

Comments
 (0)