Skip to content

Commit 51e867d

Browse files
committed
Re-bundle oniguruma
Maintenance of Oniguruma has ended, so I'll temporarily bundle it
1 parent 6f3bc59 commit 51e867d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+106126
-4
lines changed

ext/mbstring/config.m4

Lines changed: 73 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,79 @@ AC_DEFUN([PHP_MBSTRING_ADD_CFLAG], [
1919
])
2020

2121
AC_DEFUN([PHP_MBSTRING_SETUP_MBREGEX], [
22-
PKG_CHECK_MODULES([ONIG], [oniguruma])
23-
PHP_EVAL_LIBLINE([$ONIG_LIBS], [MBSTRING_SHARED_LIBADD])
24-
PHP_EVAL_INCLINE([$ONIG_CFLAGS])
22+
PHP_MBSTRING_BUNDLED_ONIG=1
23+
24+
if test "$PHP_MBSTRING_BUNDLED_ONIG" = "1"; then
25+
cp $ext_srcdir/oniguruma/src/oniguruma.h $ext_srcdir/oniguruma/oniguruma.h
26+
fi
27+
28+
AC_CHECK_HEADERS([strings.h unistd.h sys/time.h sys/times.h limits.h])
29+
AC_CHECK_SIZEOF(int, 4)
30+
AC_CHECK_SIZEOF(short, 2)
31+
AC_CHECK_SIZEOF(long, 4)
32+
AC_FUNC_ALLOCA
33+
AC_CHECK_HEADER([stdarg.h], [
34+
AC_DEFINE([HAVE_STDARG_PROTOTYPES], [1], [Define to 1 if you have the <stdarg.h> header file.])
35+
], [])
36+
AC_DEFINE([PHP_ONIG_BUNDLED], [1], [Define to 1 if the bundled oniguruma is used])
37+
AC_DEFINE([HAVE_ONIG], [1], [Define to 1 if the oniguruma library is available])
38+
PHP_MBSTRING_ADD_CFLAG([-DNOT_RUBY])
39+
PHP_MBSTRING_ADD_BUILD_DIR([oniguruma])
40+
PHP_MBSTRING_ADD_BUILD_DIR([oniguruma/src])
41+
PHP_MBSTRING_ADD_INCLUDE([oniguruma])
42+
PHP_MBSTRING_ADD_SOURCES([
43+
oniguruma/src/ascii.c
44+
oniguruma/src/big5.c
45+
oniguruma/src/cp1251.c
46+
oniguruma/src/euc_jp.c
47+
oniguruma/src/euc_jp_prop.c
48+
oniguruma/src/euc_kr.c
49+
oniguruma/src/euc_tw.c
50+
oniguruma/src/gb18030.c
51+
oniguruma/src/iso8859_1.c
52+
oniguruma/src/iso8859_10.c
53+
oniguruma/src/iso8859_11.c
54+
oniguruma/src/iso8859_13.c
55+
oniguruma/src/iso8859_14.c
56+
oniguruma/src/iso8859_15.c
57+
oniguruma/src/iso8859_16.c
58+
oniguruma/src/iso8859_2.c
59+
oniguruma/src/iso8859_3.c
60+
oniguruma/src/iso8859_4.c
61+
oniguruma/src/iso8859_5.c
62+
oniguruma/src/iso8859_6.c
63+
oniguruma/src/iso8859_7.c
64+
oniguruma/src/iso8859_8.c
65+
oniguruma/src/iso8859_9.c
66+
oniguruma/src/koi8.c
67+
oniguruma/src/koi8_r.c
68+
oniguruma/src/onig_init.c
69+
oniguruma/src/regcomp.c
70+
oniguruma/src/regenc.c
71+
oniguruma/src/regerror.c
72+
oniguruma/src/regexec.c
73+
oniguruma/src/regext.c
74+
oniguruma/src/reggnu.c
75+
oniguruma/src/regparse.c
76+
oniguruma/src/regposerr.c
77+
oniguruma/src/regposix.c
78+
oniguruma/src/regsyntax.c
79+
oniguruma/src/regtrav.c
80+
oniguruma/src/regversion.c
81+
oniguruma/src/sjis.c
82+
oniguruma/src/sjis_prop.c
83+
oniguruma/src/st.c
84+
oniguruma/src/unicode.c
85+
oniguruma/src/unicode_fold1_key.c
86+
oniguruma/src/unicode_fold2_key.c
87+
oniguruma/src/unicode_fold3_key.c
88+
oniguruma/src/unicode_unfold_key.c
89+
oniguruma/src/utf16_be.c
90+
oniguruma/src/utf16_le.c
91+
oniguruma/src/utf32_be.c
92+
oniguruma/src/utf32_le.c
93+
oniguruma/src/utf8.c
94+
])
2595
2696
AC_CACHE_CHECK([if oniguruma has an invalid entry for KOI8 encoding],
2797
[php_cv_lib_onig_invalid_koi8],

ext/mbstring/config.w32

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ if (PHP_MBSTRING != "no") {
99
EXTENSION("mbstring", "mbstring.c php_unicode.c mb_gpc.c", PHP_MBSTRING_SHARED);
1010
ADD_EXTENSION_DEP('mbstring', 'pcre');
1111

12+
FSO.CopyFile("ext\\mbstring\\oniguruma\\src\\oniguruma.h",
13+
"ext\\mbstring\\oniguruma\\oniguruma.h", true);
14+
1215
STDOUT.WriteLine("Using bundled libmbfl...");
1316

14-
ADD_FLAG("CFLAGS_MBSTRING", "-Iext/mbstring -Iext/mbstring/libmbfl -Iext/mbstring/libmbfl/mbfl \
17+
ADD_FLAG("CFLAGS_MBSTRING", "-Iext/mbstring -Iext/mbstring/libmbfl -Iext/mbstring/oniguruma -Iext/mbstring/libmbfl/mbfl \
1518
/D HAVE_STRICMP /D MBFL_DLL_EXPORT=1 /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1")
1619

1720
ADD_FLAG("CFLAGS_BD_EXT_MBSTRING", "/utf-8")

ext/mbstring/oniguruma/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<[email protected]> (K.Kosako)

ext/mbstring/oniguruma/COPYING

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Oniguruma LICENSE
2+
-----------------
3+
4+
Copyright (c) 2002-2021 K.Kosako <[email protected]>
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without
8+
modification, are permitted provided that the following conditions
9+
are met:
10+
1. Redistributions of source code must retain the above copyright
11+
notice, this list of conditions and the following disclaimer.
12+
2. Redistributions in binary form must reproduce the above copyright
13+
notice, this list of conditions and the following disclaimer in the
14+
documentation and/or other materials provided with the distribution.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26+
SUCH DAMAGE.

ext/mbstring/oniguruma/ChangeLog

Whitespace-only changes.

0 commit comments

Comments
 (0)