buildroot/package/nodejs/Config.in.host
Thomas Petazzoni 0fd6954fcb package/nodejs/nodejs-bin: new provider of host-nodejs
This package downloads the pre-built version of nodejs, if the host
platform supports it.

Reuse the variables defined in nodejs.mk.

For the definition of BR2_PACKAGE_PROVIDES_HOST_NODEJS, take care of
defaulting to host-nodejs-bin if host-nodejs is not selected at all.
This makes sure that in the future we will be able to run 'make
foo-source' for a package that uses nodejs vendoring, and it will use
the prebuilt nodejs to perform the vendoring.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Arnout:
 - update to 16.20.0 to match nodejs.mk - including hashes;
 - add HOST_NODEJS_BIN_ACTUAL_SOURCE_TARBALL + hash;
 - move to package/nodejs/nodejs-bin;
 - drop DEVELOPERS change, it's already covered by package/nodejs;
 - re-order the series;
 - immediately add it as a virtual package provider;
 - add prompt and helpt text to choice;
 - select host-nodejs-bin as provider if host-nodejs is not selected at
   all.
]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2023-10-06 17:31:14 +02:00

68 lines
1.9 KiB
Plaintext

config BR2_PACKAGE_HOST_NODEJS_BIN_ARCH_SUPPORTS
bool
default y if BR2_HOSTARCH = "aarch64"
default y if BR2_HOSTARCH = "arm"
default y if BR2_HOSTARCH = "ppc64le"
default y if BR2_HOSTARCH = "x86_64"
comment "host nodejs needs a host gcc >= 8"
depends on !BR2_PACKAGE_HOST_NODEJS_BIN_ARCH_SUPPORTS
depends on !BR2_HOST_GCC_AT_LEAST_8
config BR2_PACKAGE_HOST_NODEJS
bool "host nodejs"
depends on BR2_PACKAGE_HOST_NODEJS_BIN_ARCH_SUPPORTS || \
BR2_HOST_GCC_AT_LEAST_8
help
Event-driven I/O server-side JavaScript environment based on
V8.
http://nodejs.org/
if BR2_PACKAGE_HOST_NODEJS
choice
prompt "host nodejs variant"
default BR2_PACKAGE_HOST_NODEJS_BIN if BR2_PACKAGE_HOST_NODEJS_BIN_ARCH_SUPPORTS
default BR2_PACKAGE_HOST_NODEJS_SRC
help
Select a nodejs variant - built from source or
pre-built.
config BR2_PACKAGE_HOST_NODEJS_BIN
bool "pre-built version"
depends on BR2_PACKAGE_HOST_NODEJS_BIN_ARCH_SUPPORTS
config BR2_PACKAGE_HOST_NODEJS_SRC
bool "compile from source"
depends on BR2_HOST_GCC_AT_LEAST_8
select BR2_PACKAGE_HOST_PYTHON3
select BR2_PACKAGE_HOST_PYTHON3_BZIP2
select BR2_PACKAGE_HOST_PYTHON3_SSL
comment "host nodejs from source needs a host gcc >= 8"
depends on !BR2_HOST_GCC_AT_LEAST_8
endchoice
config BR2_PACKAGE_HOST_NODEJS_COREPACK
bool "Corepack"
help
Enable Corepack with host nodejs.
Corepack is a zero-runtime-dependency Node.js script that
acts as a bridge between Node.js projects and the package
managers they are intended to be used with during
development. In practical terms, Corepack will let you use
Yarn and pnpm without having to install them - just like
what currently happens with npm, which is shipped by Node.js
by default.
endif
config BR2_PACKAGE_PROVIDES_HOST_NODEJS
string
default "host-nodejs-src" if BR2_PACKAGE_HOST_NODEJS_SRC
# default to host-nodejs-bin so it's used if nothing is set explicitly
default "host-nodejs-bin" if !BR2_PACKAGE_HOST_NODEJS_SRC