Files
buildroot/package
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
..
2015-06-21 06:42:57 +02:00
2015-06-21 06:49:42 +02:00
2015-05-05 22:42:57 +02:00
2015-06-13 14:52:53 +02:00
2015-04-01 20:04:29 +02:00
2015-06-17 23:34:09 +02:00
2015-06-13 14:53:01 +02:00
2015-06-01 23:52:57 +02:00
2015-04-25 11:09:41 +02:00
2015-06-28 22:48:27 +02:00
2015-04-21 09:03:54 +02:00
2015-05-16 23:19:53 +02:00
2015-04-19 14:40:22 +02:00
2015-04-19 13:43:45 +02:00
2015-04-19 13:43:45 +02:00
2015-04-21 09:06:28 +02:00
2015-04-19 13:43:45 +02:00
2015-06-26 09:38:36 +02:00
2015-04-18 15:30:56 +02:00
2015-04-19 14:25:03 +02:00
2015-03-31 13:57:41 +02:00
2015-04-19 14:25:10 +02:00
2015-05-13 09:17:49 +02:00
2015-06-02 22:46:30 +02:00
2015-03-31 13:57:41 +02:00
2015-04-27 23:18:16 +02:00
2015-03-31 13:57:41 +02:00
2015-04-20 19:51:00 +02:00
2015-04-19 14:25:15 +02:00
2015-06-20 15:59:28 +02:00
2015-04-12 18:52:19 +02:00
2015-06-18 23:41:41 +02:00
2015-04-19 19:24:58 +02:00
2015-04-07 22:06:41 +02:00
2015-03-31 13:57:41 +02:00
2015-04-09 21:39:22 +02:00
2015-04-07 22:04:26 +02:00
2015-06-01 23:55:12 +02:00
2015-04-05 19:04:39 +02:00
2015-04-19 19:25:10 +02:00
2015-05-13 10:12:17 +02:00
2015-06-12 21:20:47 +02:00
2015-06-12 21:28:43 +02:00
2015-05-26 23:56:43 +02:00
2015-04-11 15:31:45 +02:00
2015-05-21 23:09:49 +02:00
2015-05-25 22:22:33 +02:00
2015-03-31 13:57:41 +02:00
2015-06-10 23:00:37 +02:00
2015-04-19 23:10:27 +02:00
2015-06-02 22:45:59 +02:00
2015-04-10 21:54:40 +02:00
2015-04-08 21:22:40 +02:00
2015-07-02 11:00:29 +02:00
2015-04-19 23:10:30 +02:00
2015-04-06 10:57:10 +02:00
2015-05-11 08:59:18 +02:00
2015-07-02 17:30:24 +02:00
2015-06-04 15:34:01 +02:00
2015-06-21 06:35:42 +02:00
2015-04-07 22:06:42 +02:00
2015-06-21 09:47:57 +02:00
2015-06-23 22:59:23 +02:00
2015-06-01 23:57:16 +02:00
2015-04-07 22:06:42 +02:00
2015-04-03 14:31:29 +02:00
2015-04-19 14:40:14 +02:00
2015-03-31 13:57:41 +02:00
2015-06-18 22:37:51 +02:00
2015-06-26 09:45:08 +02:00
2015-03-31 13:57:41 +02:00
2015-04-19 23:10:27 +02:00
2015-04-19 23:10:27 +02:00
2015-06-04 15:36:00 +02:00
2015-03-31 13:57:41 +02:00
2015-04-04 13:39:00 +02:00
2015-03-31 13:57:41 +02:00
2015-05-02 13:24:42 +02:00
2015-04-11 15:20:09 +02:00
2015-04-19 23:10:28 +02:00
2015-06-26 09:44:49 +02:00
2015-06-01 23:54:37 +02:00
2015-04-19 23:10:30 +02:00
2015-03-31 13:57:41 +02:00
2015-05-25 22:18:10 +02:00
2015-04-19 23:10:28 +02:00
2015-06-12 21:59:03 +02:00
2015-03-31 13:57:41 +02:00
2015-05-01 16:22:55 +02:00
2015-06-19 20:19:43 +02:00
2015-04-19 23:10:29 +02:00
2015-03-31 13:57:41 +02:00
2015-03-31 13:57:41 +02:00
2015-03-31 13:57:41 +02:00
2015-06-26 09:38:21 +02:00
2015-04-19 23:10:29 +02:00
2015-06-18 22:41:32 +02:00
2015-04-25 11:26:46 +02:00
2015-04-26 19:16:33 +02:00
2015-04-19 23:10:30 +02:00
2015-04-19 23:10:30 +02:00
2015-04-25 14:34:09 +02:00
2015-04-07 22:06:41 +02:00
2015-04-19 23:10:30 +02:00
2015-04-19 23:10:31 +02:00
2015-05-31 10:22:28 +02:00
2015-04-19 23:10:31 +02:00
2015-06-09 22:42:52 +02:00
2015-06-04 15:51:11 +02:00
2015-06-04 15:51:20 +02:00
2015-04-07 22:06:41 +02:00
2015-05-25 22:20:48 +02:00
2015-04-19 23:10:29 +02:00
2015-05-13 10:08:15 +02:00
2015-06-02 22:59:54 +02:00
2015-04-19 14:40:50 +02:00
2015-04-07 22:06:42 +02:00
2015-06-30 14:26:42 +02:00
2015-06-15 23:12:10 +02:00
2015-06-07 22:46:55 +02:00
2015-04-30 15:29:40 +02:00
2015-06-15 16:19:01 +02:00
2015-07-04 12:43:41 +02:00
2015-06-26 20:21:53 +02:00
2015-06-28 15:18:04 +02:00
2015-06-22 23:05:06 +02:00
2015-04-08 22:50:06 +02:00
2015-04-11 15:34:11 +02:00
2015-04-19 23:10:31 +02:00
2015-06-18 23:41:41 +02:00
2015-06-02 22:47:08 +02:00
2015-03-31 13:57:41 +02:00
2015-04-19 23:10:29 +02:00
2015-03-30 23:31:14 +02:00
2015-04-18 15:31:01 +02:00
2015-07-04 14:31:21 +02:00
2015-06-18 23:36:00 +02:00
2015-04-18 15:30:38 +02:00
2015-04-25 11:26:00 +02:00
2015-06-12 21:41:41 +02:00
2015-07-02 11:00:45 +02:00
2015-06-11 09:59:21 +02:00
2015-04-27 23:18:16 +02:00
2015-06-02 23:12:07 +02:00
2015-06-02 23:04:50 +02:00
2015-03-31 13:57:41 +02:00
2015-06-09 21:38:28 +02:00
2015-04-27 23:21:52 +02:00
2015-04-19 23:10:31 +02:00
2015-04-19 23:10:29 +02:00
2015-06-09 23:37:46 +02:00
2015-05-15 00:52:10 +02:00
2015-04-16 07:49:37 +02:00
2015-06-01 23:52:57 +02:00
2015-06-26 09:39:52 +02:00
2015-06-26 09:40:22 +02:00
2015-06-20 15:59:15 +02:00
2015-06-02 22:45:02 +02:00
2015-06-02 23:05:13 +02:00
2015-06-14 14:49:45 +02:00
2015-06-15 16:25:46 +02:00
2015-04-09 14:17:16 +02:00
2015-04-16 08:00:09 +02:00
2015-05-27 13:03:12 +02:00
2015-04-29 23:27:03 +02:00
2015-05-05 17:12:15 +02:00
2015-04-27 23:18:16 +02:00
2015-03-31 13:57:41 +02:00
2015-05-31 15:21:23 +02:00
2015-07-02 10:59:38 +02:00
2015-06-18 23:41:41 +02:00
2015-06-09 21:37:26 +02:00
2015-03-31 13:57:41 +02:00
2015-06-26 20:46:01 +02:00
2015-06-22 23:05:06 +02:00
2015-07-02 11:01:19 +02:00
2015-07-02 10:59:22 +02:00
2015-06-26 09:44:12 +02:00
2015-06-09 22:43:34 +02:00
2015-06-06 15:38:56 +02:00
2015-06-26 10:14:12 +02:00
2015-04-19 14:40:29 +02:00
2015-04-09 23:33:27 +02:00
2015-04-29 23:02:17 +02:00
2015-06-29 21:59:57 +02:00
2015-04-19 13:43:44 +02:00
2015-06-12 21:28:33 +02:00
2015-03-31 13:54:00 +02:00
2015-04-20 19:50:54 +02:00
2015-03-31 13:59:58 +02:00
2015-04-02 00:05:38 +02:00
2015-04-10 21:53:52 +02:00
2015-03-31 13:57:41 +02:00
2015-06-30 14:26:46 +02:00
2015-06-22 23:13:46 +02:00
2015-06-21 06:51:33 +02:00
2015-05-17 00:08:35 +02:00
2015-04-01 00:05:15 +02:00
2015-06-29 22:01:41 +02:00
2015-06-22 23:05:06 +02:00
2015-06-02 23:32:28 +02:00
2015-04-25 10:15:43 +02:00
2015-04-27 23:22:14 +02:00
2015-06-26 09:32:55 +02:00
2015-03-31 13:57:41 +02:00
2015-05-14 11:01:49 +02:00
2015-04-21 23:18:02 +02:00
2015-04-14 10:06:35 +02:00
2015-04-27 23:18:16 +02:00
2015-04-27 23:18:16 +02:00
2015-05-21 23:12:06 +02:00
2015-06-22 23:05:06 +02:00
2015-04-19 23:10:30 +02:00
2015-04-13 12:26:44 +02:00
2015-04-03 16:31:04 +02:00
2015-03-31 13:57:41 +02:00
2015-06-21 06:49:24 +02:00
2015-04-03 14:05:19 +02:00
2015-04-27 23:18:16 +02:00
2015-03-31 13:57:41 +02:00
2015-06-17 22:55:54 +02:00
2015-06-02 22:44:08 +02:00
2015-06-09 21:35:19 +02:00
2015-06-12 21:28:39 +02:00
2015-06-23 22:57:44 +02:00
2015-03-30 22:30:51 +02:00
2015-06-13 14:52:57 +02:00
2015-04-19 23:10:30 +02:00
2015-06-01 23:56:17 +02:00
2015-04-27 23:18:16 +02:00
2015-04-19 23:10:30 +02:00
2015-06-22 22:14:09 +02:00
2015-06-18 23:18:44 +02:00
2015-03-31 13:57:41 +02:00
2015-07-03 09:04:46 +02:00
2015-06-21 06:33:51 +02:00
2015-05-25 22:16:26 +02:00
2015-06-25 00:50:05 +02:00
2015-05-20 23:30:29 +02:00
2015-04-19 23:10:30 +02:00
2015-05-20 23:30:26 +02:00
2015-03-31 13:57:41 +02:00
2015-05-20 23:30:22 +02:00
2015-04-19 09:46:14 +02:00
2015-07-02 23:42:28 +02:00
2015-07-01 10:19:11 +02:00
2015-05-20 23:30:17 +02:00
2015-05-20 23:30:00 +02:00
2015-06-21 06:40:42 +02:00
2015-04-03 15:22:15 +02:00
2015-06-21 06:40:51 +02:00
2015-03-31 13:57:41 +02:00
2015-06-10 09:38:53 +02:00
2015-05-01 16:21:55 +02:00
2015-07-02 10:58:35 +02:00
2015-05-20 23:30:13 +02:00
2015-05-02 15:11:01 +02:00
2015-06-07 22:56:09 +02:00
2015-05-16 21:16:25 +02:00
2015-06-07 23:58:18 +02:00
2015-06-07 22:48:39 +02:00
2015-04-19 13:50:44 +02:00
2015-06-14 23:08:59 +02:00
2015-05-13 10:12:17 +02:00