]> TLD Linux GIT Repositories - packages/php.git/blobdiff - pcre-shared.patch
- updated to 7.0.3
[packages/php.git] / pcre-shared.patch
index 81b9ecfbf37886ada942683a8fd7ba42d92dc49e..ae69ebdac93a52951525ebdc4f3020d14b6a2c5d 100644 (file)
@@ -1,16 +1,61 @@
---- php-5.3.1/ext/pcre/php_pcre.h      2009-11-30 20:59:04.046581246 +0200
-+++ php-5.3.1.pcre/ext/pcre/php_pcre.h 2009-11-30 21:38:06.435493243 +0000
+--- php-7.0/ext/pcre/config0.m4~       2015-05-24 14:39:04.000000000 +0300
++++ php-7.0/ext/pcre/config0.m4        2015-05-24 14:53:49.980250297 +0300
+@@ -11,7 +11,7 @@
+   if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
+     AC_MSG_CHECKING([for PCRE headers location])
+-    for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include; do
++    for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include /usr/include; do
+       test -f $i/pcre.h && PCRE_INCDIR=$i
+     done
+@@ -21,7 +21,7 @@
+     AC_MSG_RESULT([$PCRE_INCDIR])
+     AC_MSG_CHECKING([for PCRE library location])
+-    for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR; do
++    for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR /usr/$PHP_LIBDIR; do
+       test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j
+     done
+     
+@@ -43,12 +43,13 @@
+       AC_MSG_ERROR([The PCRE extension requires PCRE library version >= 6.6])
+     fi
+-    PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR)
++    PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD)
+     
+     AC_DEFINE(HAVE_PCRE, 1, [ ])
+     PHP_ADD_INCLUDE($PCRE_INCDIR)
+-    PHP_NEW_EXTENSION(pcre, php_pcre.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
++    PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
+     PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h])
++    EXTRA_LIBS="$EXTRA_LIBS -lpcre"
+   else
+     AC_MSG_CHECKING([for PCRE library to use])
+     AC_MSG_RESULT([bundled])
+@@ -61,7 +62,7 @@
+                                pcrelib/pcre_version.c pcrelib/pcre_xclass.c \
+                                pcrelib/pcre_jit_compile.c"
+     PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I@ext_srcdir@/pcrelib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
+-    PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS)
++    PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, $ext_shared,,$PHP_PCRE_CFLAGS)
+     PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
+     PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/])
+     AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
+--- php-7.0/ext/pcre/php_pcre.h~       2015-05-21 17:57:06.000000000 +0300
++++ php-7.0/ext/pcre/php_pcre.h        2015-05-24 14:56:27.528425546 +0300
 @@ -34,7 +34,12 @@
  #endif
  
- 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);
+ 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);
 +#if COMPILE_DL_PCRE
 +#define pcre_get_compiled_regex pcre_get_compiled_regex_p
-+extern PHPAPI pcre* (*pcre_get_compiled_regex)(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
++extern PHPAPI pcre* (*pcre_get_compiled_regex)(zend_string *regex, pcre_extra **extra, int *options);
 +#else
- PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
+ PHPAPI pcre* pcre_get_compiled_regex(zend_string *regex, pcre_extra **extra, int *options);
 +#endif
- PHPAPI pcre* pcre_get_compiled_regex_ex(char *regex, pcre_extra **extra, int *preg_options, int *coptions TSRMLS_DC);
+ PHPAPI pcre* pcre_get_compiled_regex_ex(zend_string *regex, pcre_extra **extra, int *preg_options, int *coptions);
  
  extern zend_module_entry pcre_module_entry;
 --- php-5.3.1/ext/pcre/php_pcre.c      2009-11-30 21:10:01.370473754 +0200
@@ -21,7 +66,7 @@
  
 +#if COMPILE_DL_PCRE
 +#undef pcre_get_compiled_regex
-+PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options TSRMLS_DC);
++PHPAPI pcre* pcre_get_compiled_regex(zend_string *regex, pcre_extra **extra, int *options);
 +#endif
 +
  #include "ext/standard/php_string.h"
@@ -54,7 +99,7 @@
  
 +#if COMPILE_DL_PCRE
 +// will be visible in here
-+PHPAPI pcre* (*pcre_get_compiled_regex_p)(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
++PHPAPI pcre* (*pcre_get_compiled_regex_p)(zend_string *regex, pcre_extra **extra, int *options);
 +#endif
 +
  #define DEFAULT_SECTION_NAME "Default Browser Capability Settings"
  
  [Zend Modules]
  %aDone
---- php-5.3.24/ext/pcre/config0.m4.orig        2013-04-10 09:42:48.000000000 +0200
-+++ php-5.3.24/ext/pcre/config0.m4     2013-04-12 18:54:41.113531049 +0200
-@@ -11,7 +11,7 @@
-   if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
-     AC_MSG_CHECKING([for PCRE headers location])
--    for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include; do
-+    for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include /usr/include; do
-       test -f $i/pcre.h && PCRE_INCDIR=$i
-     done
-@@ -21,7 +21,7 @@
-     AC_MSG_RESULT([$PCRE_INCDIR])
-     AC_MSG_CHECKING([for PCRE library location])
--    for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR; do
-+    for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR /usr/$PHP_LIBDIR; do
-       test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j
-     done
-     
-@@ -43,12 +43,13 @@
-       AC_MSG_ERROR([The PCRE extension requires PCRE library version >= 6.6])
-     fi
+--- php-7.0.0beta3/main/php_ini.c~     2015-08-26 18:50:15.000000000 +0300
++++ php-7.0.0beta3/main/php_ini.c      2015-08-26 22:33:59.126957396 +0300
+@@ -765,8 +765,8 @@
+  */
+ void php_ini_register_extensions(void)
+ {
+-      zend_llist_apply(&extension_lists.engine, php_load_zend_extension_cb);
+       zend_llist_apply(&extension_lists.functions, php_load_php_extension_cb);
++      zend_llist_apply(&extension_lists.engine, php_load_zend_extension_cb);
  
--    PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR)
-+    PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD)
-     
-     AC_DEFINE(HAVE_PCRE, 1, [ ])
-     PHP_ADD_INCLUDE($PCRE_INCDIR)
--    PHP_NEW_EXTENSION(pcre, php_pcre.c, no)
-+    PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared)
-     PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h])
-+    EXTRA_LIBS="$EXTRA_LIBS -lpcre"
-   else
-     AC_MSG_CHECKING([for PCRE library to use])
-     AC_MSG_RESULT([bundled])
-@@ -60,7 +61,7 @@
-                                pcrelib/pcre_tables.c pcrelib/pcre_valid_utf8.c \
-                                pcrelib/pcre_version.c pcrelib/pcre_xclass.c"
-     PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I@ext_srcdir@/pcrelib"
--    PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS)
-+    PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, $ext_shared,,-I@ext_srcdir@/pcrelib)
-     PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
-     PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/])
-     AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
+       zend_llist_destroy(&extension_lists.engine);
+       zend_llist_destroy(&extension_lists.functions);