interpreters/quickjs/Makefile: fix the build with Make

QUICKJS_URL_BASE in Cmakefile and Makefile was not the same.
Updated the correct url in Makefile.

fix https://github.com/apache/nuttx/issues/15712

To avoid future breakage, used the URL with last commit ID

Current version 2024-02-14 as found in the VERSION file https://github.com/bellard/quickjs/blob/master/VERSION

Signed-off-by: simbit18 <simbit18@gmail.com>
This commit is contained in:
simbit18 2025-02-12 14:52:43 +01:00 committed by Alan C. Assis
parent 751c4efe7f
commit 71ff60753c

View file

@ -22,11 +22,11 @@
include $(APPDIR)/Make.defs
QUICKJS_VERSION = 2020-11-08
QUICKJS_UNPACK = quickjs
QUICKJS_TARBALL = quickjs-$(QUICKJS_VERSION).tar.xz
QUICKJS_URL_BASE = https://bellard.org/quickjs/
QUICKJS_URL = $(QUICKJS_URL_BASE)/$(QUICKJS_TARBALL)
QUICKJS_VERSION = 2024-02-14
QUICKJS_COMMIT_ID = 6e2e68fd0896957f92eb6c242a2e048c1ef3cae0
QUICKJS_UNPACK = quickjs
QUICKJS_ARCHIVE = $(QUICKJS_COMMIT_ID).zip
QUICKJS_URL = https://github.com/bellard/quickjs/archive/$(QUICKJS_ARCHIVE)
CSRCS = quickjs.c libregexp.c libbf.c libunicode.c cutils.c
@ -63,27 +63,16 @@ STACKSIZE = $(CONFIG_INTERPRETERS_QUICKJS_STACKSIZE)
MODULE = $(CONFIG_INTERPRETERS_QUICKJS)
endif
$(QUICKJS_TARBALL):
$(Q) echo "Downloading $(QUICKJS_TARBALL)"
$(Q) curl -O -L $(QUICKJS_URL)
$(QUICKJS_ARCHIVE):
$(Q) echo "Downloading $(QUICKJS_ARCHIVE)"
$(Q) curl -L $(QUICKJS_URL) -o quickjs-$(QUICKJS_ARCHIVE)
$(QUICKJS_UNPACK): $(QUICKJS_TARBALL)
$(Q) echo "Unpacking $(QUICKJS_TARBALL) to $(QUICKJS_UNPACK)"
$(Q) tar -Jxf $(QUICKJS_TARBALL)
$(Q) mv quickjs-$(QUICKJS_VERSION) $(QUICKJS_UNPACK)
$(QUICKJS_UNPACK): $(QUICKJS_ARCHIVE)
$(Q) echo "Unpacking quickjs-$(QUICKJS_ARCHIVE) to $(QUICKJS_UNPACK)"
$(Q) unzip -q -o quickjs-$(QUICKJS_ARCHIVE)
$(Q) mv quickjs-$(QUICKJS_COMMIT_ID) $(QUICKJS_UNPACK)
$(Q) patch -d $(QUICKJS_UNPACK) -p1 < 0001-Disabled-unsupported-feature-on-NuttX.patch
$(QUICKJS_UNPACK)/.patch: $(QUICKJS_UNPACK)
$(Q) touch $(QUICKJS_UNPACK)/.patch
# Download and unpack tarball if no git repo found
ifeq ($(wildcard $(QUICKJS_UNPACK)/.git),)
QUICKJS_DOWNLOAD=$(QUICKJS_UNPACK)/.patch
distclean::
$(call DELDIR, $(QUICKJS_UNPACK))
$(call DELFILE, $(QUICKJS_TARBALL))
endif
ifeq ($(CONFIG_INTERPRETERS_QUICKJS_MINI),y)
MAINSRC = qjsmini.c
endif
@ -91,14 +80,21 @@ endif
ifeq ($(CONFIG_INTERPRETERS_QUICKJS_FULL),y)
CSRCS += quickjs-libc.c repl.c
MAINSRC = qjs.c
context:: $(QUICKJS_DOWNLOAD)
endif
# Download and unpack zipball if no archive found
ifeq ($(wildcard $(QUICKJS_UNPACK)/.*),)
ifeq ($(CONFIG_INTERPRETERS_QUICKJS_FULL),y)
context:: $(QUICKJS_UNPACK)
$(MAKE) -C $(QUICKJS_UNPACK) \
CONFIG_BIGNUM=$(CONFIG_INTERPRETERS_QUICKJS_BIGNUM)
else
context:: $(QUICKJS_DOWNLOAD)
context:: $(QUICKJS_UNPACK)
endif
endif
clean::
$(Q) test ! -d $(QUICKJS_UNPACK) || $(MAKE) -C $(QUICKJS_UNPACK) clean
distclean::
$(call DELDIR, $(QUICKJS_UNPACK))
$(call DELFILE, $(QUICKJS_ARCHIVE))
include $(APPDIR)/Application.mk