# ModemManager 1.22.0 — libmm-glib (banda ancha móvil). Campaña KDE (ADR 0011): sólo se necesita para que
# `modemmanager-qt` (KF6ModemManagerQt) compile, y ese framework es REQUIRED en el find_package(KF6 ...)
# de plasma-nm (el applet de red) — aunque el escritorio no tenga módem.
#
# Igual que networkmanager: fuente del gitlab.freedesktop.org, y se recorta a la lib.
# qmi/mbim/qrtr=false evitan libqmi/libmbim/libqrtr (protocolos de módem, cadenas enteras que no hacen
# falta para los headers+libmm-glib.pc). polkit=no, systemd/journal/suspend off, introspection/man/tests off.
# Deps duras: gio (glib-shared, deuda Capa 0 saldada) + libudev (libudev-zero ya sellado).
name    = "modemmanager"
version = "1.22.0"

[source]
tarball = "https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/archive/1.22.0/ModemManager-1.22.0.tar.gz"
sha256  = "6c8f8720737a3788e394c700f36236278c9de09d76069a079e6f1daaf08b2768"

[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 \
  -Dqmi=false -Dmbim=false -Dqrtr=false -Dudev=false -Dudevdir=/usr/lib/udev \
  -Dpolkit=no -Dsystemdsystemunitdir=no -Dsystemd_suspend_resume=false -Dsystemd_journal=false \
  -Dintrospection=false -Dvapi=false -Dman=false -Dtests=false \
  -Dat_command_via_dbus=false -Dbash_completion=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", "glib-shared", "pcre2-shared", "libffi",
  "libudev-zero", "zlib-shared", "gettext-tiny", "dbus", "expat", "libxml2", "libxslt"]
