summaryrefslogtreecommitdiffstats
path: root/php-pecl-hdr-histogram.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-hdr-histogram.spec')
-rw-r--r--php-pecl-hdr-histogram.spec28
1 files changed, 20 insertions, 8 deletions
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 <remi@remirepo.net> - 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 <remi@remirepo.net> - 0.3.0-14
- build using HdrHistogram_c6php