buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/nodejs: build host-nodejs only if we're installing modules with NPM
@ 2022-09-25  8:19 Thomas Petazzoni
  2022-10-11 18:53 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2022-09-25  8:19 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=1facb09b94bf806b301868539185c0ff9ddffee2
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Building host-nodejs is no longer needed to build the target nodejs,
unless npm is needed during the build, which happens when
BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL is used.

We need to make that host-python3 is built with bz2 and ssl
support. Until now, it was done by the BR2_PACKAGE_HOST_NODEJS option,
but now that the target nodejs no longer depends on host-nodejs, we
are no longer guaranteed to have a host-python3 with bz2/ssl. To make
sure it is the case, we select the relevant options from
BR2_PACKAGE_NODEJS.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/nodejs/Config.in | 5 ++++-
 package/nodejs/nodejs.mk | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in
index 016aeb4e1a..8d0bd8fd60 100644
--- a/package/nodejs/Config.in
+++ b/package/nodejs/Config.in
@@ -27,7 +27,10 @@ config BR2_PACKAGE_NODEJS
 	# uses dlopen(). On ARMv5, we could technically support static
 	# linking, but that's too much of a corner case to support it.
 	depends on !BR2_STATIC_LIBS
-	select BR2_PACKAGE_HOST_NODEJS
+	select BR2_PACKAGE_HOST_NODEJS if BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL != ""
+	select BR2_PACKAGE_HOST_PYTHON3
+	select BR2_PACKAGE_HOST_PYTHON3_BZIP2
+	select BR2_PACKAGE_HOST_PYTHON3_SSL
 	select BR2_PACKAGE_C_ARES
 	select BR2_PACKAGE_LIBUV
 	select BR2_PACKAGE_ZLIB
diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
index 92a9493e25..e9fe96812f 100644
--- a/package/nodejs/nodejs.mk
+++ b/package/nodejs/nodejs.mk
@@ -8,7 +8,6 @@ NODEJS_VERSION = 16.16.0
 NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.xz
 NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
 NODEJS_DEPENDENCIES = \
-	host-nodejs \
 	host-ninja \
 	host-pkgconf \
 	host-python3 \
@@ -240,6 +239,7 @@ NPM = $(TARGET_CONFIGURE_OPTS) \
 # We can only call NPM if there's something to install.
 #
 ifneq ($(NODEJS_MODULES_LIST),)
+NODEJS_DEPENDENCIES += host-nodejs
 define NODEJS_INSTALL_MODULES
 	# If you're having trouble with module installation, adding -d to the
 	# npm install call below and setting npm_config_rollback=false can both
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [git commit] package/nodejs: build host-nodejs only if we're installing modules with NPM
  2022-09-25  8:19 [Buildroot] [git commit] package/nodejs: build host-nodejs only if we're installing modules with NPM Thomas Petazzoni
@ 2022-10-11 18:53 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2022-10-11 18:53 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > commit: https://git.buildroot.net/buildroot/commit/?id=1facb09b94bf806b301868539185c0ff9ddffee2
 > branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

 > Building host-nodejs is no longer needed to build the target nodejs,
 > unless npm is needed during the build, which happens when
 > BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL is used.

 > We need to make that host-python3 is built with bz2 and ssl
 > support. Until now, it was done by the BR2_PACKAGE_HOST_NODEJS option,
 > but now that the target nodejs no longer depends on host-nodejs, we
 > are no longer guaranteed to have a host-python3 with bz2/ssl. To make
 > sure it is the case, we select the relevant options from
 > BR2_PACKAGE_NODEJS.

 > Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2022.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-11 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-25  8:19 [Buildroot] [git commit] package/nodejs: build host-nodejs only if we're installing modules with NPM Thomas Petazzoni
2022-10-11 18:53 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).