pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/quickjs Update to 2020-01-19 version.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f877cec2a5d0
branches:  trunk
changeset: 410114:f877cec2a5d0
user:      he <he%pkgsrc.org@localhost>
date:      Sun Jan 26 18:37:49 2020 +0000

description:
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:

 lang/quickjs/Makefile                             |   4 +-
 lang/quickjs/distinfo                             |  16 +++++++-------
 lang/quickjs/patches/patch-Makefile               |  20 +++++++++++++-----
 lang/quickjs/patches/patch-quickjs.c              |  24 +++++++++++++++++++---
 lang/quickjs/patches/patch-tests_test__builtin.js |  10 ++++----
 5 files changed, 49 insertions(+), 25 deletions(-)

diffs (152 lines):

diff -r 65eee609ffce -r f877cec2a5d0 lang/quickjs/Makefile
--- a/lang/quickjs/Makefile     Sun Jan 26 17:30:40 2020 +0000
+++ b/lang/quickjs/Makefile     Sun Jan 26 18:37:49 2020 +0000
@@ -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 -r 65eee609ffce -r f877cec2a5d0 lang/quickjs/distinfo
--- a/lang/quickjs/distinfo     Sun Jan 26 17:30:40 2020 +0000
+++ b/lang/quickjs/distinfo     Sun Jan 26 18:37:49 2020 +0000
@@ -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 -r 65eee609ffce -r f877cec2a5d0 lang/quickjs/patches/patch-Makefile
--- a/lang/quickjs/patches/patch-Makefile       Sun Jan 26 17:30:40 2020 +0000
+++ b/lang/quickjs/patches/patch-Makefile       Sun Jan 26 18:37:49 2020 +0000
@@ -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 @@
  # 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 @@
  
  $(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 -r 65eee609ffce -r f877cec2a5d0 lang/quickjs/patches/patch-quickjs.c
--- a/lang/quickjs/patches/patch-quickjs.c      Sun Jan 26 17:30:40 2020 +0000
+++ b/lang/quickjs/patches/patch-quickjs.c      Sun Jan 26 18:37:49 2020 +0000
@@ -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 @@
      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 -r 65eee609ffce -r f877cec2a5d0 lang/quickjs/patches/patch-tests_test__builtin.js
--- a/lang/quickjs/patches/patch-tests_test__builtin.js Sun Jan 26 17:30:40 2020 +0000
+++ b/lang/quickjs/patches/patch-tests_test__builtin.js Sun Jan 26 18:37:49 2020 +0000
@@ -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 @@
 > 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");



Home | Main Index | Thread Index | Old Index