diff options
author | Remi Collet <remi@remirepo.net> | 2021-10-06 06:58:30 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2021-10-06 06:58:30 +0200 |
commit | 5d4802bad15d8875f3e7cc570e02e4e3aa2e1ef4 (patch) | |
tree | dfc530a737306b0ff103a88bd42450519f038300 | |
parent | be2cbc1bc1736f5c0233b2f26bdd2e75d317d739 (diff) |
update to 1.0.1
drop patch merged upstream
add patch for PHP 8.1 from
https://github.com/wikimedia/php-excimer/pull/2
display extension version in phpinfo from
https://github.com/wikimedia/php-excimer/pull/3
enable ZTS build
-rw-r--r-- | 1.patch | 31 | ||||
-rw-r--r-- | PHPINFO | 1 | ||||
-rw-r--r-- | REFLECTION | 2 | ||||
-rw-r--r-- | excimer-info.patch | 21 | ||||
-rw-r--r-- | excimer-php81.patch | 74 | ||||
-rw-r--r-- | php-pecl-excimer.spec | 32 |
6 files changed, 117 insertions, 44 deletions
diff --git a/1.patch b/1.patch deleted file mode 100644 index a2a6286..0000000 --- a/1.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 435049e9b4b55955b77d32e29f7ea7df12799668 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Tue, 2 Mar 2021 08:48:09 +0100 -Subject: [PATCH] fix [-Wincompatible-pointer-types] with PHP 8 - ---- - excimer_log.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/excimer_log.c b/excimer_log.c -index 4d5f74e..4c6b844 100644 ---- a/excimer_log.c -+++ b/excimer_log.c -@@ -408,10 +408,17 @@ static void excimer_log_array_incr(HashTable *ht, zend_string *sp_key, zend_long - } - } - -+#if PHP_VERSION_ID < 80000 - static int excimer_log_aggr_compare(const void *a, const void *b) - { - zval *zp_a = &((Bucket*)a)->val; - zval *zp_b = &((Bucket*)b)->val; -+#else -+static int excimer_log_aggr_compare(Bucket *a, Bucket *b) -+{ -+ zval *zp_a = &a->val; -+ zval *zp_b = &b->val; -+#endif - - zval *zp_a_incl = zend_hash_str_find(Z_ARRVAL_P(zp_a), "inclusive", sizeof("inclusive")-1); - zval *zp_b_incl = zend_hash_str_find(Z_ARRVAL_P(zp_b), "inclusive", sizeof("inclusive")-1); @@ -2,3 +2,4 @@ excimer excimer support => enabled +excimer version => 1.0.1 @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #72 excimer version 1.0.0 ] { +Extension [ <persistent> extension #73 excimer version 1.0.1 ] { - Dependencies { } diff --git a/excimer-info.patch b/excimer-info.patch new file mode 100644 index 0000000..3cba206 --- /dev/null +++ b/excimer-info.patch @@ -0,0 +1,21 @@ +From a70fe7ae6ca3c1c621e902fdd43a2f51e1537c77 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 6 Oct 2021 06:17:21 +0200 +Subject: [PATCH] add ext version in phpinfo + +--- + excimer.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/excimer.c b/excimer.c +index 347bdd8..110f0a2 100644 +--- a/excimer.c ++++ b/excimer.c +@@ -560,6 +560,7 @@ static PHP_MINFO_FUNCTION(excimer) + { + php_info_print_table_start(); + php_info_print_table_header(2, "excimer support", "enabled"); ++ php_info_print_table_row(2, "excimer version", PHP_EXCIMER_VERSION); + php_info_print_table_end(); + } + /* }}} */ diff --git a/excimer-php81.patch b/excimer-php81.patch new file mode 100644 index 0000000..bab26d1 --- /dev/null +++ b/excimer-php81.patch @@ -0,0 +1,74 @@ +From e709af4c60f5f70dd277ec34ee5c3af2555e6654 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 6 Oct 2021 06:01:29 +0200 +Subject: [PATCH] fix Iterator prototypes for PHP 8.1 + +--- + excimer.c | 25 +++++++++++++++---------- + 1 file changed, 15 insertions(+), 10 deletions(-) + +diff --git a/excimer.c b/excimer.c +index 347bdd8..2024a07 100644 +--- a/excimer.c ++++ b/excimer.c +@@ -238,6 +238,11 @@ static zend_object_handlers ExcimerLogEntry_handlers; + static zend_object_handlers ExcimerTimer_handlers; + + /** {{{ arginfo */ ++#ifndef ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX ++#define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \ ++ ZEND_BEGIN_ARG_INFO_EX(name, 0, return_reference, required_num_args) ++#endif ++ + ZEND_BEGIN_ARG_INFO(arginfo_ExcimerProfiler_setPeriod, 0) + ZEND_ARG_INFO(0, period) + ZEND_END_ARG_INFO() +@@ -282,38 +287,38 @@ ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_getEventCount, 0) + ZEND_END_ARG_INFO() + +-ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_current, 0) ++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_current, 0, 0, IS_MIXED, 0) + ZEND_END_ARG_INFO() + +-ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_key, 0) ++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_key, 0, 0, IS_MIXED, 0) + ZEND_END_ARG_INFO() + +-ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_next, 0) ++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_next, 0, 0, IS_VOID, 0) + ZEND_END_ARG_INFO() + +-ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_rewind, 0) ++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_rewind, 0, 0, IS_VOID, 0) + ZEND_END_ARG_INFO() + +-ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_valid, 0) ++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_valid, 0, 0, _IS_BOOL, 0) + ZEND_END_ARG_INFO() + +-ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_count, 0) ++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_count, 0, 0, IS_LONG, 0) + ZEND_END_ARG_INFO() + +-ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_offsetExists, 0) ++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_offsetExists, 0, 1, _IS_BOOL, 0) + ZEND_ARG_INFO(0, offset) + ZEND_END_ARG_INFO() + +-ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_offsetGet, 0) ++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_offsetGet, 0, 1, IS_MIXED, 0) + ZEND_ARG_INFO(0, offset) + ZEND_END_ARG_INFO() + +-ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_offsetSet, 0) ++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_offsetSet, 0, 2, IS_VOID, 0) + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, value) + ZEND_END_ARG_INFO() + +-ZEND_BEGIN_ARG_INFO(arginfo_ExcimerLog_offsetUnset, 0) ++ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_ExcimerLog_offsetUnset, 0, 1, IS_VOID, 0) + ZEND_ARG_INFO(0, offset) + ZEND_END_ARG_INFO() + diff --git a/php-pecl-excimer.spec b/php-pecl-excimer.spec index 1e24a7c..ded895c 100644 --- a/php-pecl-excimer.spec +++ b/php-pecl-excimer.spec @@ -16,17 +16,18 @@ %global pecl_name excimer %global ini_name 40-%{pecl_name}.ini # segfault in test suite -%global with_zts 0 +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} Summary: Interrupting timer and low-overhead sampling profiler Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.0.0 +Version: 1.0.1 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/1.patch +Patch0: %{pecl_name}-php81.patch +Patch1: %{pecl_name}-info.patch BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -53,6 +54,9 @@ Obsoletes: php74-pecl-%{pecl_name} %if "%{php_version}" > "8.0" Obsoletes: php80-pecl-%{pecl_name} %endif +%if "%{php_version}" > "8.1" +Obsoletes: php81-pecl-%{pecl_name} +%endif %endif @@ -75,7 +79,8 @@ sed -e 's/role="test"/role="src"/' \ mv %{pecl_name}-%{version} NTS cd NTS -%patch0 -p1 -b .pr1 +%patch0 -p1 +%patch1 -p1 # Sanity check, really often broken extver=$(sed -n '/#define PHP_EXCIMER_VERSION/{s/.* "//;s/".*$//;p}' php_excimer.h) @@ -172,11 +177,8 @@ cd NTS --modules | grep '^%{pecl_name}$' # Upstream test suite for NTS extension -TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_extdir}/%{pecl_name}.so" \ -NO_INTERACTION=1 \ -REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php --show-diff +%{__php} -n run-tests.php -q -P --show-diff %if %{with_zts} cd ../ZTS @@ -186,11 +188,8 @@ cd ../ZTS --modules | grep '^%{pecl_name}$' # Upstream test suite for ZTS extension -TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="-n -d extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so" \ -NO_INTERACTION=1 \ -REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php -q -P --show-diff %endif @@ -209,6 +208,15 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Wed Oct 6 2021 Remi Collet <remi@remirepo.net> - 1.0.1-1 +- update to 1.0.1 +- drop patch merged upstream +- add patch for PHP 8.1 from + https://github.com/wikimedia/php-excimer/pull/2 +- display extension version in phpinfo from + https://github.com/wikimedia/php-excimer/pull/3 +- enable ZTS build + * Tue Mar 2 2021 Remi Collet <remi@remirepo.net> - 1.0.0-1 - initial package - add build fix with PHP 8 from |