From 55a4e31284ce75b6734883c6160203980420b2eb Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Thu, 7 May 2020 17:15:49 +0300 Subject: [PATCH] nodejs: disable printing messages to android log in more places --- packages/nodejs/build.sh | 2 +- packages/nodejs/deps-v8-BUILD.gn.patch | 12 --------- packages/nodejs/no-android-log.patch | 36 ++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 13 deletions(-) delete mode 100644 packages/nodejs/deps-v8-BUILD.gn.patch create mode 100644 packages/nodejs/no-android-log.patch diff --git a/packages/nodejs/build.sh b/packages/nodejs/build.sh index adc45e30e..5ec4644f7 100644 --- a/packages/nodejs/build.sh +++ b/packages/nodejs/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://nodejs.org/ TERMUX_PKG_DESCRIPTION="Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications" TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_VERSION=14.0.0 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SHA256=6e220129f1d3101695ce63af59f353bd915bafbd61fb954010c6e59cf550c764 # Note that we do not use a shared libuv to avoid an issue with the Android diff --git a/packages/nodejs/deps-v8-BUILD.gn.patch b/packages/nodejs/deps-v8-BUILD.gn.patch deleted file mode 100644 index a8b8f7a91..000000000 --- a/packages/nodejs/deps-v8-BUILD.gn.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr node-v14.0.0/deps/v8/BUILD.gn node-v14.0.0.mod/deps/v8/BUILD.gn ---- node-v14.0.0/deps/v8/BUILD.gn 2020-04-21 14:38:50.000000000 +0300 -+++ node-v14.0.0.mod/deps/v8/BUILD.gn 2020-05-06 13:58:58.867691869 +0300 -@@ -28,7 +28,7 @@ - - declare_args() { - # Print to stdout on Android. -- v8_android_log_stdout = false -+ v8_android_log_stdout = true - - # Dynamically set an additional dependency from v8/custom_deps. - v8_custom_deps = "" diff --git a/packages/nodejs/no-android-log.patch b/packages/nodejs/no-android-log.patch new file mode 100644 index 000000000..513dc77b4 --- /dev/null +++ b/packages/nodejs/no-android-log.patch @@ -0,0 +1,36 @@ +diff -uNr node-v14.0.0/deps/v8/BUILD.gn node-v14.0.0.mod/deps/v8/BUILD.gn +--- node-v14.0.0/deps/v8/BUILD.gn 2020-04-21 11:38:50.000000000 +0000 ++++ node-v14.0.0.mod/deps/v8/BUILD.gn 2020-05-07 14:11:12.247429516 +0000 +@@ -28,7 +28,7 @@ + + declare_args() { + # Print to stdout on Android. +- v8_android_log_stdout = false ++ v8_android_log_stdout = true + + # Dynamically set an additional dependency from v8/custom_deps. + v8_custom_deps = "" +diff -uNr node-v14.0.0/deps/v8/infra/mb/mb_config.pyl node-v14.0.0.mod/deps/v8/infra/mb/mb_config.pyl +--- node-v14.0.0/deps/v8/infra/mb/mb_config.pyl 2020-04-21 11:38:50.000000000 +0000 ++++ node-v14.0.0.mod/deps/v8/infra/mb/mb_config.pyl 2020-05-07 14:12:44.653746359 +0000 +@@ -565,7 +565,7 @@ + + 'mixins': { + 'android': { +- 'gn_args': 'target_os="android" v8_android_log_stdout=true', ++ 'gn_args': 'target_os="android" v8_android_log_stdout=false', + }, + + 'android_strip_outputs': { +diff -uNr node-v14.0.0/src/debug_utils.cc node-v14.0.0.mod/src/debug_utils.cc +--- node-v14.0.0/src/debug_utils.cc 2020-04-21 11:38:51.000000000 +0000 ++++ node-v14.0.0.mod/src/debug_utils.cc 2020-05-07 14:12:00.694741330 +0000 +@@ -500,7 +500,7 @@ + + WriteConsoleW(handle, wbuf.data(), n, nullptr, nullptr); + return; +-#elif defined(__ANDROID__) ++#elif defined(__ANDROID__) && !defined(__TERMUX__) + if (file == stderr) { + __android_log_print(ANDROID_LOG_ERROR, "nodejs", "%s", str.data()); + return;