a88ba1548a
Commit 1facb09b94
("package/nodejs:
build host-nodejs only if we're installing modules with NPM") forgot
to account for the dependency on Qemu. Now that nodejs no longer
depends on host-nodejs, but needs host-qemu, we need to make sure that
nodejs selects the relevant BR2_PACKAGE_HOST_QEMU options.
So this patch:
- Drops the dependency of BR2_PACKAGE_NODEJS_ARCH_SUPPORTS on
BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET, which was incorrect: we
don't care about running Qemu on the target. We care about
host-qemu supporting the emulation of the target architecture,
which is what BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS is for.
- Adds the dependency to the relevant BR2_PACKAGE_HOST_QEMU options
to BR2_PACKAGE_NODEJS, so that host-qemu is built with the
appropriate features needed to build the target nodejs.
- Removes the qemu related dependencies from host-nodejs, which does
not need Qemu at all.
Without this change the build of nodejs without npm enabled is broken
as the host-qemu that gets built does not have all the features that
are needed. There are no autobuild failures at this point, however.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
89 lines
3.1 KiB
Plaintext
89 lines
3.1 KiB
Plaintext
config BR2_PACKAGE_NODEJS_ARCH_SUPPORTS
|
|
bool
|
|
# On ARM, at least ARMv6+ with VFPv2+ is needed
|
|
default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2
|
|
default y if BR2_mipsel && !BR2_MIPS_SOFT_FLOAT
|
|
default y if BR2_aarch64 || BR2_i386 || BR2_x86_64
|
|
# libuv
|
|
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
|
depends on BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS
|
|
|
|
comment "nodejs needs a toolchain w/ C++, dynamic library, NPTL, gcc >= 7, wchar, host gcc >= 8"
|
|
depends on BR2_USE_MMU
|
|
depends on BR2_PACKAGE_NODEJS_ARCH_SUPPORTS
|
|
depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
|
|
!BR2_HOST_GCC_AT_LEAST_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || !BR2_USE_WCHAR
|
|
|
|
config BR2_PACKAGE_NODEJS
|
|
bool "nodejs"
|
|
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
|
|
depends on BR2_INSTALL_LIBSTDCPP
|
|
depends on BR2_PACKAGE_NODEJS_ARCH_SUPPORTS
|
|
depends on BR2_HOST_GCC_AT_LEAST_8 # qemu
|
|
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
|
depends on BR2_USE_WCHAR
|
|
# uses fork()
|
|
depends on BR2_USE_MMU
|
|
# 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 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_HOST_QEMU
|
|
select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
|
|
select BR2_PACKAGE_C_ARES
|
|
select BR2_PACKAGE_LIBUV
|
|
select BR2_PACKAGE_ZLIB
|
|
select BR2_PACKAGE_NGHTTP2
|
|
help
|
|
Event-driven I/O server-side JavaScript environment based on
|
|
V8.
|
|
|
|
http://nodejs.org/
|
|
|
|
if BR2_PACKAGE_NODEJS
|
|
|
|
config BR2_PACKAGE_NODEJS_NPM
|
|
bool "NPM for the target"
|
|
select BR2_PACKAGE_OPENSSL
|
|
help
|
|
NPM is the package manager for the Node JavaScript platform.
|
|
Note that enabling NPM on the target also selects OpenSSL
|
|
for the target.
|
|
|
|
http://www.npmjs.org
|
|
|
|
Note that NPM is always built for the buildroot host.
|
|
|
|
config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL
|
|
string "Additional modules"
|
|
help
|
|
List of space-separated nodejs modules to install via npm.
|
|
See https://npmjs.org/ to find modules and 'npm help install'
|
|
for available installation methods. For repeatable builds,
|
|
download and save tgz files or clone git repos for the
|
|
components you care about.
|
|
|
|
Example:
|
|
serialport uglify-js@1.3.4 /my/module/mymodule.tgz \
|
|
git://github.com/someuser/somemodule.git#v1.2
|
|
|
|
This would install the serialport module (at the newest
|
|
version), the uglify-js module at 1.3.4, a module from a
|
|
filesystem path, and a module from a git repository.
|
|
|
|
config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS
|
|
string "Additional module dependencies"
|
|
help
|
|
List of space-separated buildroot recipes which must be
|
|
built before your npms can be installed. For example, if in
|
|
'Additional modules' you specified 'node-curl' (see:
|
|
https://github.com/jiangmiao/node-curl), you could then
|
|
specify 'libcurl' here, to ensure that buildroot builds the
|
|
libcurl package, and does so before building your node
|
|
modules.
|
|
|
|
endif
|