# Importada de Alpine aports (Etapa G) — de-Alpinizada. foot = emulador de terminal Wayland
# (dnkl). Último paquete diferido del userland foundational. meson, binario musl (dinámico: pixman).
# Deps directas: fcft/tllist/utf8proc (familia foot, selladas) + wayland/wayland-protocols/
# pixman/fontconfig/freetype/harfbuzz/libxkbcommon/ncurses (canónicas). Sin PGO (evita cage).
name    = "foot"
version = "1.27.0"

[source]
tarball = "https://codeberg.org/dnkl/foot/archive/1.27.0.tar.gz"
sha256  = "4e6131cc859ec6a36569f1978cf3617cc3836a681d13d228ded1b4885dab7770"

[build]
compiler = "zig-cc"
target   = "x86_64-linux-musl"
# zig 0.13 como pixman/wayland canónicas: zig 0.16/clang21 produce un ejecutable musl dinámico
# que SIGSEGV en el arranque (antes de main); 0.13 lo evita (mismo toolchain que el stack gráfico).
zig_version = "0.13.0"
# pixman canónica es link=dynamic (sólo .so, sin .a) — igual que la usa mirada-compositor;
# por eso foot enlaza dinámico (estático es irreductible sin re-sellar pixman). wayland-cursor/
# utf8proc también vienen como .so; el resto (fcft/harfbuzz/freetype/xkbcommon/z/png) son .a.
link     = "dynamic"
flags    = []

[build.phases]
# Sin PGO (Alpine usa cage headless para el profiling; aquí build directo release).
# utmp-backend=none evita libutempter; docs=disabled evita scdoc; tests/themes/ime fuera.
# terminfo=disabled: la ncurses canónica de hammer es libs-only (no trae `tic`); el
# terminfo de foot es dep de RUNTIME (Alpine: ncurses-terminfo), no de build. Usar TERM=xterm-256color.
configure = "PYTHONPATH=/usr/lib/python3.12/site-packages meson setup output --prefix=/usr --buildtype=release --default-library=static -Dprefer_static=true -Db_lto=false -Db_pgo=off -Ddocs=disabled -Dthemes=false -Dtests=false -Dime=false -Dgrapheme-clustering=enabled -Dterminfo=disabled -Dutmp-backend=none"
compile   = "PYTHONPATH=/usr/lib/python3.12/site-packages ninja -C output"
install   = "PYTHONPATH=/usr/lib/python3.12/site-packages DESTDIR=/out meson install -C output --no-rebuild"

# depends de runtime de Alpine (NO build-deps): ncurses-terminfo

[deps]
build = ["fcft", "tllist", "utf8proc", "fontconfig", "freetype", "harfbuzz", "libxkbcommon", "ncurses", "pixman", "wayland", "wayland-protocols", "libffi", "libpng", "zlib", "expat", "meson", "samurai", "python3", "pkgconf", "linux-headers"]
