diff options
author | Remi Collet <remi@remirepo.net> | 2024-01-20 08:44:00 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-01-20 08:44:00 +0100 |
commit | 80e34c964095c04da3c805536bcba566e2d341b8 (patch) | |
tree | 5d6e8399709f44f0dee1271c01ec2d21716b3fb5 | |
parent | 5fc400b7fd928ab94fb694ff47290fcdb2100dd0 (diff) |
update to 1.5.0v1
build out of sources tree
-rw-r--r-- | PHPINFO | 4 | ||||
-rw-r--r-- | REFLECTION | 26 | ||||
-rw-r--r-- | php-pecl-decimal.spec | 97 |
3 files changed, 50 insertions, 77 deletions
@@ -2,5 +2,5 @@ decimal decimal support => enabled -decimal version => 1.4.0 -libmpdec version => 2.5.0 +decimal version => 1.5.0 +libmpdec version => 2.5.1 @@ -1,7 +1,7 @@ -Extension [ <persistent> extension #121 decimal version 1.4.0 ] { +Extension [ <persistent> extension #63 decimal version 1.5.0 ] { - Classes [1] { - Class [ <internal:decimal> final class Decimal\Decimal implements JsonSerializable ] { + Class [ <internal:decimal> final class Decimal\Decimal implements Stringable, JsonSerializable ] { - Constants [13] { Constant [ public int ROUND_UP ] { 101 } @@ -27,7 +27,7 @@ Extension [ <persistent> extension #121 decimal version 1.4.0 ] { - Parameters [2] { Parameter #0 [ <required> $values ] - Parameter #1 [ <optional> int or NULL $precision ] + Parameter #1 [ <optional> ?int $precision = <default> ] } - Return [ Decimal\Decimal ] } @@ -36,7 +36,7 @@ Extension [ <persistent> extension #121 decimal version 1.4.0 ] { - Parameters [2] { Parameter #0 [ <required> $values ] - Parameter #1 [ <optional> int or NULL $precision ] + Parameter #1 [ <optional> ?int $precision = <default> ] } - Return [ Decimal\Decimal ] } @@ -49,8 +49,8 @@ Extension [ <persistent> extension #121 decimal version 1.4.0 ] { Method [ <internal:decimal, ctor> public method __construct ] { - Parameters [2] { - Parameter #0 [ <optional> $value ] - Parameter #1 [ <optional> int $precision ] + Parameter #0 [ <optional> $value = <default> ] + Parameter #1 [ <optional> int $precision = <default> ] } } @@ -169,8 +169,8 @@ Extension [ <persistent> extension #121 decimal version 1.4.0 ] { Method [ <internal:decimal> public method round ] { - Parameters [2] { - Parameter #0 [ <optional> int or NULL $places ] - Parameter #1 [ <optional> int or NULL $rounding ] + Parameter #0 [ <optional> ?int $places = <default> ] + Parameter #1 [ <optional> ?int $rounding = <default> ] } - Return [ Decimal\Decimal ] } @@ -284,9 +284,9 @@ Extension [ <persistent> extension #121 decimal version 1.4.0 ] { Method [ <internal:decimal> public method toFixed ] { - Parameters [3] { - Parameter #0 [ <optional> int or NULL $places ] - Parameter #1 [ <optional> bool or NULL $commas ] - Parameter #2 [ <optional> int or NULL $rounding ] + Parameter #0 [ <optional> ?int $places = <default> ] + Parameter #1 [ <optional> ?bool $commas = <default> ] + Parameter #2 [ <optional> ?int $rounding = <default> ] } - Return [ string ] } @@ -332,12 +332,12 @@ Extension [ <persistent> extension #121 decimal version 1.4.0 ] { - Parameters [2] { Parameter #0 [ <required> $op1 ] - Parameter #1 [ <optional> $op2 ] + Parameter #1 [ <optional> $op2 = <default> ] } - Return [ bool ] } - Method [ <internal:decimal> public method __toString ] { + Method [ <internal:decimal, prototype Stringable> public method __toString ] { - Parameters [0] { } diff --git a/php-pecl-decimal.spec b/php-pecl-decimal.spec index 76000e3..a838db2 100644 --- a/php-pecl-decimal.spec +++ b/php-pecl-decimal.spec @@ -1,33 +1,30 @@ # remirepo spec file for php-pecl-decimal # -# Copyright (c) 2018-2021 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2018-2024 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build +%{?scl:%scl_package php-pecl-decimal} -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-decimal -%endif +%bcond_without tests %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%global with_tests 0%{!?_without_tests:1} %global pecl_name decimal # After 20-json.ini %global ini_name 40-%{pecl_name}.ini +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Summary: Arbitrary-precision floating-point decimal -Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.4.0 -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Name: %{?scl_prefix}php-pecl-%{pecl_name} +Version: 1.5.0 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: MIT URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Source0: https://pecl.php.net/get/%{sources}.tgz BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -45,25 +42,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 "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -%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 -%if "%{php_version}" > "8.1" -Obsoletes: php81-pecl-%{pecl_name} <= %{version} -%endif -%endif %description @@ -80,9 +58,7 @@ sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -mv %{pecl_name}-%{version} NTS - -cd NTS +cd %{sources} # Sanity check, really often broken extver=$(sed -n '/#define PHP_DECIMAL_VERSION/{s/.* "//;s/".*$//;p}' php_decimal.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then @@ -91,9 +67,9 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then fi cd .. +mkdir NTS %if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -106,21 +82,22 @@ EOF %build %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS %configure \ --with-decimal \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/php-config + --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --with-decimal \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/zts-php-config + --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -144,7 +121,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -169,49 +146,41 @@ fi %check -%if "%{php_version}" > "8.1" -# ignore deprecated calls -rm ?TS/tests/php8/methods/__construct.phpt -%endif - -cd NTS +cd %{sources} OPT="-n" [ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so" # Minimal load test for NTS extension %{__php} $OPT \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' -%if %{with_tests} +%if %{with tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ -TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ +TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php --show-diff +%{__php} -n run-tests.php -q --show-diff %endif %if %{with_zts} -cd ../ZTS # Minimal load test for ZTS extension %{__ztsphp} $OPT \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' -%if %{with_tests} +%if %{with tests} : Upstream test suite for ZTS extension -TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \ -TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ +TEST_PHP_EXECUTABLE=%{__ztsphp} \ +TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -%{_bindir}/zts-php -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php -q --show-diff %endif %endif %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -225,6 +194,10 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Sat Jan 20 2024 Remi Collet <remi@remirepo.net> - 1.5.0-1 +- update to 1.5.0 +- build out of sources tree + * Thu Sep 9 2021 Remi Collet <remi@remirepo.net> - 1.4.0-2 - ignore 1 test for 8.1 |