# brotli 1.2.0 — compresión Brotli (libbrotli{common,dec,enc} + CLI). Base de fuentes web
# (woff2/freetype/harfbuzz→GTK). De-Alpinizada: cmake static (generador Make, sin Ninja),
# sin wheel de python (BOOTSTRAP). El fallo previo era falta de `cmake` en el sandbox:
# hay que declararlo en [deps].build para que el lab lo materialice (patrón libjpeg-turbo/libtiff).
name    = "brotli"
version = "1.2.0"

[source]
tarball = "https://github.com/google/brotli/archive/refs/tags/v1.2.0.tar.gz"
sha256  = "816c96e8e8f193b40151dad7e8ff37b1221d019dbcb9c35cd3fadbfe6477dfec"
patches = ["optimize-mips.patch", "fix-lp64.patch"]

[build]
compiler = "zig-cc"
target   = "x86_64-linux-musl"
link     = "static"
flags    = []

[build.phases]
# CMAKE_INSTALL_LIBDIR=lib: el lab usa /usr/lib (no /usr/lib64) → pkg-config de los consumidores.
configure = "cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF"
compile   = "cmake --build build"
install   = "DESTDIR=/out cmake --install build"

[deps]
build = ["cmake"]
