summaryrefslogtreecommitdiffstats
path: root/meta/classes/npm.bbclass
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>2021-10-08 09:48:24 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-14 11:48:45 +0100
commita4acb5472e8ce50d6d9bf0750bb4773e7a4045e3 (patch)
tree8fbc504e1f4e5cd9b8e55a6cc882ca5b9a916cbb /meta/classes/npm.bbclass
parent7a17e14be9bfa2ed8ff179b95e6b51b2e387e2ac (diff)
downloadpoky-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.bbclass5
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
22DEPENDS:prepend = "nodejs-native " 22DEPENDS:prepend = "nodejs-native "
23RDEPENDS:${PN}:append:class-target = " nodejs" 23RDEPENDS:${PN}:append:class-target = " nodejs"
24 24
25EXTRA_OENPM = ""
26
25NPM_INSTALL_DEV ?= "0" 27NPM_INSTALL_DEV ?= "0"
26 28
27def npm_target_arch_map(target_arch): 29def 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
266npm_do_install() { 269npm_do_install() {