summaryrefslogtreecommitdiffstats
path: root/php-when.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-04-09 12:21:42 +0200
committerRemi Collet <remi@remirepo.net>2021-04-09 12:21:42 +0200
commit3f668087d2f9985c3da67881d02356d353019a0d (patch)
treeb8d4448cab76388fa9c2410fe02737b7ca6bfdd9 /php-when.spec
parent558027f1380c227356b752dd0bb31b7bb294686c (diff)
add minimal fix for PHP 8 from
https://github.com/tplaner/When/pull/80
Diffstat (limited to 'php-when.spec')
-rw-r--r--php-when.spec14
1 files changed, 11 insertions, 3 deletions
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 <shawn@iwin.ski>
+# Copyright (c) 2019-2021 Shawn Iwinski <shawn@iwin.ski>
#
# 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 <remi@remirepo.net> - 3.0.0-6
+- add minimal fix for PHP 8 from
+ https://github.com/tplaner/When/pull/80
+
* Tue May 14 2019 Shawn Iwinski <shawn@iwin.ski> - 3.0.0-1
- Update to 3.0.0 (RHBZ #1469514)
- Rewrite spec and license it under the MIT license