diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | 0aa5b47574a6c4e6a034bfdb41a91f4a0699fb9d.patch | 44 | ||||
-rw-r--r-- | php-ast.spec | 9 |
3 files changed, 54 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d820c84 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.tar.gz +*.src.rpm diff --git a/0aa5b47574a6c4e6a034bfdb41a91f4a0699fb9d.patch b/0aa5b47574a6c4e6a034bfdb41a91f4a0699fb9d.patch new file mode 100644 index 0000000..062543e --- /dev/null +++ b/0aa5b47574a6c4e6a034bfdb41a91f4a0699fb9d.patch @@ -0,0 +1,44 @@ +From 0aa5b47574a6c4e6a034bfdb41a91f4a0699fb9d Mon Sep 17 00:00:00 2001 +From: Nikita Popov <nikita.ppv@gmail.com> +Date: Fri, 17 Mar 2017 18:20:25 +0100 +Subject: [PATCH] Fix ast_dump_with_linenos.phpt test + +--- + tests/ast_dump_with_linenos.phpt | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/tests/ast_dump_with_linenos.phpt b/tests/ast_dump_with_linenos.phpt +index 2b7c67a..abba57a 100644 +--- a/tests/ast_dump_with_linenos.phpt ++++ b/tests/ast_dump_with_linenos.phpt +@@ -1,7 +1,11 @@ + --TEST-- + ast_dump() with AST_DUMP_LINENOS + --SKIPIF-- +-<?php if (!extension_loaded("ast")) print "skip"; ?> ++<?php ++if (!extension_loaded("ast")) print "skip"; ++if (PHP_VERSION_ID >= 70000 && PHP_VERSION_ID < 70018) print "skip buggy PHP version"; ++if (PHP_VERSION_ID >= 70100 && PHP_VERSION_ID < 70104) print "skip buggy PHP version"; ++?> + --FILE-- + <?php + +@@ -22,8 +26,6 @@ PHP; + $ast = ast\parse_code($code, $version=30); + echo ast_dump($ast, AST_DUMP_LINENOS); + +-// The lineno for AST_ARG_LIST is wrong... +- + ?> + --EXPECT-- + AST_STMT_LIST @ 1 +@@ -37,7 +39,7 @@ AST_STMT_LIST @ 1 + expr: AST_NAME @ 6 + flags: NAME_NOT_FQ (1) + name: "var_dump" +- args: AST_ARG_LIST @ 8 ++ args: AST_ARG_LIST @ 7 + 0: AST_VAR @ 7 + name: "foo" + returnType: null diff --git a/php-ast.spec b/php-ast.spec index f750a22..25f5588 100644 --- a/php-ast.spec +++ b/php-ast.spec @@ -24,13 +24,15 @@ Version: 0.1.4 %if 0%{?gh_date:1} Release: 0.2.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %endif License: BSD Group: Development/Languages URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +Patch0: 0aa5b47574a6c4e6a034bfdb41a91f4a0699fb9d.patch + BuildRequires: %{?scl_prefix}php-devel > 7 BuildRequires: %{?scl_prefix}php-tokenizer @@ -66,6 +68,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO mv %{gh_project}-%{gh_commit} NTS cd NTS +%patch0 -p1 -b .upstream + # 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 @@ -169,6 +173,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Wed Mar 29 2017 Remi Collet <remi@remirepo.net> - 0.1.4-3 +- add upstream patch for PHP 7.1.4RC1, fix FTBFS detected by Koschei + * Thu Jan 26 2017 Remi Collet <remi@fedoraproject.org> - 0.1.4-1 - update to 0.1.4 |