From b8766f3b78bc9a0cc00a035b87d255a85eaeb132 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 4 Sep 2023 08:47:45 +0200 Subject: build out of sources tree add patch for PHP 8.3 from https://github.com/openswoole/ext-openswoole/pull/328 --- php-pecl-openswoole22.spec | 56 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'php-pecl-openswoole22.spec') diff --git a/php-pecl-openswoole22.spec b/php-pecl-openswoole22.spec index 1c5bf8e..e0980b6 100644 --- a/php-pecl-openswoole22.spec +++ b/php-pecl-openswoole22.spec @@ -7,12 +7,7 @@ # 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-openswoole22 -%endif +%{?scl:%scl_package php-pecl-openswoole22} # See https://github.com/openswoole/swoole-src/issues/287 %global with_zts 0 @@ -31,19 +26,22 @@ %global upstream_version 22.0.0 #global upstream_prever RC2 +%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} +%global _configure ../%{sources}/configure Summary: High Performance Programmatic Server for PHP with Async IO, Coroutines and Fibers Name: %{?scl_prefix}php-pecl-%{pecl_name}22 Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # SPDX: extension is Apache-2.0 # hiredis is BSD-3-Clause License: Apache-2.0 AND BSD-3-Clause URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +Source0: https://pecl.php.net/get/%{sources}.tgz Patch0: %{pecl_name}-gcc13.patch +Patch1: %{pecl_name}-php83.patch BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -76,7 +74,6 @@ Requires: %{?scl_prefix}php(api) = %{php_core_api} Requires: %{?scl_prefix}php-curl%{?_isa} Requires: %{?scl_prefix}php-sockets%{?_isa} Requires: %{?scl_prefix}php-mysqlnd%{?_isa} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} @@ -120,8 +117,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 \ @@ -133,8 +128,9 @@ sed \ -i package.xml -cd NTS -%patch0 -p1 -b .pr304 +cd %{sources} +%patch -P0 -p1 -b .pr304 +%patch -P1 -p1 -b .pr328 cp -p thirdparty/hiredis/COPYING hiredis-COPYING cp -p thirdparty/nghttp2/COPYING nghttp2-COPYING @@ -147,9 +143,9 @@ 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 @@ -189,14 +185,15 @@ peclbuild() { make %{?_smp_mflags} } -cd NTS -%{_bindir}/phpize -peclbuild %{_bindir}/php-config +cd %{sources} +%{__phpize} + +cd ../NTS +peclbuild %{__phpconfig} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -peclbuild %{_bindir}/zts-php-config +peclbuild %{__ztsphpconfig} %endif @@ -221,10 +218,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 @@ -257,24 +254,22 @@ OPT="--no-php-ini" [ -f %{php_extdir}/sockets.so ] && OPT="$OPT -d extension=sockets.so" [ -f %{php_extdir}/mysqlnd.so ] && OPT="$OPT -d extension=mysqlnd.so" -cd NTS : Minimal load test for NTS extension %{__php} $OPT \ - --define extension=modules/%{pecl_name}.so \ + --define extension=NTS/modules/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' %if %{with_zts} -cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} $OPT \ - --define extension=modules/%{pecl_name}.so \ + --define extension=ZTS/modules/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' %endif %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} %{pecl_xmldir}/%{name}.xml @@ -304,6 +299,11 @@ cd ../ZTS %changelog +* Mon Sep 4 2023 Remi Collet - 22.0.0-3 +- build out of sources tree +- add patch for PHP 8.3 from + https://github.com/openswoole/ext-openswoole/pull/328 + * Fri Feb 17 2023 Remi Collet - 22.0.0-2 - fix GCC 13 build using patch from https://github.com/openswoole/ext-openswoole/pull/304 -- cgit