1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 13:29:49 +00:00

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>
This commit is contained in:
Stefan Herbrechtsmeier
2021-10-08 09:48:24 +02:00
committed by Richard Purdie
parent 7a17e14be9
commit a4acb5472e
+4 -1
View File
@@ -22,6 +22,8 @@ inherit python3native
DEPENDS:prepend = "nodejs-native " DEPENDS:prepend = "nodejs-native "
RDEPENDS:${PN}:append:class-target = " nodejs" RDEPENDS:${PN}:append:class-target = " nodejs"
EXTRA_OENPM = ""
NPM_INSTALL_DEV ?= "0" NPM_INSTALL_DEV ?= "0"
def npm_target_arch_map(target_arch): def npm_target_arch_map(target_arch):
@@ -260,7 +262,8 @@ python npm_do_compile() {
# Pack and install the main package # Pack and install the main package
tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir) 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() { npm_do_install() {