From c7537a22ba77e92e6065a027875a64a300a1ba7d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 13 Sep 2022 11:16:46 +0200 Subject: add patch for PHP 8.2 from https://github.com/jbboehr/php-mustache/pull/67 --- php-pecl-mustache.spec | 54 +++++++++++++++++--------------------------------- 1 file changed, 18 insertions(+), 36 deletions(-) (limited to 'php-pecl-mustache.spec') diff --git a/php-pecl-mustache.spec b/php-pecl-mustache.spec index 884f892..6718440 100644 --- a/php-pecl-mustache.spec +++ b/php-pecl-mustache.spec @@ -1,34 +1,37 @@ # remirepo spec file for php-pecl-mustache # -# Copyright (c) 2017-2020 Remi Collet +# Copyright (c) 2017-2022 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %if 0%{?scl:1} -%global sub_prefix %{scl_prefix} %scl_package php-pecl-mustache %endif -%global pecl_name mustache +%bcond_without tests + +%global pecl_name mustache %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini -%global with_tests 0%{!?_without_tests:1} %global upstream_version 0.9.2 #global upstream_prever RC2 Summary: Mustache templating language -Name: %{?sub_prefix}php-pecl-%{pecl_name} +Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -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;')}} License: 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}-php82.patch + +BuildRequires: make BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel >= 7 +BuildRequires: %{?scl_prefix}php-devel >= 7.0 BuildRequires: %{?scl_prefix}php-pear BuildRequires: pkgconfig(mustache) >= 0.5.0 %if 0%{?rhel} == 7 @@ -45,32 +48,6 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version} 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 "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif - -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -%endif -%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 -%endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif %description @@ -90,6 +67,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .pr67 + # Sanity check, really often broken extver=$(sed -n '/PHP_MUSTACHE_VERSION/{s/.* "//;s/".*$//;p}' php_mustache.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then @@ -190,7 +169,7 @@ cd NTS --modules | grep %{pecl_name} -%if %{with_tests} +%if %{with tests} # Upstream test suite TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ @@ -206,7 +185,7 @@ cd ../ZTS --define extension=modules/%{pecl_name}.so \ --modules | grep %{pecl_name} -%if %{with_tests} +%if %{with tests} # Upstream test suite TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ @@ -232,8 +211,11 @@ REPORT_EXIT_STATUS=1 \ %endif -# Notice no more EL-6 build (compiler issue and segfaults) %changelog +* Tue Sep 13 2022 Remi Collet - 0.9.2-2 +- add patch for PHP 8.2 from + https://github.com/jbboehr/php-mustache/pull/67 + * Fri Nov 13 2020 Remi Collet - 0.9.2-1 - update to 0.9.2 -- cgit