1 |
commit: c5a8d924447d3cfb98c5f6e66506b56313346a01 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 15 16:51:28 2018 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 15 16:53:40 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5a8d924 |
7 |
|
8 |
dev-php/PEAR-Services_JSON: Revbump for EAPI, eclass and constructor |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
.../PEAR-Services_JSON-1.0.3-r1.ebuild | 19 ++++++++++ |
13 |
.../files/JSON-1.0.3-constructor.patch | 42 ++++++++++++++++++++++ |
14 |
2 files changed, 61 insertions(+) |
15 |
|
16 |
diff --git a/dev-php/PEAR-Services_JSON/PEAR-Services_JSON-1.0.3-r1.ebuild b/dev-php/PEAR-Services_JSON/PEAR-Services_JSON-1.0.3-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..7203bc34815 |
19 |
--- /dev/null |
20 |
+++ b/dev-php/PEAR-Services_JSON/PEAR-Services_JSON-1.0.3-r1.ebuild |
21 |
@@ -0,0 +1,19 @@ |
22 |
+# Copyright 1999-2018 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=6 |
26 |
+ |
27 |
+inherit php-pear-r2 |
28 |
+ |
29 |
+IUSE="" |
30 |
+DESCRIPTION="PHP implementaion of json_encode/decode" |
31 |
+LICENSE="BSD" |
32 |
+SLOT="0" |
33 |
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
34 |
+PATCHES=( "${FILESDIR}/JSON-1.0.3-constructor.patch" ) |
35 |
+ |
36 |
+src_install() { |
37 |
+ php-pear-r2_src_install |
38 |
+ insinto /usr/share/php/Services |
39 |
+ doins JSON.php |
40 |
+} |
41 |
|
42 |
diff --git a/dev-php/PEAR-Services_JSON/files/JSON-1.0.3-constructor.patch b/dev-php/PEAR-Services_JSON/files/JSON-1.0.3-constructor.patch |
43 |
new file mode 100644 |
44 |
index 00000000000..d9d63fc28fc |
45 |
--- /dev/null |
46 |
+++ b/dev-php/PEAR-Services_JSON/files/JSON-1.0.3-constructor.patch |
47 |
@@ -0,0 +1,42 @@ |
48 |
+diff -aurN a/JSON.php b/JSON.php |
49 |
+--- a/JSON.php 2011-01-13 21:40:48.000000000 -0500 |
50 |
++++ b/JSON.php 2018-02-15 11:42:06.551287857 -0500 |
51 |
+@@ -139,6 +139,14 @@ |
52 |
+ * strings or numbers, if you return an object, make sure it does |
53 |
+ * not have a toJSON method, otherwise an error will occur. |
54 |
+ */ |
55 |
++ function __construct($use = 0) |
56 |
++ { |
57 |
++ $this->use = $use; |
58 |
++ $this->_mb_strlen = function_exists('mb_strlen'); |
59 |
++ $this->_mb_convert_encoding = function_exists('mb_convert_encoding'); |
60 |
++ $this->_mb_substr = function_exists('mb_substr'); |
61 |
++ } |
62 |
++ |
63 |
+ function Services_JSON($use = 0) |
64 |
+ { |
65 |
+ $this->use = $use; |
66 |
+@@ -909,6 +917,11 @@ |
67 |
+ |
68 |
+ class Services_JSON_Error extends PEAR_Error |
69 |
+ { |
70 |
++ function __construct($message = 'unknown error', $code = null, |
71 |
++ $mode = null, $options = null, $userinfo = null) |
72 |
++ { |
73 |
++ parent::__construct($message, $code, $mode, $options, $userinfo); |
74 |
++ } |
75 |
+ function Services_JSON_Error($message = 'unknown error', $code = null, |
76 |
+ $mode = null, $options = null, $userinfo = null) |
77 |
+ { |
78 |
+@@ -923,6 +936,11 @@ |
79 |
+ */ |
80 |
+ class Services_JSON_Error |
81 |
+ { |
82 |
++ function __construct($message = 'unknown error', $code = null, |
83 |
++ $mode = null, $options = null, $userinfo = null) |
84 |
++ { |
85 |
++ |
86 |
++ } |
87 |
+ function Services_JSON_Error($message = 'unknown error', $code = null, |
88 |
+ $mode = null, $options = null, $userinfo = null) |
89 |
+ { |