ports/ncurses: Set some needed environment variables

ncurses depends on these being set to function properly
This commit is contained in:
Bananymous 2025-04-22 01:56:34 +03:00
parent 32d543943b
commit 34e680d792
2 changed files with 11 additions and 0 deletions

View File

@ -15,3 +15,11 @@ CONFIGURE_OPTIONS=(
'--without-dlsym'
'--without-cxx-binding'
)
install() {
make install "DESTDIR=$BANAN_SYSROOT" || exit 1
shellrc="$BANAN_SYSROOT/home/user/.shellrc"
grep -q 'export TERM=' "$shellrc" || echo 'export TERM=ansi' >> "$shellrc"
grep -q 'export NCURSES_NO_UTF8_ACS=' "$shellrc" || echo 'export NCURSES_NO_UTF8_ACS=1' >> "$shellrc"
}

View File

@ -27,6 +27,9 @@ int main(int argc, char** argv)
if (load_keymap("/usr/share/keymaps/us.keymap") == -1)
perror("load_keymap");
setenv("TERM", "ansi", 1);
setenv("NCURSES_NO_UTF8_ACS", "1", 1);
if (fork() == 0)
{
execl("/bin/dhcp-client", "dhcp-client", NULL);