Termux: build with make, install to $PREFIX, no nl_langinfo on Android
ci / linux (clang) (push) Canceled after 0s
ci / linux (gcc) (push) Canceled after 0s
ci / sanitizers (push) Canceled after 0s
ci / musl (push) Canceled after 0s
ci / macos (push) Canceled after 0s

- bootstrap_termux.sh installs pkg-config/binutils, builds with make,
  runs the tests and installs into Termux's $PREFIX/bin.
- Makefile drops -lpthread on Android (pthreads are in bionic libc).
- TUI assumes UTF-8 on Android: nl_langinfo needs API 26, Termux
  targets 24. All sources compile for aarch64-linux-android24 (NDK 27).
This commit is contained in:
WHC
2026-10-05 01:55:49 +08:00
parent 2fde898da0
commit a77f27ed59
4 changed files with 29 additions and 20 deletions
+3 -1
View File
@@ -369,7 +369,9 @@ static void theme_init(void) {
const char *nc = getenv("NO_COLOR");
g_nocolor = nc && nc[0];
const char *asc = getenv("CST_ASCII");
#ifndef _WIN32
#if defined(__ANDROID__)
g_utf8 = 1; /* bionic is UTF-8 only; nl_langinfo needs API 26 */
#elif !defined(_WIN32)
const char *cs = nl_langinfo(CODESET);
g_utf8 = cs && (strcasecmp(cs, "UTF-8") == 0 || strcasecmp(cs, "utf8") == 0);
#endif