From 196df1efa6431dabfef408d31259b7a0c828d76e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 19 Sep 2022 12:04:32 +0200 Subject: add patch for PHP 8.2 from https://github.com/laruence/yaf/pull/579 --- php-pecl-yaf.spec | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'php-pecl-yaf.spec') diff --git a/php-pecl-yaf.spec b/php-pecl-yaf.spec index 20c0de2..54b86e1 100644 --- a/php-pecl-yaf.spec +++ b/php-pecl-yaf.spec @@ -11,9 +11,11 @@ %undefine _strict_symbol_defs_build %if 0%{?scl:1} -%scl_package php-pecl-yaf +%scl_package php-pecl-yaf %endif +%bcond_without tests + %global gh_commit 51e458e9746d7061efc565d49baaca26feacd7ff %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner laruence @@ -30,13 +32,15 @@ Version: 3.3.5 Release: 0.13.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz %else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz %endif License: PHP URL: https://pecl.php.net/package/yaf Source1: %{pecl_name}.ini +Patch0: %{pecl_name}-php82.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 @@ -54,22 +58,6 @@ Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.1" -Obsoletes: php81-pecl-%{pecl_name} <= %{version} -%endif -%endif - %description The Yet Another Framework (Yaf) extension is a PHP framework that is used @@ -93,6 +81,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .pr579 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_YAF_VERSION/{s/.*\t"//;s/".*$//;p}' php_yaf.h ) if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then @@ -155,11 +145,13 @@ cd NTS --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' +%if %{with tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php -q --show-diff +%endif %if %{with_zts} cd ../ZTS @@ -169,12 +161,14 @@ cd ../ZTS --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' +%if %{with tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ %{__ztsphp} -n run-tests.php -q --show-diff %endif +%endif %if 0%{?fedora} < 24 && 0%{?rhel} < 8 @@ -212,6 +206,10 @@ fi %changelog +* Mon Sep 19 2022 Remi Collet - 3.3.5-2 +- add patch for PHP 8.2 from + https://github.com/laruence/yaf/pull/579 + * Mon May 23 2022 Remi Collet - 3.3.5-1 - update to 3.3.5 -- cgit