commit:     a1b1d39235dcf73d7ccac2e6fd73a391ee3fa640
Author:     Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
AuthorDate: Thu Feb 10 11:23:15 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 10 12:05:46 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1b1d392

dev-php/PEAR-Mail_mimeDecode: add patch for PHP8 compatibility

Closes: https://bugs.gentoo.org/833075
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
Closes: https://github.com/gentoo/gentoo/pull/24144
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../PEAR-Mail_mimeDecode-1.5.6-r3.ebuild           | 24 ++++++++++++++++++++++
 ...PEAR-Mail_mimeDecode-1.5.6-r3-php8_compat.patch | 12 +++++++++++
 2 files changed, 36 insertions(+)

diff --git a/dev-php/PEAR-Mail_mimeDecode/PEAR-Mail_mimeDecode-1.5.6-r3.ebuild 
b/dev-php/PEAR-Mail_mimeDecode/PEAR-Mail_mimeDecode-1.5.6-r3.ebuild
new file mode 100644
index 000000000000..56773b569a82
--- /dev/null
+++ b/dev-php/PEAR-Mail_mimeDecode/PEAR-Mail_mimeDecode-1.5.6-r3.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit php-pear-r2
+
+DESCRIPTION="Provides a class to decode mime messages (split from 
PEAR-Mail_Mime)"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ppc64 ~s390 sparc x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND=">=dev-php/PEAR-Mail_Mime-1.5.2"
+DEPEND="test? ( ${RDEPEND} dev-php/PEAR-PEAR )"
+
+PATCHES=(
+       "${FILESDIR}/PEAR-Mail_mimeDecode-1.5.6-r3-php8_compat.patch"
+)
+
+src_test() {
+       pear run-tests tests || die
+}

diff --git 
a/dev-php/PEAR-Mail_mimeDecode/files/PEAR-Mail_mimeDecode-1.5.6-r3-php8_compat.patch
 
b/dev-php/PEAR-Mail_mimeDecode/files/PEAR-Mail_mimeDecode-1.5.6-r3-php8_compat.patch
new file mode 100644
index 000000000000..e167af7f6a33
--- /dev/null
+++ 
b/dev-php/PEAR-Mail_mimeDecode/files/PEAR-Mail_mimeDecode-1.5.6-r3-php8_compat.patch
@@ -0,0 +1,12 @@
+https://pear.php.net/bugs/bug.php?id=23775
+--- a/Mail/mimeDecode.php
++++ b/Mail/mimeDecode.php
+@@ -834,7 +834,7 @@
+ 
+         // Replace encoded characters
+                
+-        $cb = create_function('$matches',  ' return 
chr(hexdec($matches[0]));');
++        $cb = function($matches) { return chr(hexdec($matches[0])); };
+          
+         $input = preg_replace_callback( '/=([a-f0-9]{2})/i', $cb, $input);
+ 

Reply via email to