summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-09-16 13:17:01 +0200
committerRemi Collet <remi@remirepo.net>2019-09-16 13:17:01 +0200
commit7b287d2e9573c53f77d83304a04dfb00ac444476 (patch)
treee54a31aa7ab5f5d0adb9496d33cfa2499d255b81
parentedb356d70ab4b1c0b3f3c267e619d9267239f17b (diff)
sync with FedoraHEADmaster
-rw-r--r--php-twig-extensions.spec29
1 files changed, 25 insertions, 4 deletions
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 <shawn.iwinski@gmail.com>
+# Copyright (c) 2014-2019 Shawn Iwinski <shawn.iwinski@gmail.com>
#
# 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 <shawn.iwinski@gmail.com> - 1.5.4-4
+- Fix FTBFS (RHBZ #1736436)
+
* Fri Dec 7 2018 Remi Collet <remi@remirepo.net> - 1.5.4-1
- update to 1.5.4