From 227111c84a2945087abb4395daf63c7b23ba5bab Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 22:36:07 -0300 Subject: kinds #47, MuPDF and FreeType lazy: Zig 0.17's configure is handed the -D options and never the steps asked for (the configurer's argv, and the configure cache keyed on it), so no step can fetch for itself; the guard is `-Dpdf`, on by itself once MuPDF is fetched (std.Build.package_map's `available`) and off Linux, which asks `b.lazyDependency` for MuPDF, and FreeType (with the zlib and libpng it brings) is lazy too and asked by it or a window: a fresh checkout's `zig build -Dplatform=tui` fetches none of them, and without `-Dpdf` the pdf, addons, static, mupdf-check, pdf-harness and bench steps say to add it; building.typ, install.typ and shared-libs.md say so Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- docs/shared-libs.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/shared-libs.md') diff --git a/docs/shared-libs.md b/docs/shared-libs.md index b9f64fdf..f6031a0d 100644 --- a/docs/shared-libs.md +++ b/docs/shared-libs.md @@ -29,6 +29,15 @@ pdf` (or `zig build addons`, both) builds and installs each library in home install). MuPDF is compiled only for a step that needs it (`pdf`, the tests); `-Dmupdf` is gone. +Since 2026-11-07 MuPDF, and FreeType with the zlib and libpng it brings, +are lazy dependencies: a build fetches MuPDF only with `-Dpdf` (on by +itself once MuPDF is fetched, and off Linux), and FreeType only for it or a +window, so a fresh checkout's `zig build -Dplatform=tui` downloads none of +them. Zig 0.17's configure is handed the options and never the steps, so +the guard is that option, not the step: without it `pdf`, `addons`, +`static`, `mupdf-check`, `pdf-harness` and the PDF benches say to add +`-Dpdf`, and the tests leave their PDF cases out. + ## One static pardes (2026-11-06) `zig build static -Dplatform=tui -Dtarget=x86_64-linux-musl` links the -- cgit v1.3