From 558fdd4c16f891517cffe32c30037197563055e1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 2 Sep 2020 11:57:17 +0200 Subject: add upstream patch for PHP 8.0.0beta3 --- fa3c4f0c327aee0f12d071b13458de70164d8fe0.patch | 64 ++++++++++++++++++++++++++ php-pecl-mailparse.spec | 9 +++- 2 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 fa3c4f0c327aee0f12d071b13458de70164d8fe0.patch diff --git a/fa3c4f0c327aee0f12d071b13458de70164d8fe0.patch b/fa3c4f0c327aee0f12d071b13458de70164d8fe0.patch new file mode 100644 index 0000000..5552289 --- /dev/null +++ b/fa3c4f0c327aee0f12d071b13458de70164d8fe0.patch @@ -0,0 +1,64 @@ +From fa3c4f0c327aee0f12d071b13458de70164d8fe0 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 2 Sep 2020 11:53:27 +0200 +Subject: [PATCH] mbfl_convert_filter_feed removed in 8.0.0beta3 + +--- + mailparse.c | 4 ++-- + php_mailparse.h | 7 +++++++ + php_mailparse_mime.c | 2 +- + 3 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/mailparse.c b/mailparse.c +index 8c706c2..a519c5b 100644 +--- a/mailparse.c ++++ b/mailparse.c +@@ -1020,7 +1020,7 @@ PHP_FUNCTION(mailparse_stream_encode) + } + + for (; ifilter_function)((c), (filter)) ++#endif ++ + #endif + + +diff --git a/php_mailparse_mime.c b/php_mailparse_mime.c +index b4dbd65..27e5a9c 100644 +--- a/php_mailparse_mime.c ++++ b/php_mailparse_mime.c +@@ -967,7 +967,7 @@ PHP_MAILPARSE_API int php_mimepart_decoder_feed(php_mimepart *part, const char * + + if (part->extract_filter) { + for (i = 0; i < bufsize; i++) { +- if (mbfl_convert_filter_feed(buf[i], part->extract_filter) < 0) { ++ if (MBFL_CONVERT_FILTER_FEED(buf[i], part->extract_filter) < 0) { + zend_error(E_WARNING, "%s() - filter conversion failed. Input message is probably incorrectly encoded\n", + get_active_function_name()); + return -1; diff --git a/php-pecl-mailparse.spec b/php-pecl-mailparse.spec index 3bb9acb..a1154c5 100644 --- a/php-pecl-mailparse.spec +++ b/php-pecl-mailparse.spec @@ -27,12 +27,13 @@ Summary: PHP PECL package for parsing and working with email messages Name: %{?sub_prefix}php-pecl-mailparse Version: 3.1.0 -Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 4%{?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: https://github.com/php/pecl-mail-mailparse/commit/d6f1583ffd408a9bbf1566d49c2bf099fce4e53a.patch +Patch1: https://github.com/php/pecl-mail-mailparse/commit/fa3c4f0c327aee0f12d071b13458de70164d8fe0.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 7 @@ -99,7 +100,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 -b .up +%patch0 -p1 -b .up0 +%patch1 -p1 -b .up1 extver=$(sed -n '/#define PHP_MAILPARSE_VERSION/{s/.* "//;s/".*$//;p}' php_mailparse.h) if test "x${extver}" != "x%{version}"; then @@ -226,6 +228,9 @@ fi %changelog +* Wed Sep 2 2020 Remi Collet - 3.1.0-4 +- add upstream patch for PHP 8.0.0beta3 + * Mon Aug 24 2020 Remi Collet - 3.1.0-3 - add upstream patch for test suite with PHP 8.0 -- cgit