From 7b287d2e9573c53f77d83304a04dfb00ac444476 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 16 Sep 2019 13:17:01 +0200 Subject: sync with Fedora --- php-twig-extensions.spec | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'php-twig-extensions.spec') diff --git a/php-twig-extensions.spec b/php-twig-extensions.spec index 15f4831..cc3f7d8 100644 --- a/php-twig-extensions.spec +++ b/php-twig-extensions.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-twig-extensions # -# Copyright (c) 2014-2018 Shawn Iwinski +# Copyright (c) 2014-2019 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -32,10 +32,9 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 1%{?dist} +Release: 4%{?dist} Summary: Twig extensions -Group: Development/Libraries License: MIT URL: http://twig-extensions.readthedocs.io/ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz @@ -134,10 +133,29 @@ cp -rp src/* %{buildroot}%{phpdir}/Twig/Extensions/ sed -e 's/testLocalizedDateFilterWithDateTimeZone/SKIPtestLocalizedDateFilterWithDateTimeZone/' \ -i test/Twig/Tests/Extension/IntlTest.php +if php -r ' +require_once "%{buildroot}%{phpdir}/Twig/Extensions/autoload.php"; +exit(class_exists("Twig\\Error\\RuntimeError") ? 0 : 1); +' +then + grep -r --files-with-matches --null 'Twig_Error_Runtime' \ + | xargs -0 sed -i 's#Twig_Error_Runtime#Twig\\\\Error\\\\RuntimeError#g' +fi + +if php -r ' +require_once "%{buildroot}%{phpdir}/Twig/Extensions/autoload.php"; +exit(class_exists("Twig\\Error\\SyntaxError") ? 0 : 1); +' +then + grep -r --files-with-matches --null 'Twig_Error_Syntax' \ + | xargs -0 sed -i 's#Twig_Error_Syntax#Twig\\\\Error\\\\SyntaxError#g' +fi + + : Upstream tests RETURN_CODE=0 PHPUNIT=$(which phpunit) -for PHP_EXEC in "" %{?rhel:php55 php56} php70 php71 php72 php73; do +for PHP_EXEC in "" %{?rhel:php55 php56 php70} php71 php72 php73 php74; do if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then $PHP_EXEC $PHPUNIT --verbose \ --bootstrap %{buildroot}%{phpdir}/Twig/Extensions/autoload.php \ @@ -160,6 +178,9 @@ exit $RETURN_CODE %changelog +* Sat Sep 14 2019 Shawn Iwinski - 1.5.4-4 +- Fix FTBFS (RHBZ #1736436) + * Fri Dec 7 2018 Remi Collet - 1.5.4-1 - update to 1.5.4 -- cgit