summaryrefslogtreecommitdiffstats
path: root/meta/classes
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:35 +0100
commit9b22b50b77a5979934193e9affbe47a05d763777 (patch)
tree296de0d4643d273fc8d7e9ac7b621a156cb41942 /meta/classes
parentc227daf3c40666ea8f2b28bd1006633f5efb4692 (diff)
downloadopenembedded-core-9b22b50b77a5979934193e9affbe47a05d763777.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. 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')
-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
DEPENDS:prepend = "nodejs-native "
RDEPENDS:${PN}:append:class-target = " nodejs"
+EXTRA_OENPM = ""
+
NPM_INSTALL_DEV ?= "0"
def npm_target_arch_map(target_arch):
@@ -260,7 +262,8 @@ python npm_do_compile() {
# Pack and install the main package
tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir)
- env.run("npm install %s" % shlex.quote(tarball), args=args, configs=configs)
+ cmd = "npm install %s %s" % (shlex.quote(tarball), d.getVar("EXTRA_OENPM"))
+ env.run(cmd, args=args, configs=configs)
}
npm_do_install() {