Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/PEAR-Mail_mimeDecode/, dev-php/PEAR-Mail_mimeDecode/files/
Date: Thu, 10 Feb 2022 12:05:59
Message-Id: 1644494746.a1b1d39235dcf73d7ccac2e6fd73a391ee3fa640.sam@gentoo
1 commit: a1b1d39235dcf73d7ccac2e6fd73a391ee3fa640
2 Author: Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
3 AuthorDate: Thu Feb 10 11:23:15 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 10 12:05:46 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1b1d392
7
8 dev-php/PEAR-Mail_mimeDecode: add patch for PHP8 compatibility
9
10 Closes: https://bugs.gentoo.org/833075
11 Package-Manager: Portage-3.0.30, Repoman-3.0.3
12 Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
13 Closes: https://github.com/gentoo/gentoo/pull/24144
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 .../PEAR-Mail_mimeDecode-1.5.6-r3.ebuild | 24 ++++++++++++++++++++++
17 ...PEAR-Mail_mimeDecode-1.5.6-r3-php8_compat.patch | 12 +++++++++++
18 2 files changed, 36 insertions(+)
19
20 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
21 new file mode 100644
22 index 000000000000..56773b569a82
23 --- /dev/null
24 +++ b/dev-php/PEAR-Mail_mimeDecode/PEAR-Mail_mimeDecode-1.5.6-r3.ebuild
25 @@ -0,0 +1,24 @@
26 +# Copyright 1999-2022 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=8
30 +
31 +inherit php-pear-r2
32 +
33 +DESCRIPTION="Provides a class to decode mime messages (split from PEAR-Mail_Mime)"
34 +LICENSE="BSD"
35 +SLOT="0"
36 +KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ppc64 ~s390 sparc x86"
37 +IUSE="test"
38 +RESTRICT="!test? ( test )"
39 +
40 +RDEPEND=">=dev-php/PEAR-Mail_Mime-1.5.2"
41 +DEPEND="test? ( ${RDEPEND} dev-php/PEAR-PEAR )"
42 +
43 +PATCHES=(
44 + "${FILESDIR}/PEAR-Mail_mimeDecode-1.5.6-r3-php8_compat.patch"
45 +)
46 +
47 +src_test() {
48 + pear run-tests tests || die
49 +}
50
51 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
52 new file mode 100644
53 index 000000000000..e167af7f6a33
54 --- /dev/null
55 +++ b/dev-php/PEAR-Mail_mimeDecode/files/PEAR-Mail_mimeDecode-1.5.6-r3-php8_compat.patch
56 @@ -0,0 +1,12 @@
57 +https://pear.php.net/bugs/bug.php?id=23775
58 +--- a/Mail/mimeDecode.php
59 ++++ b/Mail/mimeDecode.php
60 +@@ -834,7 +834,7 @@
61 +
62 + // Replace encoded characters
63 +
64 +- $cb = create_function('$matches', ' return chr(hexdec($matches[0]));');
65 ++ $cb = function($matches) { return chr(hexdec($matches[0])); };
66 +
67 + $input = preg_replace_callback( '/=([a-f0-9]{2})/i', $cb, $input);
68 +