Hi ports --
Attached is an update to lang/quickjs. The main user-visible difference
is that bignum mode is now the default, so the bignum-specific binaries
have been removed.
Could someone on macppc please give this a test and make sure that
atomics are still needed?
OK?
~Brian
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/quickjs/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile 15 Jan 2020 14:30:50 -0000 1.4
+++ Makefile 18 Feb 2020 23:22:02 -0000
@@ -2,8 +2,7 @@
COMMENT = small, embeddable JavaScript engine in C
-V = 2019.10.27
-REVISION = 0
+V = 2020.01.19
DISTNAME = quickjs-${V:S/./-/g}
PKGNAME = quickjs-${V}
Index: distinfo
===================================================================
RCS file: /cvs/ports/lang/quickjs/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo 21 Dec 2019 14:24:03 -0000 1.1.1.1
+++ distinfo 18 Feb 2020 23:22:02 -0000
@@ -1,2 +1,2 @@
-SHA256 (quickjs-2019-10-27.tar.xz) = Uc3KTreFHS64so1ELfqjYhOSAXGgzw68BGgCNpQ0oXY=
-SIZE (quickjs-2019-10-27.tar.xz) = 763012
+SHA256 (quickjs-2020-01-19.tar.xz) = SuTCDE7XwgHXLCKNXodoMUlQkUumDXWfPfI9WQN/K4U=
+SIZE (quickjs-2020-01-19.tar.xz) = 735868
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/lang/quickjs/patches/patch-Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Makefile
--- patches/patch-Makefile 21 Dec 2019 14:24:03 -0000 1.1.1.1
+++ patches/patch-Makefile 18 Feb 2020 23:22:02 -0000
@@ -23,7 +23,7 @@ Index: Makefile
ifdef CONFIG_DARWIN
# use clang instead of gcc
-@@ -81,8 +82,8 @@ ifdef CONFIG_CLANG
+@@ -83,8 +84,8 @@ ifdef CONFIG_CLANG
else
HOST_CC=gcc
CC=$(CROSS_PREFIX)gcc
@@ -34,7 +34,7 @@ Index: Makefile
ifdef CONFIG_LTO
AR=$(CROSS_PREFIX)gcc-ar
else
-@@ -97,7 +98,7 @@ DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(shell cat
+@@ -102,7 +103,7 @@ endif
CFLAGS+=$(DEFINES)
CFLAGS_DEBUG=$(CFLAGS) -O0
CFLAGS_SMALL=$(CFLAGS) -Os
@@ -43,7 +43,7 @@ Index: Makefile
CFLAGS_NOLTO:=$(CFLAGS_OPT)
LDFLAGS=-g
ifdef CONFIG_LTO
-@@ -165,7 +166,7 @@ QJSBN_OBJS=$(OBJDIR)/qjs.bn.o $(OBJDIR)/repl-bn.bn.o $
+@@ -168,7 +169,7 @@ endif
LIBS=-lm
ifndef CONFIG_WIN32
Index: patches/patch-qjsc_c
===================================================================
RCS file: /cvs/ports/lang/quickjs/patches/patch-qjsc_c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-qjsc_c
--- patches/patch-qjsc_c 21 Dec 2019 14:24:03 -0000 1.1.1.1
+++ patches/patch-qjsc_c 18 Feb 2020 23:22:02 -0000
@@ -5,7 +5,7 @@ Remove -ldl
Index: qjsc.c
--- qjsc.c.orig
+++ qjsc.c
-@@ -450,7 +450,6 @@ static int output_executable(const char *out_filename,
+@@ -446,7 +446,6 @@ static int output_executable(const char *out_filename,
lib_dir, bn_suffix, lto_suffix);
*arg++ = libjsname;
*arg++ = "-lm";
Index: patches/patch-quickjs_c
===================================================================
RCS file: /cvs/ports/lang/quickjs/patches/patch-quickjs_c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-quickjs_c
--- patches/patch-quickjs_c 21 Dec 2019 14:24:03 -0000 1.1.1.1
+++ patches/patch-quickjs_c 18 Feb 2020 23:22:02 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-quickjs_c,v 1.1.1.1 2019
Index: quickjs.c
--- quickjs.c.orig
+++ quickjs.c
-@@ -1349,7 +1349,7 @@ static inline size_t js_def_malloc_usable_size(void *p
+@@ -1550,7 +1550,7 @@ static inline size_t js_def_malloc_usable_size(void *p
return malloc_usable_size(ptr);
#else
/* change this to `return 0;` if compilation fails */
@@ -12,7 +12,7 @@ Index: quickjs.c
#endif
}
-@@ -1423,7 +1423,7 @@ static const JSMallocFunctions def_malloc_funcs = {
+@@ -1624,7 +1624,7 @@ static const JSMallocFunctions def_malloc_funcs = {
(size_t (*)(const void *))malloc_usable_size,
#else
/* change this to `NULL,` if compilation fails */
Index: patches/patch-quickjs_h
===================================================================
RCS file: patches/patch-quickjs_h
diff -N patches/patch-quickjs_h
--- patches/patch-quickjs_h 15 Jan 2020 14:30:50 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-quickjs_h,v 1.1 2020/01/15 14:30:50 jca Exp $
-
-Use more generic test for 64 bits platform.
-
-Index: quickjs.h
---- quickjs.h.orig
-+++ quickjs.h
-@@ -53,7 +53,7 @@ typedef struct JSClass JSClass;
- typedef uint32_t JSClassID;
- typedef uint32_t JSAtom;
-
--#if defined(__x86_64__) || defined(__aarch64__)
-+#if defined(__LP64__)
- #define JS_PTR64
- #define JS_PTR64_DEF(a) a
- #else
Index: patches/patch-tests_test_builtin_js
===================================================================
RCS file: /cvs/ports/lang/quickjs/patches/patch-tests_test_builtin_js,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-tests_test_builtin_js
--- patches/patch-tests_test_builtin_js 21 Dec 2019 14:24:03 -0000 1.1.1.1
+++ patches/patch-tests_test_builtin_js 18 Feb 2020 23:22:02 -0000
@@ -6,9 +6,9 @@ More info: https://github.com/NetBSD/pkg
Index: tests/test_builtin.js
--- tests/test_builtin.js.orig
+++ tests/test_builtin.js
-@@ -304,12 +304,12 @@ function test_number()
- assert(parseFloat("123.2"), 123.2);
- assert(parseFloat("123.2e3"), 123200);
+@@ -307,12 +307,12 @@ function test_number()
+ assert(Number.isNaN(Number("-")));
+ assert(Number.isNaN(Number("\x00a")));
- assert((25).toExponential(0), "3e+1");
- assert((-25).toExponential(0), "-3e+1");
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/lang/quickjs/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST 21 Dec 2019 14:24:03 -0000 1.1.1.1
+++ pkg/PLIST 18 Feb 2020 23:22:02 -0000
@@ -1,7 +1,5 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2019/12/21 14:24:03 bcallah Exp $
@bin bin/qjs
-@bin bin/qjsbn
-@bin bin/qjsbnc
@bin bin/qjsc
bin/qjscalc
include/quickjs/
@@ -9,4 +7,3 @@ include/quickjs/quickjs-libc.h
include/quickjs/quickjs.h
lib/quickjs/
@static-lib lib/quickjs/libquickjs.a
-@static-lib lib/quickjs/libquickjs.bn.a