# libffi 3.5.2 — interfaz de llamada a función foránea (C). Lib base: python, muchos -sys crates.
# De-Alpinizada: compiler=zig-cc (migrado de gcc, matar-gcc 2026-07-16), configure-split, estático.
# --with-pic: el .a estático lleva objetos PIC ⇒ se puede enlazar dentro de bibliotecas COMPARTIDAS
# (libwayland-server.so / Mesa lo exigen; sin PIC: «R_X86_64_PC32 ... recompile with -fPIC»). PIC
# es superset: sigue sirviendo para el enlace estático de exes. (2026-06-27, stack gráfico tawasuyu.)
name    = "libffi"
version = "3.5.2"
[source]
tarball = "https://github.com/libffi/libffi/releases/download/v3.5.2/libffi-3.5.2.tar.gz"
sha256  = "f3a3082a23b37c293a4fcd1053147b371f2ff91fa7ea1b2a52e335676bac82dc"
[build]
compiler = "zig-cc"
target   = "x86_64-linux-musl"
link     = "static"
flags    = []
[deps]
build = ["make"]

[build.phases]
configure = './configure --build=$CBUILD --host=$CHOST --prefix=/usr --disable-shared --enable-static --with-pic --disable-exec-static-tramp'
compile   = 'make'
install   = 'make DESTDIR=/out install'
