1 |
commit: 6e1ba2b4b685a9fc91424629c7e41222c27a58ee |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 11 04:47:04 2021 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 11 04:51:01 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e1ba2b4 |
7 |
|
8 |
dev-lang/jerryscript: 2.4.0-r3 revbump more python3 debugger fixes |
9 |
|
10 |
Package-Manager: Portage-3.0.19, Repoman-3.0.3 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
.../files/jerryscript-2.4.0-python3.patch | 38 +++++++++++++--------- |
14 |
...2.4.0-r2.ebuild => jerryscript-2.4.0-r3.ebuild} | 0 |
15 |
2 files changed, 22 insertions(+), 16 deletions(-) |
16 |
|
17 |
diff --git a/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch b/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch |
18 |
index 7da285c5d3c..a7046b4b645 100644 |
19 |
--- a/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch |
20 |
+++ b/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch |
21 |
@@ -16,12 +16,13 @@ JerryScript-DCO-1.0-Signed-off-by: Zac Medico <zmedico@×××××.com> |
22 |
2 files changed, 31 insertions(+), 9 deletions(-) |
23 |
|
24 |
diff --git a/jerry-debugger/jerry_client_main.py b/jerry-debugger/jerry_client_main.py |
25 |
-index e65d0e14..e3176c86 100644 |
26 |
+index e65d0e14..b465955f 100644 |
27 |
--- a/jerry-debugger/jerry_client_main.py |
28 |
+++ b/jerry-debugger/jerry_client_main.py |
29 |
-@@ -151,2 +151,12 @@ def arguments_parse(): |
30 |
+@@ -151,2 +151,13 @@ def arguments_parse(): |
31 |
|
32 |
+if sys.version_info.major >= 3: |
33 |
++ # pylint: disable=invalid-name |
34 |
+ _ord_orig = ord |
35 |
+ def _ord_compat(c): |
36 |
+ if isinstance(c, int): |
37 |
@@ -32,16 +33,16 @@ index e65d0e14..e3176c86 100644 |
38 |
+ |
39 |
+ |
40 |
class JerryBreakpoint(object): |
41 |
-@@ -563,2 +573,3 @@ class JerryDebugger(object): |
42 |
+@@ -563,2 +574,3 @@ class JerryDebugger(object): |
43 |
def _send_string(self, args, message_type, index=0): |
44 |
+ args = args.encode("utf8") |
45 |
|
46 |
-@@ -810,3 +821,3 @@ class JerryDebugger(object): |
47 |
+@@ -810,3 +822,3 @@ class JerryDebugger(object): |
48 |
elif buffer_type in [JERRY_DEBUGGER_SCOPE_VARIABLES, JERRY_DEBUGGER_SCOPE_VARIABLES_END]: |
49 |
- self.scope_vars += "".join(data[1:]) |
50 |
+ self.scope_vars += "".join(data[1:].decode("utf8")) |
51 |
|
52 |
-@@ -866,5 +877,5 @@ class JerryDebugger(object): |
53 |
+@@ -866,5 +878,5 @@ class JerryDebugger(object): |
54 |
def _parse_source(self, data): |
55 |
- source_code = "" |
56 |
- source_code_name = "" |
57 |
@@ -50,7 +51,7 @@ index e65d0e14..e3176c86 100644 |
58 |
+ source_code_name = b"" |
59 |
+ function_name = b"" |
60 |
stack = [{"line": 1, |
61 |
-@@ -905,7 +916,7 @@ class JerryDebugger(object): |
62 |
+@@ -905,7 +917,7 @@ class JerryDebugger(object): |
63 |
|
64 |
- stack.append({"source": source_code, |
65 |
- "source_name": source_code_name, |
66 |
@@ -61,24 +62,28 @@ index e65d0e14..e3176c86 100644 |
67 |
- "name": function_name, |
68 |
+ "name": function_name.decode("utf8"), |
69 |
"lines": [], |
70 |
-@@ -939,4 +950,4 @@ class JerryDebugger(object): |
71 |
+@@ -939,4 +951,4 @@ class JerryDebugger(object): |
72 |
if not stack: |
73 |
- func_desc["source"] = source_code |
74 |
- func_desc["source_name"] = source_code_name |
75 |
+ func_desc["source"] = source_code.decode("utf8") |
76 |
+ func_desc["source_name"] = source_code_name.decode("utf8") |
77 |
|
78 |
-@@ -1153,3 +1164,3 @@ class JerryDebugger(object): |
79 |
+@@ -1153,4 +1165,4 @@ class JerryDebugger(object): |
80 |
message = self.current_out + message |
81 |
- lines = message.split("\n") |
82 |
+- self.current_out = lines.pop() |
83 |
+ lines = message.decode("utf8").split("\n") |
84 |
- self.current_out = lines.pop() |
85 |
-@@ -1162,3 +1173,3 @@ class JerryDebugger(object): |
86 |
++ self.current_out = lines.pop().encode("utf8") |
87 |
+ |
88 |
+@@ -1162,4 +1174,4 @@ class JerryDebugger(object): |
89 |
message = self.current_log + message |
90 |
- lines = message.split("\n") |
91 |
+- self.current_log = lines.pop() |
92 |
+ lines = message.decode("utf8").split("\n") |
93 |
- self.current_log = lines.pop() |
94 |
-@@ -1171,7 +1182,7 @@ class JerryDebugger(object): |
95 |
++ self.current_log = lines.pop().encode("utf8") |
96 |
+ |
97 |
+@@ -1171,7 +1183,7 @@ class JerryDebugger(object): |
98 |
if subtype == JERRY_DEBUGGER_OUTPUT_WARNING: |
99 |
- return "%swarning: %s%s" % (self.yellow, self.nocolor, message) |
100 |
+ return "%swarning: %s%s" % (self.yellow, self.nocolor, message.decode("utf8")) |
101 |
@@ -89,22 +94,23 @@ index e65d0e14..e3176c86 100644 |
102 |
- return "%strace: %s%s" % (self.blue, self.nocolor, message) |
103 |
+ return "%strace: %s%s" % (self.blue, self.nocolor, message.decode("utf8")) |
104 |
|
105 |
-@@ -1180,2 +1191,3 @@ class JerryDebugger(object): |
106 |
+@@ -1180,2 +1192,3 @@ class JerryDebugger(object): |
107 |
|
108 |
+ message = message.decode("utf8") |
109 |
if not message.endswith("\n"): |
110 |
diff --git a/jerry-debugger/jerry_client_websocket.py b/jerry-debugger/jerry_client_websocket.py |
111 |
-index fe2c761a..07c75e53 100644 |
112 |
+index fe2c761a..9c755966 100644 |
113 |
--- a/jerry-debugger/jerry_client_websocket.py |
114 |
+++ b/jerry-debugger/jerry_client_websocket.py |
115 |
@@ -17,2 +17,3 @@ |
116 |
import struct |
117 |
+import sys |
118 |
|
119 |
-@@ -22,2 +23,13 @@ WEBSOCKET_FIN_BIT = 0x80 |
120 |
+@@ -22,2 +23,14 @@ WEBSOCKET_FIN_BIT = 0x80 |
121 |
|
122 |
+ |
123 |
+if sys.version_info.major >= 3: |
124 |
++ # pylint: disable=invalid-name |
125 |
+ _ord_orig = ord |
126 |
+ def _ord_compat(c): |
127 |
+ if isinstance(c, int): |
128 |
@@ -115,7 +121,7 @@ index fe2c761a..07c75e53 100644 |
129 |
+ |
130 |
+ |
131 |
class WebSocket(object): |
132 |
-@@ -94,3 +106,3 @@ class WebSocket(object): |
133 |
+@@ -94,3 +107,3 @@ class WebSocket(object): |
134 |
WEBSOCKET_BINARY_FRAME | WEBSOCKET_FIN_BIT, |
135 |
- WEBSOCKET_FIN_BIT + struct.unpack(byte_order + "B", packed_data[0])[0], |
136 |
+ WEBSOCKET_FIN_BIT + struct.unpack(byte_order + "B", packed_data[0:1])[0], |
137 |
|
138 |
diff --git a/dev-lang/jerryscript/jerryscript-2.4.0-r2.ebuild b/dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild |
139 |
similarity index 100% |
140 |
rename from dev-lang/jerryscript/jerryscript-2.4.0-r2.ebuild |
141 |
rename to dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild |