node: fix host build fail
authorHirokazu MORIKAWA <morikw2@gmail.com>
Mon, 7 May 2018 06:48:15 +0000 (15:48 +0900)
committerJo-Philipp Wich <jo@mein.io>
Mon, 24 Sep 2018 06:45:42 +0000 (08:45 +0200)
modify patch.
 https://github.com/nodejs/node/pull/19196

made not to use libressl headers
 fix to include path not to use "host/include"

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
(cherry picked from commit 818770d27364f31ba7a984d7f49374789463fc29)

lang/node/Makefile
lang/node/patches/004-node_crypto-remove-std.patch [deleted file]
lang/node/patches/004-node_crypto_include_cmath.patch [new file with mode: 0644]

index 79f1023003a2b17c2ce167cb434dc8e7d96e772e..40fa2a3ce25adee55292b6e63e0b69cee4c46c9d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=node
 PKG_VERSION:=v8.10.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_SOURCE:=node-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION}
 PKG_HASH:=b72d4e71618d6bcbd039b487b51fa7543631a4ac3331d7caf69bdf55b5b2901a
@@ -128,7 +128,6 @@ HOST_CONFIGURE_VARS:=
 HOST_CONFIGURE_ARGS:= \
        --dest-os=linux \
        --without-snapshot \
-       --shared-zlib \
        --prefix=$(STAGING_DIR_HOSTPKG)
 
 HOST_CONFIGURE_CMD:=python ./configure
diff --git a/lang/node/patches/004-node_crypto-remove-std.patch b/lang/node/patches/004-node_crypto-remove-std.patch
deleted file mode 100644 (file)
index fc14c02..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/node_crypto.cc b/src/node_crypto.cc
-index 972b1e4..7c0f65a 100644
---- a/src/node_crypto.cc
-+++ b/src/node_crypto.cc
-@@ -5623,7 +5623,7 @@ void PBKDF2(const FunctionCallbackInfo<Value>& args) {
-   }
-   raw_keylen = args[3]->NumberValue();
--  if (raw_keylen < 0.0 || std::isnan(raw_keylen) || std::isinf(raw_keylen) ||
-+  if (raw_keylen < 0.0 || isnan(raw_keylen) || isinf(raw_keylen) ||
-       raw_keylen > INT_MAX) {
-     type_error = "Bad key length";
-     goto err;
diff --git a/lang/node/patches/004-node_crypto_include_cmath.patch b/lang/node/patches/004-node_crypto_include_cmath.patch
new file mode 100644 (file)
index 0000000..77b309f
--- /dev/null
@@ -0,0 +1,25 @@
+From 34825d50db18631a92902af3f51ddd27aa074c90 Mon Sep 17 00:00:00 2001
+From: Jeroen Roovers <jer-gentoo@users.noreply.github.com>
+Date: Fri, 13 Apr 2018 05:54:42 +0200
+Subject: [PATCH 2/2] Include cmath ...
+
+... instead of using the C implementations of isnan and isinf
+---
+ src/node_crypto.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/node_crypto.cc b/src/node_crypto.cc
+index 7c0f65a5735..0aa4adbd467 100644
+--- a/src/node_crypto.cc
++++ b/src/node_crypto.cc
+@@ -44,9 +44,9 @@
+ #include "StartComAndWoSignData.inc"
+ #include <algorithm>
++#include <cmath>
+ #include <errno.h>
+ #include <limits.h>  // INT_MAX
+-#include <math.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <vector>