]> git.pld-linux.org Git - packages/php.git/blame - pcre-shared.patch
- release 16 (by relup.sh)
[packages/php.git] / pcre-shared.patch
CommitLineData
d758c359
ER
1--- php-5.3.1/ext/pcre/config0.m4 2009-11-30 22:09:24.385647500 +0000
2+++ php-5.3.24/ext/pcre/config0.m4 2013-04-17 13:37:52.761509001 +0300
722f34a7
ER
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
d758c359 21@@ -43,12 +43,14 @@
722f34a7
ER
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)
30- PHP_NEW_EXTENSION(pcre, php_pcre.c, no)
31+ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared)
d758c359 32+ PHP_SUBST(PCRE_SHARED_LIBADD)
722f34a7 33 PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h])
7396731d 34+ EXTRA_LIBS="$EXTRA_LIBS -lpcre"
722f34a7
ER
35 else
36 AC_MSG_CHECKING([for PCRE library to use])
37 AC_MSG_RESULT([bundled])
722f34a7
ER
38--- php-5.3.1/ext/pcre/php_pcre.h 2009-11-30 20:59:04.046581246 +0200
39+++ php-5.3.1.pcre/ext/pcre/php_pcre.h 2009-11-30 21:38:06.435493243 +0000
40@@ -34,7 +34,12 @@
41 #endif
42
43 PHPAPI char *php_pcre_replace(char *regex, int regex_len, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int *result_len, int limit, int *replace_count TSRMLS_DC);
44+#if COMPILE_DL_PCRE
45+#define pcre_get_compiled_regex pcre_get_compiled_regex_p
46+extern PHPAPI pcre* (*pcre_get_compiled_regex)(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
47+#else
48 PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
49+#endif
50 PHPAPI pcre* pcre_get_compiled_regex_ex(char *regex, pcre_extra **extra, int *preg_options, int *coptions TSRMLS_DC);
51
52 extern zend_module_entry pcre_module_entry;
53--- php-5.3.1/ext/pcre/php_pcre.c 2009-11-30 21:10:01.370473754 +0200
54+++ php-5.3.1.pcre/ext/pcre/php_pcre.c 2009-11-30 21:38:01.759684456 +0000
55@@ -27,6 +27,11 @@
56
57 #if HAVE_PCRE || HAVE_BUNDLED_PCRE
58
59+#if COMPILE_DL_PCRE
60+#undef pcre_get_compiled_regex
61+PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options TSRMLS_DC);
62+#endif
63+
64 #include "ext/standard/php_string.h"
65
66 #define PREG_PATTERN_ORDER 1
67@@ -153,6 +158,10 @@
68 REGISTER_LONG_CONSTANT("PREG_BAD_UTF8_OFFSET_ERROR", PHP_PCRE_BAD_UTF8_OFFSET_ERROR, CONST_CS | CONST_PERSISTENT);
69 REGISTER_STRING_CONSTANT("PCRE_VERSION", (char *)pcre_version(), CONST_CS | CONST_PERSISTENT);
70
71+#if COMPILE_DL_PCRE
72+ pcre_get_compiled_regex_p = pcre_get_compiled_regex;
73+#endif
74+
75 return SUCCESS;
76 }
77 /* }}} */
78@@ -429,6 +438,7 @@
79 }
80 /* }}} */
81
82+
83 /* {{{ pcre_get_compiled_regex
84 */
85 PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options TSRMLS_DC)
86--- php-5.3.1/ext/standard/browscap.c 2009-06-06 02:40:49.000000000 +0000
87+++ php-5.3.1.pcre/ext/standard/browscap.c 2009-11-30 21:33:00.775241138 +0000
88@@ -31,6 +31,11 @@
89 static zval *current_section;
90 static char *current_section_name;
91
92+#if COMPILE_DL_PCRE
93+// will be visible in here
94+PHPAPI pcre* (*pcre_get_compiled_regex_p)(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
95+#endif
96+
97 #define DEFAULT_SECTION_NAME "Default Browser Capability Settings"
98
99 /* OBJECTS_FIXME: This whole extension needs going through. The use of objects looks pretty broken here */
a4111138
ER
100--- php-5.3.2/sapi/cli/tests/018.phpt~ 2008-03-17 16:05:39.000000000 +0200
101+++ php-5.3.2/sapi/cli/tests/018.phpt 2010-03-16 20:41:11.341251246 +0200
102@@ -20,8 +20,6 @@
103 --EXPECTF--
104 [PHP Modules]
105 %a
106-pcre
107-%a
108
109 [Zend Modules]
110 %aDone
This page took 0.046061 seconds and 4 git commands to generate.