From 543a1a45867efa387bc918b52288587e951a7e6d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 3 Nov 2021 17:55:11 +0100 Subject: add patches for PHP 8.1 from upstream and from https://github.com/php-ds/ext-ds/pull/187 --- php-pecl-ds.spec | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'php-pecl-ds.spec') 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 - 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 - 1.3.0-4 - switch to phpunit7 -- cgit