diff options
| -rw-r--r-- | 106.patch | 64 | ||||
| -rw-r--r-- | REFLECTION | 4 | ||||
| -rw-r--r-- | php-pecl-yar.spec | 20 | 
3 files changed, 12 insertions, 76 deletions
| diff --git a/106.patch b/106.patch deleted file mode 100644 index 135575f..0000000 --- a/106.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 0562724d7f18d8332e7e11c65db65766102cba05 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Mon, 26 Jun 2017 15:33:29 +0200 -Subject: [PATCH] fix for 7.2 - ---- - yar_server.c | 20 ++++++++++++++++---- - 1 file changed, 16 insertions(+), 4 deletions(-) - -diff --git a/yar_server.c b/yar_server.c -index 6c01d81..e301030 100644 ---- a/yar_server.c -+++ b/yar_server.c -@@ -43,10 +43,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_service___construct, 0, 0, 1) - 	ZEND_ARG_INFO(0, protocol) - ZEND_END_ARG_INFO() -  --ZEND_BEGIN_ARG_INFO_EX(arginfo_service_set_packager, 0, 0, 1) --	ZEND_ARG_INFO(0, protocol) --ZEND_END_ARG_INFO() -- - ZEND_BEGIN_ARG_INFO_EX(arginfo_service_void, 0, 0, 1) - ZEND_END_ARG_INFO() - /* }}} */ -@@ -147,6 +143,14 @@ static char * php_yar_get_function_declaration(zend_function *fptr) /* {{{ */ { -  - 		required = fptr->common.required_num_args; - 		for (i = 0; i < fptr->common.num_args;) { -+#if PHP_VERSION_ID >= 70200 -+			if (ZEND_TYPE_IS_CLASS(arg_info->type)) { -+				const char *class_name; -+				uint32_t class_name_len; -+				zend_string *class_str = ZEND_TYPE_NAME(arg_info->type); -+				class_name = ZSTR_VAL(class_str); -+				class_name_len = ZSTR_LEN(class_str); -+#else - 			if (arg_info->class_name) { - 				const char *class_name; - 				uint32_t class_name_len; -@@ -157,6 +161,7 @@ static char * php_yar_get_function_declaration(zend_function *fptr) /* {{{ */ { - 					class_name = ZSTR_VAL(arg_info->class_name); - 					class_name_len = ZSTR_LEN(arg_info->class_name); - 				} -+#endif - 				if (strncasecmp(class_name, "self", sizeof("self")) && fptr->common.scope ) { - 					class_name = ZSTR_VAL(fptr->common.scope->name); - 					class_name_len = ZSTR_LEN(fptr->common.scope->name); -@@ -168,9 +173,16 @@ static char * php_yar_get_function_declaration(zend_function *fptr) /* {{{ */ { - 				memcpy(offset, class_name, class_name_len); - 				offset += class_name_len; - 				*(offset++) = ' '; -+ -+#if PHP_VERSION_ID >= 70200 -+			} else if (ZEND_TYPE_IS_CODE(arg_info->type)) { -+				uint32_t type_name_len; -+				char *type_name = zend_get_type_by_const(ZEND_TYPE_CODE(arg_info->type)); -+#else - 			} else if (arg_info->type_hint) { - 				uint32_t type_name_len; - 				char *type_name = zend_get_type_by_const(arg_info->type_hint); -+#endif - 				type_name_len = strlen(type_name); - 				REALLOC_BUF_IF_EXCEED(buf, offset, length, type_name_len); - 				memcpy(offset, type_name, type_name_len); @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #175 yar version 2.0.2 ] { +Extension [ <persistent> extension #180 yar version 2.0.3 ] {    - Dependencies {      Dependency [ json (Required) ] @@ -33,7 +33,7 @@ Extension [ <persistent> extension #175 yar version 2.0.2 ] {    }    - Constants [18] { -    Constant [ string YAR_VERSION ] { 2.0.2 } +    Constant [ string YAR_VERSION ] { 2.0.3 }      Constant [ integer YAR_OPT_PACKAGER ] { 1 }      Constant [ integer YAR_OPT_PERSISTENT ] { 2 }      Constant [ integer YAR_OPT_TIMEOUT ] { 4 } diff --git a/php-pecl-yar.spec b/php-pecl-yar.spec index 8d55a6b..ea6a998 100644 --- a/php-pecl-yar.spec +++ b/php-pecl-yar.spec @@ -29,20 +29,18 @@  Summary:        Light, concurrent RPC framework  Name:           %{?sub_prefix}php-pecl-%{pecl_name} -Version:        2.0.2 +Version:        2.0.3  %if 0%{?gh_date:1}  Release:        0.12.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}  Source0:        https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz  %else -Release:        3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release:        1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}  Source0:        http://pecl.php.net/get/%{pecl_name}-%{version}.tgz  %endif  License:        PHP  Group:          Development/Languages  URL:            http://pecl.php.net/package/%{pecl_name} -Patch0:         106.patch -  BuildRequires:  curl-devel  BuildRequires:  %{?scl_prefix}php-devel > 7  BuildRequires:  %{?scl_prefix}php-pear @@ -111,7 +109,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO  %setup -qc  %if 0%{?gh_date:1}  mv %{gh_project}-%{gh_commit} NTS -mv NTS/package2.xml . +mv NTS/package.xml .  %else  mv %{pecl_name}-%{version} NTS  %endif @@ -119,10 +117,9 @@ mv %{pecl_name}-%{version} NTS  # Don't install/register tests  sed -e 's/role="test"/role="src"/' \      %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -    -i package2.xml +    -i package.xml  cd NTS -%patch0 -p1 -b .pr106  # Sanity check, really often broken  extver=$(sed -n '/#define PHP_YAR_VERSION/{s/.* "//;s/".*$//;p}' php_yar.h) @@ -134,7 +131,7 @@ cd ..  sed -e 's:tools/yar_debug.inc:yar_debug.inc:' \      -e 's:tools/yar_debug.php:yar_debug:' \ -    -i package2.xml +    -i package.xml  %if %{with_zts}  # Duplicate source tree for NTS / ZTS build @@ -187,7 +184,7 @@ make -C NTS install INSTALL_ROOT=%{buildroot}  install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}  # Install XML package description -install -D -m 644 package2.xml %{buildroot}%{pecl_xmldir}/%{name}.xml +install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml  %if %{with_zts}  make -C ZTS install INSTALL_ROOT=%{buildroot} @@ -201,7 +198,7 @@ install -Dpm 755 NTS/tools/yar_debug.php %{buildroot}%{_bindir}/yar_debug  # Documentation  cd NTS -for i in $(grep 'role="doc"' ../package2.xml | sed -e 's/^.*name="//;s/".*$//') +for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')  do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i  done @@ -282,6 +279,9 @@ export YAR_API_PORT=8964  %changelog +* Tue Aug  1 2017 Remi Collet <remi@remirepo.net> - 2.0.3-1 +- Update to 2.0.3 +  * Tue Jul 18 2017 Remi Collet <remi@remirepo.net> - 2.0.2-3  - rebuild for PHP 7.2.0beta1 new API | 
