From 855510660a01cef799f88cec4f13dc8fc66e1c05 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 9 Dec 2020 15:38:40 +0100 Subject: update to 0.4.2 raise dependency on PHP 7 add patch for PHP 8 (missing arginfo) from https://github.com/beberlei/hdrhistogram-php/pull/13 --- REFLECTION | 106 +++++++++++++++++++++++++++++++++++++++++++- php-pecl-hdr-histogram.spec | 28 ++++++++---- 2 files changed, 125 insertions(+), 9 deletions(-) diff --git a/REFLECTION b/REFLECTION index 7659450..f95ee95 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,51 +1,155 @@ -Extension [ extension #73 hdrhistogram version 0.3.0 ] { +Extension [ extension #73 hdrhistogram version 0.4.2 ] { - Functions { Function [ function hdr_init ] { + + - Parameters [3] { + Parameter #0 [ $lowest_trackable_value ] + Parameter #1 [ $highest_trackable_value ] + Parameter #2 [ $significant_figures ] + } } Function [ function hdr_get_memory_size ] { + + - Parameters [1] { + Parameter #0 [ $hdr ] + } } Function [ function hdr_record_value ] { + + - Parameters [2] { + Parameter #0 [ $hdr ] + Parameter #1 [ $value ] + } } Function [ function hdr_record_values ] { + + - Parameters [3] { + Parameter #0 [ $hdr ] + Parameter #1 [ $value ] + Parameter #2 [ $count ] + } } Function [ function hdr_record_corrected_value ] { + + - Parameters [3] { + Parameter #0 [ $hdr ] + Parameter #1 [ $value ] + Parameter #2 [ $expected_interval ] + } } Function [ function hdr_mean ] { + + - Parameters [1] { + Parameter #0 [ $hdr ] + } } Function [ function hdr_stddev ] { + + - Parameters [1] { + Parameter #0 [ $hdr ] + } } Function [ function hdr_min ] { + + - Parameters [1] { + Parameter #0 [ $hdr ] + } } Function [ function hdr_max ] { + + - Parameters [1] { + Parameter #0 [ $hdr ] + } } Function [ function hdr_total_count ] { + + - Parameters [1] { + Parameter #0 [ $hdr ] + } } Function [ function hdr_reset ] { + + - Parameters [1] { + Parameter #0 [ $hdr ] + } } Function [ function hdr_count_at_value ] { + + - Parameters [2] { + Parameter #0 [ $hdr ] + Parameter #1 [ $value ] + } } Function [ function hdr_value_at_percentile ] { + + - Parameters [2] { + Parameter #0 [ $hdr ] + Parameter #1 [ $percentile ] + } } Function [ function hdr_add ] { + + - Parameters [2] { + Parameter #0 [ $hdr1 ] + Parameter #1 [ $hdr2 ] + } } Function [ function hdr_merge_into ] { + + - Parameters [2] { + Parameter #0 [ $hdr1 ] + Parameter #1 [ $hdr2 ] + } } Function [ function hdr_iter_init ] { + + - Parameters [1] { + Parameter #0 [ $hdr ] + } } Function [ function hdr_iter_next ] { + + - Parameters [1] { + Parameter #0 [ $hdr ] + } } Function [ function hdr_percentile_iter_init ] { + + - Parameters [2] { + Parameter #0 [ $hdr ] + Parameter #1 [ $ticks_per_half_distance ] + } } Function [ function hdr_percentile_iter_next ] { + + - Parameters [1] { + Parameter #0 [ $hdr ] + } } Function [ function hdr_export ] { + + - Parameters [1] { + Parameter #0 [ $hdr ] + } } Function [ function hdr_import ] { + + - Parameters [1] { + Parameter #0 [ $import ] + } } Function [ function hdr_base64_encode ] { + + - Parameters [1] { + Parameter #0 [ $hdr ] + } } Function [ function hdr_base64_decode ] { + + - Parameters [1] { + Parameter #0 [ $data ] + } } } } diff --git a/php-pecl-hdr-histogram.spec b/php-pecl-hdr-histogram.spec index 13dc3c3..b8012d5 100644 --- a/php-pecl-hdr-histogram.spec +++ b/php-pecl-hdr-histogram.spec @@ -22,18 +22,21 @@ Summary: PHP extension wrapper for the C hdrhistogram API Name: %{?sub_prefix}php-pecl-hdr-histogram -Version: 0.3.0 -Release: 14%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 0.4.2 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: MIT Group: Development/Languages URL: https://pecl.php.net/package/%{proj_name} Source: https://pecl.php.net/get/%{proj_name}-%{version}.tgz +Patch0: %{proj_name}-arginfo.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel +BuildRequires: %{?scl_prefix}php-devel >= 7.0 BuildRequires: %{?scl_prefix}php-pear +BuildRequires: %{?scl_prefix}php-json # use our specific package BuildRequires: HdrHistogram_c6php-devel @@ -83,7 +86,7 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -sed -e '/HDR_VERSION/s/0.2.0/0.3.0/' -i php_hdrhistogram.h +%patch0 -p1 -b .pr13 # Check upstream version (often broken) extver=$(sed -n '/#define HDR_VERSION/{s/.* "//;s/".*$//;p}' php_hdrhistogram.h) @@ -146,14 +149,17 @@ done %check cd NTS +OPT="-n" +[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so" + : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --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" \ +TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php --show-diff @@ -163,11 +169,11 @@ cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --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" \ +TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{__ztsphp} -n run-tests.php --show-diff @@ -210,6 +216,12 @@ fi %changelog +* Wed Dec 9 2020 Remi Collet - 0.4.2-1 +- update to 0.4.2 +- raise dependency on PHP 7 +- add patch for PHP 8 (missing arginfo) from + https://github.com/beberlei/hdrhistogram-php/pull/13 + * Wed Dec 9 2020 Remi Collet - 0.3.0-14 - build using HdrHistogram_c6php -- cgit