qt5connectivity: add QtNfc submodule
authorJulien CORJON <corjon.j@ecagroup.com>
Tue, 19 Apr 2016 11:43:53 +0000 (13:43 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 3 Jun 2016 17:39:30 +0000 (19:39 +0200)
Signed-off-by: Julien Corjon <corjon.j@ecagroup.com>
[Thomas:
 - remove useless 'depends on' on toolchain features, since we now
   depend on bluez_utils/neard
 - remove the QT5CONNECTIVITY_INSTALL_TARGET_QMLS variable, and directly
   use QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH_QMLS and
   QT5CONNECTIVITY_INSTALL_TARGET_NFC_QMLS in
   QT5CONNECTIVITY_INSTALL_TARGET_CMDS.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/qt5/qt5connectivity/Config.in
package/qt5/qt5connectivity/qt5connectivity.mk

index d529ea7f85e4e9257d4f5b2d2ff2d050b1b689c1..e3128ec55c133e9ce6be3af5adc82e72fbaa2110 100644 (file)
@@ -1,13 +1,9 @@
 config BR2_PACKAGE_QT5CONNECTIVITY
        bool "qt5connectivity"
-       select BR2_PACKAGE_BLUEZ_UTILS
        select BR2_PACKAGE_QT5BASE
        select BR2_PACKAGE_QT5BASE_CONCURRENT
        select BR2_PACKAGE_QT5BASE_DBUS
-       depends on !BR2_STATIC_LIBS # bluez_utils
-       depends on BR2_USE_WCHAR # bluez_utils
-       depends on BR2_TOOLCHAIN_HAS_THREADS # bluez_utils
-       depends on BR2_USE_MMU # bluez_utils
+       depends on BR2_PACKAGE_NEARD || BR2_PACKAGE_BLUEZ_UTILS
        help
          Qt is a cross-platform application and UI framework for
          developers using C++.
@@ -16,6 +12,5 @@ config BR2_PACKAGE_QT5CONNECTIVITY
 
          http://qt.io
 
-comment "qt5connectivity needs a toolchain w/ wchar, threads, dynamic library"
-       depends on BR2_USE_MMU
-       depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+comment "qt5connectivity needs neard and/or bluez_utils"
+       depends on !BR2_PACKAGE_NEARD && !BR2_PACKAGE_BLUEZ_UTILS
index 936bc6f63c3d5b44afc7993753ad69f9f0b7e157..ac0f2dd765a6dede0d953381ec2b05230172cc71 100644 (file)
@@ -7,7 +7,7 @@
 QT5CONNECTIVITY_VERSION = $(QT5_VERSION)
 QT5CONNECTIVITY_SITE = $(QT5_SITE)
 QT5CONNECTIVITY_SOURCE = qtconnectivity-opensource-src-$(QT5CONNECTIVITY_VERSION).tar.xz
-QT5CONNECTIVITY_DEPENDENCIES = bluez_utils qt5base
+QT5CONNECTIVITY_DEPENDENCIES = qt5base
 QT5CONNECTIVITY_INSTALL_STAGING = YES
 
 ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y)
@@ -18,9 +18,9 @@ QT5CONNECTIVITY_LICENSE = Commercial license
 QT5CONNECTIVITY_REDISTRIBUTE = NO
 endif
 
-ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
-QT5CONNECTIVITY_DEPENDENCIES += qt5declarative
-endif
+QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5DECLARATIVE),qt5declarative)
+QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_BLUEZ_UTILS),bluez_utils)
+QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_NEARD),neard)
 
 define QT5CONNECTIVITY_CONFIGURE_CMDS
        (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake)
@@ -36,15 +36,36 @@ define QT5CONNECTIVITY_INSTALL_STAGING_CMDS
 endef
 
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-define QT5CONNECTIVITY_INSTALL_TARGET_QMLS
+ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y)
+define QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH_QMLS
        cp -dpfr $(STAGING_DIR)/usr/qml/QtBluetooth $(TARGET_DIR)/usr/qml/
 endef
 endif
+ifeq ($(BR2_PACKAGE_NEARD),y)
+define QT5CONNECTIVITY_INSTALL_TARGET_NFC_QMLS
+       cp -dpfr $(STAGING_DIR)/usr/qml/QtNfc $(TARGET_DIR)/usr/qml/
+endef
+endif
+endif
 
-define QT5CONNECTIVITY_INSTALL_TARGET_CMDS
+ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y)
+define QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH
        cp -dpf $(STAGING_DIR)/usr/lib/libQt5Bluetooth.so.* $(TARGET_DIR)/usr/lib
        cp -dpf $(STAGING_DIR)/usr/bin/sdpscanner $(TARGET_DIR)/usr/bin
-       $(QT5CONNECTIVITY_INSTALL_TARGET_QMLS)
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_NEARD),y)
+define QT5CONNECTIVITY_INSTALL_TARGET_NFC
+       cp -dpf $(STAGING_DIR)/usr/lib/libQt5Nfc.so.* $(TARGET_DIR)/usr/lib
+endef
+endif
+
+define QT5CONNECTIVITY_INSTALL_TARGET_CMDS
+       $(QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH)
+       $(QT5CONNECTIVITY_INSTALL_TARGET_NFC)
+       $(QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH_QMLS)
+       $(QT5CONNECTIVITY_INSTALL_TARGET_NFC_QMLS)
 endef
 
 $(eval $(generic-package))