diff options
| author | Remi Collet <fedora@famillecollet.com> | 2014-06-08 18:46:53 +0200 | 
|---|---|---|
| committer | Remi Collet <fedora@famillecollet.com> | 2014-06-08 18:46:53 +0200 | 
| commit | 8cdab475e3fc811e4108907474e3050610cfd8c8 (patch) | |
| tree | 95b3eb18ee090eb6568b46b9023cff056d8adb24 | |
| parent | 1d00627c26ecc270c58fe296927918ad6f14ac16 (diff) | |
php-pecl-apcu: upstream build patch for php 5.6
| -rw-r--r-- | apcu-php56.patch | 57 | ||||
| -rw-r--r-- | php-pecl-apcu.spec | 10 | 
2 files changed, 66 insertions, 1 deletions
| diff --git a/apcu-php56.patch b/apcu-php56.patch new file mode 100644 index 0000000..70efbc6 --- /dev/null +++ b/apcu-php56.patch @@ -0,0 +1,57 @@ +From 244473d2bca7aff7ce24a58651ab8a261669d99d Mon Sep 17 00:00:00 2001 +From: krakjoe <joe.watkins@live.co.uk> +Date: Sun, 8 Jun 2014 17:40:36 +0100 +Subject: [PATCH] fix #73 + +--- + apc_bin.c   | 1 - + apc_cache.c | 6 ++---- + 2 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/apc_bin.c b/apc_bin.c +index 00f7160..a8f705c 100644 +--- a/apc_bin.c ++++ b/apc_bin.c +@@ -235,7 +235,6 @@ static void apc_swizzle_zval(apc_bd_t *bd, apc_context_t* ctxt, zend_llist *ll, +             apc_swizzle_ptr(bd, ctxt, ll, &zv->value.str.val); +             break; +         case IS_ARRAY: +-        case IS_CONSTANT_ARRAY: +             apc_swizzle_hashtable(bd, ctxt, ll, zv->value.ht, (apc_swizzle_cb_t)apc_swizzle_zval, 1 TSRMLS_CC); +             apc_swizzle_ptr(bd, ctxt, ll, &zv->value.ht); +             break; +diff --git a/apc_cache.c b/apc_cache.c +index b82611d..e0e53df 100644 +--- a/apc_cache.c ++++ b/apc_cache.c +@@ -1001,9 +1001,8 @@ PHP_APCU_API zend_bool apc_cache_update(apc_cache_t* cache, char *strkey, zend_u +         if ((h == (*slot)->key.h) && +             !memcmp((*slot)->key.str, strkey, keylen)) { + 			/* attempt to perform update */ +-            switch(Z_TYPE_P((*slot)->value->val) & ~IS_CONSTANT_INDEX) { ++            switch(Z_TYPE_P((*slot)->value->val) & ~IS_CONSTANT_TYPE_MASK) { +                 case IS_ARRAY: +-                case IS_CONSTANT_ARRAY: +                 case IS_OBJECT: +                 { +                     if(cache->serializer) { +@@ -1124,7 +1123,7 @@ static zval* my_serialize_object(zval* dst, const zval* src, apc_context_t* ctxt +     } +  +     if(serialize((unsigned char**)&buf.c, &buf.len, src, config TSRMLS_CC)) { +-        dst->type = src->type & ~IS_CONSTANT_INDEX;  ++        dst->type = src->type & ~IS_CONSTANT;  +         dst->value.str.len = buf.len; +         CHECK(dst->value.str.val = apc_pmemcpy(buf.c, (buf.len + 1), pool TSRMLS_CC)); +     } +@@ -1357,7 +1356,6 @@ static APC_HOTSPOT zval* my_copy_zval(zval* dst, const zval* src, apc_context_t* +         break; +  +     case IS_ARRAY: +-    case IS_CONSTANT_ARRAY: +         if(ctxt->serializer == NULL) { +  +             CHECK(dst->value.ht = +--  +1.9.3 + diff --git a/php-pecl-apcu.spec b/php-pecl-apcu.spec index 7120d9d..e44c55f 100644 --- a/php-pecl-apcu.spec +++ b/php-pecl-apcu.spec @@ -23,12 +23,14 @@  Name:           %{?scl_prefix}php-pecl-apcu  Summary:        APC User Cache  Version:        4.0.4 -Release:        2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release:        3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}  Source0:        http://pecl.php.net/get/%{pecl_name}-%{version}.tgz  Source1:        %{pecl_name}.ini  Source2:        %{pecl_name}-panel.conf  Source3:        %{pecl_name}.conf.php +Patch0:         %{pecl_name}-php56.patch +  License:        PHP  Group:          Development/Languages  URL:            http://pecl.php.net/package/APCu @@ -150,6 +152,9 @@ configuration, available on http://localhost/apcu-panel/  mv %{pecl_name}-%{version} NTS  cd NTS + +%patch0 -p1 -b .php56 +  # Sanity check, really often broken  extver=$(sed -n '/#define PHP_APCU_VERSION/{s/.* "//;s/".*$//;p}' php_apc.h)  if test "x${extver}" != "x%{version}"; then @@ -306,6 +311,9 @@ fi  %changelog +* Sun Jun  8 2014 Remi Collet <remi@fedoraproject.org> - 4.0.4-3 +- add build patch for php 5.6.0beta4 +  * Wed Apr  9 2014 Remi Collet <remi@fedoraproject.org> - 4.0.4-2  - add numerical prefix to extension configuration file | 
