From ad0b20709466ec5fe871e0c204155cf9c57d2d5e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 12 Jul 2024 09:06:25 +0200 Subject: add patch for PHP 8.4 from https://github.com/wikimedia/mediawiki-php-excimer/pull/8 --- php-pecl-excimer.spec | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) (limited to 'php-pecl-excimer.spec') diff --git a/php-pecl-excimer.spec b/php-pecl-excimer.spec index 208db5d..e7e7570 100644 --- a/php-pecl-excimer.spec +++ b/php-pecl-excimer.spec @@ -21,11 +21,13 @@ Summary: Interrupting timer and low-overhead sampling profiler Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 1.2.1 -Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: Apache-2.0 URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{sources}.tgz +Patch0: %{pecl_name}-php84.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.1 @@ -53,10 +55,12 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO # Don't install/register tests sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml cd %{sources} +%patch -P0 -p1 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_EXCIMER_VERSION/{s/.* "//;s/".*$//;p}' php_excimer.h) if test "x${extver}" != "x%{version}"; then @@ -128,26 +132,6 @@ do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done -%if 0%{?fedora} < 24 && 0%{?rhel} < 8 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - - %check cd %{sources} # erratic results, randomly fails in mock @@ -184,7 +168,7 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so" \ %files -%{?_licensedir:%license %{sources}/LICENSE} +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -198,6 +182,10 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so" \ %changelog +* Fri Jul 12 2024 Remi Collet - 1.2.1-2 +- add patch for PHP 8.4 from + https://github.com/wikimedia/mediawiki-php-excimer/pull/8 + * Thu Feb 29 2024 Remi Collet - 1.2.1-1 - update to 1.2.1 -- cgit