Bump buidlroot version to 2018.02.6
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
Remove dependency on Python bz2 module
|
||||
|
||||
The Python bz2 module is only needed in certain cases, so only import
|
||||
it when needed. In the normal nodejs build, this allows to remove the
|
||||
dependency on this module.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Index: b/deps/v8/tools/js2c.py
|
||||
===================================================================
|
||||
--- a/deps/v8/tools/js2c.py
|
||||
+++ b/deps/v8/tools/js2c.py
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
import os, re, sys, string
|
||||
import jsmin
|
||||
-import bz2
|
||||
|
||||
|
||||
def ToCAsciiArray(lines):
|
||||
@@ -344,6 +343,7 @@
|
||||
else:
|
||||
raw_sources_declaration = RAW_SOURCES_COMPRESSION_DECLARATION
|
||||
if env['COMPRESSION'] == 'bz2':
|
||||
+ import bz2
|
||||
all_sources = bz2.compress("".join(all_sources))
|
||||
total_length = len(all_sources)
|
||||
sources_data = ToCArray(all_sources)
|
||||
@@ -1,26 +0,0 @@
|
||||
From 00d809e9305241f8636a2d75e22c493293e6971a Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Martin <s.martin49@gmail.com>
|
||||
Date: Sun, 20 Apr 2014 15:03:01 +0200
|
||||
Subject: [PATCH] gyp: force link command to use CXX
|
||||
|
||||
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
|
||||
---
|
||||
tools/gyp/pylib/gyp/generator/make.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py
|
||||
index 0de510e..54e4c96 100644
|
||||
--- a/tools/gyp/pylib/gyp/generator/make.py
|
||||
+++ b/tools/gyp/pylib/gyp/generator/make.py
|
||||
@@ -134,7 +134,7 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
|
||||
# special "figure out circular dependencies" flags around the entire
|
||||
# input list during linking.
|
||||
quiet_cmd_link = LINK($(TOOLSET)) $@
|
||||
-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
|
||||
+cmd_link = $(CXX.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
|
||||
|
||||
# We support two kinds of shared objects (.so):
|
||||
# 1) shared_library, which is just bundling together many dependent libraries
|
||||
--
|
||||
1.9.2
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
From 0bc482abeb814573251ecafb5a1e045c885b13a2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
|
||||
Date: Mon, 25 May 2015 16:22:57 +0200
|
||||
Subject: [PATCH 1/1] Fix musl __USE_MISC issue
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The musl C library does not define __USE_MISC and so libuv (built-in dependency)
|
||||
does not use the correct struct stat definition for musl.
|
||||
|
||||
The feature test macro __USE_MISC is defined by glibc if _BSD_SOURCE or
|
||||
_SVID_SOURCE is defined.
|
||||
|
||||
The libuv build system enables the feature test macro _GNU_SOURCE for linux
|
||||
builds.
|
||||
|
||||
Since glibc 2.19, defining _GNU_SOURCE also has the effect of implicitly
|
||||
defining _DEFAULT_SOURCE - the replacement for _BSD_SOURCE and _SVID_SOURCE.
|
||||
|
||||
In glibc versions before 2.20, defining _GNU_SOURCE also had the effect of
|
||||
implicitly defining _BSD_SOURCE and _SVID_SOURCE. This is also true for uClibc.
|
||||
|
||||
Alltogether, we can safely replace __USE_MISC by _GNU_SOURCE to support building
|
||||
nodejs 0.10.x with the musl C library.
|
||||
|
||||
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
|
||||
---
|
||||
deps/uv/src/fs-poll.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/deps/uv/src/fs-poll.c b/deps/uv/src/fs-poll.c
|
||||
index ad27f18..094447e 100644
|
||||
--- a/deps/uv/src/fs-poll.c
|
||||
+++ b/deps/uv/src/fs-poll.c
|
||||
@@ -198,7 +198,7 @@ static int statbuf_eq(const uv_statbuf_t* a, const uv_statbuf_t* b) {
|
||||
|
||||
/* Jump through a few hoops to get sub-second granularity on Linux. */
|
||||
# if defined(__linux__)
|
||||
-# if defined(__USE_MISC) /* _BSD_SOURCE || _SVID_SOURCE */
|
||||
+# if defined(_GNU_SOURCE) /* _BSD_SOURCE || _SVID_SOURCE */
|
||||
if (a->st_ctim.tv_nsec != b->st_ctim.tv_nsec) return 0;
|
||||
if (a->st_mtim.tv_nsec != b->st_mtim.tv_nsec) return 0;
|
||||
# else
|
||||
--
|
||||
2.4.1
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
From 1cc08f6ceacbb0e5ba1f4638ca3a97ac002d7792 Mon Sep 17 00:00:00 2001
|
||||
From: "Bark, Martin" <martin.bark@te.com>
|
||||
Date: Mon, 14 Dec 2015 13:26:10 +0000
|
||||
Subject: [PATCH 2/2] Fix support for uClibc-ng
|
||||
|
||||
uClibc-ng is currently at v1.0.9. The patch corrects the uClibc
|
||||
version test so that HAVE_IFADDRS_H is defined for uClibc versions
|
||||
after v0.9.32.
|
||||
|
||||
Submitted upstream to libuv and accepted, see
|
||||
https://github.com/libuv/libuv/pull/653 and
|
||||
https://github.com/libuv/libuv/commit/c861972
|
||||
|
||||
Signed-off-by: Bark, Martin <martin.bark@te.com>
|
||||
---
|
||||
deps/uv/src/unix/linux-core.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/deps/uv/src/unix/linux-core.c b/deps/uv/src/unix/linux-core.c
|
||||
index e6e6828..6cbbb71 100644
|
||||
--- a/deps/uv/src/unix/linux-core.c
|
||||
+++ b/deps/uv/src/unix/linux-core.c
|
||||
@@ -39,7 +39,7 @@
|
||||
#define HAVE_IFADDRS_H 1
|
||||
|
||||
#ifdef __UCLIBC__
|
||||
-# if __UCLIBC_MAJOR__ < 0 || __UCLIBC_MINOR__ < 9 || __UCLIBC_SUBLEVEL__ < 32
|
||||
+# if __UCLIBC_MAJOR__ < 0 && __UCLIBC_MINOR__ < 9 && __UCLIBC_SUBLEVEL__ < 32
|
||||
# undef HAVE_IFADDRS_H
|
||||
# endif
|
||||
#endif
|
||||
--
|
||||
2.6.2
|
||||
@@ -0,0 +1,26 @@
|
||||
From 7c69553d7275bbcaa88fada8ccd0d2d9f787e1ad Mon Sep 17 00:00:00 2001
|
||||
From: Martin Bark <martin@barkynet.com>
|
||||
Date: Sat, 4 Mar 2017 20:41:40 +0000
|
||||
Subject: [PATCH] check if uclibc has backtrace support
|
||||
|
||||
Signed-off-by: Martin Bark <martin@barkynet.com>
|
||||
---
|
||||
deps/v8/src/base/debug/stack_trace_posix.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/deps/v8/src/base/debug/stack_trace_posix.cc b/deps/v8/src/base/debug/stack_trace_posix.cc
|
||||
index 87c0a73..d2c182a 100644
|
||||
--- a/deps/v8/src/base/debug/stack_trace_posix.cc
|
||||
+++ b/deps/v8/src/base/debug/stack_trace_posix.cc
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
-#if V8_LIBC_GLIBC || V8_LIBC_BSD || V8_LIBC_UCLIBC || V8_OS_SOLARIS
|
||||
+#if V8_LIBC_GLIBC || V8_LIBC_BSD || ( V8_LIBC_UCLIBC && __UCLIBC_HAS_BACKTRACE__ ) || V8_OS_SOLARIS
|
||||
#define HAVE_EXECINFO_H 1
|
||||
#endif
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From 90a3c113c19ec615249ab880c45c6c0a8d369098 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Bark <martin@barkynet.com>
|
||||
Date: Tue, 30 Jun 2015 09:43:47 +0100
|
||||
Subject: [PATCH 2/4] gyp: force link command to use CXX
|
||||
|
||||
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
|
||||
Signed-off-by: Martin Bark <martin@barkynet.com>
|
||||
[yann.morin.1998@free.fr: adapt to 4.1.2]
|
||||
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
---
|
||||
tools/gyp/pylib/gyp/generator/make.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py
|
||||
index b88a433..0a1f2e0 100644
|
||||
--- a/tools/gyp/pylib/gyp/generator/make.py
|
||||
+++ b/tools/gyp/pylib/gyp/generator/make.py
|
||||
@@ -147,7 +147,7 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
|
||||
# special "figure out circular dependencies" flags around the entire
|
||||
# input list during linking.
|
||||
quiet_cmd_link = LINK($(TOOLSET)) $@
|
||||
-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
|
||||
+cmd_link = $(CXX.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
|
||||
|
||||
# We support two kinds of shared objects (.so):
|
||||
# 1) shared_library, which is just bundling together many dependent libraries
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
From e1d8899c28997613505d288d22bfb95470d606a1 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Bevenius <daniel.bevenius@gmail.com>
|
||||
Date: Tue, 28 Feb 2017 20:04:12 +0100
|
||||
Subject: [PATCH] src: add HAVE_OPENSSL directive to openssl_config
|
||||
|
||||
Currently when building with the following configuration options:
|
||||
$ ./configure --without-ssl && make
|
||||
|
||||
The following link error is reported:
|
||||
|
||||
Undefined symbols for architecture x86_64:
|
||||
"node::openssl_config", referenced from:
|
||||
node::Init(int*, char const**, int*, char const***) in node.o
|
||||
ld: symbol(s) not found for architecture x86_64
|
||||
clang: error: linker command failed with exit code 1 (use -v to see
|
||||
invocation)
|
||||
|
||||
Adding an HAVE_OPENSSL directive around this code allows the build to
|
||||
pass.
|
||||
|
||||
PR-URL: https://github.com/nodejs/node/pull/11618
|
||||
Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
||||
Reviewed-By: James M Snell <jasnell@gmail.com>
|
||||
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
||||
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
||||
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
src/node.cc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/node.cc b/src/node.cc
|
||||
index 57415bba41..ec78339d89 100644
|
||||
--- a/src/node.cc
|
||||
+++ b/src/node.cc
|
||||
@@ -4389,8 +4389,10 @@ void Init(int* argc,
|
||||
V8::SetFlagsFromString(NODE_V8_OPTIONS, sizeof(NODE_V8_OPTIONS) - 1);
|
||||
#endif
|
||||
|
||||
+#if HAVE_OPENSSL
|
||||
if (openssl_config.empty())
|
||||
SafeGetenv("OPENSSL_CONF", &openssl_config);
|
||||
+#endif
|
||||
|
||||
// Parse a few arguments which are specific to Node.
|
||||
int v8_argc;
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
comment "nodejs needs a toolchain w/ C++, dynamic library, threads, gcc >= 4.8, wchar"
|
||||
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
|
||||
|
||||
comment "nodejs needs a toolchain w/ C++, dynamic library, NPTL, gcc >= 4.8, wchar"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_arm || BR2_aarch64 || BR2_i386 || BR2_x86_64 || BR2_mipsel
|
||||
depends on !BR2_MIPS_SOFT_FLOAT
|
||||
depends on !BR2_ARM_CPU_ARMV4
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
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_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_NODEJS
|
||||
bool "nodejs"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_arm || BR2_aarch64 || BR2_i386 || BR2_x86_64 || BR2_mipsel
|
||||
depends on !BR2_MIPS_SOFT_FLOAT
|
||||
# ARM needs BLX, so v5t+
|
||||
depends on !BR2_ARM_CPU_ARMV4
|
||||
# 0.10.x could be built without the following toolchain dependencies but
|
||||
# simplify things by requiring these basic dependencies for all versions.
|
||||
depends on BR2_PACKAGE_NODEJS_ARCH_SUPPORTS
|
||||
depends on BR2_HOST_GCC_AT_LEAST_4_8
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
|
||||
depends on BR2_USE_WCHAR
|
||||
@@ -24,57 +26,30 @@ 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_C_ARES
|
||||
select BR2_PACKAGE_LIBHTTPPARSER
|
||||
select BR2_PACKAGE_LIBUV
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
Event-driven I/O server-side JavaScript environment based on V8.
|
||||
Event-driven I/O server-side JavaScript environment based on
|
||||
V8.
|
||||
|
||||
http://nodejs.org/
|
||||
|
||||
if BR2_PACKAGE_NODEJS
|
||||
|
||||
# Starting with 0.12.x, on ARM, V8 (the JS engine)
|
||||
# now requires an armv6+ and a VFPv2+.
|
||||
config BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
|
||||
bool
|
||||
# On supported architectures other than ARM, no special requirement
|
||||
default y if !BR2_arm
|
||||
# On ARM, at least ARMv6+ with VFPv2+ is needed
|
||||
default y if !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2
|
||||
|
||||
config BR2_PACKAGE_NODEJS_VERSION_STRING
|
||||
string
|
||||
default "6.12.2" if BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
|
||||
default "0.10.48"
|
||||
|
||||
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.
|
||||
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_EXPRESS
|
||||
bool "Express web application framework"
|
||||
help
|
||||
Express is a minimal and flexible node.js web application
|
||||
framework, providing a robust set of features for building
|
||||
single and multi-page, and hybrid web applications.
|
||||
|
||||
http://www.expressjs.com
|
||||
https://github.com/visionmedia/express
|
||||
|
||||
config BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT
|
||||
bool "CoffeeScript"
|
||||
help
|
||||
CoffeeScript is a little language that compiles into JavaScript.
|
||||
|
||||
http://www.coffeescript.org
|
||||
|
||||
config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL
|
||||
string "Additional modules"
|
||||
help
|
||||
@@ -84,20 +59,23 @@ config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL
|
||||
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
|
||||
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.
|
||||
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.
|
||||
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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# From upstream URL: http://nodejs.org/dist/v0.10.48/SHASUMS256.txt
|
||||
sha256 365a93d9acc076a0d93f087d269f376abeebccad599a9dab72f2f6ed96c8ae6e node-v0.10.48.tar.xz
|
||||
# From http://nodejs.org/dist/v8.11.4/SHASUMS256.txt
|
||||
sha256 fbce7de6d96b0bcb0db0bf77f0e6ea999b6755e6930568aedaab06847552a609 node-v8.11.4.tar.xz
|
||||
|
||||
# From upstream URL: http://nodejs.org/dist/v6.12.2/SHASUMS256.txt
|
||||
sha256 33677c1fcf6a2f35d2718834fd0afdb36166b0cc68349820e05d8f9316b1dafc node-v6.12.2.tar.xz
|
||||
# Hash for license file
|
||||
sha256 b87be6c1479ed977481115869c2dd8b6d59e5ea55aa09939d6c898242121b2f5 LICENSE
|
||||
|
||||
@@ -4,10 +4,11 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
NODEJS_VERSION = $(call qstrip,$(BR2_PACKAGE_NODEJS_VERSION_STRING))
|
||||
NODEJS_VERSION = 8.11.4
|
||||
NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.xz
|
||||
NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
|
||||
NODEJS_DEPENDENCIES = host-python host-nodejs zlib \
|
||||
NODEJS_DEPENDENCIES = host-python host-nodejs c-ares \
|
||||
libhttpparser libuv zlib \
|
||||
$(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS))
|
||||
HOST_NODEJS_DEPENDENCIES = host-python host-zlib
|
||||
NODEJS_LICENSE = MIT (core code); MIT, Apache and BSD family licenses (Bundled components)
|
||||
@@ -16,6 +17,9 @@ NODEJS_LICENSE_FILES = LICENSE
|
||||
NODEJS_CONF_OPTS = \
|
||||
--without-snapshot \
|
||||
--shared-zlib \
|
||||
--shared-cares \
|
||||
--shared-http-parser \
|
||||
--shared-libuv \
|
||||
--without-dtrace \
|
||||
--without-etw \
|
||||
--dest-os=linux
|
||||
@@ -27,15 +31,12 @@ else
|
||||
NODEJS_CONF_OPTS += --without-ssl
|
||||
endif
|
||||
|
||||
# 0.10.x does not have icu support
|
||||
ifeq ($(findstring 0.10.,$(NODEJS_VERSION)),)
|
||||
ifeq ($(BR2_PACKAGE_ICU),y)
|
||||
NODEJS_DEPENDENCIES += icu
|
||||
NODEJS_CONF_OPTS += --with-intl=system-icu
|
||||
else
|
||||
NODEJS_CONF_OPTS += --with-intl=none
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_NODEJS_NPM),y)
|
||||
NODEJS_CONF_OPTS += --without-npm
|
||||
@@ -47,7 +48,7 @@ define HOST_NODEJS_CONFIGURE_CMDS
|
||||
# The build system directly calls python. Work around this by forcing python2
|
||||
# into PATH. See https://github.com/nodejs/node/issues/2735
|
||||
mkdir -p $(@D)/bin
|
||||
ln -sf $(HOST_DIR)/usr/bin/python2 $(@D)/bin/python
|
||||
ln -sf $(HOST_DIR)/bin/python2 $(@D)/bin/python
|
||||
|
||||
# Build with the static, built-in OpenSSL which is supplied as part of
|
||||
# the nodejs source distribution. This is needed on the host because
|
||||
@@ -56,28 +57,30 @@ define HOST_NODEJS_CONFIGURE_CMDS
|
||||
(cd $(@D); \
|
||||
$(HOST_CONFIGURE_OPTS) \
|
||||
PATH=$(@D)/bin:$(BR_PATH) \
|
||||
PYTHON=$(HOST_DIR)/usr/bin/python2 \
|
||||
$(HOST_DIR)/usr/bin/python2 ./configure \
|
||||
--prefix=$(HOST_DIR)/usr \
|
||||
PYTHON=$(HOST_DIR)/bin/python2 \
|
||||
$(HOST_DIR)/bin/python2 ./configure \
|
||||
--prefix=$(HOST_DIR) \
|
||||
--without-snapshot \
|
||||
--without-dtrace \
|
||||
--without-etw \
|
||||
--shared-zlib \
|
||||
$(if $(BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS),--with-intl=none) \
|
||||
--with-intl=none \
|
||||
)
|
||||
endef
|
||||
|
||||
define HOST_NODEJS_BUILD_CMDS
|
||||
$(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 \
|
||||
$(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
|
||||
$(MAKE) -C $(@D) \
|
||||
$(HOST_CONFIGURE_OPTS) \
|
||||
NO_LOAD=cctest.target.mk \
|
||||
PATH=$(@D)/bin:$(BR_PATH)
|
||||
endef
|
||||
|
||||
define HOST_NODEJS_INSTALL_CMDS
|
||||
$(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 \
|
||||
$(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
|
||||
$(MAKE) -C $(@D) install \
|
||||
$(HOST_CONFIGURE_OPTS) \
|
||||
NO_LOAD=cctest.target.mk \
|
||||
PATH=$(@D)/bin:$(BR_PATH)
|
||||
endef
|
||||
|
||||
@@ -111,14 +114,14 @@ endif
|
||||
|
||||
define NODEJS_CONFIGURE_CMDS
|
||||
mkdir -p $(@D)/bin
|
||||
ln -sf $(HOST_DIR)/usr/bin/python2 $(@D)/bin/python
|
||||
ln -sf $(HOST_DIR)/bin/python2 $(@D)/bin/python
|
||||
|
||||
(cd $(@D); \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
PATH=$(@D)/bin:$(BR_PATH) \
|
||||
LD="$(TARGET_CXX)" \
|
||||
PYTHON=$(HOST_DIR)/usr/bin/python2 \
|
||||
$(HOST_DIR)/usr/bin/python2 ./configure \
|
||||
PYTHON=$(HOST_DIR)/bin/python2 \
|
||||
$(HOST_DIR)/bin/python2 ./configure \
|
||||
--prefix=/usr \
|
||||
--dest-cpu=$(NODEJS_CPU) \
|
||||
$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
|
||||
@@ -129,20 +132,18 @@ define NODEJS_CONFIGURE_CMDS
|
||||
endef
|
||||
|
||||
define NODEJS_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 \
|
||||
$(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
|
||||
$(MAKE) -C $(@D) \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
NO_LOAD=cctest.target.mk \
|
||||
PATH=$(@D)/bin:$(BR_PATH) \
|
||||
LD="$(TARGET_CXX)"
|
||||
endef
|
||||
|
||||
#
|
||||
# Build the list of modules to install based on the booleans for
|
||||
# popular modules, as well as the "additional modules" list.
|
||||
# Build the list of modules to install.
|
||||
#
|
||||
NODEJS_MODULES_LIST= $(call qstrip,\
|
||||
$(if $(BR2_PACKAGE_NODEJS_MODULES_EXPRESS),express) \
|
||||
$(if $(BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT),coffee-script) \
|
||||
$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL))
|
||||
|
||||
# Define NPM for other packages to use
|
||||
@@ -153,7 +154,7 @@ NPM = $(TARGET_CONFIGURE_OPTS) \
|
||||
npm_config_build_from_source=true \
|
||||
npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \
|
||||
npm_config_prefix=$(TARGET_DIR)/usr \
|
||||
$(HOST_DIR)/usr/bin/npm
|
||||
$(HOST_DIR)/bin/npm
|
||||
|
||||
#
|
||||
# We can only call NPM if there's something to install.
|
||||
@@ -168,10 +169,11 @@ endef
|
||||
endif
|
||||
|
||||
define NODEJS_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 \
|
||||
$(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
|
||||
$(MAKE) -C $(@D) install \
|
||||
DESTDIR=$(TARGET_DIR) \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
NO_LOAD=cctest.target.mk \
|
||||
PATH=$(@D)/bin:$(BR_PATH) \
|
||||
LD="$(TARGET_CXX)"
|
||||
$(NODEJS_INSTALL_MODULES)
|
||||
|
||||
Reference in New Issue
Block a user