[gentoo-commits] repo/gentoo:master commit in: dev-lang/jerryscript/

2024-05-12 Thread Zac Medico
commit: 09af1b7b4285a3083f4221bda80c92dc0838315d
Author: Zac Medico  gentoo  org>
AuthorDate: Sun May 12 19:21:37 2024 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun May 12 19:27:58 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09af1b7b

dev-lang/jerryscript: enable py3.12

Closes: https://bugs.gentoo.org/929400
Signed-off-by: Zac Medico  gentoo.org>

 dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild 
b/dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild
index 60be1af801e9..c87480e20a8c 100644
--- a/dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild
+++ b/dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2021-2023 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..12} )
 inherit cmake python-single-r1
 
 DESCRIPTION="Ultra-lightweight JavaScript engine for the Internet of Things"
@@ -17,7 +17,7 @@ IUSE="debugger"
 RDEPEND="debugger? ( ${PYTHON_DEPS} )"
 BDEPEND="${RDEPEND}"
 REQUIRED_USE="debugger? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT+=" test"
+RESTRICT="test"
 
 PATCHES=(
"${FILESDIR}/jerryscript-2.4.0-python3-r4.patch"



[gentoo-commits] repo/gentoo:master commit in: dev-lang/jerryscript/

2023-05-03 Thread Zac Medico
commit: 0b77fb787232cba5c137ef301def8d65f4a54c36
Author: Zac Medico  gentoo  org>
AuthorDate: Thu May  4 05:37:54 2023 +
Commit: Zac Medico  gentoo  org>
CommitDate: Thu May  4 05:40:27 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b77fb78

dev-lang/jerryscript: enable py3.11

Closes: https://bugs.gentoo.org/896696
Signed-off-by: Zac Medico  gentoo.org>

 dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild 
b/dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild
index 0664595d496f..60be1af801e9 100644
--- a/dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild
+++ b/dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{9..11} )
 inherit cmake python-single-r1
 
 DESCRIPTION="Ultra-lightweight JavaScript engine for the Internet of Things"



[gentoo-commits] repo/gentoo:master commit in: dev-lang/jerryscript/, dev-lang/jerryscript/files/

2022-06-10 Thread Sam James
commit: 0c800e1cf627a83ca4b8b9bbdca11026bcf8def8
Author: Sam James  gentoo  org>
AuthorDate: Fri Jun 10 10:31:53 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jun 10 11:01:57 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c800e1c

dev-lang/jerryscript: drop -Werror; fix build with GCC 12

Closes: https://bugs.gentoo.org/840263
Signed-off-by: Sam James  gentoo.org>

 .../files/jerryscript-2.4.0-no-werror.patch| 33 ++
 dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild   |  1 +
 2 files changed, 34 insertions(+)

diff --git a/dev-lang/jerryscript/files/jerryscript-2.4.0-no-werror.patch 
b/dev-lang/jerryscript/files/jerryscript-2.4.0-no-werror.patch
new file mode 100644
index ..216e72758a25
--- /dev/null
+++ b/dev-lang/jerryscript/files/jerryscript-2.4.0-no-werror.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/840263
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -167,7 +167,6 @@ endmacro()
+ macro(jerry_add_compile_warnings)
+   foreach(_warning ${ARGV})
+ jerry_add_compile_flags(-W${_warning})
+-jerry_add_compile_flags(-Werror=${_warning})
+   endforeach()
+ endmacro()
+ 
+@@ -212,7 +211,7 @@ if(USING_GCC OR USING_CLANG)
+ jerry_add_compile_flags(-fno-builtin)
+   endif()
+   jerry_add_compile_warnings(all extra format-nonliteral init-self conversion 
sign-conversion format-security missing-declarations shadow strict-prototypes 
undef old-style-definition)
+-  jerry_add_compile_flags(-Wno-stack-protector -Wno-attributes -Werror)
++  jerry_add_compile_flags(-Wno-stack-protector -Wno-attributes)
+ endif()
+ 
+ if(USING_GCC)
+--- a/targets/zephyr/Makefile.zephyr
 b/targets/zephyr/Makefile.zephyr
+@@ -55,9 +55,8 @@ EXT_CFLAGS += -ffunction-sections -fno-inline-functions
+ EXT_CFLAGS += $(KBUILD_CFLAGS) $(NOSTDINC_FLAGS) $(subst 
-I,-isystem,$(ZEPHYRINCLUDE))
+ 
+ EXT_CFLAGS += -Wall -Wno-format-zero-length -Wno-pointer-sign
+-EXT_CFLAGS += -Werror=format -Werror=implicit-int -Wno-unused-but-set-variable
++EXT_CFLAGS += -Wformat -Wimplicit-int -Wno-unused-but-set-variable
+ EXT_CFLAGS += -Wno-main -Wno-strict-aliasing -Wno-old-style-declaration
+-EXT_CFLAGS += -Wno-error=format=
+ EXT_CFLAGS += -D_XOPEN_SOURCE=700
+ 
+ EXT_CFLAGS += -Wno-error=conversion

diff --git a/dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild 
b/dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild
index 8d851e7d9a8a..53553aaabb7d 100644
--- a/dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild
+++ b/dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild
@@ -21,6 +21,7 @@ RESTRICT+=" test"
 
 PATCHES=(
"${FILESDIR}/jerryscript-2.4.0-python3-r4.patch"
+   "${FILESDIR}/jerryscript-2.4.0-no-werror.patch"
 )
 
 src_prepare() {



[gentoo-commits] repo/gentoo:master commit in: dev-lang/jerryscript/files/, dev-lang/jerryscript/

2022-01-01 Thread Zac Medico
commit: d96caa26a673684a877edb0aceaa0c0b03739171
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Jan  2 00:27:30 2022 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun Jan  2 00:28:06 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d96caa26

dev-lang/jerryscript: Remove old ebuild

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Zac Medico  gentoo.org>

 .../files/jerryscript-2.4.0-python3.patch  | 128 -
 dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild   |  71 
 2 files changed, 199 deletions(-)

diff --git a/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch 
b/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch
deleted file mode 100644
index a7046b4b6453..
--- a/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 3f725c9a6e62048dcc7e1d0dd0f9c3e8d2e092f6 Mon Sep 17 00:00:00 2001
-From: Zac Medico 
-Date: Sun, 23 May 2021 13:46:30 -0700
-Subject: [PATCH] Python debugger support for Python 3 (in addition to Python 2)
-
-https://github.com/jerryscript-project/jerryscript/pull/4678
-
-- Added ord builtin compatibility to pass through int arguments
-- Fixed JerryDebugger _parse_source method to decode bytes as utf8 strings
-- Fixed WebSocket send_message method to use packed_data[0:1] bytes slice
-
-JerryScript-DCO-1.0-Signed-off-by: Zac Medico 

- jerry-debugger/jerry_client_main.py  | 26 
- jerry-debugger/jerry_client_websocket.py | 14 -
- 2 files changed, 31 insertions(+), 9 deletions(-)
-
-diff --git a/jerry-debugger/jerry_client_main.py 
b/jerry-debugger/jerry_client_main.py
-index e65d0e14..b465955f 100644
 a/jerry-debugger/jerry_client_main.py
-+++ b/jerry-debugger/jerry_client_main.py
-@@ -151,2 +151,13 @@ def arguments_parse():
- 
-+if sys.version_info.major >= 3:
-+# pylint: disable=invalid-name
-+_ord_orig = ord
-+def _ord_compat(c):
-+if isinstance(c, int):
-+return c
-+return _ord_orig(c)
-+# pylint: disable=redefined-builtin
-+ord = _ord_compat
-+
-+
- class JerryBreakpoint(object):
-@@ -563,2 +574,3 @@ class JerryDebugger(object):
- def _send_string(self, args, message_type, index=0):
-+args = args.encode("utf8")
- 
-@@ -810,3 +822,3 @@ class JerryDebugger(object):
- elif buffer_type in [JERRY_DEBUGGER_SCOPE_VARIABLES, 
JERRY_DEBUGGER_SCOPE_VARIABLES_END]:
--self.scope_vars += "".join(data[1:])
-+self.scope_vars += "".join(data[1:].decode("utf8"))
- 
-@@ -866,5 +878,5 @@ class JerryDebugger(object):
- def _parse_source(self, data):
--source_code = ""
--source_code_name = ""
--function_name = ""
-+source_code = b""
-+source_code_name = b""
-+function_name = b""
- stack = [{"line": 1,
-@@ -905,7 +917,7 @@ class JerryDebugger(object):
- 
--stack.append({"source": source_code,
--  "source_name": source_code_name,
-+stack.append({"source": source_code.decode("utf8"),
-+  "source_name": source_code_name.decode("utf8"),
-   "line": position[0],
-   "column": position[1],
--  "name": function_name,
-+  "name": function_name.decode("utf8"),
-   "lines": [],
-@@ -939,4 +951,4 @@ class JerryDebugger(object):
- if not stack:
--func_desc["source"] = source_code
--func_desc["source_name"] = source_code_name
-+func_desc["source"] = source_code.decode("utf8")
-+func_desc["source_name"] = source_code_name.decode("utf8")
- 
-@@ -1153,4 +1165,4 @@ class JerryDebugger(object):
- message = self.current_out + message
--lines = message.split("\n")
--self.current_out = lines.pop()
-+lines = message.decode("utf8").split("\n")
-+self.current_out = lines.pop().encode("utf8")
- 
-@@ -1162,4 +1174,4 @@ class JerryDebugger(object):
- message = self.current_log + message
--lines = message.split("\n")
--self.current_log = lines.pop()
-+lines = message.decode("utf8").split("\n")
-+self.current_log = lines.pop().encode("utf8")
- 
-@@ -1171,7 +1183,7 @@ class JerryDebugger(object):
- if subtype == JERRY_DEBUGGER_OUTPUT_WARNING:
--return "%swarning: %s%s" % (self.yellow, self.nocolor, 
message)
-+return "%swarning: %s%s" % (self.yellow, self.nocolor, 
message.decode("utf8"))
- elif subtype == JERRY_DEBUGGER_OUTPUT_ERROR:
--return "%serr: %s%s" % (self.red, self.nocolor, message)
-+return 

[gentoo-commits] repo/gentoo:master commit in: dev-lang/jerryscript/, dev-lang/jerryscript/files/

2022-01-01 Thread Zac Medico
commit: 164bf869e338666239e7c1b9cdd6c399acaa9c7c
Author: Zac Medico  gentoo  org>
AuthorDate: Sun Jan  2 00:05:22 2022 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun Jan  2 00:28:06 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=164bf869

dev-lang/jerryscript: 2.4.0-r4 using python-single-r1

Closes: https://bugs.gentoo.org/830388
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Zac Medico  gentoo.org>

 .../files/jerryscript-2.4.0-python3-r4.patch   | 236 +
 dev-lang/jerryscript/jerryscript-2.4.0-r4.ebuild   |  74 +++
 2 files changed, 310 insertions(+)

diff --git a/dev-lang/jerryscript/files/jerryscript-2.4.0-python3-r4.patch 
b/dev-lang/jerryscript/files/jerryscript-2.4.0-python3-r4.patch
new file mode 100644
index ..92198f3901d4
--- /dev/null
+++ b/dev-lang/jerryscript/files/jerryscript-2.4.0-python3-r4.patch
@@ -0,0 +1,236 @@
+From 22d8b904d85e548aa06d2d665aeaaee510a2435a Mon Sep 17 00:00:00 2001
+From: Zac Medico 
+Date: Sun, 23 May 2021 13:46:30 -0700
+Subject: [PATCH] Python debugger support for Python 3 (in addition to Python
+ 2)
+
+- Added safe_ord compatibility to pass through int arguments
+- Fixed JerryDebugger to decode bytes as utf8 strings when necessary
+- Fixed WebSocket send_message method to use packed_data[0:1] bytes slice
+
+JerryScript-DCO-1.0-Signed-off-by: Zac Medico 
+---
+ jerry-debugger/jerry_client_main.py  | 82 ++--
+ jerry-debugger/jerry_client_rawpacket.py | 13 +++-
+ jerry-debugger/jerry_client_websocket.py | 15 -
+ 3 files changed, 74 insertions(+), 36 deletions(-)
+
+diff --git a/jerry-debugger/jerry_client_main.py 
b/jerry-debugger/jerry_client_main.py
+index e65d0e14..ee3ffd26 100644
+--- a/jerry-debugger/jerry_client_main.py
 b/jerry-debugger/jerry_client_main.py
+@@ -151,2 +151,11 @@ def arguments_parse():
+ 
++if sys.version_info.major >= 3:
++def safe_ord(c):
++if isinstance(c, int):
++return c
++return ord(c)
++else:
++  safe_ord = ord
++
++
+ class JerryBreakpoint(object):
+@@ -309,8 +318,8 @@ class JerryDebugger(object):
+ 
+-if len(result) != config_size or ord(result[0]) != 
JERRY_DEBUGGER_CONFIGURATION:
++if len(result) != config_size or safe_ord(result[0]) != 
JERRY_DEBUGGER_CONFIGURATION:
+ raise Exception("Unexpected configuration")
+ 
+-self.little_endian = ord(result[1]) & JERRY_DEBUGGER_LITTLE_ENDIAN
+-self.max_message_size = ord(result[6])
+-self.cp_size = ord(result[7])
++self.little_endian = safe_ord(result[1]) & 
JERRY_DEBUGGER_LITTLE_ENDIAN
++self.max_message_size = safe_ord(result[6])
++self.cp_size = safe_ord(result[7])
+ 
+@@ -402,3 +411,3 @@ class JerryDebugger(object):
+ if args != "pending":
+-for i in self.active_breakpoint_list.values():
++for i in list(self.active_breakpoint_list.values()):
+ breakpoint = self.active_breakpoint_list[i.active_index]
+@@ -563,2 +572,3 @@ class JerryDebugger(object):
+ def _send_string(self, args, message_type, index=0):
++args = args.encode("utf8")
+ 
+@@ -686,3 +696,3 @@ class JerryDebugger(object):
+ 
+-buffer_type = ord(data[0])
++buffer_type = safe_ord(data[0])
+ buffer_size = len(data) -1
+@@ -740,6 +750,6 @@ class JerryDebugger(object):
+ elif buffer_type == JERRY_DEBUGGER_EXCEPTION_STR:
+-self.exception_string += data[1:]
++self.exception_string += data[1:].decode("utf8")
+ 
+ elif buffer_type == JERRY_DEBUGGER_EXCEPTION_STR_END:
+-self.exception_string += data[1:]
++self.exception_string += data[1:].decode("utf8")
+ 
+@@ -810,3 +820,3 @@ class JerryDebugger(object):
+ elif buffer_type in [JERRY_DEBUGGER_SCOPE_VARIABLES, 
JERRY_DEBUGGER_SCOPE_VARIABLES_END]:
+-self.scope_vars += "".join(data[1:])
++self.scope_vars += "".join(data[1:].decode("utf8"))
+ 
+@@ -866,5 +876,5 @@ class JerryDebugger(object):
+ def _parse_source(self, data):
+-source_code = ""
+-source_code_name = ""
+-function_name = ""
++source_code = b""
++source_code_name = b""
++function_name = b""
+ stack = [{"line": 1,
+@@ -881,3 +891,3 @@ class JerryDebugger(object):
+ 
+-buffer_type = ord(data[0])
++buffer_type = safe_ord(data[0])
+ buffer_size = len(data) - 1
+@@ -905,10 +915,10 @@ class JerryDebugger(object):
+ 
+-stack.append({"source": source_code,
+-  "source_name": source_code_name,
++stack.append({"source": source_code.decode("utf8"),
++  "source_name": source_code_name.decode("utf8"),
+   "line": position[0],
+  

[gentoo-commits] repo/gentoo:master commit in: dev-lang/jerryscript/

2022-01-01 Thread Zac Medico
commit: da86570a762bbe7b2ea1f79743c851f382a19342
Author: Zac Medico  gentoo  org>
AuthorDate: Sat Jan  1 20:35:16 2022 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sat Jan  1 20:35:49 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da86570a

dev-lang/jerryscript: PYTHON_COMPAT+=(python3_10)

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Zac Medico  gentoo.org>

 dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild 
b/dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild
index f7f6592c87ba..618eb5259a29 100644
--- a/dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild
+++ b/dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2021 Gentoo Authors
+# Copyright 2021-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-PYTHON_COMPAT=(python3_{7,8,9})
+PYTHON_COMPAT=(python3_{7,8,9,10})
 inherit cmake python-any-r1
 
 DESCRIPTION="Ultra-lightweight JavaScript engine for the Internet of Things"



[gentoo-commits] repo/gentoo:master commit in: dev-lang/jerryscript/

2021-06-14 Thread Zac Medico
commit: fd68871a6c49ad0f9b9e79a2822636cba51579c7
Author: Zac Medico  gentoo  org>
AuthorDate: Mon Jun 14 07:12:14 2021 +
Commit: Zac Medico  gentoo  org>
CommitDate: Mon Jun 14 07:13:22 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd68871a

dev-lang/jerryscript: RESTRICT+= test

Disable tests which were not expected to run.

Closes: https://bugs.gentoo.org/795918
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Zac Medico  gentoo.org>

 dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild 
b/dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild
index 369fd92e37c..f7f6592c87b 100644
--- a/dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild
+++ b/dev-lang/jerryscript/jerryscript-2.4.0-r3.ebuild
@@ -16,6 +16,7 @@ KEYWORDS="~amd64"
 IUSE="debugger"
 RDEPEND="debugger? ( ${PYTHON_DEPS} )"
 BDEPEND="${RDEPEND}"
+RESTRICT+=" test"
 
 PATCHES=(
"${FILESDIR}/jerryscript-2.4.0-python3.patch"



[gentoo-commits] repo/gentoo:master commit in: dev-lang/jerryscript/, dev-lang/jerryscript/files/

2021-06-10 Thread Zac Medico
commit: 6e1ba2b4b685a9fc91424629c7e41222c27a58ee
Author: Zac Medico  gentoo  org>
AuthorDate: Fri Jun 11 04:47:04 2021 +
Commit: Zac Medico  gentoo  org>
CommitDate: Fri Jun 11 04:51:01 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e1ba2b4

dev-lang/jerryscript: 2.4.0-r3 revbump more python3 debugger fixes

Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Zac Medico  gentoo.org>

 .../files/jerryscript-2.4.0-python3.patch  | 38 +-
 ...2.4.0-r2.ebuild => jerryscript-2.4.0-r3.ebuild} |  0
 2 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch 
b/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch
index 7da285c5d3c..a7046b4b645 100644
--- a/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch
+++ b/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch
@@ -16,12 +16,13 @@ JerryScript-DCO-1.0-Signed-off-by: Zac Medico 

  2 files changed, 31 insertions(+), 9 deletions(-)
 
 diff --git a/jerry-debugger/jerry_client_main.py 
b/jerry-debugger/jerry_client_main.py
-index e65d0e14..e3176c86 100644
+index e65d0e14..b465955f 100644
 --- a/jerry-debugger/jerry_client_main.py
 +++ b/jerry-debugger/jerry_client_main.py
-@@ -151,2 +151,12 @@ def arguments_parse():
+@@ -151,2 +151,13 @@ def arguments_parse():
  
 +if sys.version_info.major >= 3:
++# pylint: disable=invalid-name
 +_ord_orig = ord
 +def _ord_compat(c):
 +if isinstance(c, int):
@@ -32,16 +33,16 @@ index e65d0e14..e3176c86 100644
 +
 +
  class JerryBreakpoint(object):
-@@ -563,2 +573,3 @@ class JerryDebugger(object):
+@@ -563,2 +574,3 @@ class JerryDebugger(object):
  def _send_string(self, args, message_type, index=0):
 +args = args.encode("utf8")
  
-@@ -810,3 +821,3 @@ class JerryDebugger(object):
+@@ -810,3 +822,3 @@ class JerryDebugger(object):
  elif buffer_type in [JERRY_DEBUGGER_SCOPE_VARIABLES, 
JERRY_DEBUGGER_SCOPE_VARIABLES_END]:
 -self.scope_vars += "".join(data[1:])
 +self.scope_vars += "".join(data[1:].decode("utf8"))
  
-@@ -866,5 +877,5 @@ class JerryDebugger(object):
+@@ -866,5 +878,5 @@ class JerryDebugger(object):
  def _parse_source(self, data):
 -source_code = ""
 -source_code_name = ""
@@ -50,7 +51,7 @@ index e65d0e14..e3176c86 100644
 +source_code_name = b""
 +function_name = b""
  stack = [{"line": 1,
-@@ -905,7 +916,7 @@ class JerryDebugger(object):
+@@ -905,7 +917,7 @@ class JerryDebugger(object):
  
 -stack.append({"source": source_code,
 -  "source_name": source_code_name,
@@ -61,24 +62,28 @@ index e65d0e14..e3176c86 100644
 -  "name": function_name,
 +  "name": function_name.decode("utf8"),
"lines": [],
-@@ -939,4 +950,4 @@ class JerryDebugger(object):
+@@ -939,4 +951,4 @@ class JerryDebugger(object):
  if not stack:
 -func_desc["source"] = source_code
 -func_desc["source_name"] = source_code_name
 +func_desc["source"] = source_code.decode("utf8")
 +func_desc["source_name"] = source_code_name.decode("utf8")
  
-@@ -1153,3 +1164,3 @@ class JerryDebugger(object):
+@@ -1153,4 +1165,4 @@ class JerryDebugger(object):
  message = self.current_out + message
 -lines = message.split("\n")
+-self.current_out = lines.pop()
 +lines = message.decode("utf8").split("\n")
- self.current_out = lines.pop()
-@@ -1162,3 +1173,3 @@ class JerryDebugger(object):
++self.current_out = lines.pop().encode("utf8")
+ 
+@@ -1162,4 +1174,4 @@ class JerryDebugger(object):
  message = self.current_log + message
 -lines = message.split("\n")
+-self.current_log = lines.pop()
 +lines = message.decode("utf8").split("\n")
- self.current_log = lines.pop()
-@@ -1171,7 +1182,7 @@ class JerryDebugger(object):
++self.current_log = lines.pop().encode("utf8")
+ 
+@@ -1171,7 +1183,7 @@ class JerryDebugger(object):
  if subtype == JERRY_DEBUGGER_OUTPUT_WARNING:
 -return "%swarning: %s%s" % (self.yellow, self.nocolor, 
message)
 +return "%swarning: %s%s" % (self.yellow, self.nocolor, 
message.decode("utf8"))
@@ -89,22 +94,23 @@ index e65d0e14..e3176c86 100644
 -return "%strace: %s%s" % (self.blue, self.nocolor, message)
 +return "%strace: %s%s" % (self.blue, self.nocolor, 
message.decode("utf8"))
  
-@@ -1180,2 +1191,3 @@ class JerryDebugger(object):
+@@ -1180,2 +1192,3 @@ class JerryDebugger(object):
  
 +message = message.decode("utf8")
  if not message.endswith("\n"):
 diff --git 

[gentoo-commits] repo/gentoo:master commit in: dev-lang/jerryscript/, dev-lang/jerryscript/files/

2021-05-23 Thread Zac Medico
commit: 272c2ca3526d0219b3902ca4cb2cb085588aa93b
Author: Zac Medico  gentoo  org>
AuthorDate: Sun May 23 23:24:43 2021 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun May 23 23:26:58 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=272c2ca3

dev-lang/jerryscript: 2.4.0-r2 revbump for python3 debugger fixes

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Zac Medico  gentoo.org>

 .../files/jerryscript-2.4.0-python3.patch  | 42 +++---
 ...2.4.0-r1.ebuild => jerryscript-2.4.0-r2.ebuild} |  0
 2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch 
b/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch
index 4a358ac5ce9..7da285c5d3c 100644
--- a/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch
+++ b/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch
@@ -16,7 +16,7 @@ JerryScript-DCO-1.0-Signed-off-by: Zac Medico 

  2 files changed, 31 insertions(+), 9 deletions(-)
 
 diff --git a/jerry-debugger/jerry_client_main.py 
b/jerry-debugger/jerry_client_main.py
-index e65d0e14..b877a159 100644
+index e65d0e14..e3176c86 100644
 --- a/jerry-debugger/jerry_client_main.py
 +++ b/jerry-debugger/jerry_client_main.py
 @@ -151,2 +151,12 @@ def arguments_parse():
@@ -32,7 +32,16 @@ index e65d0e14..b877a159 100644
 +
 +
  class JerryBreakpoint(object):
-@@ -866,5 +876,5 @@ class JerryDebugger(object):
+@@ -563,2 +573,3 @@ class JerryDebugger(object):
+ def _send_string(self, args, message_type, index=0):
++args = args.encode("utf8")
+ 
+@@ -810,3 +821,3 @@ class JerryDebugger(object):
+ elif buffer_type in [JERRY_DEBUGGER_SCOPE_VARIABLES, 
JERRY_DEBUGGER_SCOPE_VARIABLES_END]:
+-self.scope_vars += "".join(data[1:])
++self.scope_vars += "".join(data[1:].decode("utf8"))
+ 
+@@ -866,5 +877,5 @@ class JerryDebugger(object):
  def _parse_source(self, data):
 -source_code = ""
 -source_code_name = ""
@@ -41,7 +50,7 @@ index e65d0e14..b877a159 100644
 +source_code_name = b""
 +function_name = b""
  stack = [{"line": 1,
-@@ -905,7 +915,7 @@ class JerryDebugger(object):
+@@ -905,7 +916,7 @@ class JerryDebugger(object):
  
 -stack.append({"source": source_code,
 -  "source_name": source_code_name,
@@ -52,13 +61,38 @@ index e65d0e14..b877a159 100644
 -  "name": function_name,
 +  "name": function_name.decode("utf8"),
"lines": [],
-@@ -939,4 +949,4 @@ class JerryDebugger(object):
+@@ -939,4 +950,4 @@ class JerryDebugger(object):
  if not stack:
 -func_desc["source"] = source_code
 -func_desc["source_name"] = source_code_name
 +func_desc["source"] = source_code.decode("utf8")
 +func_desc["source_name"] = source_code_name.decode("utf8")
  
+@@ -1153,3 +1164,3 @@ class JerryDebugger(object):
+ message = self.current_out + message
+-lines = message.split("\n")
++lines = message.decode("utf8").split("\n")
+ self.current_out = lines.pop()
+@@ -1162,3 +1173,3 @@ class JerryDebugger(object):
+ message = self.current_log + message
+-lines = message.split("\n")
++lines = message.decode("utf8").split("\n")
+ self.current_log = lines.pop()
+@@ -1171,7 +1182,7 @@ class JerryDebugger(object):
+ if subtype == JERRY_DEBUGGER_OUTPUT_WARNING:
+-return "%swarning: %s%s" % (self.yellow, self.nocolor, 
message)
++return "%swarning: %s%s" % (self.yellow, self.nocolor, 
message.decode("utf8"))
+ elif subtype == JERRY_DEBUGGER_OUTPUT_ERROR:
+-return "%serr: %s%s" % (self.red, self.nocolor, message)
++return "%serr: %s%s" % (self.red, self.nocolor, 
message.decode("utf8"))
+ elif subtype == JERRY_DEBUGGER_OUTPUT_TRACE:
+-return "%strace: %s%s" % (self.blue, self.nocolor, message)
++return "%strace: %s%s" % (self.blue, self.nocolor, 
message.decode("utf8"))
+ 
+@@ -1180,2 +1191,3 @@ class JerryDebugger(object):
+ 
++message = message.decode("utf8")
+ if not message.endswith("\n"):
 diff --git a/jerry-debugger/jerry_client_websocket.py 
b/jerry-debugger/jerry_client_websocket.py
 index fe2c761a..07c75e53 100644
 --- a/jerry-debugger/jerry_client_websocket.py

diff --git a/dev-lang/jerryscript/jerryscript-2.4.0-r1.ebuild 
b/dev-lang/jerryscript/jerryscript-2.4.0-r2.ebuild
similarity index 100%
rename from dev-lang/jerryscript/jerryscript-2.4.0-r1.ebuild
rename to dev-lang/jerryscript/jerryscript-2.4.0-r2.ebuild



[gentoo-commits] repo/gentoo:master commit in: dev-lang/jerryscript/files/, dev-lang/jerryscript/

2021-05-23 Thread Zac Medico
commit: 6437ce06b88dbebbcd19d5afade4f8499b49c611
Author: Zac Medico  gentoo  org>
AuthorDate: Sun May 23 22:20:55 2021 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun May 23 22:36:59 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6437ce06

dev-lang/jerryscript: 2.4.0-r1 revbump to support USE=debugger

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Zac Medico  gentoo.org>

 .../files/jerryscript-2.4.0-python3.patch  | 88 ++
 ...pt-2.4.0.ebuild => jerryscript-2.4.0-r1.ebuild} | 30 +++-
 dev-lang/jerryscript/metadata.xml  |  3 +
 3 files changed, 119 insertions(+), 2 deletions(-)

diff --git a/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch 
b/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch
new file mode 100644
index 000..4a358ac5ce9
--- /dev/null
+++ b/dev-lang/jerryscript/files/jerryscript-2.4.0-python3.patch
@@ -0,0 +1,88 @@
+From 3f725c9a6e62048dcc7e1d0dd0f9c3e8d2e092f6 Mon Sep 17 00:00:00 2001
+From: Zac Medico 
+Date: Sun, 23 May 2021 13:46:30 -0700
+Subject: [PATCH] Python debugger support for Python 3 (in addition to Python 2)
+
+https://github.com/jerryscript-project/jerryscript/pull/4678
+
+- Added ord builtin compatibility to pass through int arguments
+- Fixed JerryDebugger _parse_source method to decode bytes as utf8 strings
+- Fixed WebSocket send_message method to use packed_data[0:1] bytes slice
+
+JerryScript-DCO-1.0-Signed-off-by: Zac Medico 
+---
+ jerry-debugger/jerry_client_main.py  | 26 
+ jerry-debugger/jerry_client_websocket.py | 14 -
+ 2 files changed, 31 insertions(+), 9 deletions(-)
+
+diff --git a/jerry-debugger/jerry_client_main.py 
b/jerry-debugger/jerry_client_main.py
+index e65d0e14..b877a159 100644
+--- a/jerry-debugger/jerry_client_main.py
 b/jerry-debugger/jerry_client_main.py
+@@ -151,2 +151,12 @@ def arguments_parse():
+ 
++if sys.version_info.major >= 3:
++_ord_orig = ord
++def _ord_compat(c):
++if isinstance(c, int):
++return c
++return _ord_orig(c)
++# pylint: disable=redefined-builtin
++ord = _ord_compat
++
++
+ class JerryBreakpoint(object):
+@@ -866,5 +876,5 @@ class JerryDebugger(object):
+ def _parse_source(self, data):
+-source_code = ""
+-source_code_name = ""
+-function_name = ""
++source_code = b""
++source_code_name = b""
++function_name = b""
+ stack = [{"line": 1,
+@@ -905,7 +915,7 @@ class JerryDebugger(object):
+ 
+-stack.append({"source": source_code,
+-  "source_name": source_code_name,
++stack.append({"source": source_code.decode("utf8"),
++  "source_name": source_code_name.decode("utf8"),
+   "line": position[0],
+   "column": position[1],
+-  "name": function_name,
++  "name": function_name.decode("utf8"),
+   "lines": [],
+@@ -939,4 +949,4 @@ class JerryDebugger(object):
+ if not stack:
+-func_desc["source"] = source_code
+-func_desc["source_name"] = source_code_name
++func_desc["source"] = source_code.decode("utf8")
++func_desc["source_name"] = source_code_name.decode("utf8")
+ 
+diff --git a/jerry-debugger/jerry_client_websocket.py 
b/jerry-debugger/jerry_client_websocket.py
+index fe2c761a..07c75e53 100644
+--- a/jerry-debugger/jerry_client_websocket.py
 b/jerry-debugger/jerry_client_websocket.py
+@@ -17,2 +17,3 @@
+ import struct
++import sys
+ 
+@@ -22,2 +23,13 @@ WEBSOCKET_FIN_BIT = 0x80
+ 
++
++if sys.version_info.major >= 3:
++_ord_orig = ord
++def _ord_compat(c):
++if isinstance(c, int):
++return c
++return _ord_orig(c)
++# pylint: disable=redefined-builtin
++ord = _ord_compat
++
++
+ class WebSocket(object):
+@@ -94,3 +106,3 @@ class WebSocket(object):
+   WEBSOCKET_BINARY_FRAME | WEBSOCKET_FIN_BIT,
+-  WEBSOCKET_FIN_BIT + struct.unpack(byte_order + 
"B", packed_data[0])[0],
++  WEBSOCKET_FIN_BIT + struct.unpack(byte_order + 
"B", packed_data[0:1])[0],
+   0) + packed_data[1:]

diff --git a/dev-lang/jerryscript/jerryscript-2.4.0.ebuild 
b/dev-lang/jerryscript/jerryscript-2.4.0-r1.ebuild
similarity index 58%
rename from dev-lang/jerryscript/jerryscript-2.4.0.ebuild
rename to dev-lang/jerryscript/jerryscript-2.4.0-r1.ebuild
index d3949f02d59..369fd92e37c 100644
--- a/dev-lang/jerryscript/jerryscript-2.4.0.ebuild
+++ b/dev-lang/jerryscript/jerryscript-2.4.0-r1.ebuild
@@ -3,7 +3,8 @@
 
 EAPI=7
 
-inherit cmake
+PYTHON_COMPAT=(python3_{7,8,9})
+inherit cmake python-any-r1
 
 

[gentoo-commits] repo/gentoo:master commit in: dev-lang/jerryscript/

2021-05-23 Thread Zac Medico
commit: 75e53ff3f27c3346277c2fec0879f33eb22970ab
Author: Zac Medico  gentoo  org>
AuthorDate: Sun May 23 09:07:07 2021 +
Commit: Zac Medico  gentoo  org>
CommitDate: Sun May 23 10:41:01 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75e53ff3

dev-lang/jerryscript: Initial import

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Zac Medico  gentoo.org>

 dev-lang/jerryscript/Manifest |  1 +
 dev-lang/jerryscript/jerryscript-2.4.0.ebuild | 44 +++
 dev-lang/jerryscript/metadata.xml | 12 
 3 files changed, 57 insertions(+)

diff --git a/dev-lang/jerryscript/Manifest b/dev-lang/jerryscript/Manifest
new file mode 100644
index 000..7531fb469ee
--- /dev/null
+++ b/dev-lang/jerryscript/Manifest
@@ -0,0 +1 @@
+DIST jerryscript-2.4.0.tar.gz 2802799 BLAKE2B 
18a3f71e7d3e2fc43772cb94aa3b0d4d28d72c6cd174eb0195f09283c5da5140ef85e86c6ed7a82e672724563549294c26d870b55c8bd9d0a92251b1002c612a
 SHA512 
e96e6c6a2207ff869474801a1f8bbd3ce453d4076e558736ebf6962ccab08540f57cf932ec43bcd40429e21f1c6453d77874dd0a467d91a15d8357257533c1ea

diff --git a/dev-lang/jerryscript/jerryscript-2.4.0.ebuild 
b/dev-lang/jerryscript/jerryscript-2.4.0.ebuild
new file mode 100644
index 000..d3949f02d59
--- /dev/null
+++ b/dev-lang/jerryscript/jerryscript-2.4.0.ebuild
@@ -0,0 +1,44 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Ultra-lightweight JavaScript engine for the Internet of Things"
+HOMEPAGE="https://github.com/jerryscript-project/jerryscript;
+SRC_URI="https://github.com/jerryscript-project/${PN}/archive/refs/tags/v${PV}.tar.gz
 -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+src_prepare() {
+   find . -name CMakeLists.txt -print0 | xargs -0 sed -i \
+   -e "s:lib/pkgconfig:$(get_libdir)/pkgconfig:" \
+   -e "s:DESTINATION lib):DESTINATION $(get_libdir)):" \
+   || die
+   cmake_src_prepare
+}
+
+src_configure() {
+   local mycmakeargs=(
+   -DENABLE_STRIP=OFF
+   -DJERRY_DEBUGGER=ON
+   -DJERRY_ERROR_MESSAGES=ON
+   -DJERRY_EXTERNAL_CONTEXT=ON
+   -DJERRY_LINE_INFO=ON
+   -DJERRY_LOGGING=ON
+   -DJERRY_PARSER_DUMP_BYTE_CODE=ON
+   -DJERRY_PARSER=ON
+   -DJERRY_REGEXP_DUMP_BYTE_CODE=ON
+   -DJERRY_SNAPSHOT_EXEC=ON
+   -DJERRY_SNAPSHOT_SAVE=ON
+   )
+   cmake_src_configure
+}
+
+src_install() {
+   cmake_src_install
+}

diff --git a/dev-lang/jerryscript/metadata.xml 
b/dev-lang/jerryscript/metadata.xml
new file mode 100644
index 000..0c73846f82d
--- /dev/null
+++ b/dev-lang/jerryscript/metadata.xml
@@ -0,0 +1,12 @@
+
+http://www.gentoo.org/dtd/metadata.dtd;>
+
+   
+   zmed...@gentoo.org
+   Zac Medico
+   
+   
+   
https://github.com/jerryscript-project/jerryscript/issues
+   jerryscript-project/jerryscript
+   
+