# dbus 1.16.2 — bus de IPC de escritorio. Import de Alpine (trae parches musl). Adaptado al
# lab hammer: deps sólo del catálogo canónico (dbus real sólo necesita expat; libsm/libx11/
# glib/xmlto eran de session-mgmt X11 + docs, opcionales). Build meson estático musl.
name    = "dbus"
version = "1.16.2"

[source]
tarball = "https://dbus.freedesktop.org/releases/dbus/dbus-1.16.2.tar.xz"
sha256  = "0ba2a1a4b16afe7bceb2c07e9ce99a8c2c3508e5dec290dbb643384bd6beb7e2"

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

[build.phases]
# meson estático (patrón glib): systemd/x11-autolaunch/tests/docs off (deps ausentes en el lab).
configure = "PYTHONPATH=/usr/lib/python3.12/site-packages meson setup output --prefix=/usr --buildtype=release --prefer-static -Ddefault_library=static -Dsystemd=disabled -Dx11_autolaunch=disabled -Ddoxygen_docs=disabled -Dxml_docs=disabled -Dtools=true -Dsystem_pid_file=/run/dbus/dbus.pid"
compile   = "PYTHONPATH=/usr/lib/python3.12/site-packages ninja -C output"
install   = '''
set -e
PYTHONPATH=/usr/lib/python3.12/site-packages DESTDIR=/out meson install --no-rebuild -C output
# can't install tmpfs
rm -rf /out/run
'''

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