zsh's configure will happily build without a terminal library -- the probe is AC_SEARCH_LIBS, which is soft -- and produce a shell whose cursor cannot move and whose arrow keys do nothing. ZLE is the reason to want zsh, so this comes first. MIT, so it combines with Apache-2.0 without conditions. Built static, widec (which is what zsh looks for first, and the console's UTF-8 decoder can already take), and --disable-database --with-fallbacks so seven terminal descriptions are compiled into the library. SchOS has no business shipping /usr/share/terminfo, and with the fallbacks the .a is self-contained: verified that no terminfo path strings survive in the binary. Nothing reaches sysroot/ -- a static library is not a file the OS ships -- so `install` means into $(PREFIX). port.mk gains NCURSES beside MUSL for the same reason MUSL is there. tinfotest.c is the acceptance test, and asks the question the build cannot: not "did it link" but "does terminfo work on a SchOS console". It reports TIOCGWINSZ, initialises from the compiled-in fallback, and names every capability ZLE binds. Anything MISSING there is a missing feature in the shell later. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VQ7Qx8E1q1M1bbCq8QLHS2
37 lines
1.4 KiB
Makefile
37 lines
1.4 KiB
Makefile
# SPDX-License-Identifier: Apache-2.0
|
|
# SchOS ports — third-party software, one directory per port.
|
|
# All ports are permissive-licensed (MIT, BSD, 0BSD, Apache 2.0).
|
|
#
|
|
# ports/musl/ libc — installs headers/libs to build/ports/musl/prefix
|
|
# ports/mksh/ MirBSD Korn Shell — installed as sysroot/bin/sh
|
|
# ports/toybox/ core utilities — installed as sysroot/bin/<applet>
|
|
# ports/ncurses/ terminfo + screen library — link-time only, ships nothing
|
|
#
|
|
# A port directory holds only a Makefile and optional patches/. Everything
|
|
# generated lives in build/ports/<name>/ — see mk/port.mk for the contract.
|
|
# Tarballs are cached in dist/ and are never removed by 'clean'.
|
|
#
|
|
# Order matters: musl must be built before anything that links against it.
|
|
|
|
# Ports that live in this directory but are deliberately not built by `make`.
|
|
# Empty for now; the filter stays because the reason it existed will recur --
|
|
# a port whose licence cannot be combined with Apache-2.0 can be kept here for
|
|
# local testing but must never be built into a SchOS image.
|
|
NOTPORTS :=
|
|
PORTS := $(filter-out $(NOTPORTS), \
|
|
$(patsubst %/,%,$(sort $(dir $(wildcard */Makefile)))))
|
|
|
|
.PHONY: all $(PORTS) clean distclean
|
|
|
|
all: $(PORTS)
|
|
|
|
mksh: musl
|
|
toybox: musl
|
|
fastfetch: musl
|
|
ncurses: musl
|
|
|
|
$(PORTS):
|
|
$(MAKE) -C $@
|
|
|
|
clean distclean:
|
|
for p in $(PORTS); do $(MAKE) -C $$p $@; done
|