Commit Graph

89 Commits

Author SHA1 Message Date
Martin Bark
1a08bddc38 package/nodejs: remove icu support from 0.10.x
icu support was added to nodejs in commit 7d0702a, however, 0.10.x does
not have support for icu. The 0.10.x configure script will error
if it is passed the --with-intl option.  This commit removes icu support
from 0.10.x.

Fixes:
 http://autobuild.buildroot.net/results/932e4ec24623592255f234a098f7a90ef2ad8063

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-09 10:51:01 +02:00
Martin Bark
a898d5de17 package/nodejs: Update npm to use NODEJS_CONF_OPTS
Signed-off-by: Martin Bark <martin@barkynet.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-04 14:32:16 +02:00
Martin Bark
81bb80c89d package/nodejs: Update openssl to use NODEJS_CONF_OPTS
Signed-off-by: Martin Bark <martin@barkynet.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-04 14:32:05 +02:00
Martin Bark
be0d8ecc27 package/nodejs: Update icu to use NODEJS_CONF_OPTS
Signed-off-by: Martin Bark <martin@barkynet.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-04 14:31:52 +02:00
Martin Bark
af37338488 package/nodejs: Add NODEJS_CONF_OPTS
Most packages in buildroot pass a FOO_CONF_OPTS variable into the
configure script.  Transition nodejs to follow this convention.

Signed-off-by: Martin Bark <martin@barkynet.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-04 14:31:44 +02:00
Martin Bark
dc725e763c package/nodejs: bump version to 6.2.1
See https://nodejs.org/en/blog/release/v6.2.1/

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-03 14:47:51 +02:00
Martin Bark
7d0702a2bd package/nodejs: add icu support
Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-03 14:47:44 +02:00
Martin Bark
34d4337f93 package/nodejs: bump version to 0.10.45
See https://nodejs.org/en/blog/release/v0.10.45/

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-09 22:54:48 +02:00
Martin Bark
fbd387c08c package/nodejs: bump version to 6.1.0
See https://nodejs.org/en/blog/release/v6.1.0/

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-09 22:54:19 +02:00
Martin Bark
692005ae90 package/nodejs: bump version to 6.0.0
See https://nodejs.org/en/blog/release/v6.0.0/

The patches from 5.11.0 have been copied to 6.0.0 with the following
changes:

 - Removed 0001-Remove-dependency-on-Python-bz2-module.patch,
   0003-Fix-va_list-not-declared.patch and
   0004-Fix-support-for-uClibc-ng.patch as all 3 have been fixed upstream
 - Renamed 0002-gyp-force-link-command-to-use-CXX.patch to
   0001-gyp-force-link-command-to-use-CXX.patch

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-04-28 20:38:03 +02:00
Martin Bark
fbf9411d0a package/nodejs: bump version to 5.11.0
See https://nodejs.org/en/blog/release/v5.11.0/

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-26 21:58:03 +02:00
Martin Bark
09f2657562 package/nodejs: bump version to 0.10.44
See https://nodejs.org/en/blog/release/v0.10.44/

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-26 21:57:54 +02:00
Martin Bark
6c59e8d1f6 package/nodejs: bump version to 5.10.1
See https://nodejs.org/en/blog/release/v5.10.1/

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-13 22:49:04 +02:00
Martin Bark
c6d16d3b2d package/nodejs: bump version to 5.9.1
See https://nodejs.org/en/blog/release/v5.9.1/

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-03-26 23:43:42 +01:00
Martin Bark
e3ba69f3eb package/nodejs: bump version to 5.8.0
See https://nodejs.org/en/blog/release/v5.8.0/

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-03-10 15:39:14 +01:00
Martin Bark
d51ab07a17 package/nodejs: bump version to 0.10.43
See https://nodejs.org/en/blog/release/v0.10.43/

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-03-08 21:03:23 +01:00
Martin Bark
f7d8ca19ac package/nodejs: bump version to 5.7.1
See https://nodejs.org/en/blog/release/v5.7.1/

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-03-06 15:13:39 +01:00
Martin Bark
12010acc62 package/nodejs: force the use of python2
Remove the patches to use a python variable and instead force python2
into the PATH.

Upstream the python variable was recently removed
(see https://github.com/nodejs/node/commit/c3e50ca) and due to dependencies
directly calling python there is a reluctance to change this.  Instead it
is recommended to add python2 into PATH as the nodejs build machines do
(see https://github.com/nodejs/node/issues/418 and
https://github.com/nodejs/node/issues/2735).

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-03-06 15:13:33 +01:00
Peter Korsgaard
28cd1ed30a Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-03-02 21:25:00 +01:00
Jörg Krause
f4c366f005 package/nodejs: security bump for 0.10.x to version 0.10.42
Fixes security vulnerabilites [1]:
 - CVE-2016-2086
 - CVE-2016-2216

Also switch to the xz compressed tar file now available for v0.10 builds from
v0.10.42 onward.

[1] https://nodejs.org/en/blog/vulnerability/february-2016-security-releases/

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-02-18 09:28:58 +01:00
Martin Bark
b88c1d149d package/nodejs: bump version to 5.6.0
This is an important security release. See
https://nodejs.org/en/blog/release/v5.6.0/ for further details

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-02-16 21:52:01 +01:00
Martin Bark
687492f532 package/nodejs: update python variable patch
Update 0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
for v5.5.0 to include the js2c.py tool.

Fixes:
http://autobuild.buildroot.net/results/87e9bbbb36f7fe4868d238ef6a7b72eb8cca7052/
http://autobuild.buildroot.net/results/f748c0956f71a7857d5cc9ae7bfe3c14357a078a/

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-02-16 16:07:36 +01:00
Martin Bark
75b7049281 package/nodejs: remove version choice
Remove the choice of nodejs version.  Now automatically pick nodejs 0.10.x
for armv5 architectures only and the latest nodejs for all other
supported architectures.

Note that the removal of BR2_PACKAGE_NODEJS_5_X is not handled in
Config.in.legacy because buildroot has never been released with this
option included.

Signed-off-by: Martin Bark <martin@barkynet.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-02-07 23:35:25 +01:00
Martin Bark
976380ce27 package/nodejs: bump to version 5.5.0
Patches from 5.3.0 have been copied over with the following exceptions:
 - Removed 0005-Fix-crash-in-GetInterfaceAddresses.patch as this has
   been applied upstream
 - Renamed 0006-Fix-support-for-uClibc-ng.patch to
   0005-Fix-support-for-uClibc-ng.patch

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-02-07 23:34:29 +01:00
Arnout Vandecappelle
2f6093ae76 nodejs: version 5.X needs host GCC >= 4.8
Fixes
http://autobuild.buildroot.org/results/4589dd076585d6472ad1e65926ffe68343b94422
http://autobuild.buildroot.org/results/e3147c0d9c9eb9f58773b75c8cb4ea49df483611
and many more.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-31 10:36:33 +01:00
Yann E. MORIN
4d819e3ebe package/nodejs: move comment around, to keep proper indentation
In Kconfig, when there is an item (like a comment) between a symbol and
its dependees, then the indentation is not in effect.

Move the symbol to the top of the file to guarantee the indentation in
menuconfig.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2015-12-28 17:57:58 +01:00
Martin Bark
a2d166004d package/nodejs: correct 0.10.x option name
The nodejs options incorrectly started BR2_BR2_xxx.  This change corrects
the name for 0.10.x releases to BR2_PACKAGE_NODEJS_0_10_X

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-25 18:48:42 +01:00
Martin Bark
5bba3ca130 package/nodejs: fix support for uClibc-ng
Fix segmentation fault in node.js when using uClibc-ng.

This patch fixes bug #8296, see
https://bugs.busybox.net/show_bug.cgi?id=8296.

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-23 17:51:07 +01:00
Martin Bark
41118ac9f2 package/nodejs: fixed comment for mips soft float
nodejs is only selected for mips hard float however the comment is
displayed for hard and soft float.  Correct this by adding the missing
!BR2_MIPS_SOFT_FLOAT to the comment.

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-23 17:49:02 +01:00
Martin Bark
a314b878a5 package/nodejs: removed version 0.12.9
Remove 0.12.9 to rationalise the number of nodejs releases supported by
buildroot.  Going forward buildroot will only support the latest release
of nodejs and the 0.10.x branch for armv5 support.

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-23 17:48:21 +01:00
Martin Bark
90bf67c0d2 package/nodejs: bump version to 5.3.0
Replace 4.2.3 with 5.3.0.  5.3.0 is the current Stable release. See
https://nodejs.org/en/blog/release/v5.3.0 for details on the release.

Copied 4.2.3 patched to 5.3.0 with the following exceptions:
 - Removed 0004-fix-arm-vfpv2.patch, committed upstream and included in
   5.3.0.  See https://github.com/nodejs/node/commit/84dea1bd0c
 - Added 0004-Fix-va_list-not-declared.patch, fix for a new bug.  This
   has already been fixed upstream but is not in 5.3.0

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-23 17:47:41 +01:00
Jörg Krause
584d777dda package/nodejs: bump 4.x branch to version 4.2.3
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-12 18:28:41 +01:00
Jörg Krause
9d3b69dfdd package/nodejs: bump 0.12.x branch to version 0.12.9
Patch #4 was applied upstream, however a new bug was introduced which breaks
building nodejs without OpenSSL support. We replace the applied patch with a
new patch to fix:
 error: ‘ALLOW_INSECURE_SERVER_DHPARAM’ was not declared in this scope
       ALLOW_INSECURE_SERVER_DHPARAM = true;

Patch #4 status: Sent upstream [1]

[1] https://github.com/nodejs/node/pull/4201

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-12 18:28:13 +01:00
Jörg Krause
5cff6a83c6 package/nodejs: bump 0.10.x branch to version 0.10.41
Also remove a patch applied upstream.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-12 18:27:51 +01:00
Vicente Olivert Riera
e5aabd8586 nodejs: build for the right MIPS architecture variant
Fixes:

  http://autobuild.buildroot.net/results/faa/faae16b543e146b230256d7653d181fb895c83fc/

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-12 18:25:01 +01:00
Vicente Olivert Riera
b807c1ee58 nodejs: add support for MIPS big endian
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-12-12 18:24:47 +01:00
Martin Bark
1325da4a28 package/nodejs: Fixed npm global install
Set npm_config_prefix to $(TARGET_DIR)/usr so that npm -g will correctly
install global modules to $(TARGET_DIR)/usr/lib/node_modules.

By using npm -g to install global modules npm will now automatically create
the symlinks to executables under $(TARGET_DIR)/usr/bin.

See https://docs.npmjs.com/misc/config#global and
https://docs.npmjs.com/files/folders for information on how the prefix
setting is used by global installs.

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-11-02 23:12:02 +01:00
Yann E. MORIN
8d916fa247 package/nodejs: more python3 fixes
nodejs' build system can not work with python3.

Complement the existing patch to use a variable instead of hard-coding
python.

Fixes:
    http://autobuild.buildroot.org/results/406/406291bf7c61a80ed4a8d14d9a3887f51a1b2254/
    http://autobuild.buildroot.org/results/ff9/ff97f452b875d8b1fb78561609742a233b80e0d3/
    http://autobuild.buildroot.org/results/7ad/7adb96b45cb539c46940908d4ce9ca78b6a84d81/
    ...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-31 15:47:46 +01:00
Yann E. MORIN
827c9d2bdd package/nodejs: add version 4.1.2
We add a new version, because it is not API-compatible with the previous
versions.

Also, nodejs-4.1.2 requires gcc >= 4.8.

Forward-port patches from 0.12.7:
  - 0001-Remove-dependency-on-Python-bz2-module.patch partially applied
    upstream;
  - 0002-gyp-force-link-command-to-use-CXX.patch slightly refreshed;
  - 0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
    largely refreshed to address new occurences of hard-coded calls;
  - 0004-fix-build-error-without-OpenSSL-support.patch applied upstream
  - 0005-Fix-typo-for-arm-predefined-macro-in-atomicops_inte.patch
    applied upstream.

New patch:
  - 0004-fix-arm-vfpv2.patch to fix the gcc -mfpu option for VFPv2.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Jörg Krause <joerg.krause@embedded.rocks>
Cc: Martin Bark <martin@barkynet.com>
Cc: Jaap Crezee <jaap@jcz.nl>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-20 09:55:06 +02:00
Yann E. MORIN
f443386c5d package/nodejs: fix architectural dependencies on ARM
On ARM, starting with v0.12.x, the V8 JS engine is now requires at least
an armv6 and at least a VFPv2.

Since we're about to introduce the v4.x version, which has the same
requirements, introduce an intermediate variable to hold that condition.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Jörg Krause <joerg.krause@embedded.rocks>
Cc: Martin Bark <martin@barkynet.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-20 09:55:00 +02:00
Peter Seiderer
eec69cdcaf nodejs: fix typo for arm predefined macro used for atomicops
Add patch to fix typo for arm predefined macrco in (__ARM_ARCH_6KZ__
vs. __ARM_ARCH_6ZK__) in atomicops_internals_arm_gcc.h

Fixes #8391: Node.js 0.12.7 fails to build on raspberry_pi defconfig

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-11 14:54:12 +02:00
Jörg Krause
aab10cedec package/nodejs/0.10.x: add patch to fix musl build error
The musl C library does not understand the feature test macro __USE_MISC and so
libuv (built-in dependency of nodejs) does not use the correct struct stat
definition for musl:
	error: ‘uv_statbuf_t’ has no member named ‘st_ctimensec’
	error: ‘uv_statbuf_t’ has no member named ‘st_mtimensec’

The 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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-08-06 09:00:09 +02:00
Jörg Krause
0399ed064d package/nodejs: disable for static build
nodejs requires dlopen(), etc.

Fixes:
http://autobuild.buildroot.net/results/87d/87dab0186abd7b2737a56b2f939f3aba294e8772/
http://autobuild.buildroot.net/results/be1/be1010a3a31642d49ec3a118858c77fed2f762b8/

[Thomas: add comment explaining that we could support static linking
on ARMv5, but we don't do it since it's too much of a corner case.]

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-08-03 11:23:03 +02:00
Martin Bark
20ad99535a package/nodejs: version bump to 0.10.40
Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-14 16:02:01 +02:00
Jörg Krause
d082f1390c package/nodejs: version bump to 0.12.7
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-12 11:57:54 +02:00
Yann E. MORIN
781529b159 package/nodejs: security bump
Critical security flaw:
    https://medium.com/@iojs/important-security-upgrades-for-node-js-and-io-js-8ac14ece5852

Fixes #8201.

Reported-by: Chris Becker <goabonga@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-06 11:50:00 +02:00
Yann E. MORIN
eb6254a5aa package/nodejs: drop minor version in Config.in
Drop the minor version from the Kconfig symbol, so we can seamlessly
update the versions without having to handle legacy stuff.

Note: not adding legacy handling, as we haven't had any release with
those symbols yet.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Chris Becker <goabonga@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-06 11:50:00 +02:00
Martin Bark
c50256b6d2 package/nodejs: Define NPM command for other packages to use
Other nodejs-related packages will need to call npm with the same set of
arguments as is currently used by the nodejs package itself.

To avoid duplicating this code, set the NPM variable so those packages can
re-use it.

Signed-off-by: Martin Bark <martin@barkynet.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-04 14:38:44 +02:00
Martin Bark
c72b8eaf21 package/nodejs: Fixes for node-pre-gyp
Many packages use node-pre-gyp as a way of deploying precompiled binary
dependencies with fall back to compilation for other targets.  Currently
installing node modules that use node-pre-gyp can fail to use the correct
binary for the target.  This patch fixes this issue by correctly
configuring node-pre-gyp.

Firstly, node-gyp uses the option --arch to determine its target
architecture (which is already set correctly), however, node-pre-gyp uses
--target-arch.  Without this set node.js packages that uses node-pre-gyp
will pick the wrong target architecture.

Secondly, the use of precompiled binary packages is not desirable due to
potential security and licensing issues.  To solve this we use the
--build-from-source option to force node-pre-gyp to always build the C++
code.

This patch passes npm_config_target_arch and npm_config_build_from_source
to npm which causes --target-arch and --build-from-source to be passed to
node-pre-gyp.

I have tested this using the node.js package serialport which now
successfully builds and runs.

Signed-off-by: Martin Bark <martin@barkynet.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-04 14:38:33 +02:00
Martin Bark
9aab65f304 package/nodejs: symlink /usr/lib/node_modules/.bin/* to /usr/bin
This patch symlinks all executables in /usr/lib/node_modules/.bin
to /usr/bin so that node.js modules installed using
BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL are accessible from the command line.

Signed-off-by: Martin Bark <martin@barkynet.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-04 14:38:13 +02:00