diff options
author | Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> | 2021-10-08 09:48:24 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-14 11:48:45 +0100 |
commit | a4acb5472e8ce50d6d9bf0750bb4773e7a4045e3 (patch) | |
tree | 8fbc504e1f4e5cd9b8e55a6cc882ca5b9a916cbb /meta/classes/npm.bbclass | |
parent | 7a17e14be9bfa2ed8ff179b95e6b51b2e387e2ac (diff) | |
download | poky-a4acb5472e8ce50d6d9bf0750bb4773e7a4045e3.tar.gz |
npm: Add support for EXTRA_OENPM arguments
Add support for EXTRA_OENPM arguments to set node-gyp variables for
example. This allows use of shared librariess, avoid download
of external sources or build from source.
(From OE-Core rev: 9b22b50b77a5979934193e9affbe47a05d763777)
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/classes/npm.bbclass')
-rw-r--r-- | meta/classes/npm.bbclass | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass index 91a2321116..477b40d921 100644 --- a/meta/classes/npm.bbclass +++ b/meta/classes/npm.bbclass | |||
@@ -22,6 +22,8 @@ inherit python3native | |||
22 | DEPENDS:prepend = "nodejs-native " | 22 | DEPENDS:prepend = "nodejs-native " |
23 | RDEPENDS:${PN}:append:class-target = " nodejs" | 23 | RDEPENDS:${PN}:append:class-target = " nodejs" |
24 | 24 | ||
25 | EXTRA_OENPM = "" | ||
26 | |||
25 | NPM_INSTALL_DEV ?= "0" | 27 | NPM_INSTALL_DEV ?= "0" |
26 | 28 | ||
27 | def npm_target_arch_map(target_arch): | 29 | def npm_target_arch_map(target_arch): |
@@ -260,7 +262,8 @@ python npm_do_compile() { | |||
260 | 262 | ||
261 | # Pack and install the main package | 263 | # Pack and install the main package |
262 | tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir) | 264 | tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir) |
263 | env.run("npm install %s" % shlex.quote(tarball), args=args, configs=configs) | 265 | cmd = "npm install %s %s" % (shlex.quote(tarball), d.getVar("EXTRA_OENPM")) |
266 | env.run(cmd, args=args, configs=configs) | ||
264 | } | 267 | } |
265 | 268 | ||
266 | npm_do_install() { | 269 | npm_do_install() { |