summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>2020-01-24 18:07:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-27 16:48:09 +0000
commitba5d030b6240db58c0cdefc46a9ee42f1583b694 (patch)
treead5aad938035bb6ef421289d201be53dc0b7d1b0 /meta
parent8f39026f1acee0a13c1ebc405a195c2879a0e604 (diff)
downloadpoky-ba5d030b6240db58c0cdefc46a9ee42f1583b694.tar.gz
classes/npm: use the local node headers
When building addons, the node headers are needed to be able to compile properly. Usually they are downloaded by npm but network access in the do_compile task are unauthorized. Hopefully the local node headers are available in the native sysroot so lets use them. (From OE-Core rev: e4c111dacc808d8c7883f3a36dd5a9f65e7a44cc) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/npm.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass
index cf2c12047e..88d8de91e9 100644
--- a/meta/classes/npm.bbclass
+++ b/meta/classes/npm.bbclass
@@ -233,6 +233,9 @@ python npm_do_compile() {
233 # Add node-gyp configuration 233 # Add node-gyp configuration
234 configs.append(("arch", d.getVar("NPM_ARCH"))) 234 configs.append(("arch", d.getVar("NPM_ARCH")))
235 configs.append(("release", "true")) 235 configs.append(("release", "true"))
236 sysroot = d.getVar("RECIPE_SYSROOT_NATIVE")
237 nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/"))
238 configs.append(("nodedir", nodedir))
236 239
237 # Pack and install the main package 240 # Pack and install the main package
238 tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir) 241 tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir)