[OE-core] [PATCH 01/12] npm: Add support for EXTRA_OENPM arguments

2021-10-08 Thread Stefan Herbrechtsmeier
From: Stefan Herbrechtsmeier 

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 
---

(no changes since v1)

 meta/classes/npm.bbclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

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() {
-- 
2.20.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156748): 
https://lists.openembedded.org/g/openembedded-core/message/156748
Mute This Topic: https://lists.openembedded.org/mt/86141407/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 01/12] npm: Add support for EXTRA_OENPM arguments

2021-10-07 Thread Stefan Herbrechtsmeier
From: Stefan Herbrechtsmeier 

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 
---

 meta/classes/npm.bbclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

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() {
-- 
2.20.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156709): 
https://lists.openembedded.org/g/openembedded-core/message/156709
Mute This Topic: https://lists.openembedded.org/mt/86141407/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-