From 153a551ea34a48715937bd8e23cb04c5f367e3de Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 10 Jul 2024 16:54:56 +0200 Subject: add upstream patch for PHP 8.4 --- php-pecl-yaf.spec | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) (limited to 'php-pecl-yaf.spec') diff --git a/php-pecl-yaf.spec b/php-pecl-yaf.spec index 2157fc0..50109f8 100644 --- a/php-pecl-yaf.spec +++ b/php-pecl-yaf.spec @@ -15,31 +15,23 @@ %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner laruence %global gh_project yaf -#global gh_date 20150914 %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name yaf %global ini_name 40-%{pecl_name}.ini -%if 0%{?gh_date:1} -%global sources %{gh_project}-%{gh_commit} -%else %global sources %{pecl_name}-%{version} -%endif %global _configure ../%{sources}/configure Summary: Yet Another Framework Name: %{?scl_prefix}php-pecl-yaf Version: 3.3.6 -%if 0%{?gh_date:1} -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}/%{sources}-%{gh_short}.tar.gz -%else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -Source: https://pecl.php.net/get/%{sources}%{?prever}.tgz -%endif -License: PHP +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: PHP-3.01 URL: https://pecl.php.net/package/yaf +Source0: https://pecl.php.net/get/%{sources}%{?prever}.tgz Source1: %{pecl_name}.ini +Patch0: %{pecl_name}-upstream.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 @@ -66,20 +58,19 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -qc -%if 0%{?gh_date:1} -mv %{sources}/package.xml . -%endif # Don't install/register tests sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml cd %{sources} +%patch -P0 -p1 + # 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 - : Error: Upstream extension version is ${extver}, expecting %{version}%{?gh_date:-dev}. +if test "x${extver}" != "x%{version}"; then + : Error: Upstream extension version is ${extver}, expecting %{version}. exit 1 fi cd .. @@ -166,7 +157,7 @@ REPORT_EXIT_STATUS=1 \ %files -%{?_licensedir:%license %{sources}/LICENSE} +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -180,6 +171,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Wed Jul 10 2024 Remi Collet - 3.3.6-2 +- add upstream patch for PHP 8.4 + * Mon Jul 1 2024 Remi Collet - 3.3.6-1 - update to 3.3.6 - drop patch merged upstream -- cgit