summaryrefslogtreecommitdiffstats
path: root/meta/classes/npm.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/npm.bbclass')
-rw-r--r--meta/classes/npm.bbclass8
1 files changed, 3 insertions, 5 deletions
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass
index 477b40d921..05bb9f578d 100644
--- a/meta/classes/npm.bbclass
+++ b/meta/classes/npm.bbclass
@@ -26,6 +26,8 @@ EXTRA_OENPM = ""
26 26
27NPM_INSTALL_DEV ?= "0" 27NPM_INSTALL_DEV ?= "0"
28 28
29NPM_NODEDIR ?= "${RECIPE_SYSROOT_NATIVE}${prefix_native}"
30
29def npm_target_arch_map(target_arch): 31def npm_target_arch_map(target_arch):
30 """Maps arch names to npm arch names""" 32 """Maps arch names to npm arch names"""
31 import re 33 import re
@@ -249,11 +251,7 @@ python npm_do_compile() {
249 # Add node-gyp configuration 251 # Add node-gyp configuration
250 configs.append(("arch", d.getVar("NPM_ARCH"))) 252 configs.append(("arch", d.getVar("NPM_ARCH")))
251 configs.append(("release", "true")) 253 configs.append(("release", "true"))
252 nodedir = d.getVar("NPM_NODEDIR") 254 configs.append(("nodedir", d.getVar("NPM_NODEDIR")))
253 if not nodedir:
254 sysroot = d.getVar("RECIPE_SYSROOT_NATIVE")
255 nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/"))
256 configs.append(("nodedir", nodedir))
257 configs.append(("python", d.getVar("PYTHON"))) 255 configs.append(("python", d.getVar("PYTHON")))
258 256
259 # Add node-pre-gyp configuration 257 # Add node-pre-gyp configuration