diff options
-rw-r--r-- | PHPINFO | 2 | ||||
-rw-r--r-- | REFLECTION | 36 | ||||
-rw-r--r-- | php-pecl-yac.spec | 164 |
3 files changed, 91 insertions, 111 deletions
@@ -2,7 +2,7 @@ yac yac support => enabled -Version => 2.3.0 +Version => 2.3.1 Shared Memory => mmap Serializer => php, msgpack, igbinary, json @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #118 yac version 2.3.0 ] { +Extension [ <persistent> extension #119 yac version 2.3.1 ] { - Dependencies { Dependency [ msgpack (Required) ] @@ -31,7 +31,7 @@ Extension [ <persistent> extension #118 yac version 2.3.0 ] { } - Constants [9] { - Constant [ string YAC_VERSION ] { 2.3.0 } + Constant [ string YAC_VERSION ] { 2.3.1 } Constant [ int YAC_MAX_KEY_LEN ] { 48 } Constant [ int YAC_MAX_VALUE_RAW_LEN ] { 67108863 } Constant [ int YAC_MAX_RAW_COMPRESSED_LEN ] { 1048576 } @@ -61,60 +61,68 @@ Extension [ <persistent> extension #118 yac version 2.3.0 ] { Method [ <internal:yac, ctor> public method __construct ] { - Parameters [1] { - Parameter #0 [ <optional> $prefix ] + Parameter #0 [ <optional> string $prefix = "" ] } } Method [ <internal:yac> public method add ] { - Parameters [3] { - Parameter #0 [ <required> $keys ] - Parameter #1 [ <optional> $value ] - Parameter #2 [ <optional> $ttl ] + Parameter #0 [ <required> array|string $key ] + Parameter #1 [ <required> mixed $value ] + Parameter #2 [ <optional> int $ttl = 0 ] } + - Return [ ?bool ] } Method [ <internal:yac> public method set ] { - Parameters [3] { - Parameter #0 [ <required> $keys ] - Parameter #1 [ <optional> $value ] - Parameter #2 [ <optional> $ttl ] + Parameter #0 [ <required> array|string $key ] + Parameter #1 [ <required> mixed $value ] + Parameter #2 [ <optional> int $ttl = 0 ] } + - Return [ ?bool ] } Method [ <internal:yac> public method get ] { - - Parameters [1] { - Parameter #0 [ <required> $keys ] + - Parameters [2] { + Parameter #0 [ <required> array|string $key ] + Parameter #1 [ <optional> mixed &$cas = NULL ] } + - Return [ ?bool ] } Method [ <internal:yac> public method delete ] { - Parameters [2] { - Parameter #0 [ <required> $keys ] - Parameter #1 [ <optional> $ttl ] + Parameter #0 [ <required> array|string $key ] + Parameter #1 [ <optional> int $delay = 0 ] } + - Return [ ?bool ] } Method [ <internal:yac> public method flush ] { - Parameters [0] { } + - Return [ bool ] } Method [ <internal:yac> public method info ] { - Parameters [0] { } + - Return [ array ] } Method [ <internal:yac> public method dump ] { - Parameters [1] { - Parameter #0 [ <optional> $limit ] + Parameter #0 [ <optional> int $limit = 0 ] } + - Return [ ?array ] } } } diff --git a/php-pecl-yac.spec b/php-pecl-yac.spec index 137ea49..1aba772 100644 --- a/php-pecl-yac.spec +++ b/php-pecl-yac.spec @@ -3,41 +3,38 @@ # # Fedora spec file for php-pecl-yac (previously php-yac) # -# Copyright (c) 2013-2021 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2013-2024 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-yac -%endif +%{?scl:%scl_package php-pecl-yac} + +# use system library by default +%bcond_without fastlz + +# run test suite by default +%bcond_without tests %global gh_commit 7e5a9edfcfb6ad064c165a0b6abf8d11218fe4b5 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner laruence %global gh_project yac -#global gh_date 20150908 %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name yac -%global with_tests %{!?_without_tests:1}%{?_without_tests:0} # after 20-json, 40-igbinary and 40-msgpack %global ini_name 50-%{pecl_name}.ini -%global with_fastlz 1 +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Summary: Lockless user data cache -Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 2.3.0 -License: PHP +Name: %{?scl_prefix}php-pecl-%{pecl_name} +Version: 2.3.1 +License: PHP-3.01 URL: https://pecl.php.net/package/%{pecl_name} -%if 0%{?gh_date:1} -Release: 0.13.%{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 -%else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz -%endif +Release: 7%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Source0: https://pecl.php.net/get/%{sources}.tgz BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -46,7 +43,7 @@ BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-json BuildRequires: %{?scl_prefix}php-pecl-msgpack-devel BuildRequires: %{?scl_prefix}php-pecl-igbinary-devel -%if %{with_fastlz} +%if %{with fastlz} BuildRequires: fastlz-devel %endif @@ -55,7 +52,6 @@ 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 Obsoletes: %{?scl_prefix}php-%{pecl_name} < %{version} @@ -63,23 +59,6 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif - -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%endif %description @@ -97,28 +76,22 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -qc -%if 0%{?gh_date:1} -mv %{gh_project}-%{gh_commit} NTS -mv NTS/package.xml . -%else -mv %{pecl_name}-%{version} NTS -%endif # Don't install (register) the tests sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml -cd NTS -%if %{with_fastlz} +cd %{sources} +%if %{with fastlz} sed -e '\:name="compressor/fastlz:d' -i ../package.xml rm -r compressor/fastlz %endif # Check version as upstream often forget to update this extver=$(sed -n '/#define PHP_YAC_VERSION/{s/.* "//;s/".*$//;p}' php_yac.h) -if test "x${extver}" != "x%{version}%{?prever}%{?gh_date:-dev}"; then - : Error: Upstream YAC version is ${extver}, expecting %{version}%{?prever}%{?gh_date:-dev}. +if test "x${extver}" != "x%{version}%{?prever}"; then + : Error: Upstream YAC version is ${extver}, expecting %{version}%{?prever}. exit 1 fi cd .. @@ -138,9 +111,9 @@ extension = %{pecl_name}.so EOF +mkdir NTS %if %{with_zts} -# duplicate for ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif @@ -149,25 +122,28 @@ cp -pr NTS ZTS peclconf() { %configure \ -%if %{with_fastlz} --enable-json \ --enable-msgpack \ --enable-igbinary \ +%if %{with fastlz} --with-system-fastlz \ %endif --with-php-config=$1 } -cd NTS -%{_bindir}/phpize -peclconf %{_bindir}/php-config -make %{?_smp_mflags} +cd %{sources} +%{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL + +cd ../NTS +peclconf %{__phpconfig} +%make_build %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -peclconf %{_bindir}/zts-php-config -make %{?_smp_mflags} +peclconf %{__ztsphpconfig} +%make_build %endif @@ -175,90 +151,66 @@ make %{?_smp_mflags} %{?dtsenable} # Install the NTS stuff -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} # Install XML package description install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml -# Install the ZTS stuff %if %{with_zts} -make -C ZTS install INSTALL_ROOT=%{buildroot} +# Install the ZTS stuff +%make_install -C ZTS install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation for i in README.md $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do [ -f NTS/$i ] && install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do [ -f %{sources}/$i ] && install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done %check -cd NTS +cd %{sources} OPTS="-n" [ -f %{php_extdir}/json.so ] && OPTS="$OPTS -d extension=json.so" [ -f %{php_extdir}/igbinary.so ] && OPTS="$OPTS -d extension=igbinary.so" [ -f %{php_extdir}/msgpack.so ] && OPTS="$OPTS -d extension=msgpack.so" : Minimal load test for NTS extension -%{_bindir}/php $OPTS \ +%{__php} $OPTS \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' -%if %{with_tests} +%if %{with tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ -TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ +TEST_PHP_ARGS="$OPTS -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php --show-diff +%{__php} -n run-tests.php -q --show-diff %else : Upstream test suite disabled %endif %if %{with_zts} -cd ../ZTS - : Minimal load test for ZTS extension %{__ztsphp} $OPTS \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' -%if %{with_tests} +%if %{with tests} : Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{__ztsphp} \ -TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ +TEST_PHP_ARGS="$OPTS -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php -q --show-diff %else : Upstream test suite disabled %endif %endif -%if 0%{?fedora} < 24 && 0%{?rhel} < 8 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - - %files -%{?_licensedir:%license NTS/LICENSE} +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -272,6 +224,26 @@ fi %changelog +* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 2.3.1-7 +- rebuild for PHP 8.3.0RC1 + +* Tue Jul 18 2023 Remi Collet <remi@remirepo.net> - 2.3.1-6 +- build out of sources tree + +* Mon Dec 20 2021 Remi Collet <remi@remirepo.net> - 2.3.1-5 +- update to 2.3.1 +- drop patch merged upstream + +* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 2.3.0-5 +- rebuild for 8.1.0RC1 + +* Wed Aug 4 2021 Remi Collet <remi@remirepo.net> - 2.3.0-4 +- add patch for test suite with 8.1.0beta2 from + https://github.com/laruence/yac/pull/120 + +* Fri Apr 30 2021 Remi Collet <remi@remirepo.net> - 2.3.0-3 +- F34 rebuild for https://github.com/remicollet/remirepo/issues/174 + * Wed Jan 6 2021 Remi Collet <remi@remirepo.net> - 2.3.0-1 - update to 2.3.0 |