summaryrefslogtreecommitdiffstats
path: root/php-phpmyadmin-sql-parser5.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-10-29 10:20:57 +0200
committerRemi Collet <remi@php.net>2021-10-29 10:20:57 +0200
commit23b10439136f8f9bd4b7ce445427594c45813b53 (patch)
tree0b74c90270d4d6ef47d0b248ba06f9e3b04108a1 /php-phpmyadmin-sql-parser5.spec
parentd6845aebac031f7b6f77360545bc435284f5f87d (diff)
add upstream patches for PHP 8.1
Diffstat (limited to 'php-phpmyadmin-sql-parser5.spec')
-rw-r--r--php-phpmyadmin-sql-parser5.spec16
1 files changed, 9 insertions, 7 deletions
diff --git a/php-phpmyadmin-sql-parser5.spec b/php-phpmyadmin-sql-parser5.spec
index 75600a4..ff1e4a2 100644
--- a/php-phpmyadmin-sql-parser5.spec
+++ b/php-phpmyadmin-sql-parser5.spec
@@ -20,7 +20,7 @@
Name: php-%{gh_owner}-%{gh_project}%{major}
Version: 5.4.2
-Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist}
+Release: 3%{?gh_date?%{gh_date}git%{gh_short}}%{?dist}
Summary: A validating SQL lexer and parser with a focus on MySQL dialect
License: GPLv2+
@@ -29,6 +29,8 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
# Use our autoloader and locale relocation
Patch0: %{name}-autoload.patch
+# Upstream patches for PHP 8.1
+Patch1: %{name}-php81.patch
BuildArch: noarch
BuildRequires: gettext
@@ -45,13 +47,8 @@ BuildRequires: php-spl
# "phpstan/phpstan-phpunit": "^0.12.16",
# "phpunit/php-code-coverage": "*",
# "phpunit/phpunit": "^7.4 || ^8 || 9"
-%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9
BuildRequires: phpunit9
%global phpunit %{_bindir}/phpunit9
-%else
-BuildRequires: phpunit8
-%global phpunit %{_bindir}/phpunit8
-%endif
%endif
# For autoloader
BuildRequires: php-composer(fedora/autoloader)
@@ -93,6 +90,8 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php
%patch0 -p0 -b .rpm
find src -name \*rpm -exec rm {} \;
+%patch1 -p1 -b .php81
+find src -name \*php81 -exec rm {} \;
: Create autoloader
cat <<'AUTOLOAD' | tee src/autoload.php
@@ -150,7 +149,7 @@ EOF
sed -e 's:%{_datadir}/php:%{buildroot}%{_datadir}/php:' -i bin/*query
ret=0
-for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
+for cmdarg in "php %{phpunit}" php73 php74 php80 php81; do
if which $cmdarg; then
set $cmdarg
$1 ${2:-%{_bindir}/phpunit9} --no-coverage --verbose || ret=1
@@ -191,6 +190,9 @@ exit $ret
%changelog
+* Fri Oct 29 2021 Remi Collet <remi@remirepo.net> - 5.4.2-3
+- add upstream patches for PHP 8.1
+
* Fri Feb 5 2021 Remi Collet <remi@remirepo.net> - 5.4.2-1
- update to 5.4.2