summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-05-24 16:19:38 +0200
committerRemi Collet <remi@php.net>2022-05-24 16:19:38 +0200
commit4e83d1b70fc860d170d0a6d77c6a19b0889c1ec5 (patch)
treeb48925e07f554354a8a45a23c5513b7a9309de58
parent2d3764bcf3636ad151fd0a65915e2de4d00deddd (diff)
add upstream patch for PHP 8.2
-rw-r--r--0001-declare-mimemessage-data-property-for-8.2.patch24
-rw-r--r--REFLECTION3
-rw-r--r--php-pecl-mailparse.spec9
3 files changed, 34 insertions, 2 deletions
diff --git a/0001-declare-mimemessage-data-property-for-8.2.patch b/0001-declare-mimemessage-data-property-for-8.2.patch
new file mode 100644
index 0000000..489a7a7
--- /dev/null
+++ b/0001-declare-mimemessage-data-property-for-8.2.patch
@@ -0,0 +1,24 @@
+From e633e2308afe992a2eaf2bbf3f0ab34fc420ce77 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Tue, 24 May 2022 16:16:44 +0200
+Subject: [PATCH] declare mimemessage::data property (for 8.2)
+
+---
+ mailparse.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/mailparse.c b/mailparse.c
+index 58c8b7b..631a225 100644
+--- a/mailparse.c
++++ b/mailparse.c
+@@ -160,6 +160,7 @@ PHP_MINIT_FUNCTION(mailparse)
+ INIT_CLASS_ENTRY(mmce, "mimemessage", mimemessage_methods);
+ mimemsg_class_entry = zend_register_internal_class(&mmce);
+
++ zend_declare_property_null(mimemsg_class_entry, "data", sizeof("data")-1, ZEND_ACC_PUBLIC);
+
+ le_mime_part = zend_register_list_destructors_ex(mimepart_dtor, NULL, mailparse_msg_name, module_number);
+
+--
+2.35.3
+
diff --git a/REFLECTION b/REFLECTION
index f19f96a..32315e3 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -130,7 +130,8 @@ Extension [ <persistent> extension #83 mailparse version 3.1.3 ] {
- Static methods [0] {
}
- - Properties [0] {
+ - Properties [1] {
+ Property [ public $data = NULL ]
}
- Methods [10] {
diff --git a/php-pecl-mailparse.spec b/php-pecl-mailparse.spec
index 471feb1..1f3d0f5 100644
--- a/php-pecl-mailparse.spec
+++ b/php-pecl-mailparse.spec
@@ -27,11 +27,13 @@
Summary: PHP PECL package for parsing and working with email messages
Name: %{?sub_prefix}php-pecl-mailparse
Version: 3.1.3
-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: PHP
URL: https://pecl.php.net/package/mailparse
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Patch0: 0001-declare-mimemessage-data-property-for-8.2.patch
+
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
@@ -92,6 +94,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1
+
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}.
@@ -217,6 +221,9 @@ fi
%changelog
+* Mon May 24 2022 Remi Collet <remi@remirepo.net> - 3.1.3-2
+- add upstream patch for PHP 8.2
+
* Mon Feb 21 2022 Remi Collet <remi@remirepo.net> - 3.1.3-1
- update to 3.1.3