]> git.pld-linux.org Git - packages/php.git/blame - pcre-shared.patch
up to 7.0.0 snapshot from php-src master
[packages/php.git] / pcre-shared.patch
CommitLineData
f4ee12ea
ER
1--- php-7.0/ext/pcre/config0.m4~ 2015-05-24 14:39:04.000000000 +0300
2+++ php-7.0/ext/pcre/config0.m4 2015-05-24 14:53:49.980250297 +0300
c0240cb1 3@@ -11,7 +11,7 @@
4
5 if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
6 AC_MSG_CHECKING([for PCRE headers location])
7- for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include; do
8+ for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include /usr/include; do
9 test -f $i/pcre.h && PCRE_INCDIR=$i
10 done
11
12@@ -21,7 +21,7 @@
13 AC_MSG_RESULT([$PCRE_INCDIR])
14
15 AC_MSG_CHECKING([for PCRE library location])
16- for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR; do
17+ for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR /usr/$PHP_LIBDIR; do
18 test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j
19 done
20
21@@ -43,12 +43,13 @@
22 AC_MSG_ERROR([The PCRE extension requires PCRE library version >= 6.6])
23 fi
24
25- PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR)
26+ PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD)
27
28 AC_DEFINE(HAVE_PCRE, 1, [ ])
29 PHP_ADD_INCLUDE($PCRE_INCDIR)
f4ee12ea
ER
30- PHP_NEW_EXTENSION(pcre, php_pcre.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
31+ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
c0240cb1 32 PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h])
33+ EXTRA_LIBS="$EXTRA_LIBS -lpcre"
34 else
35 AC_MSG_CHECKING([for PCRE library to use])
36 AC_MSG_RESULT([bundled])
f4ee12ea
ER
37@@ -61,7 +62,7 @@
38 pcrelib/pcre_version.c pcrelib/pcre_xclass.c \
39 pcrelib/pcre_jit_compile.c"
40 PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I@ext_srcdir@/pcrelib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
553dd2f2
ER
41- PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS)
42+ PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, $ext_shared,,$PHP_PCRE_CFLAGS)
c0240cb1 43 PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
44 PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/])
45 AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
f4ee12ea
ER
46--- php-7.0/ext/pcre/php_pcre.h~ 2015-05-21 17:57:06.000000000 +0300
47+++ php-7.0/ext/pcre/php_pcre.h 2015-05-24 14:56:27.528425546 +0300
c0240cb1 48@@ -34,7 +34,12 @@
49 #endif
50
f4ee12ea 51 PHPAPI zend_string *php_pcre_replace(zend_string *regex, zend_string *subject_str, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int limit, int *replace_count);
c0240cb1 52+#if COMPILE_DL_PCRE
53+#define pcre_get_compiled_regex pcre_get_compiled_regex_p
f4ee12ea 54+extern PHPAPI pcre* (*pcre_get_compiled_regex)(zend_string *regex, pcre_extra **extra, int *options);
c0240cb1 55+#else
f4ee12ea 56 PHPAPI pcre* pcre_get_compiled_regex(zend_string *regex, pcre_extra **extra, int *options);
c0240cb1 57+#endif
f4ee12ea 58 PHPAPI pcre* pcre_get_compiled_regex_ex(zend_string *regex, pcre_extra **extra, int *preg_options, int *coptions);
c0240cb1 59
60 extern zend_module_entry pcre_module_entry;
61--- php-5.3.1/ext/pcre/php_pcre.c 2009-11-30 21:10:01.370473754 +0200
62+++ php-5.3.1.pcre/ext/pcre/php_pcre.c 2009-11-30 21:38:01.759684456 +0000
63@@ -27,6 +27,11 @@
64
65 #if HAVE_PCRE || HAVE_BUNDLED_PCRE
66
67+#if COMPILE_DL_PCRE
68+#undef pcre_get_compiled_regex
f4ee12ea 69+PHPAPI pcre* pcre_get_compiled_regex(zend_string *regex, pcre_extra **extra, int *options);
c0240cb1 70+#endif
71+
72 #include "ext/standard/php_string.h"
73
74 #define PREG_PATTERN_ORDER 1
75@@ -153,6 +158,10 @@
76 REGISTER_LONG_CONSTANT("PREG_BAD_UTF8_OFFSET_ERROR", PHP_PCRE_BAD_UTF8_OFFSET_ERROR, CONST_CS | CONST_PERSISTENT);
77 REGISTER_STRING_CONSTANT("PCRE_VERSION", (char *)pcre_version(), CONST_CS | CONST_PERSISTENT);
78
79+#if COMPILE_DL_PCRE
80+ pcre_get_compiled_regex_p = pcre_get_compiled_regex;
81+#endif
82+
83 return SUCCESS;
84 }
85 /* }}} */
86@@ -429,6 +438,7 @@
87 }
88 /* }}} */
89
90+
91 /* {{{ pcre_get_compiled_regex
92 */
93 PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options TSRMLS_DC)
94--- php-5.3.1/ext/standard/browscap.c 2009-06-06 02:40:49.000000000 +0000
95+++ php-5.3.1.pcre/ext/standard/browscap.c 2009-11-30 21:33:00.775241138 +0000
96@@ -31,6 +31,11 @@
97 static zval *current_section;
98 static char *current_section_name;
99
100+#if COMPILE_DL_PCRE
101+// will be visible in here
f4ee12ea 102+PHPAPI pcre* (*pcre_get_compiled_regex_p)(zend_string *regex, pcre_extra **extra, int *options);
c0240cb1 103+#endif
104+
105 #define DEFAULT_SECTION_NAME "Default Browser Capability Settings"
106
107 /* OBJECTS_FIXME: This whole extension needs going through. The use of objects looks pretty broken here */
108--- php-5.3.2/sapi/cli/tests/018.phpt~ 2008-03-17 16:05:39.000000000 +0200
109+++ php-5.3.2/sapi/cli/tests/018.phpt 2010-03-16 20:41:11.341251246 +0200
110@@ -20,8 +20,6 @@
111 --EXPECTF--
112 [PHP Modules]
113 %a
114-pcre
115-%a
116
117 [Zend Modules]
118 %aDone
This page took 0.051116 seconds and 4 git commands to generate.