nodejs-current: fix hardcoded paths
[termux-packages] / packages / nodejs-current / fix-hardcoded-paths.patch
1 diff -uNr node-v8.4.0/deps/uv/src/unix/core.c node-v8.4.0.mod/deps/uv/src/unix/core.c
2 --- node-v8.4.0/deps/uv/src/unix/core.c 2017-08-15 19:42:28.000000000 +0300
3 +++ node-v8.4.0.mod/deps/uv/src/unix/core.c 2017-09-14 16:13:27.292856099 +0300
4 @@ -1112,7 +1112,9 @@
5
6 /* No temp environment variables defined */
7 #if defined(__ANDROID__)
8 - buf = "/data/local/tmp";
9 + // Don't use '/data/local/tmp' in Termux
10 + //buf = "/data/local/tmp";
11 + buf = "@TERMUX_PREFIX@/tmp";
12 #else
13 buf = "/tmp";
14 #endif
15 diff -uNr node-v8.4.0/deps/v8/src/flag-definitions.h node-v8.4.0.mod/deps/v8/src/flag-definitions.h
16 --- node-v8.4.0/deps/v8/src/flag-definitions.h 2017-08-15 19:42:30.000000000 +0300
17 +++ node-v8.4.0.mod/deps/v8/src/flag-definitions.h 2017-09-14 16:12:34.462856137 +0300
18 @@ -1203,7 +1203,7 @@
19 DEFINE_BOOL(perf_prof_unwinding_info, false,
20 "Enable unwinding info for perf linux profiler (experimental).")
21 DEFINE_IMPLICATION(perf_prof, perf_prof_unwinding_info)
22 -DEFINE_STRING(gc_fake_mmap, "/tmp/__v8_gc__",
23 +DEFINE_STRING(gc_fake_mmap, "@TERMUX_PREFIX@/tmp/__v8_gc__",
24 "Specify the name of the file for fake gc mmap used in ll_prof")
25 DEFINE_BOOL(log_internal_timer_events, false, "Time internal events.")
26 DEFINE_BOOL(log_timer_events, false,
27 diff -uNr node-v8.4.0/deps/v8/src/log.cc node-v8.4.0.mod/deps/v8/src/log.cc
28 --- node-v8.4.0/deps/v8/src/log.cc 2017-08-15 19:42:31.000000000 +0300
29 +++ node-v8.4.0.mod/deps/v8/src/log.cc 2017-09-14 16:11:05.192856201 +0300
30 @@ -233,7 +233,7 @@
31 FILE* perf_output_handle_;
32 };
33
34 -const char PerfBasicLogger::kFilenameFormatString[] = "/tmp/perf-%d.map";
35 +const char PerfBasicLogger::kFilenameFormatString[] = "@TERMUX_PREFIX@/tmp/perf-%d.map";
36 // Extra space for the PID in the filename
37 const int PerfBasicLogger::kFilenameBufferPadding = 16;
38