mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 00:32:14 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
36965547e3
commit
9f452b4831
@@ -26,6 +26,8 @@ EXTRA_OENPM = ""
|
||||
|
||||
NPM_INSTALL_DEV ?= "0"
|
||||
|
||||
NPM_NODEDIR ?= "${RECIPE_SYSROOT_NATIVE}${prefix_native}"
|
||||
|
||||
def npm_target_arch_map(target_arch):
|
||||
"""Maps arch names to npm arch names"""
|
||||
import re
|
||||
@@ -249,11 +251,7 @@ python npm_do_compile() {
|
||||
# Add node-gyp configuration
|
||||
configs.append(("arch", d.getVar("NPM_ARCH")))
|
||||
configs.append(("release", "true"))
|
||||
nodedir = d.getVar("NPM_NODEDIR")
|
||||
if not nodedir:
|
||||
sysroot = d.getVar("RECIPE_SYSROOT_NATIVE")
|
||||
nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/"))
|
||||
configs.append(("nodedir", nodedir))
|
||||
configs.append(("nodedir", d.getVar("NPM_NODEDIR")))
|
||||
configs.append(("python", d.getVar("PYTHON")))
|
||||
|
||||
# Add node-pre-gyp configuration
|
||||
|
||||
Reference in New Issue
Block a user