diff options
author | Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> | 2020-01-24 18:07:35 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-27 16:38:54 +0000 |
commit | dc4dda4d459ef66246cb7fb6f7d667c982707544 (patch) | |
tree | c272a471e58523787f2e7f1d0dfdf167a374047e /meta | |
parent | 946fd69cba6f60c531ff34091cda3b7fee8ee594 (diff) | |
download | openembedded-core-contrib-dc4dda4d459ef66246cb7fb6f7d667c982707544.tar.gz |
classes/npm: force to rebuild the prebuild addons
This commit forces to rebuild the prebuild addons which are using
node-gyp-build.
https://www.npmjs.com/package/node-gyp-build
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.bbclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass index b7c9c40811..068032a1e5 100644 --- a/meta/classes/npm.bbclass +++ b/meta/classes/npm.bbclass @@ -216,6 +216,7 @@ python npm_do_compile() { dev = bb.utils.to_boolean(d.getVar("NPM_INSTALL_DEV"), False) with tempfile.TemporaryDirectory() as tmpdir: + args = [] configs = [] if dev: @@ -240,9 +241,13 @@ python npm_do_compile() { pythondir = os.path.join(bindir, "python-native", "python") configs.append(("python", pythondir)) + # Add node-pre-gyp configuration + args.append(("target_arch", d.getVar("NPM_ARCH"))) + args.append(("build-from-source", "true")) + # Pack and install the main package tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir) - env.run("npm install %s" % shlex.quote(tarball), configs=configs) + env.run("npm install %s" % shlex.quote(tarball), args=args, configs=configs) } npm_do_install() { |