]> git.pld-linux.org Git - packages/php.git/blob - pcre-shared.patch
This commit was manufactured by cvs2git to create branch 'DEVEL'.
[packages/php.git] / pcre-shared.patch
1 --- php-5.3.1/ext/pcre/config0.m4       2009-11-27 08:19:08.836025192 +0000
2 +++ php-5.3.1/ext/pcre/config0.m4       2009-11-30 22:09:24.385647500 +0000
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)
30 -    PHP_NEW_EXTENSION(pcre, php_pcre.c, no)
31 +    PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared)
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])
37 @@ -59,7 +60,7 @@
38                                  pcrelib/pcre_ord2utf8.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c \
39                                  pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_valid_utf8.c \
40                                  pcrelib/pcre_version.c pcrelib/pcre_xclass.c"
41 -    PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,-I@ext_srcdir@/pcrelib)
42 +    PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, $ext_shared,,-I@ext_srcdir@/pcrelib)
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, [ ])
46 --- php-5.3.1/ext/pcre/php_pcre.h       2009-11-30 20:59:04.046581246 +0200
47 +++ php-5.3.1.pcre/ext/pcre/php_pcre.h  2009-11-30 21:38:06.435493243 +0000
48 @@ -34,7 +34,12 @@
49  #endif
50  
51  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);
52 +#if COMPILE_DL_PCRE
53 +#define pcre_get_compiled_regex pcre_get_compiled_regex_p
54 +extern PHPAPI pcre* (*pcre_get_compiled_regex)(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
55 +#else
56  PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
57 +#endif
58  PHPAPI pcre* pcre_get_compiled_regex_ex(char *regex, pcre_extra **extra, int *preg_options, int *coptions TSRMLS_DC);
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
69 +PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options TSRMLS_DC);
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
102 +PHPAPI pcre* (*pcre_get_compiled_regex_p)(char *regex, pcre_extra **extra, int *options TSRMLS_DC);
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.100389 seconds and 3 git commands to generate.