From 3f668087d2f9985c3da67881d02356d353019a0d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 9 Apr 2021 12:21:42 +0200 Subject: add minimal fix for PHP 8 from https://github.com/tplaner/When/pull/80 --- php-when.spec | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'php-when.spec') diff --git a/php-when.spec b/php-when.spec index c6fb260..9b2a02b 100644 --- a/php-when.spec +++ b/php-when.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-when # -# Copyright (c) 2019 Shawn Iwinski +# Copyright (c) 2019-2021 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -28,13 +28,16 @@ Name: php-when Version: %{github_version} -Release: 1%{?github_release}%{?dist} +Release: 6%{?github_release}%{?dist} Summary: Date/Calendar recursion library for PHP License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +# Minimal fix for PHP 8 +Patch0: %{name}-php8.patch + BuildArch: noarch # Tests %if %{with_tests} @@ -67,6 +70,7 @@ Autoloader: %{phpdir}/When/autoload.php %prep %setup -qn %{github_name}-%{github_commit} +%patch0 -p1 # Remove exec bit from doc file chmod a-x composer.json @@ -96,7 +100,7 @@ cp -rp src %{buildroot}%{phpdir}/When : Upstream tests RETURN_CODE=0 PHPUNIT=$(which phpunit) -for PHP_EXEC in php %{?rhel:php54 php55} php56 php70 php71 php72 php73 php74; do +for PHP_EXEC in php %{?rhel:php54 php55 php56 php70 php71 php72} php73 php74 php80; do if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then $PHP_EXEC -d date.timezone=UTC $PHPUNIT --verbose \ --bootstrap %{buildroot}%{phpdir}/When/autoload.php \ @@ -118,6 +122,10 @@ exit $RETURN_CODE %changelog +* Mon Dec 17 2012 Remi Collet - 3.0.0-6 +- add minimal fix for PHP 8 from + https://github.com/tplaner/When/pull/80 + * Tue May 14 2019 Shawn Iwinski - 3.0.0-1 - Update to 3.0.0 (RHBZ #1469514) - Rewrite spec and license it under the MIT license -- cgit