From 0020cc650ff973f269f23332e82fc097254d0adc Mon Sep 17 00:00:00 2001 From: root Date: Sun, 12 Feb 2012 23:15:07 +0000 Subject: Sun Feb 12 23:15:07 UTC 2012 --- extra/php/PKGBUILD | 11 +++++++---- extra/php/pcre_info.patch | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 extra/php/pcre_info.patch (limited to 'extra/php') diff --git a/extra/php/PKGBUILD b/extra/php/PKGBUILD index da0430b2d..7c961ddaa 100644 --- a/extra/php/PKGBUILD +++ b/extra/php/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 148876 2012-02-05 11:53:48Z ibiru $ +# $Id: PKGBUILD 149966 2012-02-11 23:31:22Z allan $ # Maintainer: Pierre Schmitz pkgbase=php @@ -23,7 +23,7 @@ pkgname=('php' 'php-xsl') pkgver=5.3.10 _suhosinver=5.3.9-0.9.10 -pkgrel=2 +pkgrel=4 arch=('i686' 'x86_64') license=('PHP') url='http://www.php.net' @@ -35,7 +35,7 @@ source=("http://www.php.net/distributions/${pkgbase}-${pkgver}.tar.bz2" "http://download.suhosin.org/suhosin-patch-${_suhosinver}.patch.gz" "http://download.suhosin.org/suhosin-patch-${_suhosinver}.patch.gz.sig" 'php.ini.patch' 'apache.conf' 'rc.d.php-fpm' 'php-fpm.conf.in.patch' - 'logrotate.d.php-fpm') + 'logrotate.d.php-fpm' 'pcre_info.patch') md5sums=('816259e5ca7d0a7e943e56a3bb32b17f' 'c099b3d7eac95018ababd41ded7f3066' 'c15d18f846be1d69144a5d0056ee6506' @@ -43,7 +43,8 @@ md5sums=('816259e5ca7d0a7e943e56a3bb32b17f' 'dec2cbaad64e3abf4f0ec70e1de4e8e9' 'b01be5f816988fcee7e78225836e5e27' '740ec5fe2ecfd9d7febd4081c90ec65b' - '07c4e412909ac65a44ec90e7a2c4bade') + '07c4e412909ac65a44ec90e7a2c4bade' + '8d3806bbb19e390f9b32ccf21611d937') build() { phpconfig="--srcdir=../${pkgbase}-${pkgver} \ @@ -136,6 +137,8 @@ build() { cd ${srcdir}/${pkgbase}-${pkgver} + patch -p1 -i ${srcdir}/pcre_info.patch + # apply suhosin patch patch -p1 -i ${srcdir}/suhosin-patch-${_suhosinver}.patch diff --git a/extra/php/pcre_info.patch b/extra/php/pcre_info.patch new file mode 100644 index 000000000..e6d10df06 --- /dev/null +++ b/extra/php/pcre_info.patch @@ -0,0 +1,43 @@ +--- php-5.3.10/ext/pcre/php_pcre.c 2012-01-01 14:15:04.000000000 +0100 ++++ php-5.3.10/ext/pcre/php_pcre.c 2012-02-06 13:31:36.198935107 +0100 +@@ -241,6 +241,7 @@ + char *pattern; + int do_study = 0; + int poptions = 0; ++ int count = 0; + unsigned const char *tables = NULL; + #if HAVE_SETLOCALE + char *locale = setlocale(LC_CTYPE, NULL); +@@ -252,10 +252,10 @@ + back the compiled pattern, otherwise go on and compile it. */ + if (zend_hash_find(&PCRE_G(pcre_cache), regex, regex_len+1, (void **)&pce) == SUCCESS) { + /* +- * We use a quick pcre_info() check to see whether cache is corrupted, and if it ++ * We use a quick pcre_fullinfo() check to see whether cache is corrupted, and if it + * is, we flush it and compile the pattern from scratch. + */ +- if (pcre_info(pce->re, NULL, NULL) == PCRE_ERROR_BADMAGIC) { ++ if (pcre_fullinfo(pce->re, NULL, PCRE_INFO_CAPTURECOUNT, &count) == PCRE_ERROR_BADMAGIC) { + zend_hash_clean(&PCRE_G(pcre_cache)); + } else { + #if HAVE_SETLOCALE +--- php-5.3.10/ext/pcre/php_pcre.def 2009-01-11 14:59:00.000000000 +0100 ++++ php-5.3.10/ext/pcre/php_pcre.def 2012-02-06 13:31:47.775299315 +0100 +@@ -4,7 +4,6 @@ + php_pcre_exec + php_pcre_get_substring + php_pcre_get_substring_list +-php_pcre_info + php_pcre_maketables + php_pcre_study + php_pcre_version +--- php-5.3.10/main/php_compat.h 2012-01-01 14:15:04.000000000 +0100 ++++ php-5.3.10/main/php_compat.h 2012-02-06 13:26:59.272834580 +0100 +@@ -34,7 +34,6 @@ + #define pcre_exec php_pcre_exec + #define pcre_get_substring php_pcre_get_substring + #define pcre_get_substring_list php_pcre_get_substring_list +-#define pcre_info php_pcre_info + #define pcre_maketables php_pcre_maketables + #define pcre_study php_pcre_study + #define pcre_version php_pcre_version -- cgit v1.2.3-54-g00ecf