1config BR2_PACKAGE_NODEJS_ARCH_SUPPORTS 2 bool 3 # On ARM, at least ARMv6+ with VFPv2+ is needed 4 default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2 5 default y if BR2_aarch64 || BR2_i386 || BR2_x86_64 6 # libuv 7 depends on BR2_TOOLCHAIN_HAS_SYNC_4 8 depends on BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS 9 10comment "nodejs needs a toolchain w/ C++, dynamic library, NPTL, gcc >= 10, wchar, host gcc >= 10" 11 depends on BR2_USE_MMU 12 depends on BR2_PACKAGE_NODEJS_ARCH_SUPPORTS 13 depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ 14 !BR2_HOST_GCC_AT_LEAST_10 || !BR2_TOOLCHAIN_GCC_AT_LEAST_10 || !BR2_USE_WCHAR 15 16config BR2_PACKAGE_NODEJS 17 bool "nodejs" 18 depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv 19 depends on BR2_INSTALL_LIBSTDCPP 20 depends on BR2_PACKAGE_NODEJS_ARCH_SUPPORTS 21 depends on BR2_HOST_GCC_AT_LEAST_10 22 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10 23 depends on BR2_USE_WCHAR 24 # uses fork() 25 depends on BR2_USE_MMU 26 # uses dlopen(). On ARMv5, we could technically support static 27 # linking, but that's too much of a corner case to support it. 28 depends on !BR2_STATIC_LIBS 29 select BR2_PACKAGE_NODEJS_SRC 30 select BR2_PACKAGE_HOST_NODEJS if BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL != "" 31 select BR2_PACKAGE_HOST_PYTHON3 32 select BR2_PACKAGE_HOST_PYTHON3_BZIP2 33 select BR2_PACKAGE_HOST_PYTHON3_SSL 34 select BR2_PACKAGE_HOST_QEMU 35 select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE 36 select BR2_PACKAGE_C_ARES 37 select BR2_PACKAGE_LIBUV 38 select BR2_PACKAGE_ZLIB 39 select BR2_PACKAGE_NGHTTP2 40 help 41 Event-driven I/O server-side JavaScript environment based on 42 V8. 43 44 http://nodejs.org/ 45 46if BR2_PACKAGE_NODEJS 47 48config BR2_PACKAGE_NODEJS_NPM 49 bool "NPM for the target" 50 select BR2_PACKAGE_OPENSSL 51 help 52 NPM is the package manager for the Node JavaScript platform. 53 Note that enabling NPM on the target also selects OpenSSL 54 for the target. 55 56 http://www.npmjs.org 57 58 Note that NPM is always built for the buildroot host. 59 60config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL 61 string "Additional modules" 62 help 63 List of space-separated nodejs modules to install via npm. 64 See https://npmjs.org/ to find modules and 'npm help install' 65 for available installation methods. For repeatable builds, 66 download and save tgz files or clone git repos for the 67 components you care about. 68 69 Example: 70 serialport uglify-js@1.3.4 /my/module/mymodule.tgz \ 71 git://github.com/someuser/somemodule.git#v1.2 72 73 This would install the serialport module (at the newest 74 version), the uglify-js module at 1.3.4, a module from a 75 filesystem path, and a module from a git repository. 76 77config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS 78 string "Additional module dependencies" 79 help 80 List of space-separated buildroot recipes which must be 81 built before your npms can be installed. For example, if in 82 'Additional modules' you specified 'node-curl' (see: 83 https://github.com/jiangmiao/node-curl), you could then 84 specify 'libcurl' here, to ensure that buildroot builds the 85 libcurl package, and does so before building your node 86 modules. 87 88endif 89 90source "package/nodejs/nodejs-src/Config.in" 91