Skip to contentSkip to conversation

package/quickjs: new package

PATCH New Francois Perrad 2 participants 2 messages Nov 6, 2020 – Nov 7, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/quickjs: new package

---
 package/Config.in            |  1 +
 package/quickjs/Config.in    | 15 +++++++++++++++
 package/quickjs/quickjs.hash |  2 ++
 package/quickjs/quickjs.mk   | 37 ++++++++++++++++++++++++++++++++++++
 4 files changed, 55 insertions(+)
 create mode 100644 package/quickjs/Config.in
 create mode 100644 package/quickjs/quickjs.hash
 create mode 100644 package/quickjs/quickjs.mk
package/Config.in +1 -0
index 016a99ed1..8fcea0643 100644
@@ -1245,6 +1245,7 @@ menu "External python modules"
 	source "package/python-zope-interface/Config.in"
 endmenu
 endif
+	source "package/quickjs/Config.in"
 	source "package/ruby/Config.in"
 	source "package/tcl/Config.in"
 if BR2_PACKAGE_TCL
package/quickjs/Config.in new file +15 -0
new file mode 100644
index 000000000..89346ceff
@@ -0,0 +1,15 @@
+
+config BR2_PACKAGE_QUICKJS
+	bool "quickjs"
+	depends on !BR2_STATIC_LIBS
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC # No way to check for fenv support.
+	depends on BR2_USE_MMU # fork()
+	help
+	  QuickJS is a small and embeddable Javascript engine.
+	  It supports the ES2020 specification including modules,
+	  asynchronous generators, proxies and BigInt.
+
+	  https://bellard.org/quickjs/
+
+comment "quickjs needs a glibc or musl toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_UCLIBC
package/quickjs/quickjs.hash new file +2 -0
new file mode 100644
index 000000000..076e4bddb
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  0021a3e8cdc6b61e225411d05e2841d2437e1ccf4b4cabb9a5f7685ebfb57717  quickjs-2020-09-06.tar.xz
package/quickjs/quickjs.mk new file +37 -0
new file mode 100644
index 000000000..557ffb196
@@ -0,0 +1,37 @@
+################################################################################
+#
+# quickjs
+#
+################################################################################
+
+QUICKJS_VERSION = 2020-09-06
+QUICKJS_SOURCE = quickjs-$(QUICKJS_VERSION).tar.xz
+QUICKJS_SITE = https://bellard.org/quickjs
+QUICKJS_LICENSE = MIT
+QUICKJS_INSTALL_STAGING = YES
+
+define QUICKJS_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+		CROSS_PREFIX="$(TARGET_CROSS)" \
+		all
+endef
+
+define QUICKJS_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+		CROSS_PREFIX="$(TARGET_CROSS)" \
+		DESTDIR=$(STAGING_DIR) \
+		STRIP=/bin/true \
+		prefix=/usr \
+		install
+endef
+
+define QUICKJS_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+		CROSS_PREFIX="$(TARGET_CROSS)" \
+		DESTDIR=$(TARGET_DIR) \
+		STRIP=/bin/true \
+		prefix=/usr \
+		install
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.27.0
#1 lore raw

PATCH v2 1/1 package/quickjs: new package

Quoted 10 lines · On Fri, 6 Nov 2020 23:51:14 +0100 Francois Perrad <[email protected]> wrote:
---
 package/Config.in            |  1 +
 package/quickjs/Config.in    | 15 +++++++++++++++
 package/quickjs/quickjs.hash |  2 ++
 package/quickjs/quickjs.mk   | 37 ++++++++++++++++++++++++++++++++++++
 4 files changed, 55 insertions(+)
 create mode 100644 package/quickjs/Config.in
 create mode 100644 package/quickjs/quickjs.hash
 create mode 100644 package/quickjs/quickjs.mk

The entry in the DEVELOPERS file was missing.

package/quickjs/Config.in line 1

Quoted 7 lines
package/quickjs/Config.in new file +1 -0
new file mode 100644
index 000000000..89346ceff
@@ -0,0 +1,15 @@
+

Spurious empty line.

package/quickjs/Config.in line 14

Quoted 13 lines
package/quickjs/Config.in new file +13 -0
+config BR2_PACKAGE_QUICKJS
+	bool "quickjs"
+	depends on !BR2_STATIC_LIBS
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC # No way to check for fenv support.
+	depends on BR2_USE_MMU # fork()
+	help
+	  QuickJS is a small and embeddable Javascript engine.
+	  It supports the ES2020 specification including modules,
+	  asynchronous generators, proxies and BigInt.
+
+	  https://bellard.org/quickjs/
+
+comment "quickjs needs a glibc or musl toolchain w/ dynamic library"

depends on BR2_USE_MMU

was missing here.

package/quickjs/Config.in line 15

Quoted 1 line
package/quickjs/Config.in new file +1 -0
+	depends on BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_UCLIBC

Applied to next after fixing those details. Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com