diff options
| -rw-r--r-- | php-pecl-yaf.spec | 13 | ||||
| -rw-r--r-- | yaf-git.patch | 55 | 
2 files changed, 66 insertions, 2 deletions
diff --git a/php-pecl-yaf.spec b/php-pecl-yaf.spec index 2247dff..46d7c41 100644 --- a/php-pecl-yaf.spec +++ b/php-pecl-yaf.spec @@ -22,13 +22,15 @@  Summary:       Yet Another Framework  Name:          %{?scl_prefix}php-pecl-yaf  Version:       2.3.2 -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;')}  License:       PHP  Group:         Development/Languages  URL:           http://pecl.php.net/package/yaf  Source0:       http://pecl.php.net/get/%{pecl_name}-%{version}.tgz  Source1:       %{pecl_name}.ini +Patch0:        %{pecl_name}-git.patch +  BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root  BuildRequires: %{?scl_prefix}php-devel >= 5.2.0  BuildRequires: %{?scl_prefix}php-pear @@ -73,12 +75,16 @@ to develop web applications.  %setup -q -c   mv %{pecl_name}-%{version} NTS +cd NTS +%patch0 -p1 -b .upstream +  # Sanity check, really often broken -extver=$(sed -n '/#define PHP_YAF_VERSION/{s/.*\t"//;s/".*$//;p}' NTS/php_yaf.h ) +extver=$(sed -n '/#define PHP_YAF_VERSION/{s/.*\t"//;s/".*$//;p}' php_yaf.h )  if test "x${extver}" != "x%{version}"; then     : Error: Upstream extension version is ${extver}, expecting %{version}.     exit 1  fi +cd ..  %if %{with_zts}  # duplicate for ZTS build @@ -184,6 +190,9 @@ rm -rf %{buildroot}  %changelog +* Thu Jun 26 2014 Remi Collet <remi@fedoraproject.org> - 2.3.2-3 +- upstream patch for PHP 5.6 +  * Thu Apr 17 2014 Remi Collet <remi@fedoraproject.org> - 2.3.2-2  - add numerical prefix to extension configuration file (php 5.6) diff --git a/yaf-git.patch b/yaf-git.patch new file mode 100644 index 0000000..7453ca4 --- /dev/null +++ b/yaf-git.patch @@ -0,0 +1,55 @@ +From d5878063d8c654419f27d958134a1bf220e2344b Mon Sep 17 00:00:00 2001 +From: Xinchen Hui <laruence@gmail.com> +Date: Sun, 1 Jun 2014 19:57:31 +0800 +Subject: [PATCH] Fixed bug #67291 (Compile Error with PHP-5.6) + +--- + yaf_config.c | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git a/yaf_config.c b/yaf_config.c +index e4a56b9..c1f1997 100644 +--- a/yaf_config.c ++++ b/yaf_config.c +@@ -77,8 +77,10 @@ static void yaf_config_zval_dtor(zval **value) { + 				pefree((*value)->value.str.val, 1); + 				pefree(*value, 1); + 				break; +-			case IS_ARRAY: +-			case IS_CONSTANT_ARRAY: { ++#if ((PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 6)) ++			case IS_CONSTANT_ARRAY: ++#endif ++			case IS_ARRAY: { + 				zend_hash_destroy((*value)->value.ht); + 				pefree((*value)->value.ht, 1); + 				pefree(*value, 1); +@@ -179,8 +181,10 @@ static zval * yaf_config_ini_zval_persistent(zval *zvalue TSRMLS_DC) { + 				ret->value.str.val = pestrndup(zvalue->value.str.val, zvalue->value.str.len, 1); + 				ret->value.str.len = zvalue->value.str.len; + 			break; +-		case IS_ARRAY: +-		case IS_CONSTANT_ARRAY: { ++#if ((PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 6)) ++		case IS_CONSTANT_ARRAY: ++#endif ++		case IS_ARRAY: { + 				HashTable *tmp_ht, *original_ht = zvalue->value.ht; +  + 				tmp_ht = (HashTable *)pemalloc(sizeof(HashTable), 1); +@@ -218,8 +222,10 @@ static zval * yaf_config_ini_zval_losable(zval *zvalue TSRMLS_DC) { + 			CHECK_ZVAL_STRING(zvalue); + 			ZVAL_STRINGL(ret, zvalue->value.str.val, zvalue->value.str.len, 1); + 			break; +-		case IS_ARRAY: +-		case IS_CONSTANT_ARRAY: { ++#if ((PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 6)) ++		case IS_CONSTANT_ARRAY: ++#endif ++		case IS_ARRAY: { + 			HashTable *original_ht = zvalue->value.ht; + 			array_init(ret); + 			yaf_config_copy_losable(Z_ARRVAL_P(ret), original_ht TSRMLS_CC); +--  +1.9.3 +  | 
