From c8f347b6e2a1437c5d8315c65f4e6ea975d858e4 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 18 Aug 2014 17:32:49 +0200 Subject: php-pecl-parsekit: patch for php 5.6 (backport) --- php-pecl-parsekit-1.3-php56-variadic-fix.patch | 12 ++++++ php-pecl-parsekit.spec | 53 +++++++++++++++++++------- 2 files changed, 51 insertions(+), 14 deletions(-) create mode 100644 php-pecl-parsekit-1.3-php56-variadic-fix.patch diff --git a/php-pecl-parsekit-1.3-php56-variadic-fix.patch b/php-pecl-parsekit-1.3-php56-variadic-fix.patch new file mode 100644 index 0000000..6a8a7d6 --- /dev/null +++ b/php-pecl-parsekit-1.3-php56-variadic-fix.patch @@ -0,0 +1,12 @@ +diff -Naur php-pecl-parsekit-1.3.0.orig/parsekit-1.3.0/parsekit.c php-pecl-parsekit-1.3.0/parsekit-1.3.0/parsekit.c +--- php-pecl-parsekit-1.3.0.orig/parsekit-1.3.0/parsekit.c 2014-08-16 21:55:32.000000000 +0400 ++++ php-pecl-parsekit-1.3.0/parsekit-1.3.0/parsekit.c 2014-08-18 12:50:05.377165855 +0400 +@@ -300,7 +300,7 @@ + } + add_assoc_long(return_value, "num_args", ops->num_args); + add_assoc_long(return_value, "required_num_args", ops->required_num_args); +- add_assoc_bool(return_value, "pass_rest_by_reference", ops->fn_flags & ZEND_ACC_PASS_REST_BY_REFERENCE); ++ add_assoc_bool(return_value, "pass_rest_by_reference", ops->fn_flags & ZEND_ACC_VARIADIC); + + if (ops->num_args && ops->arg_info) { + MAKE_STD_ZVAL(tmpzval); diff --git a/php-pecl-parsekit.spec b/php-pecl-parsekit.spec index 60340a0..1a1d20a 100644 --- a/php-pecl-parsekit.spec +++ b/php-pecl-parsekit.spec @@ -1,11 +1,16 @@ -%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}} +%{!?__pecl: %global __pecl %{_bindir}/pecl} -%global pecl_name parsekit +%global pecl_name parsekit +%if "%{php_version}" < "5.6" +%global ini_name %{pecl_name}.ini +%else +%global ini_name 40-%{pecl_name}.ini +%endif Summary: PHP Opcode Analyser Name: php-pecl-parsekit Version: 1.3.0 -Release: 2%{?CVS:.CVS%{CVS}}%{?dist}.1 +Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} # https://bugs.php.net/65937 - license file License: PHP URL: http://pecl.php.net/package/parsekit @@ -14,6 +19,8 @@ Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz # https://bugs.php.net/bug.php?id=61187 Patch1: php-pecl-parsekit-1.3-php-5.4.patch +# https://bugs.php.net/bug.php?id=67854 +Patch2: php-pecl-parsekit-1.3-php56-variadic-fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: php-pear @@ -30,14 +37,21 @@ Provides: php-%{pecl_name}%{?_isa} = %{version} Provides: php-pecl(%{pecl_name}) = %{version} Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} +%if "%{?vendor}" == "Remi Collet" # Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} +Obsoletes: php53-pecl-%{pecl_name} Obsoletes: php53u-pecl-%{pecl_name} -%if "%{php_version}" > "5.4" -Obsoletes: php54-pecl-%{pecl_name} -%endif +Obsoletes: php53w-pecl-%{pecl_name} +Obsoletes: php54-pecl-%{pecl_name} +Obsoletes: php54x-pecl-%{pecl_name} %if "%{php_version}" > "5.5" Obsoletes: php55u-pecl-%{pecl_name} +Obsoletes: php55w-pecl-%{pecl_name} +%endif +%if "%{php_version}" > "5.4" +%endif +Obsoletes: php56u-pecl-%{pecl_name} +Obsoletes: php56w-pecl-%{pecl_name} %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 @@ -58,14 +72,15 @@ some code which is potentially non-threadsafe. %prep %setup -qc -%if "%{php_version}" > "5.4" cd %{pecl_name}-%{version} %patch1 -p2 -b .php54 -cd .. +%if "%{php_version}" > "5.6" +%patch2 -p2 -b .php56 %endif +cd .. # Create configuration file -cat <<'EOF' > %{pecl_name}.ini +cat <<'EOF' > %{ini_name} ; Enable %{pecl_name} extension module extension=%{pecl_name}.so EOF @@ -96,8 +111,8 @@ make install -C %{pecl_name}-%{version} install INSTALL_ROOT=%{buildroot} make install -C %{pecl_name}-zts install INSTALL_ROOT=%{buildroot} # Drop in the bit of configuration -install -Dpm 644 %{pecl_name}.ini %{buildroot}%{php_inidir}/%{pecl_name}.ini -install -Dpm 644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/%{pecl_name}.ini +install -Dpm 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} +install -Dpm 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Install XML package description install -Dpm 0664 package2.xml %{buildroot}%{pecl_xmldir}/%{name}.xml @@ -136,13 +151,23 @@ rm -rf %{buildroot} %{pecl_xmldir}/%{name}.xml %{php_extdir}/%{pecl_name}.so -%config(noreplace) %{php_inidir}/%{pecl_name}.ini +%config(noreplace) %{php_inidir}/%{ini_name} %{php_ztsextdir}/%{pecl_name}.so -%config(noreplace) %{php_ztsinidir}/%{pecl_name}.ini +%config(noreplace) %{php_ztsinidir}/%{ini_name} %changelog +* Mon Aug 18 2014 Remi Collet - 1.3.0-6 +- backport rawhide change (php 5.6 patch) for remi-repo +- add numerical prefix to extension configuration file + +* Mon Aug 18 2014 Pavel Alexeev - 1.3.0-6 +- Fix FBFS bz#1111492 - ( https://bugs.php.net/bug.php?id=67854 ) + add Patch2: php-pecl-parsekit-1.3-php56-variadic-fix.patch + Based on introduced incompatability from commit + https://github.com/php/php-src/commit/0d7a6388663b76ebed6585ac92dfca5ef65fa7af + * Sat Jan 5 2013 Remi Collet - 1.3.0-2 - also provides php-parsekit -- cgit