diff options
-rw-r--r-- | PHPINFO | 2 | ||||
-rw-r--r-- | REFLECTION | 2 | ||||
-rw-r--r-- | mailparse-php81.patch | 112 | ||||
-rw-r--r-- | php-pecl-mailparse.spec | 11 |
4 files changed, 7 insertions, 120 deletions
@@ -2,7 +2,7 @@ mailparse mailparse support => enabled -Extension Version => 3.1.1 +Extension Version => 3.1.2 Directive => Local Value => Master Value mailparse.def_charset => us-ascii => us-ascii @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #84 mailparse version 3.1.1 ] { +Extension [ <persistent> extension #85 mailparse version 3.1.2 ] { - Dependencies { Dependency [ mbstring (Required) ] diff --git a/mailparse-php81.patch b/mailparse-php81.patch deleted file mode 100644 index a0d1a2a..0000000 --- a/mailparse-php81.patch +++ /dev/null @@ -1,112 +0,0 @@ -From ae960dba8cb607296b7f85ca23f9d0a2462607d5 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@php.net> -Date: Tue, 8 Jun 2021 08:00:37 +0200 -Subject: [PATCH] fix for 8.1 - ---- - mailparse.c | 29 ++++++++++++++++++++++++++++- - package.xml | 2 +- - 2 files changed, 29 insertions(+), 2 deletions(-) - -diff --git a/mailparse.c b/mailparse.c -index 104ab38..d4b0804 100644 ---- a/mailparse.c -+++ b/mailparse.c -@@ -413,7 +413,11 @@ static void mailparse_mimemessage_extract(int flags, INTERNAL_FUNCTION_PARAMETER - - - if (part->source.kind == mpSTRING) -+#if PHP_VERSION_ID < 80100 - srcstream = php_stream_memory_open(TEMP_STREAM_READONLY, Z_STRVAL_P(&part->source.zval), Z_STRLEN_P(&part->source.zval)); -+#else -+ srcstream = php_stream_memory_open(TEMP_STREAM_READONLY, Z_STR(part->source.zval)); -+#endif - else - php_stream_from_zval(srcstream, &part->source.zval); - -@@ -430,11 +434,15 @@ static void mailparse_mimemessage_extract(int flags, INTERNAL_FUNCTION_PARAMETER - if (SUCCESS == extract_part(part, flags, srcstream, callback_data, callback)) { - - if (mode == MAILPARSE_EXTRACT_RETURN) { -+#if PHP_VERSION_ID < 80100 - size_t len; - char *buf; - - buf = php_stream_memory_get_buffer(deststream, &len); - RETVAL_STRINGL(buf, len); -+#else -+ RETVAL_STR(php_stream_memory_get_buffer(deststream)); -+#endif - } else { - RETVAL_TRUE; - } -@@ -502,7 +510,11 @@ PHP_METHOD(mimemessage, extract_uue) - } - - if (part->source.kind == mpSTRING) -+#if PHP_VERSION_ID < 80100 - srcstream = php_stream_memory_open(TEMP_STREAM_READONLY, Z_STRVAL_P(&part->source.zval), Z_STRLEN_P(&part->source.zval)); -+#else -+ srcstream = php_stream_memory_open(TEMP_STREAM_READONLY, Z_STR(part->source.zval)); -+#endif - else - php_stream_from_zval(srcstream, &part->source.zval); - -@@ -535,11 +547,15 @@ PHP_METHOD(mimemessage, extract_uue) - if (nparts == index) { - mailparse_do_uudecode(srcstream, deststream); - if (mode == MAILPARSE_EXTRACT_RETURN) { -+#if PHP_VERSION_ID < 80100 - size_t len; - char *buf; - - buf = php_stream_memory_get_buffer(deststream, &len); - RETVAL_STRINGL(buf, len); -+#else -+ RETVAL_STR(php_stream_memory_get_buffer(deststream)); -+#endif - } else { - RETVAL_TRUE; - } -@@ -584,7 +600,11 @@ PHP_METHOD(mimemessage, enum_uue) - return; - - if (part->source.kind == mpSTRING) -+#if PHP_VERSION_ID < 80100 - instream = php_stream_memory_open(TEMP_STREAM_READONLY, Z_STRVAL_P(&part->source.zval), Z_STRLEN_P(&part->source.zval)); -+#else -+ instream = php_stream_memory_open(TEMP_STREAM_READONLY, Z_STR(part->source.zval)); -+#endif - else - php_stream_from_zval(instream, &part->source.zval); - -@@ -1308,7 +1328,11 @@ static void mailparse_do_extract(INTERNAL_FUNCTION_PARAMETERS, int decode, int i - close_src_stream = 1; - } else { - /* filename is the actual data */ -+#if PHP_VERSION_ID < 80100 - srcstream = php_stream_memory_open(TEMP_STREAM_READONLY, Z_STRVAL_P(filename), Z_STRLEN_P(filename)); -+#else -+ srcstream = php_stream_memory_open(TEMP_STREAM_READONLY, Z_STR_P(filename)); -+#endif - close_src_stream = 1; - } - -@@ -1339,12 +1363,15 @@ static void mailparse_do_extract(INTERNAL_FUNCTION_PARAMETERS, int decode, int i - if (SUCCESS == extract_part(part, decode, srcstream, cbdata, cbfunc)) { - - if (deststream != NULL) { -+#if PHP_VERSION_ID < 80100 - /* return it's contents as a string */ - char *membuf = NULL; - size_t memlen = 0; - membuf = php_stream_memory_get_buffer(deststream, &memlen); - RETVAL_STRINGL(membuf, memlen); -- -+#else -+ RETVAL_STR(php_stream_memory_get_buffer(deststream)); -+#endif - } else { - RETVAL_TRUE; - } - diff --git a/php-pecl-mailparse.spec b/php-pecl-mailparse.spec index 1cd426a..ebf91fb 100644 --- a/php-pecl-mailparse.spec +++ b/php-pecl-mailparse.spec @@ -26,14 +26,12 @@ Summary: PHP PECL package for parsing and working with email messages Name: %{?sub_prefix}php-pecl-mailparse -Version: 3.1.1 -Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 3.1.2 +Release: 1%{?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.0 @@ -94,8 +92,6 @@ 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}. @@ -221,6 +217,9 @@ fi %changelog +* Wed Sep 1 2021 Remi Collet <remi@remirepo.net> - 3.1.2-1 +- update to 3.1.2 + * Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 3.1.1-4 - rebuild for 8.1.0RC1 |