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