diff options
-rw-r--r-- | PHPINFO | 2 | ||||
-rw-r--r-- | REFLECTION | 49 | ||||
-rw-r--r-- | fe089abf1a34a1ae5575bd7cc8b9bfa9a6605e16.patch | 27 | ||||
-rw-r--r-- | php-pecl-seasclick.spec | 142 |
4 files changed, 95 insertions, 125 deletions
@@ -2,5 +2,5 @@ SeasClick SeasClick support => enabled -Version => 0.1.0 +Version => 0.1.1 Author => SeasX Group[email: ahhhh.wang@gmail.com] @@ -1,12 +1,7 @@ -Extension [ <persistent> extension #15 SeasClick version 0.1.0 ] { - - - Functions { - Function [ <internal:SeasClick> function SeasClick_version ] { - } - } +Extension [ <persistent> extension #122 SeasClick version 0.1.1 ] { - Classes [1] { - Class [ <internal:SeasClick> class SeasClick ] { + Class [ <internal:SeasClick> final class SeasClick ] { - Constants [0] { } @@ -18,15 +13,15 @@ Extension [ <persistent> extension #15 SeasClick version 0.1.0 ] { } - Properties [6] { - Property [ <default> protected $host ] - Property [ <default> protected $port ] - Property [ <default> protected $database ] - Property [ <default> protected $user ] - Property [ <default> protected $passwd ] - Property [ <default> protected $compression ] + Property [ protected $host = '127.0.0.1' ] + Property [ protected $port = 9000 ] + Property [ protected $database = 'default' ] + Property [ protected $user = NULL ] + Property [ protected $passwd = NULL ] + Property [ protected $compression = false ] } - - Methods [5] { + - Methods [8] { Method [ <internal:SeasClick, ctor> public method __construct ] { - Parameters [1] { @@ -34,7 +29,10 @@ Extension [ <persistent> extension #15 SeasClick version 0.1.0 ] { } } - Method [ <internal:SeasClick, dtor> public method __destruct ] { + Method [ <internal:SeasClick> public method __destruct ] { + + - Parameters [0] { + } } Method [ <internal:SeasClick> public method select ] { @@ -54,6 +52,27 @@ Extension [ <persistent> extension #15 SeasClick version 0.1.0 ] { } } + Method [ <internal:SeasClick> public method writeStart ] { + + - Parameters [2] { + Parameter #0 [ <required> $table ] + Parameter #1 [ <required> $columns ] + } + } + + Method [ <internal:SeasClick> public method write ] { + + - Parameters [1] { + Parameter #0 [ <required> $values ] + } + } + + Method [ <internal:SeasClick> public method writeEnd ] { + + - Parameters [0] { + } + } + Method [ <internal:SeasClick> public method execute ] { - Parameters [2] { diff --git a/fe089abf1a34a1ae5575bd7cc8b9bfa9a6605e16.patch b/fe089abf1a34a1ae5575bd7cc8b9bfa9a6605e16.patch deleted file mode 100644 index 43631ad..0000000 --- a/fe089abf1a34a1ae5575bd7cc8b9bfa9a6605e16.patch +++ /dev/null @@ -1,27 +0,0 @@ -From fe089abf1a34a1ae5575bd7cc8b9bfa9a6605e16 Mon Sep 17 00:00:00 2001 -From: Panda <itwujunze@163.com> -Date: Tue, 28 May 2019 16:22:15 +0800 -Subject: [PATCH] PHP 7.4 support - -PHP 7.4 support -fix: https://github.com/SeasX/SeasClick/issues/1 ---- - php7_wrapper.h | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/php7_wrapper.h b/php7_wrapper.h -index e856b15..2306ff8 100644 ---- a/php7_wrapper.h -+++ b/php7_wrapper.h -@@ -15,6 +15,11 @@ - | Author: SeasX Group <ahhhh.wang@gmail.com> | - +----------------------------------------------------------------------+ - */ -+// PHP7.4 + -+#if !defined(ZEND_ACC_IMPLICIT_PUBLIC) -+# define ZEND_ACC_IMPLICIT_PUBLIC ZEND_ACC_PUBLIC -+#endif -+ - // PHP7+ - #if PHP_MAJOR_VERSION < 7 - diff --git a/php-pecl-seasclick.spec b/php-pecl-seasclick.spec index 567a3ca..5c7f69a 100644 --- a/php-pecl-seasclick.spec +++ b/php-pecl-seasclick.spec @@ -1,88 +1,52 @@ # remirepo spec file for php-pecl-seasclick # -# Copyright (c) 2019 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2019-2023 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-seasclick -%else -%global _root_libdir %{_libdir} -%endif -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%global proj_name SeasClick -%global pecl_name %{proj_name} -%global lowername seasclick +%{?scl:%scl_package php-pecl-seasclick} + # tests require a server -%global with_tests 0%{?_with_tests:1} +%bcond_with tests + +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global proj_name SeasClick +%global pecl_name %{proj_name} +%global lowername seasclick %if "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini +%global ini_name %{pecl_name}.ini %else -%global ini_name 40-%{pecl_name}.ini +%global ini_name 40-%{pecl_name}.ini %endif +%global sources %{proj_name}-%{version} +%global _configure ../%{sources}/configure Summary: An Yandex ClickHouse client driven extension for PHP -Name: %{?sub_prefix}php-pecl-%{lowername} -Version: 0.1.0 +Name: %{?scl_prefix}php-pecl-%{lowername} +Version: 0.1.1 Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -License: ASL 2.0 -URL: http://pecl.php.net/package/%{proj_name} -Source0: http://pecl.php.net/get/%{proj_name}-%{version}.tgz +License: Apache-2.0 +URL: https://pecl.php.net/package/%{proj_name} +Source0: https://pecl.php.net/get/%{sources}.tgz -Patch0: https://github.com/SeasX/SeasClick/commit/fe089abf1a34a1ae5575bd7cc8b9bfa9a6605e16.patch - -%if 0%{?rhel} == 6 -BuildRequires: devtoolset-6-toolchain -%else +BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?dtsprefix}gcc-c++ -%endif -BuildRequires: %{?scl_prefix}php-devel +# see https://github.com/SeasX/SeasClick/issues/16 +BuildRequires: %{?scl_prefix}php-devel >= 7.0 BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} Requires: %{?scl_prefix}php-json%{?_isa} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-%{lowername} = %{version} Provides: %{?scl_prefix}php-%{lowername}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{proj_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{proj_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} -# Other third party repo stuff -%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 -%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 -%endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif %description @@ -93,17 +57,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -mv %{proj_name}-%{version} NTS -cp NTS/lib/clickhouse-cpp/LICENSE NTS/LICENSE.clickhouse-cpp +cp %{sources}/lib/clickhouse-cpp/LICENSE %{sources}/LICENSE.clickhouse-cpp # Don't install tests sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -cd NTS -%patch0 -p1 -b .up - +cd %{sources} : Sanity check, really often broken extver=$(sed -n '/#define PHP_SEASCLICK_VERSION /{s/.* "//;s/".*$//;p}' php_SeasClick.h) if test "x${extver}" != "x%{version}"; then @@ -112,9 +73,9 @@ if test "x${extver}" != "x%{version}"; 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 @@ -125,32 +86,27 @@ EOF %build -%if 0%{?rhel} == 6 -source /opt/rh/devtoolset-6/enable -%endif %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS %configure \ --enable-SeasClick \ - --with-php-config=%{_bindir}/php-config + --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --enable-SeasClick \ - --with-php-config=%{_bindir}/zts-php-config + --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif %install -%if 0%{?rhel} == 6 -source /opt/rh/devtoolset-6/enable -%endif %{?dtsenable} make -C NTS install INSTALL_ROOT=%{buildroot} @@ -169,28 +125,37 @@ 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 %check -cd NTS +cd %{sources} + : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=json.so \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep -i %{pecl_name} + --modules | grep -i '^%{pecl_name}$' + +%if %{with tests} +: Upstream test suite for NTS extension +TEST_PHP_EXECUTABLE=%{__php} \ +TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ +REPORT_EXIT_STATUS=1 \ +%{__php} -n run-tests.php -q --show-diff +%endif %if %{with_zts} -cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=json.so \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep -i %{pecl_name} + --modules | grep -i '^%{pecl_name}$' %endif + %if 0%{?fedora} < 24 && 0%{?rhel} < 8 # when pear installed alone, after us %triggerin -- %{?scl_prefix}php-pear @@ -213,7 +178,7 @@ fi %files %doc %{pecl_docdir}/%{pecl_name} -%{?_licensedir:%license NTS/LICENSE*} +%{?_licensedir:%license %{sources}/LICENSE*} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} @@ -226,6 +191,19 @@ fi %changelog +* Fri Sep 1 2023 Remi Collet <remi@remirepo.net> - 0.1.1-2 +- build out of sources tree + +* Mon Feb 27 2023 Remi Collet <remi@remirepo.net> - 0.1.1-1 +- update to 0.1.1 +- open https://github.com/SeasX/SeasClick/issues/16 PHP 5.x broken build + +* Wed Aug 19 2020 Remi Collet <remi@remirepo.net> - 0.1.0-4 +- add upstream patch for GCC 10 + +* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 0.1.0-3 +- rebuild for 7.4.0RC1 + * Thu Jun 6 2019 Remi Collet <remi@remirepo.net> - 0.1.0-2 - add upstream patch for 7.4 |