# xorgproto 2024.1 — headers del protocolo X11 (X.h, Xproto.h, keysymdef.h, extensiones…) + los .pc
# (xproto, xextproto, kbproto, inputproto…). Sin binarios: sólo cabeceras. Capa 0 de la campaña KDE
# (ADR 0011); dep de build de libXau/libXdmcp/libxcb/libX11. Build meson con -Dlegacy=true para incluir
# los headers legacy (kbproto/inputproto/…) que libX11 y consumidores viejos todavía piden.
# (Alternativa autotools: el tarball trae ./configure; `./configure --prefix=/usr --enable-legacy`.)
name    = "xorgproto"
version = "2024.1"

[source]
tarball = "https://www.x.org/releases/individual/proto/xorgproto-2024.1.tar.xz"
sha256  = "372225fd40815b8423547f5d890c5debc72e88b91088fbfb13158c20495ccb59"

[build]
compiler    = "zig-cc"
target      = "x86_64-linux-musl"
link        = "dynamic"
zig_version = "0.13.0"

[build.phases]
# Los .pc de proto se instalan en /usr/share/pkgconfig (datadir), no en /usr/lib/pkgconfig.
configure = "meson setup output --prefix=/usr --buildtype=release --wrap-mode=nodownload -Dlegacy=true"
compile   = "ninja -C output"
install   = "DESTDIR=/out ninja -C output install"

[deps]
build = ["meson", "samurai", "python3", "pkgconf"]
