diff options
Diffstat (limited to 'php-pecl-swoole5.spec')
-rw-r--r-- | php-pecl-swoole5.spec | 58 |
1 files changed, 42 insertions, 16 deletions
diff --git a/php-pecl-swoole5.spec b/php-pecl-swoole5.spec index 156591c..8d316fb 100644 --- a/php-pecl-swoole5.spec +++ b/php-pecl-swoole5.spec @@ -40,22 +40,24 @@ %bcond_with curl %endif -%global upstream_version 5.0.2 -#global upstream_prever RC2 +%bcond_without nghttpd2 +%global upstream_version 5.0.3 +#global upstream_prever RC2 +%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} Summary: PHP's asynchronous concurrent distributed networking framework Name: %{?scl_prefix}php-pecl-%{pecl_name}5 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # Extension is Apache-2.0 -# Hiredis is BSD-3-Clause -# nlohmann/json is MIT +# BSD-3-Clause: Hiredis +# MIT: nlohmann/json, nghttp2 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}-build.patch +Patch0: %{pecl_name}-syslib.patch BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -81,6 +83,9 @@ BuildRequires: brotli-devel %if %{with pgsql} BuildRequires: libpq-devel %endif +%if %{with nghttpd2} +BuildRequires: libnghttp2-devel +%endif Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -147,8 +152,6 @@ These are the files needed to compile programs using %{name}. %prep %setup -q -c -mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS - # Don't install/register tests, install examples as doc sed \ @@ -160,11 +163,15 @@ sed \ -i package.xml -cd NTS -%patch0 -p1 +cd %{sources} +%patch -P0 -p1 -b .pr5038 cp -p thirdparty/hiredis/COPYING hiredis-COPYING +%if %{with nghttpd2} +rm -r thirdparty/nghttp2 +%else cp -p thirdparty/nghttp2/COPYING nghttp2-COPYING +%endif # Sanity check, really often broken extver=$(sed -n '/#define SWOOLE_VERSION /{s/.* "//;s/".*$//;p}' include/swoole_version.h) @@ -174,9 +181,10 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_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 @@ -194,6 +202,8 @@ extension=%{pecl_name}.so EOF +%global _configure ../%{sources}/configure + %build %{?dtsenable} @@ -217,19 +227,23 @@ peclbuild() { %if %{with brotli} --enable-brotli \ %endif +%if %{with nghttpd2} + --with-nghttp2-dir=%{_prefix} \ +%endif --with-libdir=%{_lib} \ --with-php-config=$1 make %{?_smp_mflags} } -cd NTS +cd %{sources} %{_bindir}/phpize + +cd ../NTS peclbuild %{_bindir}/php-config %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize peclbuild %{_bindir}/zts-php-config %endif @@ -255,10 +269,10 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Test and Documentation for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i done 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 # code not compatible with Python 3 @@ -309,8 +323,8 @@ cd ../ZTS %files -%{?_licensedir:%license NTS/LICENSE} -%{?_licensedir:%license NTS/*-COPYING} +%{?_licensedir:%license %{sources}/LICENSE} +%{?_licensedir:%license %{sources}/*-COPYING} %{!?_licensedir:%{pecl_docdir}/%{pecl_name}/LICENSE} %{!?_licensedir:%{pecl_docdir}/%{pecl_name}/thirdparty/*/COPYING} %doc %{pecl_docdir}/%{pecl_name}/*md @@ -340,6 +354,18 @@ cd ../ZTS %changelog +* Wed Apr 26 2023 Remi Collet <remi@remirepo.net> - 5.0.3-1 +- update to 5.0.3 +- use system libnghttp2 +- drop patch merged upstream +- fix use of system headers with system libnghttp2 using patch from + https://github.com/swoole/swoole-src/pull/5038 +- build out of sources tree + +* Fri Feb 17 2023 Remi Collet <remi@remirepo.net> - 5.0.2-2 +- fix GCC 13 build using patch from + https://github.com/swoole/swoole-src/pull/4985 + * Mon Feb 6 2023 Remi Collet <remi@remirepo.net> - 5.0.2-1 - update to 5.0.2 |