From 35c24923242603723ad99809fceb775523e97cc2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 4 Sep 2020 07:19:54 +0200 Subject: update to 1.0.9 drop patch merged upstream --- .gitignore | 2 ++ 174.patch | 38 -------------------------------------- PHPINFO | 2 +- REFLECTION | 2 +- php-ast.spec | 24 +++++++++--------------- 5 files changed, 13 insertions(+), 55 deletions(-) delete mode 100644 174.patch diff --git a/.gitignore b/.gitignore index 1ab5c4f..01f0400 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ +clog package-*.xml *.tgz +*.tar.bz2 *.tar.gz *.tar.xz *.tar.xz.asc diff --git a/174.patch b/174.patch deleted file mode 100644 index 9c391bf..0000000 --- a/174.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 1c0d5b08852e1fd69ad7110f4cae53ecac26de3c Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Wed, 2 Sep 2020 09:01:23 +0200 -Subject: [PATCH] fix for 8.0.0beta3 - ---- - ast.c | 17 ++++++++--------- - 1 file changed, 8 insertions(+), 9 deletions(-) - -diff --git a/ast.c b/ast.c -index eeb6b5a..2004d7d 100644 ---- a/ast.c -+++ b/ast.c -@@ -329,16 +329,15 @@ static zend_ast *get_ast(zend_string *code, zend_arena **ast_arena, char *filena - CG(in_compilation) = 1; - - zend_save_lexical_state(&original_lex_state); -- if (zend_prepare_string_for_scanning(&code_zv, filename) == SUCCESS) { -+ zend_prepare_string_for_scanning(&code_zv, filename); -+ CG(ast) = NULL; -+ CG(ast_arena) = zend_arena_create(1024 * 32); -+ LANG_SCNG(yy_state) = yycINITIAL; -+ -+ if (zendparse() != 0) { -+ zend_ast_destroy(CG(ast)); -+ zend_arena_destroy(CG(ast_arena)); - CG(ast) = NULL; -- CG(ast_arena) = zend_arena_create(1024 * 32); -- LANG_SCNG(yy_state) = yycINITIAL; -- -- if (zendparse() != 0) { -- zend_ast_destroy(CG(ast)); -- zend_arena_destroy(CG(ast_arena)); -- CG(ast) = NULL; -- } - } - - /* restore_lexical_state changes CG(ast) and CG(ast_arena) */ diff --git a/PHPINFO b/PHPINFO index 0a5412f..03d3fe2 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,5 +2,5 @@ ast ast support => enabled -extension version => 1.0.8 +extension version => 1.0.9 AST version => Current version is 70. All versions (including experimental): {50, 60, 70, 80} diff --git a/REFLECTION b/REFLECTION index dada6c4..9ca77f0 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #71 ast version 1.0.8 ] { +Extension [ extension #71 ast version 1.0.9 ] { - Constants [192] { Constant [ int ast\AST_ARG_LIST ] { 128 } diff --git a/php-ast.spec b/php-ast.spec index 492c092..c82bda4 100644 --- a/php-ast.spec +++ b/php-ast.spec @@ -20,11 +20,11 @@ Summary: Abstract Syntax Tree Name: %{?scl_prefix}php-ast -Version: 1.0.8 +Version: 1.0.9 %if 0%{?gh_date:1} Release: 0.6.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %else -Release: 2%{?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;')}} %endif License: BSD URL: https://github.com/%{gh_owner}/%{gh_project} @@ -34,8 +34,6 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz %endif -Patch0: https://patch-diff.githubusercontent.com/raw/nikic/php-ast/pull/174.patch - BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 7 BuildRequires: %{?scl_prefix}php-pear @@ -58,22 +56,16 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} %if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} %if "%{php_version}" > "7.2" -Obsoletes: php72u-%{pecl_name} <= %{version} Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.3" -Obsoletes: php73-%{pecl_name} <= %{version} Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.4" -Obsoletes: php74-%{pecl_name} <= %{version} Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif %endif @@ -105,8 +97,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 -b .pr174 - # Sanity check, really often broken extver=$(sed -n '/#define PHP_AST_VERSION/{s/.* "//;s/".*$//;p}' php_ast.h) if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then @@ -235,6 +225,10 @@ fi %changelog +* Fri Sep 4 2020 Remi Collet - 1.0.9-1 +- update to 1.0.9 +- drop patch merged upstream + * Wed Sep 2 2020 Remi Collet - 1.0.8-2 - add patch for 8.0.0beta3 from https://github.com/nikic/php-ast/pull/174 -- cgit