libqmi: make QMI-over-MBIM support optional 13645/head
authorAleksander Morgado <aleksander@aleksander.es>
Mon, 12 Oct 2020 11:54:54 +0000 (13:54 +0200)
committerAleksander Morgado <aleksander@aleksander.es>
Tue, 13 Oct 2020 07:18:57 +0000 (09:18 +0200)
There is no need to force every user of libqmi to require libmbim and
build with QMI-over-MBIM support, if they know they're not going to
use it. Just make it optional and enabled by default.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
libs/libqmi/Config.in [new file with mode: 0644]
libs/libqmi/Makefile

diff --git a/libs/libqmi/Config.in b/libs/libqmi/Config.in
new file mode 100644 (file)
index 0000000..1c3ad0c
--- /dev/null
@@ -0,0 +1,9 @@
+menu "Configuration"
+depends on PACKAGE_libqmi
+
+       config LIBQMI_WITH_MBIM_QMUX
+               bool "Include MBIM QMUX service support"
+               default y
+               help
+                 Compile libqmi with QMI-over-MBIM support
+endmenu
index b9020b3987f2ac50ae9c675cefee44bba77ef89a..4be3f9e0e3af5d00e60b1f1e3434dfdbe7d2f51e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libqmi
 PKG_VERSION:=1.26.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://www.freedesktop.org/software/libqmi
@@ -23,10 +23,16 @@ PKG_BUILD_PARALLEL:=1
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
 
+define Package/libqmi/config
+  source "$(SOURCE)/Config.in"
+endef
+
 define Package/libqmi
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+libmbim
+  DEPENDS:= \
+    +glib2 \
+    +LIBQMI_WITH_MBIM_QMUX:libmbim
   TITLE:=Helper library to talk to QMI enabled modems
   URL:=https://www.freedesktop.org/wiki/Software/libqmi
   LICENSE:=LGPL-2.0-or-later
@@ -59,7 +65,7 @@ CONFIGURE_ARGS += \
        --disable-gtk-doc-pdf \
        --disable-silent-rules \
        --enable-firmware-update \
-       --enable-mbim-qmux \
+       --$(if $(LIBQMI_WITH_MBIM_QMUX),en,dis)able-mbim-qmux \
        --enable-more-warnings=yes \
        --without-udev \
        --without-udev-base-dir