Browse Source

package/nodejs: add visible option to build host-nodejs

To use nodejs on the host (independant of the actual system) to create
some static files to place onto the target rootfs nodejs can be very
helpful.

The provided nodejs package didn't expose the possibility to create a
host package, which this commit adds.

This patch contains fixes based on feedback from:
- Peter Seiderer <ps.report@gmx.net>
- Yann E. MORIN <yann.morin.1998@free.fr>

Signed-off-by: Linus Kaschulla <linus@cosmos-ink.net>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Linus Kaschulla 3 years ago
parent
commit
78d7c5f803
3 changed files with 15 additions and 5 deletions
  1. 1 0
      package/Config.in.host
  2. 1 5
      package/nodejs/Config.in
  3. 13 0
      package/nodejs/Config.in.host

+ 1 - 0
package/Config.in.host

@@ -56,6 +56,7 @@ menu "Host utilities"
 	source "package/mtd/Config.in.host"
 	source "package/mtools/Config.in.host"
 	source "package/mxsldr/Config.in.host"
+	source "package/nodejs/Config.in.host"
 	source "package/odb/Config.in.host"
 	source "package/omap-u-boot-utils/Config.in.host"
 	source "package/openocd/Config.in.host"

+ 1 - 5
package/nodejs/Config.in

@@ -27,11 +27,7 @@ config BR2_PACKAGE_NODEJS
 	# uses dlopen(). On ARMv5, we could technically support static
 	# linking, but that's too much of a corner case to support it.
 	depends on !BR2_STATIC_LIBS
-	select BR2_PACKAGE_HOST_PYTHON3
-	select BR2_PACKAGE_HOST_PYTHON3_BZIP2
-	select BR2_PACKAGE_HOST_PYTHON3_SSL
-	select BR2_PACKAGE_HOST_QEMU
-	select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
+	select BR2_PACKAGE_HOST_NODEJS
 	select BR2_PACKAGE_C_ARES
 	select BR2_PACKAGE_LIBUV
 	select BR2_PACKAGE_ZLIB

+ 13 - 0
package/nodejs/Config.in.host

@@ -0,0 +1,13 @@
+config BR2_PACKAGE_HOST_NODEJS
+	bool "host nodejs"
+	depends on BR2_HOST_GCC_AT_LEAST_7
+	select BR2_PACKAGE_HOST_PYTHON3
+	select BR2_PACKAGE_HOST_PYTHON3_BZIP2
+	select BR2_PACKAGE_HOST_PYTHON3_SSL
+	select BR2_PACKAGE_HOST_QEMU
+	select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
+	help
+	  Event-driven I/O server-side JavaScript environment based on
+	  V8.
+
+	  http://nodejs.org/