diff options
author | Remi Collet <remi@remirepo.net> | 2020-09-23 11:17:52 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-09-23 11:17:52 +0200 |
commit | a9c5c6e659a2487656bc1dafe2521b67708264fe (patch) | |
tree | 19b67b431c0095a0e8ff2d067760f22979c796f6 | |
parent | b34ce025c77bfe695aacac3e887abdb1f76ed87c (diff) |
add upstream patch for PHP 8
-rw-r--r-- | PHPINFO | 6 | ||||
-rw-r--r-- | REFLECTION | 2 | ||||
-rw-r--r-- | php-pecl-rrd.spec | 41 | ||||
-rw-r--r-- | rrd-php8.patch | 213 |
4 files changed, 236 insertions, 26 deletions
@@ -0,0 +1,6 @@ + +rrd + +rrd tool module => enabled +rrd tool module version => 2.0.1 +rrdtool library version => 1.7.2 @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #75 rrd version 2.0.1 ] { +Extension [ <persistent> extension #117 rrd version 2.0.1 ] { - Functions { Function [ <internal:rrd> function rrd_update ] { diff --git a/php-pecl-rrd.spec b/php-pecl-rrd.spec index 398a069..da9a494 100644 --- a/php-pecl-rrd.spec +++ b/php-pecl-rrd.spec @@ -3,7 +3,7 @@ # # Fedora spec file for php-pecl-rrd # -# Copyright (c) 2011-2018 Remi Collet +# Copyright (c) 2011-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -23,11 +23,14 @@ Summary: PHP Bindings for rrdtool Name: %{?scl_prefix}php-pecl-rrd Version: 2.0.1 -Release: 7%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 8%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD -URL: http://pecl.php.net/package/rrd +URL: https://pecl.php.net/package/rrd -Source: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz +Source: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz + +# https://svn.php.net/viewvc?view=revision&revision=350618 +Patch0: %{pecl_name}-php8.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7 @@ -49,33 +52,17 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{releas Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %endif -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} # Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} <= %{version} -Obsoletes: php53u-pecl-%{pecl_name} <= %{version} -Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php54w-pecl-%{pecl_name} <= %{version} -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif +Obsoletes: php56u-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "7.3" Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.4" Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif %endif @@ -104,6 +91,7 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p3 -b .up # Sanity check, really often broken extver=$(sed -n '/#define PHP_RRD_VERSION/{s/.* "//;s/".*$//;p}' php_rrd.h) @@ -232,6 +220,9 @@ fi %changelog +* Wed Sep 23 2020 Remi Collet <remi@remirepo.net> - 2.0.1-8 +- add upstream patch for PHP 8 + * Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 2.0.1-7 - rebuild for 7.4.0RC1 diff --git a/rrd-php8.patch b/rrd-php8.patch new file mode 100644 index 0000000..c5b48c4 --- /dev/null +++ b/rrd-php8.patch @@ -0,0 +1,213 @@ +--- pecl/rrd/trunk/rrd.c 2020/09/23 07:41:40 350617 ++++ pecl/rrd/trunk/rrd.c 2020/09/23 09:09:08 350618 +@@ -552,6 +552,9 @@ + ZEND_ARG_INFO(0, file) + ZEND_ARG_INFO(0, options) + ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO(arginfo_rrd_void, 0) ++ZEND_END_ARG_INFO() + /* }}} */ + + /* {{{ */ +@@ -559,7 +562,7 @@ + PHP_FE(rrd_update, arginfo_rrd_update) + PHP_FE(rrd_create, arginfo_rrd_create) + PHP_FE(rrd_graph, arginfo_rrd_graph) +- PHP_FE(rrd_error, NULL) ++ PHP_FE(rrd_error, arginfo_rrd_void) + PHP_FE(rrd_fetch, arginfo_rrd_fetch) + PHP_FE(rrd_first, arginfo_rrd_first) + PHP_FE(rrd_info, arginfo_rrd_info) +@@ -569,9 +572,9 @@ + PHP_FE(rrd_tune, arginfo_rrd_tune) + PHP_FE(rrd_xport, arginfo_rrd_xport) + #ifdef HAVE_RRDC_DISCONNECT +- PHP_FE(rrdc_disconnect, NULL) ++ PHP_FE(rrdc_disconnect, arginfo_rrd_void) + #endif +- PHP_FE(rrd_version, NULL) ++ PHP_FE(rrd_version, arginfo_rrd_void) + PHP_FE_END + }; + /* }}} */ +--- pecl/rrd/trunk/rrd_create.c 2020/09/23 07:41:40 350617 ++++ pecl/rrd/trunk/rrd_create.c 2020/09/23 09:09:08 350618 +@@ -323,10 +323,13 @@ + ZEND_ARG_INFO(0, description) + ZEND_END_ARG_INFO() + ++ZEND_BEGIN_ARG_INFO_EX(arginfo_rrdcreator_void, 0, 0, 0) ++ZEND_END_ARG_INFO() ++ + /* class method table */ + static zend_function_entry rrd_create_methods[] = { + PHP_ME(RRDCreator, __construct, arginfo_rrdcreator_construct, ZEND_ACC_PUBLIC) +- PHP_ME(RRDCreator, save, NULL, ZEND_ACC_PUBLIC) ++ PHP_ME(RRDCreator, save, arginfo_rrdcreator_void, ZEND_ACC_PUBLIC) + PHP_ME(RRDCreator, addDataSource, arginfo_rrdcreator_description, ZEND_ACC_PUBLIC) + PHP_ME(RRDCreator, addArchive, arginfo_rrdcreator_description, ZEND_ACC_PUBLIC) + PHP_FE_END +--- pecl/rrd/trunk/rrd_graph.c 2020/09/23 07:41:40 350617 ++++ pecl/rrd/trunk/rrd_graph.c 2020/09/23 09:09:08 350618 +@@ -140,6 +140,7 @@ + array_init(&zv_argv); + + ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL(obj->zv_arr_options), num_key, zs_key, zv_option_val) { ++ (void)num_key; /* to avoid -Wunused-but-set-variable */ + smart_string option = {0}; /* one argument option */ + + /* option with string key means long option, hence they are used as +@@ -356,6 +357,9 @@ + /* }}} */ + + /* arguments */ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_rrd_void, 0, 0, 0) ++ZEND_END_ARG_INFO() ++ + ZEND_BEGIN_ARG_INFO_EX(arginfo_rrd_path, 0, 0, 1) + ZEND_ARG_INFO(0, path) + ZEND_END_ARG_INFO() +@@ -367,8 +371,8 @@ + /* class method table */ + static zend_function_entry rrd_graph_methods[] = { + PHP_ME(RRDGraph, __construct, arginfo_rrd_path, ZEND_ACC_PUBLIC) +- PHP_ME(RRDGraph, save, NULL, ZEND_ACC_PUBLIC) +- PHP_ME(RRDGraph, saveVerbose, NULL, ZEND_ACC_PUBLIC) ++ PHP_ME(RRDGraph, save, arginfo_rrd_void, ZEND_ACC_PUBLIC) ++ PHP_ME(RRDGraph, saveVerbose, arginfo_rrd_void, ZEND_ACC_PUBLIC) + PHP_ME(RRDGraph, setOptions, arginfo_rrd_options, ZEND_ACC_PUBLIC) + PHP_FE_END + }; +--- pecl/rrd/trunk/tests/rrd_010.phpt 2020/09/23 07:41:40 350617 ++++ pecl/rrd/trunk/tests/rrd_010.phpt 2020/09/23 09:09:08 350618 +@@ -40,11 +40,11 @@ + [920805900]=> + float(0) + [920806200]=> +- float(0.033333333333333) ++ float(0.03333333333%s) + [920806500]=> +- float(0.033333333333333) ++ float(0.03333333333%s) + [920806800]=> +- float(0.033333333333333) ++ float(0.03333333333%s) + [920807100]=> + float(0.02) + [920807400]=> +@@ -52,20 +52,20 @@ + [920807700]=> + float(0.02) + [920808000]=> +- float(0.013333333333333) ++ float(0.01333333333%s) + [920808300]=> +- float(0.016666666666667) ++ float(0.01666666666%s) + } + ["speed2"]=> + array(13) { + [920804700]=> + float(NAN) + [920805000]=> +- float(0.056666666666667) ++ float(0.05666666666%s) + [920805300]=> + float(0.02) + [920805600]=> +- float(0.0033333333333333) ++ float(0.00333333333%s) + [920805900]=> + float(0) + [920806200]=> +@@ -73,7 +73,7 @@ + [920806500]=> + float(0) + [920806800]=> +- float(0.066666666666667) ++ float(0.06666666666%s) + [920807100]=> + float(0.02) + [920807400]=> +@@ -81,9 +81,9 @@ + [920807700]=> + float(0.02) + [920808000]=> +- float(0.013333333333333) ++ float(0.01333333333%s) + [920808300]=> +- float(0.016666666666667) ++ float(0.01666666666%s) + } + } +-} +\ No newline at end of file ++} +--- pecl/rrd/trunk/tests/rrd_012.phpt 2020/09/23 07:41:40 350617 ++++ pecl/rrd/trunk/tests/rrd_012.phpt 2020/09/23 09:09:08 350618 +@@ -69,7 +69,7 @@ + ["rra[1].xff"]=> + float(0.5) + ["rra[1].cdp_prep[0].value"]=> +- float(0.026666666666667) ++ float(0.02666666666%s) + ["rra[1].cdp_prep[0].unknown_datapoints"]=> + int(0) + } +--- pecl/rrd/trunk/tests/rrd_017.phpt 2020/09/23 07:41:40 350617 ++++ pecl/rrd/trunk/tests/rrd_017.phpt 2020/09/23 09:09:08 350618 +@@ -47,11 +47,11 @@ + [920805900]=> + float(0) + [920806200]=> +- float(0.033333333333333) ++ float(0.0333333333%s) + [920806500]=> +- float(0.033333333333333) ++ float(0.0333333333%s) + [920806800]=> +- float(0.033333333333333) ++ float(0.0333333333%s) + [920807100]=> + float(0.02) + [920807400]=> +@@ -59,9 +59,9 @@ + [920807700]=> + float(0.02) + [920808000]=> +- float(0.013333333333333) ++ float(0.0133333333%s) + [920808300]=> +- float(0.016666666666667) ++ float(0.0166666666%s) + } + } + [1]=> +@@ -81,11 +81,11 @@ + [920805900]=> + float(0) + [920806200]=> +- float(33.333333333333) ++ float(33.333333333%s) + [920806500]=> +- float(33.333333333333) ++ float(33.333333333%s) + [920806800]=> +- float(33.333333333333) ++ float(33.333333333%s) + [920807100]=> + float(20) + [920807400]=> +@@ -93,9 +93,9 @@ + [920807700]=> + float(20) + [920808000]=> +- float(13.333333333333) ++ float(13.333333333%s) + [920808300]=> +- float(16.666666666667) ++ float(16.666666666%s) + } + } + } |