pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/quickjs lang/quickjs: update to 2021-03-27 version.
details: https://anonhg.NetBSD.org/pkgsrc/rev/4125f87786dd
branches: trunk
changeset: 372756:4125f87786dd
user: he <he%pkgsrc.org@localhost>
date: Sun Jan 30 10:55:03 2022 +0000
description:
lang/quickjs: update to 2021-03-27 version.
Pkgsrc changes:
* adjust patches and checksums as needed
* Update request from PR#56675 should be fulfilled by this;
thanks to Kimihiro Nonaka
Upstream changes:
2021-03-27:
- faster Array.prototype.push and Array.prototype.unshift
- added JS_UpdateStackTop()
- fixed Windows console
- misc bug fixes
2020-11-08:
- improved function parameter initializers
- added std.setenv(), std.unsetenv() and std.getenviron()
- added JS_EvalThis()
- misc bug fixes
2020-09-06:
- added logical assignment operators
- added IsHTMLDDA support
- faster for-of loops
- os.Worker now takes a module filename as parameter
- qjsc: added -D option to compile dynamically loaded modules or workers
- misc bug fixes
2020-07-05:
- modified JS_GetPrototype() to return a live value
- REPL: support unicode characters larger than 16 bits
- added os.Worker
- improved object serialization
- added std.parseExtJSON
- misc bug fixes
diffstat:
lang/quickjs/Makefile | 10 +++++-----
lang/quickjs/PLIST | 6 ++++--
lang/quickjs/distinfo | 17 +++++++++--------
lang/quickjs/patches/patch-Makefile | 31 ++++++++++++++++++++-----------
lang/quickjs/patches/patch-qjsc.c | 6 +++---
lang/quickjs/patches/patch-quickjs-libc.c | 24 ++++++++++++------------
lang/quickjs/patches/patch-quickjs.c | 18 +++++++++---------
lang/quickjs/patches/patch-run-test262.c | 24 ++++++++++++++++++++++++
8 files changed, 86 insertions(+), 50 deletions(-)
diffs (278 lines):
diff -r f451a1b3e6e0 -r 4125f87786dd lang/quickjs/Makefile
--- a/lang/quickjs/Makefile Sun Jan 30 10:54:26 2022 +0000
+++ b/lang/quickjs/Makefile Sun Jan 30 10:55:03 2022 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2021/12/13 13:14:32 nia Exp $
+# $NetBSD: Makefile,v 1.9 2022/01/30 10:55:03 he Exp $
NAME= quickjs
-QJS_DATE= 2020-04-12
+QJS_DATE= 2021-03-27
VERSION= ${QJS_DATE:S/-//g}
DISTNAME= ${NAME}-${QJS_DATE}
PKGNAME= ${NAME}-${VERSION}
@@ -25,11 +25,11 @@
.if ${OPSYS} == "NetBSD"
HAS_ATOMIC_64!= ${CC} -E files/netbsd-has-atomic64.c | tail -1
-.if (${HAS_ATOMIC_64} == "YES")
+. if (${HAS_ATOMIC_64} == "YES")
MAKE_ENV+= CONFIG_BIGNUM=yes
-.endif
+. endif
.elif ${OPSYS} == "Darwin" || ${OPSYS} == "Linux"
-PLIST.lto=yes
+PLIST.lto= yes
.else # Not NetBSD && not Linux
# Presumed to be supported
MAKE_ENV+= CONFIG_BIGNUM=yes
diff -r f451a1b3e6e0 -r 4125f87786dd lang/quickjs/PLIST
--- a/lang/quickjs/PLIST Sun Jan 30 10:54:26 2022 +0000
+++ b/lang/quickjs/PLIST Sun Jan 30 10:55:03 2022 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2020/05/10 10:32:33 rillig Exp $
+@comment $NetBSD: PLIST,v 1.5 2022/01/30 10:55:03 he Exp $
bin/qjs
bin/qjsc
bin/qjscalc
@@ -26,8 +26,10 @@
share/doc/quickjs/tests/test_bjson.js
share/doc/quickjs/tests/test_builtin.js
share/doc/quickjs/tests/test_closure.js
+share/doc/quickjs/tests/test_language.js
share/doc/quickjs/tests/test_loop.js
-share/doc/quickjs/tests/test_op.js
share/doc/quickjs/tests/test_op_overloading.js
share/doc/quickjs/tests/test_qjscalc.js
share/doc/quickjs/tests/test_std.js
+share/doc/quickjs/tests/test_worker.js
+share/doc/quickjs/tests/test_worker_module.js
diff -r f451a1b3e6e0 -r 4125f87786dd lang/quickjs/distinfo
--- a/lang/quickjs/distinfo Sun Jan 30 10:54:26 2022 +0000
+++ b/lang/quickjs/distinfo Sun Jan 30 10:55:03 2022 +0000
@@ -1,12 +1,13 @@
-$NetBSD: distinfo,v 1.8 2021/10/26 10:51:52 nia Exp $
+$NetBSD: distinfo,v 1.9 2022/01/30 10:55:03 he Exp $
-BLAKE2s (quickjs-2020-04-12.tar.xz) = f0eaa95481d04c2abddec3095b46ec77a8d3ca2011015adfc1bcbdfc3ebffb06
-SHA512 (quickjs-2020-04-12.tar.xz) = ed15bb159fa05a7c7749e34f346d426803adf34f1ee83eb23c1a9acce037402537fb52ff0c54135da13d7908a71043eb00b5688fe13488eca356a0713d4a65a3
-Size (quickjs-2020-04-12.tar.xz) = 741060 bytes
-SHA1 (patch-Makefile) = c31015842b53368344e07eb39873fa496e5f79f1
+BLAKE2s (quickjs-2021-03-27.tar.xz) = 840b2a3cb55944981b3c8c5e1797f59a25bc4199a6539173ffb49a31bb10a2bd
+SHA512 (quickjs-2021-03-27.tar.xz) = eeb810083484df213bc658a8703ca3ef094b7789c2b49eed86cb4068c9f9da401ad0300261d61a163c6ea82306f3ef50bf8e29a64920f704fd8958ef08a7286c
+Size (quickjs-2021-03-27.tar.xz) = 753556 bytes
+SHA1 (patch-Makefile) = 93c54ea3927caa449b6a14eb7ad9e96450ed7724
SHA1 (patch-cutils.h) = db3fad2bd422d2886538819ef778d13a391d6935
SHA1 (patch-qjs.c) = 2a2d778bb43540dc5289f84cd9df43162c1ce291
-SHA1 (patch-qjsc.c) = 9a70bde5e19b65942d9f23c10d0b7b3e2741bfaa
-SHA1 (patch-quickjs-libc.c) = d07010eb2c572d8e2de8e212ab8ac34a8bcdf3bd
-SHA1 (patch-quickjs.c) = 7337eaac4ac5336db5205fa06d6cefd22a78cbf6
+SHA1 (patch-qjsc.c) = b67cd008e9f9081c7d1afdc5c286522e5854a511
+SHA1 (patch-quickjs-libc.c) = 39c2b553ef04b308e7c477590edd345b62acc528
+SHA1 (patch-quickjs.c) = 4a76824a4ada669c640b2a7a05b73d9ee57503a5
+SHA1 (patch-run-test262.c) = c8cb354909c1433924fb0129f95b110bdf1be48c
SHA1 (patch-tests_test__builtin.js) = 762d201adfe15e7ab63dc0146040a7679229b10c
diff -r f451a1b3e6e0 -r 4125f87786dd lang/quickjs/patches/patch-Makefile
--- a/lang/quickjs/patches/patch-Makefile Sun Jan 30 10:54:26 2022 +0000
+++ b/lang/quickjs/patches/patch-Makefile Sun Jan 30 10:55:03 2022 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-Makefile,v 1.3 2020/02/10 13:06:08 he Exp $
+$NetBSD: patch-Makefile,v 1.4 2022/01/30 10:55:03 he Exp $
Portability patch for NetBSD.
---- Makefile.orig 2020-01-19 10:12:01.000000000 +0000
+--- Makefile.orig 2021-03-27 10:00:32.000000000 +0000
+++ Makefile
@@ -22,13 +22,19 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
@@ -36,35 +36,44 @@
# installation directory
prefix=/usr/local
-@@ -47,8 +57,10 @@ prefix=/usr/local
- #CONFIG_PROFILE=y
+@@ -48,7 +58,8 @@ prefix=/usr/local
# use address sanitizer
#CONFIG_ASAN=y
-+
# include the code for BigInt/BigFloat/BigDecimal and math mode
-CONFIG_BIGNUM=y
+# Set via environment in pkg Makefile if supported:
-+# CONFIG_BIGNUM=y
++#CONFIG_BIGNUM=y
OBJDIR=.obj
-@@ -168,8 +180,10 @@ endif
+@@ -174,12 +185,18 @@ QJS_LIB_OBJS+=$(OBJDIR)/libbf.o
+ QJS_OBJS+=$(OBJDIR)/qjscalc.o
+ endif
+-HOST_LIBS=-lm -ldl -lpthread
++HOST_LIBS=-lm
++ifndef CONFIG_NETBSD
++HOST_LIBS+=-ldl
++endif
++HOST_LIBS+=-lphtread
LIBS=-lm
ifndef CONFIG_WIN32
+-LIBS+=-ldl -lpthread
+ifndef CONFIG_NETBSD
- LIBS+=-ldl
++LIBS+=-ldl
++endif
++LIBS+=-lpthread
endif
-+endif
+-LIBS+=$(EXTRA_LIBS)
$(OBJDIR):
mkdir -p $(OBJDIR) $(OBJDIR)/examples $(OBJDIR)/tests
-@@ -195,6 +209,9 @@ QJSC_DEFINES:=-DCONFIG_CC=\"$(QJSC_CC)\"
+@@ -205,6 +222,9 @@ QJSC_DEFINES:=-DCONFIG_CC=\"$(QJSC_CC)\"
ifdef CONFIG_LTO
QJSC_DEFINES+=-DCONFIG_LTO
endif
+ifdef CONFIG_LDL
-+QJSC_DEFINES+= -DCONFIG_LDL
++QJSC_DEFINES+=-DCONFIG_LDL
+endif
QJSC_HOST_DEFINES:=-DCONFIG_CC=\"$(HOST_CC)\" -DCONFIG_PREFIX=\"$(prefix)\"
diff -r f451a1b3e6e0 -r 4125f87786dd lang/quickjs/patches/patch-qjsc.c
--- a/lang/quickjs/patches/patch-qjsc.c Sun Jan 30 10:54:26 2022 +0000
+++ b/lang/quickjs/patches/patch-qjsc.c Sun Jan 30 10:55:03 2022 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-qjsc.c,v 1.1 2019/11/14 21:20:04 rillig Exp $
+$NetBSD: patch-qjsc.c,v 1.2 2022/01/30 10:55:03 he Exp $
Portability patch for NetBSD.
---- qjsc.c.orig 2019-11-14 20:58:23.645680708 +0000
+--- qjsc.c.orig 2021-03-27 10:00:32.000000000 +0000
+++ qjsc.c
@@ -450,7 +450,9 @@ static int output_executable(const char
lib_dir, bn_suffix, lto_suffix);
@@ -11,6 +11,6 @@
+#ifdef CONFIG_LDL
*arg++ = "-ldl";
+#endif
+ *arg++ = "-lpthread";
*arg = NULL;
- if (verbose) {
diff -r f451a1b3e6e0 -r 4125f87786dd lang/quickjs/patches/patch-quickjs-libc.c
--- a/lang/quickjs/patches/patch-quickjs-libc.c Sun Jan 30 10:54:26 2022 +0000
+++ b/lang/quickjs/patches/patch-quickjs-libc.c Sun Jan 30 10:55:03 2022 +0000
@@ -1,10 +1,19 @@
-$NetBSD: patch-quickjs-libc.c,v 1.2 2020/05/10 10:17:06 rillig Exp $
+$NetBSD: patch-quickjs-libc.c,v 1.3 2022/01/30 10:55:03 he Exp $
Portability patch for NetBSD.
---- quickjs-libc.c.orig 2020-04-12 13:18:13.000000000 +0000
+--- quickjs-libc.c.orig 2021-03-27 10:00:32.000000000 +0000
+++ quickjs-libc.c
-@@ -1712,7 +1712,7 @@ static void os_signal_handler(int sig_nu
+@@ -675,6 +675,8 @@ static JSValue js_std_unsetenv(JSContext
+ return JS_UNDEFINED;
+ }
+
++extern char **environ; /* Needed at least for NetBSD-8.0-x86_64. */
++
+ /* return an object containing the list of the available environment
+ variables. */
+ static JSValue js_std_getenviron(JSContext *ctx, JSValueConst this_val,
+@@ -1912,7 +1914,7 @@ static void os_signal_handler(int sig_nu
os_pending_signals |= ((uint64_t)1 << sig_num);
}
@@ -13,12 +22,3 @@
typedef void (*sighandler_t)(int sig_num);
#endif
-@@ -2442,6 +2442,8 @@ static int my_execvpe(const char *filena
- return -1;
- }
-
-+extern char **environ; /* Needed at least for NetBSD-8.0-x86_64. */
-+
- /* exec(args[, options]) -> exitcode */
- static JSValue js_os_exec(JSContext *ctx, JSValueConst this_val,
- int argc, JSValueConst *argv)
diff -r f451a1b3e6e0 -r 4125f87786dd lang/quickjs/patches/patch-quickjs.c
--- a/lang/quickjs/patches/patch-quickjs.c Sun Jan 30 10:54:26 2022 +0000
+++ b/lang/quickjs/patches/patch-quickjs.c Sun Jan 30 10:55:03 2022 +0000
@@ -1,26 +1,26 @@
-$NetBSD: patch-quickjs.c,v 1.2 2020/01/26 18:37:49 he Exp $
+$NetBSD: patch-quickjs.c,v 1.3 2022/01/30 10:55:03 he Exp $
Portability patch for NetBSD.
---- quickjs.c.orig 2020-01-19 10:12:01.000000000 +0000
+--- quickjs.c.orig 2021-03-27 10:00:32.000000000 +0000
+++ quickjs.c
-@@ -68,7 +68,15 @@
+@@ -70,7 +70,15 @@
/* define to include Atomics.* operations which depend on the OS
threads */
#if !defined(EMSCRIPTEN)
+#ifdef __NetBSD__
-+#ifdef __HAVE_ATOMICS64_OPS
++#ifdef __HAVE_ATOMICOPS64_OPS
#define CONFIG_ATOMICS
+#else
+#undef CONFIG_ATOMICS
-+#endif /* __HAVE_ATOMICS64_OPS */
-+#else /* ! __NetBSD__ */
++#endif /* __HAVE_ATOMICOPS64_OPS */
++#else /* !__NetBSD__ */
+#define CONFIG_ATOMICS
+#endif /* __NetBSD__ */
#endif
- /* dump object free */
-@@ -1544,7 +1552,7 @@ static inline size_t js_def_malloc_usabl
+ #if !defined(EMSCRIPTEN)
+@@ -1680,7 +1688,7 @@ static inline size_t js_def_malloc_usabl
return malloc_size(ptr);
#elif defined(_WIN32)
return _msize(ptr);
@@ -29,7 +29,7 @@
return 0;
#elif defined(__linux__)
return malloc_usable_size(ptr);
-@@ -1618,7 +1626,7 @@ static const JSMallocFunctions def_mallo
+@@ -1754,7 +1762,7 @@ static const JSMallocFunctions def_mallo
malloc_size,
#elif defined(_WIN32)
(size_t (*)(const void *))_msize,
diff -r f451a1b3e6e0 -r 4125f87786dd lang/quickjs/patches/patch-run-test262.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/quickjs/patches/patch-run-test262.c Sun Jan 30 10:55:03 2022 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-run-test262.c,v 1.1 2022/01/30 10:55:03 he Exp $
+
+Don't trigger undefined behaviour with isxxxxx() macros.
+
+--- run-test262.c.orig 2021-03-27 10:00:32.000000000 +0000
++++ run-test262.c
+@@ -1635,7 +1635,7 @@ int run_test(const char *filename, int i
+ /* XXX: should extract the phase */
+ char *q = find_tag(p, "type:", &state);
+ if (q) {
+- while (isspace(*q))
++ while (isspace((unsigned char)*q))
+ q++;
+ error_type = strdup_len(q, strcspn(q, " \n"));
+ }
+@@ -2025,7 +2025,7 @@ int main(int argc, char **argv)
+ update_exclude_dirs();
+
+ if (is_dir_list) {
+- if (optind < argc && !isdigit(argv[optind][0])) {
++ if (optind < argc && !isdigit((unsigned char)argv[optind][0])) {
+ filename = argv[optind++];
+ namelist_load(&test_list, filename);
+ }
Home |
Main Index |
Thread Index |
Old Index