# libva 2.22.0 — Video Acceleration API (libva.so + libva-drm.so). Campaña KDE (ADR 0011): **kpipewire**
# los exige REQUIRED (`pkg_check_modules(LIBVA ... libva REQUIRED)` + libva-drm), para codificar por
# hardware los streams que graba KPipeWireRecord.
#
# Es sólo la capa de despacho: los drivers reales (intel-media-driver / mesa gallium VA) son RUNTIME y
# se cargan por dlopen — no hacen falta para compilar. Sólo backend DRM: sin X11/Wayland/GLX (evita
# arrastrar más cadena; el driver DRM es el que usa kpipewire).
name    = "libva"
version = "2.22.0"

[source]
tarball = "https://github.com/intel/libva/archive/refs/tags/2.22.0.tar.gz"
sha256  = "467c418c2640a178c6baad5be2e00d569842123763b80507721ab87eb7af8735"

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

[build.phases]
configure = '''
PYTHONPATH=/usr/lib/python3.12/site-packages meson setup output --prefix=/usr --buildtype=release \
  -Ddefault_library=shared \
  -Dwith_x11=no -Dwith_glx=no -Dwith_wayland=no -Dwith_win32=no -Ddisable_drm=false \
  -Denable_docs=false
'''
compile = "PYTHONPATH=/usr/lib/python3.12/site-packages ninja -C output"
install = "PYTHONPATH=/usr/lib/python3.12/site-packages DESTDIR=/out meson install -C output --no-rebuild"

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