pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/quickjs



Module Name:    pkgsrc
Committed By:   leot
Date:           Wed Nov 12 11:49:38 UTC 2025

Modified Files:
        pkgsrc/lang/quickjs: Makefile PLIST distinfo
        pkgsrc/lang/quickjs/patches: patch-Makefile patch-qjs.c patch-qjsc.c
            patch-quickjs.c
Removed Files:
        pkgsrc/lang/quickjs/patches: patch-run-test262.c
            patch-tests_test__builtin.js

Log Message:
quickjs: Update to 20250913

pkgsrc changes:
- Remove patches no longer needed because applied upstream

Changes:
2025-09-13:
- added JSON modules and import attributes
- added JS_PrintValue() API
- qjs: pretty print objects in print() and console.log()
- qjs: better promise rejection tracker heuristics
- added RegExp v flag
- added RegExp modifiers
- added RegExp.escape
- added Float16Array
- added Promise.try
- improved JSON parser spec conformance
- qjs: improved compatibility of std.parseExtJSON() with JSON5 and
  accept JSON5 modules
- added JS_FreePropertyEnum() and JS_AtomToCStringLen() API
- added Error.isError()
- misc bug fixes

2025-04-26:
- removed the bignum extensions and qjscalc
- new BigInt implementation optimized for small numbers
- added WeakRef, FinalizationRegistry and symbols as weakrefs
- added builtin float64 printing and parsing functions for more correctness
- faster repeated string concatenation
- qjs: promise unhandled rejections are fatal errors by default
- added column number in debug information
- removed the "use strip" extension
- qjs: added -s and --strip-source options
- qjsc: added -s and --keep-source options
- added JS_GetAnyOpaque()
- added more callbacks for exotic objects in JSClassExoticMethods
- misc bug fixes


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 pkgsrc/lang/quickjs/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/lang/quickjs/PLIST
cvs rdiff -u -r1.12 -r1.13 pkgsrc/lang/quickjs/distinfo
cvs rdiff -u -r1.6 -r1.7 pkgsrc/lang/quickjs/patches/patch-Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/quickjs/patches/patch-qjs.c
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/quickjs/patches/patch-qjsc.c
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/quickjs/patches/patch-quickjs.c
cvs rdiff -u -r1.1 -r0 pkgsrc/lang/quickjs/patches/patch-run-test262.c
cvs rdiff -u -r1.3 -r0 \
    pkgsrc/lang/quickjs/patches/patch-tests_test__builtin.js

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/quickjs/Makefile
diff -u pkgsrc/lang/quickjs/Makefile:1.14 pkgsrc/lang/quickjs/Makefile:1.15
--- pkgsrc/lang/quickjs/Makefile:1.14   Fri Feb  7 12:36:23 2025
+++ pkgsrc/lang/quickjs/Makefile        Wed Nov 12 11:49:38 2025
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.14 2025/02/07 12:36:23 pho Exp $
+# $NetBSD: Makefile,v 1.15 2025/11/12 11:49:38 leot Exp $
 
 NAME=          quickjs
-QJS_DATE=      2024-01-13
+QJS_DATE=      2025-09-13
 VERSION=       ${QJS_DATE:S/-//g}
 DISTNAME=      ${NAME}-${QJS_DATE}
 PKGNAME=       ${NAME}-${VERSION}
@@ -38,9 +38,17 @@ PLIST.lto=   yes
 MAKE_ENV+=     CONFIG_BIGNUM=yes
 .endif
 
+# Populate missing examples/message.json based on the file present in Git
+# repository that is missing in the distfile. Without it the build fails with:
+#
+#  ReferenceError: could not load module filename 'examples/message.json'
+#
+pre-configure:
+       ${ECHO} '{ "x" : 1, "tab": [ 1, 2, 3 ] }' > ${WRKSRC}/examples/message.json
+
 post-install:
        cd ${WRKSRC}/doc && ${INSTALL_DATA} *.html *.pdf ${DESTDIR}${PREFIX}/share/doc/quickjs/
-       cd ${WRKSRC}/examples && ${INSTALL_DATA} *.js *.c ${DESTDIR}${PREFIX}/share/doc/quickjs/examples/
+       cd ${WRKSRC}/examples && ${INSTALL_DATA} *.js *.c *.json ${DESTDIR}${PREFIX}/share/doc/quickjs/examples/
        cd ${WRKSRC}/tests && ${INSTALL_DATA} *.js *.c ${DESTDIR}${PREFIX}/share/doc/quickjs/tests/
 
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/lang/quickjs/PLIST
diff -u pkgsrc/lang/quickjs/PLIST:1.6 pkgsrc/lang/quickjs/PLIST:1.7
--- pkgsrc/lang/quickjs/PLIST:1.6       Fri Feb  7 12:20:38 2025
+++ pkgsrc/lang/quickjs/PLIST   Wed Nov 12 11:49:38 2025
@@ -1,35 +1,31 @@
-@comment $NetBSD: PLIST,v 1.6 2025/02/07 12:20:38 pho Exp $
+@comment $NetBSD: PLIST,v 1.7 2025/11/12 11:49:38 leot Exp $
 bin/qjs
 bin/qjsc
-bin/qjscalc
 include/quickjs/quickjs-libc.h
 include/quickjs/quickjs.h
 lib/libquickjs.a
-${PLIST.lto}lib/libquickjs.lto.a
 share/doc/quickjs/examples/fib.c
 share/doc/quickjs/examples/fib_module.js
 share/doc/quickjs/examples/hello.js
 share/doc/quickjs/examples/hello_module.js
-share/doc/quickjs/examples/pi_bigdecimal.js
-share/doc/quickjs/examples/pi_bigfloat.js
+share/doc/quickjs/examples/message.json
 share/doc/quickjs/examples/pi_bigint.js
 share/doc/quickjs/examples/point.c
 share/doc/quickjs/examples/test_fib.js
 share/doc/quickjs/examples/test_point.js
-share/doc/quickjs/jsbignum.html
-share/doc/quickjs/jsbignum.pdf
 share/doc/quickjs/quickjs.html
 share/doc/quickjs/quickjs.pdf
+share/doc/quickjs/tests/assert.js
 share/doc/quickjs/tests/bjson.c
+share/doc/quickjs/tests/fixture_cyclic_import.js
 share/doc/quickjs/tests/microbench.js
-share/doc/quickjs/tests/test_bignum.js
+share/doc/quickjs/tests/test_bigint.js
 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_cyclic_import.js
 share/doc/quickjs/tests/test_language.js
 share/doc/quickjs/tests/test_loop.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

Index: pkgsrc/lang/quickjs/distinfo
diff -u pkgsrc/lang/quickjs/distinfo:1.12 pkgsrc/lang/quickjs/distinfo:1.13
--- pkgsrc/lang/quickjs/distinfo:1.12   Fri Feb  7 12:36:24 2025
+++ pkgsrc/lang/quickjs/distinfo        Wed Nov 12 11:49:38 2025
@@ -1,13 +1,10 @@
-$NetBSD: distinfo,v 1.12 2025/02/07 12:36:24 pho Exp $
+$NetBSD: distinfo,v 1.13 2025/11/12 11:49:38 leot Exp $
 
-BLAKE2s (quickjs-2024-01-13.tar.xz) = 8408cd2b506cbe6c5980e718a366471c506e968a9037f0a75bd8dacabb320a29
-SHA512 (quickjs-2024-01-13.tar.xz) = 9f426404e4dc1e2a41fcc235b72e58708041aed24eadd5fb9e82f62435501003d3a6b04831f307b04852551d2fd265b94cd400b3293ec0810465f52de8a6c057
-Size (quickjs-2024-01-13.tar.xz) = 765800 bytes
-SHA1 (patch-Makefile) = 30cae7eb45a6382afc59be937e6d96737ceca7bf
-SHA1 (patch-cutils.h) = db3fad2bd422d2886538819ef778d13a391d6935
-SHA1 (patch-qjs.c) = d875b765521f2661146afb5fae4665f895f1fd8b
-SHA1 (patch-qjsc.c) = b67cd008e9f9081c7d1afdc5c286522e5854a511
+BLAKE2s (quickjs-2025-09-13.tar.xz) = 1dd767416ef10f6f3be0ada60edd5c478e08a6df5813b345e7830038b1e416b0
+SHA512 (quickjs-2025-09-13.tar.xz) = 077acba8b318b19cd2660fae0ca03099185b688dba46c89a6456b455639813eefc282975cd1eebdb3c49f62217b9506c6abad86d777b08cb49fe234beef918a2
+Size (quickjs-2025-09-13.tar.xz) = 595964 bytes
+SHA1 (patch-Makefile) = c3f827f36e41ca78a9b5144092276db8a9ac4a5e
+SHA1 (patch-qjs.c) = bfabed96cfdd40214fede3069485394af2faef4f
+SHA1 (patch-qjsc.c) = bffd0222579f3996bc21116694343a7dd65d8f33
 SHA1 (patch-quickjs-libc.c) = 39c2b553ef04b308e7c477590edd345b62acc528
-SHA1 (patch-quickjs.c) = ea19cb2ed33e59f3c8e3751084860818580ac46a
-SHA1 (patch-run-test262.c) = c8cb354909c1433924fb0129f95b110bdf1be48c
-SHA1 (patch-tests_test__builtin.js) = 762d201adfe15e7ab63dc0146040a7679229b10c
+SHA1 (patch-quickjs.c) = 7e8b8e9370bea8c654fb766217a6021c245fcee9

Index: pkgsrc/lang/quickjs/patches/patch-Makefile
diff -u pkgsrc/lang/quickjs/patches/patch-Makefile:1.6 pkgsrc/lang/quickjs/patches/patch-Makefile:1.7
--- pkgsrc/lang/quickjs/patches/patch-Makefile:1.6      Fri Feb  7 12:36:24 2025
+++ pkgsrc/lang/quickjs/patches/patch-Makefile  Wed Nov 12 11:49:38 2025
@@ -1,10 +1,10 @@
-$NetBSD: patch-Makefile,v 1.6 2025/02/07 12:36:24 pho Exp $
+$NetBSD: patch-Makefile,v 1.7 2025/11/12 11:49:38 leot Exp $
 
 Portability patch for NetBSD.
 
---- Makefile.orig      2024-01-13 10:20:39.000000000 +0000
+--- Makefile.orig      2025-09-13 08:48:28.000000000 +0000
 +++ Makefile
-@@ -22,13 +22,19 @@
+@@ -22,10 +22,14 @@
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  # THE SOFTWARE.
  
@@ -13,42 +13,31 @@ Portability patch for NetBSD.
 +ifeq ($(OPSYS),Darwin)
  CONFIG_DARWIN=y
  endif
+-ifeq ($(shell uname -s),FreeBSD)
 +ifeq ($(OPSYS),NetBSD)
 +CONFIG_NETBSD=y
 +endif
++ifeq ($(OPSYS),FreeBSD)
+ CONFIG_FREEBSD=y
+ endif
  # Windows cross compilation from Linux
- #CONFIG_WIN32=y
- # use link time optimization (smaller and faster executables but slower build)
-+ifndef CONFIG_NETBSD
- CONFIG_LTO=y
-+endif
- # consider warnings as errors (for development)
- #CONFIG_WERROR=y
- # force 32 bit build for some utilities
-@@ -44,7 +50,8 @@ PREFIX?=/usr/local
- # use address sanitizer
- #CONFIG_ASAN=y
- # include the code for BigFloat/BigDecimal, math mode and faster large integers
--CONFIG_BIGNUM=y
-+# Set via environment in pkg Makefile if supported:
-+#CONFIG_BIGNUM=y
- 
- OBJDIR=.obj
- 
-@@ -54,6 +61,10 @@ CONFIG_CLANG=y
+@@ -77,6 +81,13 @@ CONFIG_CLANG=y
  CONFIG_DEFAULT_AR=y
+ CONFIG_LTO=
  endif
- 
++ifdef CONFIG_NETBSD
++CONFIG_LTO=
++endif
++
 +ifndef CONFIG_NETBSD
 +CONFIG_LDL=y
 +endif
-+
+ 
  ifdef CONFIG_WIN32
    ifdef CONFIG_M32
-     CROSS_PREFIX?=i686-w64-mingw32-
-@@ -194,12 +205,18 @@ ifdef CONFIG_BIGNUM
- QJS_OBJS+=$(OBJDIR)/qjscalc.o
- endif
+@@ -243,11 +254,17 @@ QJS_LIB_OBJS=$(OBJDIR)/quickjs.o $(OBJDI
+ 
+ QJS_OBJS=$(OBJDIR)/qjs.o $(OBJDIR)/repl.o $(QJS_LIB_OBJS)
  
 -HOST_LIBS=-lm -ldl -lpthread
 +HOST_LIBS=-lm
@@ -56,19 +45,16 @@ Portability patch for NetBSD.
 +HOST_LIBS+=-ldl
 +endif
 +HOST_LIBS+=-lphtread
- LIBS=-lm
+ LIBS=-lm -lpthread
  ifndef CONFIG_WIN32
--LIBS+=-ldl -lpthread
 +ifndef CONFIG_NETBSD
-+LIBS+=-ldl
-+endif
-+LIBS+=-lpthread
+ LIBS+=-ldl
  endif
--LIBS+=$(EXTRA_LIBS)
++endif
+ LIBS+=$(EXTRA_LIBS)
  
  $(OBJDIR):
-       mkdir -p $(OBJDIR) $(OBJDIR)/examples $(OBJDIR)/tests
-@@ -225,6 +242,9 @@ QJSC_DEFINES:=-DCONFIG_CC=\"$(QJSC_CC)\"
+@@ -285,6 +302,9 @@ QJSC_DEFINES:=-DCONFIG_CC=\"$(QJSC_CC)\"
  ifdef CONFIG_LTO
  QJSC_DEFINES+=-DCONFIG_LTO
  endif
@@ -78,10 +64,10 @@ Portability patch for NetBSD.
  QJSC_HOST_DEFINES:=-DCONFIG_CC=\"$(HOST_CC)\" -DCONFIG_PREFIX=\"$(PREFIX)\"
  
  $(OBJDIR)/qjsc.o: CFLAGS+=$(QJSC_DEFINES)
-@@ -322,10 +342,9 @@ install: all
-       $(STRIP) qjs qjsc
-       install -m755 qjs qjsc "$(DESTDIR)$(PREFIX)/bin"
-       ln -sf qjs "$(DESTDIR)$(PREFIX)/bin/qjscalc"
+@@ -368,10 +388,9 @@ install: all
+       mkdir -p "$(DESTDIR)$(PREFIX)/bin"
+       $(STRIP) qjs$(EXE) qjsc$(EXE)
+       install -m755 qjs$(EXE) qjsc$(EXE) "$(DESTDIR)$(PREFIX)/bin"
 -      mkdir -p "$(DESTDIR)$(PREFIX)/lib/quickjs"
 -      install -m644 libquickjs.a "$(DESTDIR)$(PREFIX)/lib/quickjs"
 +      install -m644 libquickjs.a "$(DESTDIR)$(PREFIX)/lib"

Index: pkgsrc/lang/quickjs/patches/patch-qjs.c
diff -u pkgsrc/lang/quickjs/patches/patch-qjs.c:1.3 pkgsrc/lang/quickjs/patches/patch-qjs.c:1.4
--- pkgsrc/lang/quickjs/patches/patch-qjs.c:1.3 Fri Feb  7 12:36:24 2025
+++ pkgsrc/lang/quickjs/patches/patch-qjs.c     Wed Nov 12 11:49:38 2025
@@ -1,15 +1,15 @@
-$NetBSD: patch-qjs.c,v 1.3 2025/02/07 12:36:24 pho Exp $
+$NetBSD: patch-qjs.c,v 1.4 2025/11/12 11:49:38 leot Exp $
 
 Portability patch for NetBSD.
 
---- qjs.c.orig 2024-01-13 10:20:39.000000000 +0000
+--- qjs.c.orig 2025-09-13 08:48:28.000000000 +0000
 +++ qjs.c
-@@ -146,7 +146,7 @@ static size_t js_trace_malloc_usable_siz
+@@ -136,7 +136,7 @@ static size_t js_trace_malloc_usable_siz
      return malloc_size(ptr);
  #elif defined(_WIN32)
      return _msize((void *)ptr);
 -#elif defined(EMSCRIPTEN)
 +#elif defined(EMSCRIPTEN) || defined(__NetBSD__)
      return 0;
- #elif defined(__linux__)
+ #elif defined(__linux__) || defined(__GLIBC__)
      return malloc_usable_size((void *)ptr);

Index: pkgsrc/lang/quickjs/patches/patch-qjsc.c
diff -u pkgsrc/lang/quickjs/patches/patch-qjsc.c:1.2 pkgsrc/lang/quickjs/patches/patch-qjsc.c:1.3
--- pkgsrc/lang/quickjs/patches/patch-qjsc.c:1.2        Sun Jan 30 10:55:03 2022
+++ pkgsrc/lang/quickjs/patches/patch-qjsc.c    Wed Nov 12 11:49:38 2025
@@ -1,10 +1,10 @@
-$NetBSD: patch-qjsc.c,v 1.2 2022/01/30 10:55:03 he Exp $
+$NetBSD: patch-qjsc.c,v 1.3 2025/11/12 11:49:38 leot Exp $
 
 Portability patch for NetBSD.
 
---- qjsc.c.orig        2021-03-27 10:00:32.000000000 +0000
+--- qjsc.c.orig        2025-09-13 08:48:28.000000000 +0000
 +++ qjsc.c
-@@ -450,7 +450,9 @@ static int output_executable(const char 
+@@ -502,7 +502,9 @@ static int output_executable(const char 
               lib_dir, bn_suffix, lto_suffix);
      *arg++ = libjsname;
      *arg++ = "-lm";
@@ -13,4 +13,4 @@ Portability patch for NetBSD.
 +#endif
      *arg++ = "-lpthread";
      *arg = NULL;
-     
+ 

Index: pkgsrc/lang/quickjs/patches/patch-quickjs.c
diff -u pkgsrc/lang/quickjs/patches/patch-quickjs.c:1.4 pkgsrc/lang/quickjs/patches/patch-quickjs.c:1.5
--- pkgsrc/lang/quickjs/patches/patch-quickjs.c:1.4     Fri Feb  7 12:36:24 2025
+++ pkgsrc/lang/quickjs/patches/patch-quickjs.c Wed Nov 12 11:49:38 2025
@@ -1,10 +1,10 @@
-$NetBSD: patch-quickjs.c,v 1.4 2025/02/07 12:36:24 pho Exp $
+$NetBSD: patch-quickjs.c,v 1.5 2025/11/12 11:49:38 leot Exp $
 
 Portability patch for NetBSD.
 
---- quickjs.c.orig     2024-01-13 10:20:39.000000000 +0000
+--- quickjs.c.orig     2025-09-13 08:48:28.000000000 +0000
 +++ quickjs.c
-@@ -68,7 +68,15 @@
+@@ -69,7 +69,15 @@
  /* define to include Atomics.* operations which depend on the OS
     threads */
  #if !defined(EMSCRIPTEN)
@@ -20,12 +20,12 @@ Portability patch for NetBSD.
  #endif
  
  #if !defined(EMSCRIPTEN)
-@@ -1699,7 +1707,7 @@ static size_t js_def_malloc_usable_size(
+@@ -1669,7 +1677,7 @@ static size_t js_def_malloc_usable_size(
      return malloc_size(ptr);
  #elif defined(_WIN32)
      return _msize((void *)ptr);
 -#elif defined(EMSCRIPTEN)
 +#elif defined(EMSCRIPTEN) || defined(__NetBSD__)
      return 0;
- #elif defined(__linux__)
+ #elif defined(__linux__) || defined(__GLIBC__)
      return malloc_usable_size((void *)ptr);



Home | Main Index | Thread Index | Old Index