PKGNAME=libqmi
PKGSEC=libs
PKGDEP="systemd libmbim libgudev libqrtr-glib"
BUILDDEP="gobject-introspection gtk-doc help2man vim"
BUILDDEP__RETRO="help2man"
BUILDDEP__ARMV4="${BUILDDEP__RETRO}"
BUILDDEP__ARMV6HF="${BUILDDEP__RETRO}"
BUILDDEP__ARMV7HF="${BUILDDEP__RETRO}"
BUILDDEP__I486="${BUILDDEP__RETRO}"
BUILDDEP__LOONGSON2F="${BUILDDEP__RETRO}"
BUILDDEP__M68K="${BUILDDEP__RETRO}"
BUILDDEP__POWERPC="${BUILDDEP__RETRO}"
BUILDDEP__PPC64="${BUILDDEP__RETRO}"
PKGDES="Support library to use the Qualcomm MSM Interface (QMI) protocol"

# FIXME: gtk-doc is broken.
#
# ...
# ../libqmi-glib-docs.xml:542: element include: XInclude error : could not
# load ../xml/qmi-message-dpm-close-port.xml, and no fallback was found
MESON_AFTER="-Dcollection=full \
             -Dfirmware_update=true \
             -Dmbim_qmux=true \
             -Dmm_runtime_check=true \
             -Dqrtr=true \
             -Drmnet=true \
             -Dudev=true \
             -Dintrospection=true \
             -Dgtk_doc=false \
             -Dman=true \
             -Dbash_completion=true"
MESON_AFTER__RETRO=" \
             -Dcollection=basic \
             -Dfirmware_update=true \
             -Dmbim_qmux=true \
             -Dmm_runtime_check=true \
             -Dqrtr=true \
             -Drmnet=true \
             -Dudev=true \
             -Dintrospection=false \
             -Dgtk_doc=false \
             -Dman=false \
             -Dbash_completion=false"
MESON_AFTER__ARMV4=" \
             ${MESON_AFTER__RETRO}"
MESON_AFTER__ARMV6HF=" \
             ${MESON_AFTER__RETRO}"
MESON_AFTER__ARMV7HF=" \
             ${MESON_AFTER__RETRO}"
MESON_AFTER__I486=" \
             ${MESON_AFTER__RETRO}"
MESON_AFTER__LOONGSON2F=" \
             ${MESON_AFTER__RETRO}"
MESON_AFTER__M68K=" \
             ${MESON_AFTER__RETRO}"
MESON_AFTER__POWERPC=" \
             ${MESON_AFTER__RETRO}"
MESON_AFTER__PPC64=" \
             ${MESON_AFTER__RETRO}"

PKGBREAK="modemmanager<=1.6.10"
ABTYPE=meson

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
