package/nodejs: expose capability to compile host library
PATCH 1/1 package/nodejs: expose capability to compile host library
From: Linus Kaschulla <[email protected]>
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 show the possibility to create a host package. But upon further examination I noticed that the package does it in fact (in the .mk). It specifies dependencies for the package with the host prefix and also invokes $(host-generic-package) as well as $(generic-package) which is the only one assumed from the config.
With this change other packages can require BR2_PACKAGE_HOST_NODEJS without any problems or the buildsystem not fully knowing about this. Seems that someone added the capability (as a step for the cross- compiled nodejs) and didn't notice that this is a handy package by itself.
When installing global npm packages (with -g), the parameter --prefix $(HOST_DIR) can be used to ensure that nodejs doesn't try to install it onto the real host filesystem.
I already used this change to create static web files from Angular and place onto a target that doesn't need nodejs itself.
This patch contains fixes based on feedback from:
- Peter Seiderer <[email protected]>
- Yann E. MORIN <[email protected]>
--- package/Config.in.host | 1 + package/nodejs/Config.in.host | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 package/nodejs/Config.in.host
package/Config.in.host +1 -0
@@ -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"
package/nodejs/Config.in.host new file +2 -0
@@ -0,0 +1,2 @@ +config BR2_PACKAGE_HOST_NODEJS + bool "host nodejs"
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot