Browse Source

nodejs: Disable v8 warning and set TMPDIR

android-5
Fredrik Fornwall 9 years ago
parent
commit
49f47ae04c
  1. 2
      packages/nodejs/build.sh
  2. 14
      packages/nodejs/deps-v8-src-flag-definitions.h.patch
  3. 21
      packages/nodejs/src-node_main.cc.patch

2
packages/nodejs/build.sh

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://nodejs.org/
TERMUX_PKG_DESCRIPTION="Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications"
TERMUX_PKG_VERSION=6.0.0
TERMUX_PKG_BUILD_REVISION=2
TERMUX_PKG_BUILD_REVISION=3
TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_DEPENDS="openssl, libuv, libgnustl, c-ares"
TERMUX_PKG_RM_AFTER_INSTALL="lib/node_modules/npm/html lib/node_modules/npm/make.bat share/systemtap lib/dtrace"

14
packages/nodejs/deps-v8-src-flag-definitions.h.patch

@ -0,0 +1,14 @@
--- ../node-v6.0.0/deps/v8/src/flag-definitions.h 2016-04-26 15:50:11.000000000 -0400
+++ ./deps/v8/src/flag-definitions.h 2016-05-02 16:46:31.289030161 -0400
@@ -172,7 +172,10 @@
//
#define FLAG FLAG_FULL
-DEFINE_BOOL(warn_template_set, true,
+/* Termux modification: Do not enable this warning per default
+ as it will only confuse users needlessly. The root causes
+ of this warning will get fixed anyway soon in npm packages. */
+DEFINE_BOOL(warn_template_set, false,
"warn on deprecated v8::Template::Set() use")
DEFINE_BOOL(experimental_extras, false,

21
packages/nodejs/src-node_main.cc.patch

@ -0,0 +1,21 @@
diff -u -r ../node-v6.0.0/src/node_main.cc ./src/node_main.cc
--- ../node-v6.0.0/src/node_main.cc 2016-04-26 15:50:22.000000000 -0400
+++ ./src/node_main.cc 2016-05-02 16:29:08.313594254 -0400
@@ -1,4 +1,5 @@
#include "node.h"
+#include <stdlib.h>
#ifdef _WIN32
#include <VersionHelpers.h>
@@ -50,6 +51,11 @@
// UNIX
int main(int argc, char *argv[]) {
setvbuf(stderr, NULL, _IOLBF, 1024);
+ if (getenv("TMPDIR") == NULL) {
+ /* Give javascript programs (such as updated versions of npm) a working tmpdir. */
+ putenv("TMPDIR=@TERMUX_PREFIX@/tmp");
+ }
+
return node::Start(argc, argv);
}
#endif
Loading…
Cancel
Save