summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>2021-10-08 09:48:33 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-14 11:48:45 +0100
commit9f452b48310a28f3471b17cc1085587c48e86c3b (patch)
treea01bdb7078207749a9504a15e9c1e19eb5a39f87 /meta
parent36965547e344eb9ac947062075bbe58e5e9b623c (diff)
downloadpoky-9f452b48310a28f3471b17cc1085587c48e86c3b.tar.gz
npm: Add variable NPM_NODEDIR with default value
Replace the variable NPM_NODEDIR fallback to a default value inside the code with a variable NPM_NODEDIR with default value. (From OE-Core rev: f0a47afb43bd63b66c565ba3d084e20d6725495e) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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