From 5c3e85a6c7e468a9352fddb93fe5db6c62820de1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 4 May 2022 16:30:47 +0200 Subject: update to 1.0.3 fix build with PHP 7.1 using patch from https://github.com/wikimedia/php-excimer/pull/4 --- 4.patch | 25 +++++++++++++++++++++++++ PHPINFO | 2 +- REFLECTION | 4 +++- php-pecl-excimer.spec | 20 +++++++++++++++++--- 4 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 4.patch diff --git a/4.patch b/4.patch new file mode 100644 index 0000000..43cdfca --- /dev/null +++ b/4.patch @@ -0,0 +1,25 @@ +From b87b859aa7546942f85e20c05e3aefa797868164 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 4 May 2022 16:22:00 +0200 +Subject: [PATCH] fix arginfo for 7.1 + +--- + excimer.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/excimer.c b/excimer.c +index ac7e12f..fec499a 100644 +--- a/excimer.c ++++ b/excimer.c +@@ -285,7 +285,11 @@ ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_formatCollapsed, 0) + ZEND_END_ARG_INFO() + ++#if PHP_VERSION_ID < 70200 ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ExcimerLog_aggregateByFunction, IS_ARRAY, NULL, 0) ++#else + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_ExcimerLog_aggregateByFunction, IS_ARRAY, 0) ++#endif + ZEND_END_ARG_INFO() + + ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_getEventCount, 0) diff --git a/PHPINFO b/PHPINFO index 6bc0a0c..50498f5 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,4 +2,4 @@ excimer excimer support => enabled -excimer version => 1.0.2 +excimer version => 1.0.3 diff --git a/REFLECTION b/REFLECTION index 08991fa..4b87747 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #73 excimer version 1.0.2 ] { +Extension [ extension #73 excimer version 1.0.3 ] { - Dependencies { } @@ -85,6 +85,7 @@ Extension [ extension #73 excimer version 1.0.2 ] { - Parameters [0] { } + - Return [ ExcimerLog ] } Method [ public method flush ] { @@ -126,6 +127,7 @@ Extension [ extension #73 excimer version 1.0.2 ] { - Parameters [0] { } + - Return [ array ] } Method [ public method getEventCount ] { diff --git a/php-pecl-excimer.spec b/php-pecl-excimer.spec index 60891ef..7096962 100644 --- a/php-pecl-excimer.spec +++ b/php-pecl-excimer.spec @@ -20,12 +20,14 @@ Summary: Interrupting timer and low-overhead sampling profiler Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.0.2 +Version: 1.0.3 Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: ASL 2.0 URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Patch0: https://patch-diff.githubusercontent.com/raw/wikimedia/php-excimer/pull/4.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.1 @@ -76,6 +78,8 @@ sed -e 's/role="test"/role="src"/' \ mv %{pecl_name}-%{version} NTS cd NTS +%patch0 -p1 -b .pr4 + # 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 @@ -164,6 +168,11 @@ fi %check +OPT="-q -P --show-diff" +%if "%{php_version}" > "7.4" +OPT="$OPT %{?_smp_mflags}" +%endif + cd NTS # Minimal load test for NTS extension %{__php} --no-php-ini \ @@ -172,7 +181,7 @@ cd NTS # Upstream test suite for NTS extension TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_extdir}/%{pecl_name}.so" \ -%{__php} -n run-tests.php -q -P --show-diff +%{__php} -n run-tests.php $OPT %if %{with_zts} cd ../ZTS @@ -183,7 +192,7 @@ cd ../ZTS # Upstream test suite for ZTS extension TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so" \ -%{__ztsphp} -n run-tests.php -q -P --show-diff +%{__ztsphp} -n run-tests.php $OPT %endif @@ -202,6 +211,11 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so" \ %changelog +* Wed May 4 2022 Remi Collet - 1.0.3-1 +- update to 1.0.3 +- fix build with PHP 7.1 using patch from + https://github.com/wikimedia/php-excimer/pull/4 + * Tue Oct 19 2021 Remi Collet - 1.0.2-1 - update to 1.0.2 - drop patches merged upstream -- cgit