summaryrefslogtreecommitdiffstats
path: root/php-pear
diff options
context:
space:
mode:
authorVlad Glagolev2012-10-03 16:32:03 +0400
committerVlad Glagolev2012-10-03 16:32:03 +0400
commit1f1e4fc840baf6da8e23d104a5b01487bcfb2f8a (patch)
treeb85934af9c773008ba762ebc8d879357838487f7 /php-pear
parent658fed6e4b62800b50a279d7fe3cd3609191873f (diff)
php: fixed build with ext. pcre >=8.30 (legacy)
Diffstat (limited to 'php-pear')
-rw-r--r--php-pear/php/HISTORY2
-rwxr-xr-xphp-pear/php/PRE_BUILD3
-rw-r--r--php-pear/php/pcre830.patch15
3 files changed, 19 insertions, 1 deletions
diff --git a/php-pear/php/HISTORY b/php-pear/php/HISTORY
index 96a961721a..85bd4331c4 100644
--- a/php-pear/php/HISTORY
+++ b/php-pear/php/HISTORY
@@ -1,6 +1,8 @@
2012-10-03 Vlad Glagolev <stealth@sourcemage.org>
* DETAILS: updated backports+security patches to 20120924;
SECUIRTY_PATCH++
+ * PRE_BUILD: apply the patch for legacy php branch
+ * pcre830.patch: added to fix build with external pcre lib >=8.30
2012-09-18 Ladislav Hagara <hgr@vabo.cz>
* DETAILS: 5.3.17
diff --git a/php-pear/php/PRE_BUILD b/php-pear/php/PRE_BUILD
index b3c82e4bce..96280bb9f3 100755
--- a/php-pear/php/PRE_BUILD
+++ b/php-pear/php/PRE_BUILD
@@ -3,7 +3,8 @@ cd "${SOURCE_DIRECTORY}" &&
if [[ $PHP5_BRANCH == legacy ]]; then
unpack_file 4 &&
- patch -p1 < "${SOURCE_CACHE}/${SOURCE4}"
+ patch -p1 < "${SOURCE_CACHE}/${SOURCE4}" &&
+ patch -p0 < "$SPELL_DIRECTORY/pcre830.patch"
fi &&
if [[ "${PHP5_SUHOSIN}" == "y" ]]; then
diff --git a/php-pear/php/pcre830.patch b/php-pear/php/pcre830.patch
new file mode 100644
index 0000000000..c47722a3fe
--- /dev/null
+++ b/php-pear/php/pcre830.patch
@@ -0,0 +1,15 @@
+--- ext/pcre/php_pcre.c.orig
++++ ext/pcre/php_pcre.c
+@@ -252,10 +252,11 @@
+ 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) {
++ int count = 0;
++ if (pcre_fullinfo(pce->re, NULL, PCRE_INFO_CAPTURECOUNT, &count) == PCRE_ERROR_BADMAGIC) {
+ zend_hash_clean(&PCRE_G(pcre_cache));
+ } else {