From 5a30a40d1003dad3cc3c339ca68d9874ba292e46 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 29 Sep 2023 13:34:17 +0200 Subject: update to 5.1.0 add dependency on pdo extension new coroutine_odbc enabled new coroutine_sqlite enabled new coroutine_oracle disabled --- php-pecl-swoole5.spec | 67 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 17 deletions(-) (limited to 'php-pecl-swoole5.spec') diff --git a/php-pecl-swoole5.spec b/php-pecl-swoole5.spec index a026054..f461321 100644 --- a/php-pecl-swoole5.spec +++ b/php-pecl-swoole5.spec @@ -7,11 +7,10 @@ # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build - %if 0%{?scl:1} %scl_package php-pecl-swoole5 +%else +%global _root_prefix %{_prefix} %endif %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} @@ -21,6 +20,19 @@ %bcond_without cares %bcond_without nghttpd2 +# disabled by default to avoid dependency on Oracle Instant Client +%bcond_with oracle + +%ifarch aarch64 +%global oraclever 19.19 +%global oraclelib 19.1 +%global oracledir 19.19 +%else +%global oraclever 21.11 +%global oraclelib 21.1 +%global oracledir 21 +%endif + %if 0%{?fedora} || 0%{?rhel} >= 8 %bcond_without pgsql @@ -42,9 +54,10 @@ %bcond_without nghttpd2 -%global upstream_version 5.0.3 +%global upstream_version 5.1.0 #global upstream_prever RC2 %global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} +%global _configure ../%{sources}/configure Summary: PHP's asynchronous concurrent distributed networking framework Name: %{?scl_prefix}php-pecl-%{pecl_name}5 @@ -57,9 +70,6 @@ License: Apache-2.0 AND BSD-3-Clause AND MIT URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz -Patch0: %{pecl_name}-syslib.patch -Patch1: %{pecl_name}-php83.patch - BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?dtsprefix}gcc-c++ @@ -69,6 +79,7 @@ BuildRequires: %{?scl_prefix}php-curl BuildRequires: %{?scl_prefix}php-json BuildRequires: %{?scl_prefix}php-sockets BuildRequires: %{?scl_prefix}php-mysqlnd +BuildRequires: %{?scl_prefix}php-pdo BuildRequires: pcre-devel BuildRequires: openssl-devel >= 1.0.2 BuildRequires: zlib-devel @@ -87,6 +98,19 @@ BuildRequires: libpq-devel %if %{with nghttpd2} BuildRequires: libnghttp2-devel %endif +BuildRequires: unixODBC-devel +BuildRequires: sqlite-devel +%if %{with oracle} +%ifarch aarch64 +BuildRequires: oracle-instantclient%{oraclever}-devel +# Should requires libclntsh.so.19.1()(aarch-64), but it's not provided by Oracle RPM. +Requires: libclntsh.so.%{oraclelib} +AutoReq: 0 +%else +BuildRequires: oracle-instantclient-devel >= %{oraclever} +%endif +%endif + Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -94,6 +118,7 @@ Requires: %{?scl_prefix}php-curl%{?_isa} Requires: %{?scl_prefix}php-json%{?_isa} Requires: %{?scl_prefix}php-sockets%{?_isa} Requires: %{?scl_prefix}php-mysqlnd%{?_isa} +Requires: %{?scl_prefix}php-pdo%{?_isa} Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} @@ -164,9 +189,6 @@ sed \ cd %{sources} -%patch -P0 -p1 -b .pr5038 -%patch -P1 -p1 -b .php83 - cp -p thirdparty/hiredis/COPYING hiredis-COPYING %if %{with nghttpd2} rm -r thirdparty/nghttp2 @@ -196,6 +218,7 @@ extension=%{pecl_name}.so ; Configuration ;swoole.enable_coroutine = On ;swoole.enable_library = On +;swoole.enable_fiber_mock = Off ;swoole.enable_preemptive_scheduler = Off ;swoole.display_errors = On :swoole.use_shortname = On @@ -203,8 +226,6 @@ extension=%{pecl_name}.so EOF -%global _configure ../%{sources}/configure - %build %{?dtsenable} @@ -229,8 +250,13 @@ peclbuild() { --enable-brotli \ %endif %if %{with nghttpd2} - --with-nghttp2-dir=%{_prefix} \ + --with-nghttp2-dir=%{_root_prefix} \ +%endif +%if %{with oracle} + --with-swoole-oracle=instantclient,%{_root_prefix}/lib/oracle/%{oracledir}/client64/lib \ %endif + --with-swoole-odbc=unixodbc,%{_root_prefix} \ + --enable-swoole-sqlite \ --with-libdir=%{_lib} \ --with-php-config=$1 @@ -303,10 +329,10 @@ fi %check OPT="--no-php-ini" -[ -f %{php_extdir}/curl.so ] && OPT="$OPT -d extension=curl.so" -[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so" -[ -f %{php_extdir}/sockets.so ] && OPT="$OPT -d extension=sockets.so" -[ -f %{php_extdir}/mysqlnd.so ] && OPT="$OPT -d extension=mysqlnd.so" +[ -f %{php_extdir}/curl.so ] && OPT="$OPT -d extension=curl" +[ -f %{php_extdir}/sockets.so ] && OPT="$OPT -d extension=sockets" +[ -f %{php_extdir}/mysqlnd.so ] && OPT="$OPT -d extension=mysqlnd" +[ -f %{php_extdir}/pdo.so ] && OPT="$OPT -d extension=pdo" cd NTS : Minimal load test for NTS extension @@ -355,6 +381,13 @@ cd ../ZTS %changelog +* Fri Sep 29 2023 Remi Collet - 5.1.0-1 +- update to 5.1.0 +- add dependency on pdo extension +- new coroutine_odbc enabled +- new coroutine_sqlite enabled +- new coroutine_oracle disabled + * Mon Sep 4 2023 Remi Collet - 5.0.3-2 - add upstream patch for PHP 8.3 -- cgit