# zstd 1.5.7 → libzstd.a (C, Makefile). Lib FUNDACIONAL: zstd-sys está en MONTONES de crates Rust
# (compresión moderna) + cola C. De-Alpinizada: compiler=zig-cc (migrado de gcc, matar-gcc 2026-07-16), build de lib/ (no CLI), estático.
name    = "zstd"
version = "1.5.7"
[source]
tarball = "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
sha256  = "eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3"
[build]
compiler = "zig-cc"
target   = "x86_64-linux-musl"
link     = "static"
flags    = []
[build.phases]
# CFLAGS con -fPIC: el libzstd.a lleva objetos PIC ⇒ enlazable dentro de .so (Mesa liga libzstd en
# sus bibliotecas compartidas; sin PIC: «R_X86_64_PC32 ... recompile with -fPIC»). PIC es superset.
compile = 'make -C lib libzstd.a CFLAGS="-O3 -fPIC"'
install = 'make -C lib install PREFIX=/usr DESTDIR=/out'
