summaryrefslogtreecommitdiff
path: root/lang/quickjs
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2020-01-26 18:37:49 +0000
committerhe <he@pkgsrc.org>2020-01-26 18:37:49 +0000
commit4fe3b1525028b7969aa14b99d51d03083e5475e2 (patch)
treed28deee162e93c4bdbb8c98893457b17fa7c30c1 /lang/quickjs
parent0267807f87c64f31dfd0e699ddbab19e55e61df4 (diff)
downloadpkgsrc-4fe3b1525028b7969aa14b99d51d03083e5475e2.tar.gz
Update to 2020-01-19 version.
Pkgsrc changes: * adapt patches * If NetBSD platform misses 64-bit atomics, turn off all atomics (Trying to just disable BIGNUM fails; workaround suggested by Fabrice Bellard) Upstream changes: - keep CONFIG_BIGNUM in the makefile - added os.chdir() - qjs: added -I option - more memory checks in the bignum operations - modified operator overloading semantics to be closer to the TC39 proposal - suppressed "use bigint" mode. Simplified "use math" mode - BigDecimal: changed suffix from 'd' to 'm' - misc bug fixes
Diffstat (limited to 'lang/quickjs')
-rw-r--r--lang/quickjs/Makefile4
-rw-r--r--lang/quickjs/distinfo16
-rw-r--r--lang/quickjs/patches/patch-Makefile20
-rw-r--r--lang/quickjs/patches/patch-quickjs.c24
-rw-r--r--lang/quickjs/patches/patch-tests_test__builtin.js10
5 files changed, 49 insertions, 25 deletions
diff --git a/lang/quickjs/Makefile b/lang/quickjs/Makefile
index c15d5d238a0..ed7dda052eb 100644
--- a/lang/quickjs/Makefile
+++ b/lang/quickjs/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2019/11/14 21:20:04 rillig Exp $
+# $NetBSD: Makefile,v 1.2 2020/01/26 18:37:49 he Exp $
-DISTNAME= quickjs-2019-10-27
+DISTNAME= quickjs-2020-01-19
CATEGORIES= lang
MASTER_SITES= https://bellard.org/quickjs/
EXTRACT_SUFX= .tar.xz
diff --git a/lang/quickjs/distinfo b/lang/quickjs/distinfo
index 031aea1cd46..121ee4edeea 100644
--- a/lang/quickjs/distinfo
+++ b/lang/quickjs/distinfo
@@ -1,13 +1,13 @@
-$NetBSD: distinfo,v 1.3 2019/11/15 20:51:23 rillig Exp $
+$NetBSD: distinfo,v 1.4 2020/01/26 18:37:49 he Exp $
-SHA1 (quickjs-2019-10-27.tar.xz) = 6d10526eecc6bbbd13f33262f796f30090195974
-RMD160 (quickjs-2019-10-27.tar.xz) = 4cd24d0d6c6c9fd23c2bc66d1e724e7e43985b22
-SHA512 (quickjs-2019-10-27.tar.xz) = 3654c8998b6c99fb42387c785e2be138b46b644025b2da5f26ecc6c1d58f32ef89b274763b0bcc5d25d86bbae217ec52576d13bf4e9cd81c6c2af46b692b73e9
-Size (quickjs-2019-10-27.tar.xz) = 763012 bytes
-SHA1 (patch-Makefile) = 4cff6c51bbd44d80327f186f261c6c7899b2a031
+SHA1 (quickjs-2020-01-19.tar.xz) = a33a7abb4471d566da39df90d0b688d120a8a2c4
+RMD160 (quickjs-2020-01-19.tar.xz) = 0de6489bf915c3e3d558c39bf5e7b264249b57a5
+SHA512 (quickjs-2020-01-19.tar.xz) = 6bbd271a3a3adfd612c9723f98d04c7a62b9f8c44ca5ae2134d34baa077f6fdba3ac65d43f8c573fdc5af23309cde7ada8cc12caf73236d2a9286fecdf677cf2
+Size (quickjs-2020-01-19.tar.xz) = 735868 bytes
+SHA1 (patch-Makefile) = 73dd794bd79bc54ec17f94cc059f598da0af9cfe
SHA1 (patch-cutils.h) = db3fad2bd422d2886538819ef778d13a391d6935
SHA1 (patch-qjs.c) = 2a2d778bb43540dc5289f84cd9df43162c1ce291
SHA1 (patch-qjsc.c) = 9a70bde5e19b65942d9f23c10d0b7b3e2741bfaa
SHA1 (patch-quickjs-libc.c) = 8a82afa9f13c9f7d53f8a94e377fbb4aa4471947
-SHA1 (patch-quickjs.c) = c411d8ed5539bcd77a504caf53541b7bddb51b5a
-SHA1 (patch-tests_test__builtin.js) = 1433415f3e0e9fed061377027a78fe62f5fde8a7
+SHA1 (patch-quickjs.c) = 7337eaac4ac5336db5205fa06d6cefd22a78cbf6
+SHA1 (patch-tests_test__builtin.js) = 762d201adfe15e7ab63dc0146040a7679229b10c
diff --git a/lang/quickjs/patches/patch-Makefile b/lang/quickjs/patches/patch-Makefile
index a7243551219..ec037584f3c 100644
--- a/lang/quickjs/patches/patch-Makefile
+++ b/lang/quickjs/patches/patch-Makefile
@@ -1,8 +1,8 @@
-$NetBSD: patch-Makefile,v 1.1 2019/11/14 21:20:04 rillig Exp $
+$NetBSD: patch-Makefile,v 1.2 2020/01/26 18:37:49 he Exp $
Portability patch for NetBSD.
---- Makefile.orig 2019-10-27 10:55:35.000000000 +0000
+--- Makefile.orig 2020-01-19 10:12:01.000000000 +0000
+++ Makefile
@@ -22,13 +22,19 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
@@ -36,7 +36,15 @@ Portability patch for NetBSD.
# installation directory
prefix=/usr/local
-@@ -165,8 +175,10 @@ QJSBN_OBJS=$(OBJDIR)/qjs.bn.o $(OBJDIR)/
+@@ -47,6 +57,7 @@ prefix=/usr/local
+ #CONFIG_PROFILE=y
+ # use address sanitizer
+ #CONFIG_ASAN=y
++
+ # include the code for BigInt/BigFloat/BigDecimal and math mode
+ CONFIG_BIGNUM=y
+
+@@ -168,8 +179,10 @@ endif
LIBS=-lm
ifndef CONFIG_WIN32
@@ -47,13 +55,13 @@ Portability patch for NetBSD.
$(OBJDIR):
mkdir -p $(OBJDIR) $(OBJDIR)/examples $(OBJDIR)/tests
-@@ -199,6 +211,9 @@ QJSC_DEFINES:=-DCONFIG_CC=\"$(QJSC_CC)\"
+@@ -195,6 +208,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)\"
- $(OBJDIR)/qjsc.o $(OBJDIR)/qjsc.bn.o: CFLAGS+=$(QJSC_DEFINES)
+ $(OBJDIR)/qjsc.o: CFLAGS+=$(QJSC_DEFINES)
diff --git a/lang/quickjs/patches/patch-quickjs.c b/lang/quickjs/patches/patch-quickjs.c
index 2643557152e..90f8c4c80b8 100644
--- a/lang/quickjs/patches/patch-quickjs.c
+++ b/lang/quickjs/patches/patch-quickjs.c
@@ -1,10 +1,26 @@
-$NetBSD: patch-quickjs.c,v 1.1 2019/11/14 21:20:04 rillig Exp $
+$NetBSD: patch-quickjs.c,v 1.2 2020/01/26 18:37:49 he Exp $
Portability patch for NetBSD.
---- quickjs.c.orig 2019-10-27 10:55:35.000000000 +0000
+--- quickjs.c.orig 2020-01-19 10:12:01.000000000 +0000
+++ quickjs.c
-@@ -1343,7 +1343,7 @@ static inline size_t js_def_malloc_usabl
+@@ -68,7 +68,15 @@
+ /* define to include Atomics.* operations which depend on the OS
+ threads */
+ #if !defined(EMSCRIPTEN)
++#ifdef __NetBSD__
++#ifdef __HAVE_ATOMICS64_OPS
+ #define CONFIG_ATOMICS
++#else
++#undef CONFIG_ATOMICS
++#endif /* __HAVE_ATOMICS64_OPS */
++#else /* ! __NetBSD__ */
++#define CONFIG_ATOMICS
++#endif /* __NetBSD__ */
+ #endif
+
+ /* dump object free */
+@@ -1544,7 +1552,7 @@ static inline size_t js_def_malloc_usabl
return malloc_size(ptr);
#elif defined(_WIN32)
return _msize(ptr);
@@ -13,7 +29,7 @@ Portability patch for NetBSD.
return 0;
#elif defined(__linux__)
return malloc_usable_size(ptr);
-@@ -1417,7 +1417,7 @@ static const JSMallocFunctions def_mallo
+@@ -1618,7 +1626,7 @@ static const JSMallocFunctions def_mallo
malloc_size,
#elif defined(_WIN32)
(size_t (*)(const void *))_msize,
diff --git a/lang/quickjs/patches/patch-tests_test__builtin.js b/lang/quickjs/patches/patch-tests_test__builtin.js
index d75fba6b063..3c42c8a7e5b 100644
--- a/lang/quickjs/patches/patch-tests_test__builtin.js
+++ b/lang/quickjs/patches/patch-tests_test__builtin.js
@@ -1,4 +1,4 @@
-$NetBSD: patch-tests_test__builtin.js,v 1.2 2019/11/15 20:51:24 rillig Exp $
+$NetBSD: patch-tests_test__builtin.js,v 1.3 2020/01/26 18:37:49 he Exp $
Disable tests that fail on NetBSD.
@@ -9,11 +9,11 @@ rillig contacted Fabrice via mail. Fabrice replied:
> big issue. The fix will be not to depend on printf to convert floating
> point numbers to string.
---- tests/test_builtin.js.orig 2019-10-27 10:55:35.000000000 +0000
+--- tests/test_builtin.js.orig 2020-01-19 10:12:01.000000000 +0000
+++ 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");