From d71c4e3b3024c1e16a9adca72e95112e3ef43b10 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 31 Mar 2020 10:32:34 +0200 Subject: update to 2.2.0 enable json, igbinary and msgpack serializers rename configuration file to 50-yac.ini to ensure proper load order --- php-pecl-yac.spec | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) (limited to 'php-pecl-yac.spec') diff --git a/php-pecl-yac.spec b/php-pecl-yac.spec index 920f85d..c531416 100644 --- a/php-pecl-yac.spec +++ b/php-pecl-yac.spec @@ -14,10 +14,6 @@ %scl_package php-pecl-yac %endif -# TODO use --enable-msgpack -# See https://github.com/laruence/yac/issues/107 - Serializer choice at runtime -# And https://github.com/laruence/yac/pull/106 - module dep - %global gh_commit 7e5a9edfcfb6ad064c165a0b6abf8d11218fe4b5 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner laruence @@ -26,16 +22,13 @@ %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name yac %global with_tests %{!?_without_tests:1}%{?_without_tests:0} -%if "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini -%else -%global ini_name 40-%{pecl_name}.ini -%endif +# after 20-json, 40-igbinary and 40-msgpack +%global ini_name 50-%{pecl_name}.ini %global with_fastlz 1 Summary: Lockless user data cache Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 2.1.2 +Version: 2.2.0 %if 0%{?gh_date:1} Release: 0.12.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz @@ -50,12 +43,17 @@ URL: https://pecl.php.net/package/%{pecl_name} BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 7 BuildRequires: %{?scl_prefix}php-pear +BuildRequires: %{?scl_prefix}php-pecl-msgpack-devel +BuildRequires: %{?scl_prefix}php-pecl-igbinary-devel %if %{with_fastlz} BuildRequires: fastlz-devel %endif Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} +Requires: %{?scl_prefix}php-json%{?_isa} +Requires: %{?scl_prefix}php-igbinary%{?_isa} +Requires: %{?scl_prefix}php-msgpack%{?_isa} %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} # Package have be renamed @@ -144,6 +142,7 @@ extension = %{pecl_name}.so ;yac.keys_memory_size=4M ;yac.values_memory_size=64M ;yac.compress_threshold=-1 +;yac.serializer=php EOF @@ -159,6 +158,9 @@ cp -pr NTS ZTS peclconf() { %configure \ %if %{with_fastlz} + --enable-json \ + --enable-msgpack \ + --enable-igbinary \ --with-system-fastlz \ %endif --with-php-config=$1 @@ -200,19 +202,17 @@ done %check -# TODO: need investigation -rm ?TS/tests/005.phpt - cd NTS +OPTS="-n -d extension=json.so -d extension=igbinary.so -d extension=msgpack.so" : Minimal load test for NTS extension -%{_bindir}/php --no-php-ini \ +%{_bindir}/php $OPTS \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} %if %{with_tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ -TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ +TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php --show-diff @@ -224,14 +224,14 @@ REPORT_EXIT_STATUS=1 \ cd ../ZTS : Minimal load test for ZTS extension -%{__ztsphp} --no-php-ini \ +%{__ztsphp} $OPTS \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep %{pecl_name} %if %{with_tests} : Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{__ztsphp} \ -TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \ +TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{__ztsphp} -n run-tests.php --show-diff @@ -276,6 +276,11 @@ fi %changelog +* Tue Mar 31 2020 Remi Collet - 2.2.0-1 +- update to 2.2.0 +- enable json, igbinary and msgpack serializers +- rename configuration file to 50-yac.ini to ensure proper load order + * Fri Mar 27 2020 Remi Collet - 2.1.2-1 - update to 2.1.2 -- cgit