From 34f22f931a68ebf9273250d82d4d5614974a05f3 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 9 Jun 2021 08:14:21 +0200 Subject: add upstream patch for PHP 8.1 --- php-pecl-mailparse.spec | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'php-pecl-mailparse.spec') diff --git a/php-pecl-mailparse.spec b/php-pecl-mailparse.spec index f4ab3c6..1bf47b6 100644 --- a/php-pecl-mailparse.spec +++ b/php-pecl-mailparse.spec @@ -3,7 +3,7 @@ # # Fedora spec file for php-pecl-mailparse # -# Copyright (c) 2008-2020 Remi Collet +# Copyright (c) 2008-2021 Remi Collet # Copyright (c) 2004-2007 Matthias Saou # # License: MIT @@ -27,13 +27,16 @@ Summary: PHP PECL package for parsing and working with email messages Name: %{?sub_prefix}php-pecl-mailparse Version: 3.1.1 -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;')}} License: PHP URL: https://pecl.php.net/package/mailparse Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Patch0: %{pecl_name}-php81.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: %{?scl_prefix}php-mbstring # Required by phpize @@ -67,12 +70,9 @@ Obsoletes: php74-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "8.0" Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "8.1" +Obsoletes: php81-pecl-%{pecl_name} <= %{version} %endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} %endif @@ -94,6 +94,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .php81 + extver=$(sed -n '/#define PHP_MAILPARSE_VERSION/{s/.* "//;s/".*$//;p}' php_mailparse.h) if test "x${extver}" != "x%{version}"; then : Error: Upstream version is ${extver}, expecting %{version}. @@ -219,6 +221,9 @@ fi %changelog +* Wed Jun 9 2021 Remi Collet - 3.1.1-3 +- add upstream patch for PHP 8.1 + * Wed Sep 30 2020 Remi Collet - 3.1.1-2 - rebuild for PHP 8.0.0RC1 -- cgit