package/nodejs: install to staging
authorYegor Yefremov <yegorslists@googlemail.com>
Mon, 8 Jun 2020 10:32:10 +0000 (12:32 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 10 Jun 2020 21:22:55 +0000 (23:22 +0200)
Install header files and libraries into the staging area. Some
packages like mraa (if enabled for Node.js) search for node.h
and v8.h. Hence, Node.js development file must be installed to
the staging area.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/nodejs/nodejs.mk

index 37d787722619cbc3210bac94a815e367bc609217..3f35ac7c33293d19dc8aebcd0448777913e24929 100644 (file)
@@ -11,6 +11,7 @@ NODEJS_DEPENDENCIES = host-python host-nodejs c-ares \
        libuv zlib nghttp2 \
        $(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS))
 HOST_NODEJS_DEPENDENCIES = host-libopenssl host-python host-zlib
+NODEJS_INSTALL_STAGING = YES
 NODEJS_LICENSE = MIT (core code); MIT, Apache and BSD family licenses (Bundled components)
 NODEJS_LICENSE_FILES = LICENSE
 
@@ -215,6 +216,17 @@ define NODEJS_INSTALL_MODULES
 endef
 endif
 
+define NODEJS_INSTALL_STAGING_CMDS
+       $(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
+               $(MAKE) -C $(@D) install \
+               DESTDIR=$(STAGING_DIR) \
+               $(TARGET_CONFIGURE_OPTS) \
+               NO_LOAD=cctest.target.mk \
+               PATH=$(@D)/bin:$(BR_PATH) \
+               LDFLAGS="$(NODEJS_LDFLAGS)" \
+               LD="$(TARGET_CXX)"
+endef
+
 define NODEJS_INSTALL_TARGET_CMDS
        $(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
                $(MAKE) -C $(@D) install \