summaryrefslogtreecommitdiffstats
path: root/php-pecl-ds.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-11-03 17:55:11 +0100
committerRemi Collet <remi@php.net>2021-11-03 17:55:11 +0100
commit543a1a45867efa387bc918b52288587e951a7e6d (patch)
treee0155eb803b530908355cdb3073a430c588f33ea /php-pecl-ds.spec
parenta83d8d10b3be229bafb2ae6136453749f9236959 (diff)
add patches for PHP 8.1 from upstream and from
https://github.com/php-ds/ext-ds/pull/187
Diffstat (limited to 'php-pecl-ds.spec')
-rw-r--r--php-pecl-ds.spec23
1 files changed, 18 insertions, 5 deletions
diff --git a/php-pecl-ds.spec b/php-pecl-ds.spec
index fb05d13..8c673f3 100644
--- a/php-pecl-ds.spec
+++ b/php-pecl-ds.spec
@@ -34,7 +34,7 @@
Summary: Data Structures for PHP
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 1.3.0
-Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: MIT
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
@@ -43,10 +43,12 @@ Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
Source1: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{gh_short}.tar.gz
Patch0: 0001-fix-missing-return-after-exception.patch
+# output from: git diff v1.3.0 -- src
+Patch1: %{pecl_name}-php81.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel >= 7
+BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-gmp
BuildRequires: %{?scl_prefix}php-json
@@ -81,6 +83,9 @@ Obsoletes: php74-pecl-%{pecl_name} <= %{version}
%if "%{php_version}" > "8.0"
Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "8.1"
+Obsoletes: php81-pecl-%{pecl_name} <= %{version}
+%endif
%endif
@@ -100,7 +105,11 @@ mv %{gh_project}-%{gh_commit} tests
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
cd NTS
+%if "%{php_version}" > "8.1"
+%patch1 -p1
+%else
%patch0 -p1
+%endif
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_DS_VERSION/{s/.* "//;s/".*$//;p}' php_ds.h)
@@ -197,7 +206,7 @@ cd NTS
%{__php} --no-php-ini \
$modules \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%if %{with_zts}
cd ../ZTS
@@ -205,7 +214,7 @@ cd ../ZTS
%{__ztsphp} --no-php-ini \
$modules \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%endif
cd ..
@@ -220,7 +229,7 @@ cd ..
-d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
%{_bindir}/phpunit7 \
--bootstrap tests/autoload.php \
- tests
+ --verbose tests
%endif
@@ -239,6 +248,10 @@ cd ..
%changelog
+* Wed Nov 3 2021 Remi Collet <remi@remirepo.net> - 1.3.0-6
+- add patches for PHP 8.1 from upstream and from
+ https://github.com/php-ds/ext-ds/pull/187
+
* Fri Mar 26 2021 Remi Collet <remi@remirepo.net> - 1.3.0-4
- switch to phpunit7