mirror of
https://git.yoctoproject.org/poky
synced 2026-03-19 13:49:41 +01:00
npm.bbclass: Allow nodedir to be overridden by NPM_NODEDIR
Node modules may need to be built against multiple Node versions. Setting nodedir in the NPM configuration stops older ways of doing this, such as setting npm_config_target and npm_config_disturl, from working. (From OE-Core rev: 14795ee305f3c11fcc31cc7ca815b8ff1020e29a) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
436662bc4d
commit
bac39de14e
@@ -247,8 +247,10 @@ python npm_do_compile() {
|
||||
# Add node-gyp configuration
|
||||
configs.append(("arch", d.getVar("NPM_ARCH")))
|
||||
configs.append(("release", "true"))
|
||||
sysroot = d.getVar("RECIPE_SYSROOT_NATIVE")
|
||||
nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/"))
|
||||
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(("python", d.getVar("PYTHON")))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user