diff options
author | Juan M. Lasca <juanmlasca@gmail.com> | 2024-02-04 17:44:14 +0900 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-02-10 16:17:19 +0700 |
commit | 54d5248e244264bbd45ae6e39874415d6c1277a9 (patch) | |
tree | f78e6c9b673b1779f9f3e6d7f484b8879dfad7ba /development/quickjs | |
parent | 7d06039ed8d09c346cb4eb90454bee4c7fae1c3f (diff) |
development/quickjs: Updated for version 2024.01.13.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/quickjs')
-rw-r--r-- | development/quickjs/README | 6 | ||||
-rw-r--r-- | development/quickjs/patches/01-Makefile.patch | 140 | ||||
-rw-r--r-- | development/quickjs/patches/02-qjsc.c.patch | 6 | ||||
-rw-r--r-- | development/quickjs/quickjs.SlackBuild | 11 | ||||
-rw-r--r-- | development/quickjs/quickjs.info | 6 |
5 files changed, 89 insertions, 80 deletions
diff --git a/development/quickjs/README b/development/quickjs/README index ebc589068a71..3ffa3044b10a 100644 --- a/development/quickjs/README +++ b/development/quickjs/README @@ -1,5 +1,5 @@ QuickJS is a small and embeddable Javascript engine by Fabrice Bellard -and Charlie Gordon. It supports the ES2020 specification including +and Charlie Gordon. It supports the ES2023 specification including modules, asynchronous generators, proxies and BigInt. It optionally supports mathematical extensions such as big decimal floating point numbers (BigDecimal), big binary floating point numbers @@ -9,10 +9,10 @@ Main Features: * Small and easily embeddable: just a few C files, no external dependency. * Fast interpreter with very low startup time -* Almost complete ES2020 support including modules, asynchronous +* Almost complete ES2023 support including modules, asynchronous generators and full Annex B support (legacy web compatibility). * Passes nearly 100% of the ECMAScript Test Suite tests when selecting - the ES2020 features. + the ES2023 features. * Can compile Javascript sources to executables with no external dependency. * Garbage collection using reference counting (to reduce memory usage diff --git a/development/quickjs/patches/01-Makefile.patch b/development/quickjs/patches/01-Makefile.patch index 2e3650369b2a..10eb343fb3b1 100644 --- a/development/quickjs/patches/01-Makefile.patch +++ b/development/quickjs/patches/01-Makefile.patch @@ -5,104 +5,112 @@ * avoid building examples * disabled debug information ---- quickjs-2021-03-27/Makefile 2021-03-27 07:00:32.000000000 -0300 -+++ quickjs-2021-03-27-modified/Makefile 2022-08-02 21:52:01.476250120 -0300 -@@ -36,12 +36,14 @@ - - ifdef CONFIG_DARWIN - # use clang instead of gcc --CONFIG_CLANG=y -+#CONFIG_CLANG=y - CONFIG_DEFAULT_AR=y - endif - +--- quickjs-2024-01-13/Makefile 2024-01-13 07:20:39.000000000 -0300 ++++ quickjs-2024-01-13m/Makefile 2024-02-04 02:01:09.732016372 -0300 +@@ -39,6 +39,8 @@ # installation directory - prefix=/usr/local -+libdir=$(prefix)/lib -+CFLAGS_EXTRA= + PREFIX?=/usr/local ++CFLAGS+=$(CFLAGS_EXTRA) ++ # use the gprof profiler #CONFIG_PROFILE=y -@@ -66,7 +68,7 @@ + # use address sanitizer +@@ -69,7 +71,7 @@ ifdef CONFIG_CLANG HOST_CC=clang CC=$(CROSS_PREFIX)clang -- CFLAGS=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d -+ CFLAGS= -Wall -MMD -MF $(OBJDIR)/$(@F).d +- CFLAGS+=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d ++ CFLAGS+= -Wall -MMD -MF $(OBJDIR)/$(@F).d CFLAGS += -Wextra CFLAGS += -Wno-sign-compare CFLAGS += -Wno-missing-field-initializers -@@ -87,7 +89,7 @@ +@@ -92,13 +94,13 @@ + HOST_CC=gcc + CC=cosmocc + # cosmocc does not correct support -MF +- CFLAGS=-g -Wall #-MMD -MF $(OBJDIR)/$(@F).d ++ CFLAGS= -Wall #-MMD -MF $(OBJDIR)/$(@F).d + CFLAGS += -Wno-array-bounds -Wno-format-truncation + AR=cosmoar else HOST_CC=gcc CC=$(CROSS_PREFIX)gcc -- CFLAGS=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d -+ CFLAGS= -Wall -MMD -MF $(OBJDIR)/$(@F).d +- CFLAGS+=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d ++ CFLAGS+= -Wall -MMD -MF $(OBJDIR)/$(@F).d CFLAGS += -Wno-array-bounds -Wno-format-truncation ifdef CONFIG_LTO AR=$(CROSS_PREFIX)gcc-ar -@@ -107,12 +109,15 @@ - DEFINES+=-D__USE_MINGW_ANSI_STDIO # for standard snprintf behavior +@@ -127,7 +129,7 @@ + ifdef CONFIG_COSMO + LDFLAGS+=-s # better to strip by default + else +-LDFLAGS+=-g ++LDFLAGS+= endif - -+DEFINES += -DCONFIG_LIBDIR=\"$(libdir)\" -+ -+CFLAGS+=$(CFLAGS_EXTRA) - CFLAGS+=$(DEFINES) - CFLAGS_DEBUG=$(CFLAGS) -O0 - CFLAGS_SMALL=$(CFLAGS) -Os - CFLAGS_OPT=$(CFLAGS) -O2 - CFLAGS_NOLTO:=$(CFLAGS_OPT) --LDFLAGS=-g -+#LDFLAGS=-g ifdef CONFIG_LTO CFLAGS_SMALL+=-flto - CFLAGS_OPT+=-flto -@@ -157,14 +162,14 @@ - ifdef CONFIG_ASAN - PROGS+= - else --PROGS+=examples/hello examples/hello_module examples/test_fib -+#PROGS+=examples/hello examples/hello_module examples/test_fib - ifndef CONFIG_DARWIN --PROGS+=examples/fib.so examples/point.so -+#PROGS+=examples/fib.so examples/point.so +@@ -176,16 +178,16 @@ + + # examples + ifeq ($(CROSS_PREFIX),) +-PROGS+=examples/hello ++#PROGS+=examples/hello + ifndef CONFIG_ASAN +-PROGS+=examples/hello_module ++#PROGS+=examples/hello_module endif + ifdef CONFIG_SHARED_LIBS +-PROGS+=examples/test_fib examples/fib.so examples/point.so ++#PROGS+=examples/test_fib examples/fib.so examples/point.so endif endif -all: $(OBJDIR) $(OBJDIR)/quickjs.check.o $(OBJDIR)/qjs.check.o $(PROGS) +all: $(OBJDIR) $(OBJDIR)/quickjs.check.o $(OBJDIR)/qjs.check.o $(PROGS) libquickjs.so - QJS_LIB_OBJS=$(OBJDIR)/quickjs.o $(OBJDIR)/libregexp.o $(OBJDIR)/libunicode.o $(OBJDIR)/cutils.o $(OBJDIR)/quickjs-libc.o + QJS_LIB_OBJS=$(OBJDIR)/quickjs.o $(OBJDIR)/libregexp.o $(OBJDIR)/libunicode.o $(OBJDIR)/cutils.o $(OBJDIR)/quickjs-libc.o $(OBJDIR)/libbf.o -@@ -187,6 +192,9 @@ - qjs$(EXE): $(QJS_OBJS) - $(CC) $(LDFLAGS) $(LDEXPORT) -o $@ $^ $(LIBS) +@@ -213,6 +215,9 @@ + qjsc$(EXE): $(OBJDIR)/qjsc.o $(QJS_LIB_OBJS) + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) +libquickjs.so: $(QJS_LIB_OBJS) -+ $(CC) -shared $(LDFLAGS) -fPIC $(LDEXPORT) -o $@ $^ $(LIBS) ++ $(CC) -shared -fPIC $(LDFLAGS) -o $@ $^ $(LIBS) + - qjs-debug$(EXE): $(patsubst %.o, %.debug.o, $(QJS_OBJS)) - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + ifneq ($(CROSS_PREFIX),) -@@ -299,13 +307,15 @@ + $(QJSC): $(OBJDIR)/qjsc.host.o \ +@@ -221,11 +226,11 @@ + + endif #CROSS_PREFIX + +-QJSC_DEFINES:=-DCONFIG_CC=\"$(QJSC_CC)\" -DCONFIG_PREFIX=\"$(PREFIX)\" ++QJSC_DEFINES:=-DCONFIG_CC=\"$(QJSC_CC)\" -DCONFIG_PREFIX=\"$(PREFIX)\" -DCONFIG_LIBDIR=\"$(LIBDIR)\" + ifdef CONFIG_LTO + QJSC_DEFINES+=-DCONFIG_LTO + endif +-QJSC_HOST_DEFINES:=-DCONFIG_CC=\"$(HOST_CC)\" -DCONFIG_PREFIX=\"$(PREFIX)\" ++QJSC_HOST_DEFINES:=-DCONFIG_CC=\"$(HOST_CC)\" -DCONFIG_PREFIX=\"$(PREFIX)\" -DCONFIG_LIBDIR=\"$(LIBDIR)\" + + $(OBJDIR)/qjsc.o: CFLAGS+=$(QJSC_DEFINES) + $(OBJDIR)/qjsc.host.o: CFLAGS+=$(QJSC_HOST_DEFINES) +@@ -319,14 +324,12 @@ install: all - mkdir -p "$(DESTDIR)$(prefix)/bin" + mkdir -p "$(DESTDIR)$(PREFIX)/bin" - $(STRIP) qjs qjsc + $(STRIP) qjs qjsc libquickjs.so - install -m755 qjs qjsc "$(DESTDIR)$(prefix)/bin" - ln -sf qjs "$(DESTDIR)$(prefix)/bin/qjscalc" -- mkdir -p "$(DESTDIR)$(prefix)/lib/quickjs" -- install -m644 libquickjs.a "$(DESTDIR)$(prefix)/lib/quickjs" -+ mkdir -p "$(DESTDIR)/$(libdir)/quickjs" -+ install -m644 libquickjs.a "$(DESTDIR)/$(libdir)/quickjs" -+ install -m644 libquickjs.so "$(DESTDIR)/$(libdir)/quickjs" -+ ln -s quickjs/libquickjs.so "$(DESTDIR)/$(libdir)/libquickjs.so" - ifdef CONFIG_LTO -- install -m644 libquickjs.lto.a "$(DESTDIR)$(prefix)/lib/quickjs" -+ install -m644 libquickjs.lto.a "$(DESTDIR)/$(libdir)/quickjs" - endif - mkdir -p "$(DESTDIR)$(prefix)/include/quickjs" - install -m644 quickjs.h quickjs-libc.h "$(DESTDIR)$(prefix)/include/quickjs" + install -m755 qjs qjsc "$(DESTDIR)$(PREFIX)/bin" + ln -sf qjs "$(DESTDIR)$(PREFIX)/bin/qjscalc" +- mkdir -p "$(DESTDIR)$(PREFIX)/lib/quickjs" +- install -m644 libquickjs.a "$(DESTDIR)$(PREFIX)/lib/quickjs" +-ifdef CONFIG_LTO +- install -m644 libquickjs.lto.a "$(DESTDIR)$(PREFIX)/lib/quickjs" +-endif ++ mkdir -p "$(DESTDIR)$(LIBDIR)/quickjs" ++ install -m644 libquickjs.a "$(DESTDIR)$(LIBDIR)/quickjs" ++ install -m755 libquickjs.so "$(DESTDIR)$(LIBDIR)" + mkdir -p "$(DESTDIR)$(PREFIX)/include/quickjs" + install -m644 quickjs.h quickjs-libc.h "$(DESTDIR)$(PREFIX)/include/quickjs" + diff --git a/development/quickjs/patches/02-qjsc.c.patch b/development/quickjs/patches/02-qjsc.c.patch index fb1bb58d4e54..13d725fba299 100644 --- a/development/quickjs/patches/02-qjsc.c.patch +++ b/development/quickjs/patches/02-qjsc.c.patch @@ -1,7 +1,7 @@ This is a simple patch to compile on 64 bit systems. ---- quickjs-2021-03-27/qjsc.c 2021-03-27 07:00:32.000000000 -0300 -+++ quickjs-2021-03-27-modified/qjsc.c 2022-07-31 19:54:12.464023282 -0300 -@@ -420,7 +420,7 @@ +--- quickjs-2024-01-13/qjsc.c 2024-01-13 07:20:39.000000000 -0300 ++++ quickjs-2024-01-13m/qjsc.c 2024-02-04 01:43:19.516094810 -0300 +@@ -419,7 +419,7 @@ pstrcpy(lib_dir, sizeof(lib_dir), exe_dir); } else { snprintf(inc_dir, sizeof(inc_dir), "%s/include/quickjs", CONFIG_PREFIX); diff --git a/development/quickjs/quickjs.SlackBuild b/development/quickjs/quickjs.SlackBuild index 66a73604abb8..c798c85dd9cc 100644 --- a/development/quickjs/quickjs.SlackBuild +++ b/development/quickjs/quickjs.SlackBuild @@ -25,10 +25,11 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=quickjs -VERSION=${VERSION:-20210327} +VERSION=${VERSION:-2024.01.13} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +SRCVERSION=${VERSION//./-} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -67,8 +68,8 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-2021-03-27.tar.xz -mv $PRGNAM-2021-03-27 $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.xz +mv $PRGNAM-$SRCVERSION $PRGNAM-$VERSION cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -83,8 +84,8 @@ patch -p1 < $CWD/patches/02-qjsc.c.patch || exit 1; make install \ DESTDIR=$PKG \ CFLAGS_EXTRA="$SLKCFLAGS" \ - prefix=/usr \ - libdir=/usr/lib${LIBDIRSUFFIX} + PREFIX=/usr \ + LIBDIR=/usr/lib${LIBDIRSUFFIX} mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples cp -a \ diff --git a/development/quickjs/quickjs.info b/development/quickjs/quickjs.info index 2adcb2495cc0..2f902dfab391 100644 --- a/development/quickjs/quickjs.info +++ b/development/quickjs/quickjs.info @@ -1,8 +1,8 @@ PRGNAM="quickjs" -VERSION="20210327" +VERSION="2024.01.13" HOMEPAGE="https://bellard.org/quickjs" -DOWNLOAD="https://bellard.org/quickjs/quickjs-2021-03-27.tar.xz" -MD5SUM="135182a626aa0c87a49aa2bf58fd39bf" +DOWNLOAD="https://bellard.org/quickjs/quickjs-2024-01-13.tar.xz" +MD5SUM="ea9fa8c503c4125dff9fd42c38b891d0" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" |