Skip to contentSkip to conversation

qt5connectivity: add sdpscanner tool for Qt5Bluetooth

PATCH New Julien Corjon 4 participants 16 messages Apr 4, 2016 – Jun 3, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 qt5connectivity: add sdpscanner tool for Qt5Bluetooth

---
 package/qt5/qt5connectivity/qt5connectivity.mk | 1 +
 1 file changed, 1 insertion(+)
package/qt5/qt5connectivity/qt5connectivity.mk +1 -0
index a68f5ec..936bc6f 100644
@@ -43,6 +43,7 @@ endif
 
 define QT5CONNECTIVITY_INSTALL_TARGET_CMDS
 	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
 
Signature · 1 line
2.5.0
#1 lore raw

PATCH 2/2 qt5connectivity: add QtNfc submodule

---
 package/qt5/qt5connectivity/Config.in          | 10 ++++++----
 package/qt5/qt5connectivity/qt5connectivity.mk |  4 +++-
 2 files changed, 9 insertions(+), 5 deletions(-)
package/qt5/qt5connectivity/Config.in +6 -4
index d529ea7..611ef14 100644
@@ -1,13 +1,15 @@
 config BR2_PACKAGE_QT5CONNECTIVITY
 	bool "qt5connectivity"
 	select BR2_PACKAGE_BLUEZ_UTILS
+	select BR2_PACKAGE_NEARD
 	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_STATIC_LIBS # bluez_utils, neard
+	depends on BR2_USE_WCHAR # bluez_utils, neard
+	depends on BR2_TOOLCHAIN_HAS_THREADS # bluez_utils, neard
+	depends on BR2_USE_MMU # bluez_utils, neard
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # neard
 	help
 	  Qt is a cross-platform application and UI framework for
 	  developers using C++.
package/qt5/qt5connectivity/qt5connectivity.mk +3 -1
index 936bc6f..ff82b9d 100644
@@ -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 = bluez_utils neard qt5base
 QT5CONNECTIVITY_INSTALL_STAGING = YES
 
 ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y)
@@ -38,12 +38,14 @@ endef
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
 define QT5CONNECTIVITY_INSTALL_TARGET_QMLS
 	cp -dpfr $(STAGING_DIR)/usr/qml/QtBluetooth $(TARGET_DIR)/usr/qml/
+	cp -dpfr $(STAGING_DIR)/usr/qml/QtNfc $(TARGET_DIR)/usr/qml/
 endef
 endif
 
 define QT5CONNECTIVITY_INSTALL_TARGET_CMDS
 	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Bluetooth.so.* $(TARGET_DIR)/usr/lib
 	cp -dpf $(STAGING_DIR)/usr/bin/sdpscanner $(TARGET_DIR)/usr/bin
+	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Nfc.so.* $(TARGET_DIR)/usr/lib
 	$(QT5CONNECTIVITY_INSTALL_TARGET_QMLS)
 endef
 
Signature · 1 line
2.5.0
#2 lore raw

PATCH 2/2 qt5connectivity: add QtNfc submodule

Quoted 17 lines · Julien Corjon
---
  package/qt5/qt5connectivity/Config.in          | 10 ++++++----
  package/qt5/qt5connectivity/qt5connectivity.mk |  4 +++-
  2 files changed, 9 insertions(+), 5 deletions(-)
package/qt5/qt5connectivity/Config.in +1 -0
index d529ea7..611ef14 100644
@@ -1,13 +1,15 @@
  config BR2_PACKAGE_QT5CONNECTIVITY
  	bool "qt5connectivity"
  	select BR2_PACKAGE_BLUEZ_UTILS
+	select BR2_PACKAGE_NEARD
  	select BR2_PACKAGE_QT5BASE
  	select BR2_PACKAGE_QT5BASE_CONCURRENT

package/qt5/qt5connectivity/Config.in line 12

Quoted 10 lines
package/qt5/qt5connectivity/Config.in +5 -4
  	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_STATIC_LIBS # bluez_utils, neard
+	depends on BR2_USE_WCHAR # bluez_utils, neard
+	depends on BR2_TOOLCHAIN_HAS_THREADS # bluez_utils, neard
+	depends on BR2_USE_MMU # bluez_utils, neard
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # neard

My first thought was: this is unnecessarily adding an architecture dependency
to qt5connectivity. However, in practice it doesn't exclude anything that wasn't excluded already (sparc and arc don't have GL support anyway).

Therefore:

Regards,
Arnout

Quoted 32 lines
package/qt5/qt5connectivity/Config.in +0 -0
  	help
  	  Qt is a cross-platform application and UI framework for
  	  developers using C++.
package/qt5/qt5connectivity/qt5connectivity.mk +3 -1
index 936bc6f..ff82b9d 100644
@@ -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 = bluez_utils neard qt5base
  QT5CONNECTIVITY_INSTALL_STAGING = YES
 
  ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y)
@@ -38,12 +38,14 @@ endef
  ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
  define QT5CONNECTIVITY_INSTALL_TARGET_QMLS
  	cp -dpfr $(STAGING_DIR)/usr/qml/QtBluetooth $(TARGET_DIR)/usr/qml/
+	cp -dpfr $(STAGING_DIR)/usr/qml/QtNfc $(TARGET_DIR)/usr/qml/
  endef
  endif
 
  define QT5CONNECTIVITY_INSTALL_TARGET_CMDS
  	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Bluetooth.so.* $(TARGET_DIR)/usr/lib
  	cp -dpf $(STAGING_DIR)/usr/bin/sdpscanner $(TARGET_DIR)/usr/bin
+	cp -dpf $(STAGING_DIR)/usr/lib/libQt5Nfc.so.* $(TARGET_DIR)/usr/lib
  	$(QT5CONNECTIVITY_INSTALL_TARGET_QMLS)
  endef
 
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH 2/2 qt5connectivity: add QtNfc submodule

In reply to Julien Corjon

Hello,

Quoted 11 lines · Julien Corjon
---
 package/qt5/qt5connectivity/Config.in          | 10 ++++++----
 package/qt5/qt5connectivity/qt5connectivity.mk |  4 +++-
 2 files changed, 9 insertions(+), 5 deletions(-)
package/qt5/qt5connectivity/Config.in +0 -0
index d529ea7..611ef14 100644

package/qt5/qt5connectivity/Config.in line 4

Quoted 4 lines
package/qt5/qt5connectivity/Config.in +1 -0
@@ -1,13 +1,15 @@
 config BR2_PACKAGE_QT5CONNECTIVITY
 	bool "qt5connectivity"
 	select BR2_PACKAGE_BLUEZ_UTILS
+	select BR2_PACKAGE_NEARD

So until now, neard was not necessary, and without any version bump or anything, it should become a mandatory dependency? This seems weird, and does not quite follow the policy of Buildroot that we should have as much as possible the smallest set of mandatory dependencies.

Is it possible to have qt5connectivity with just Bluetooth support? Just NFC support? No support for any of them at all?

I'm wondering if we shouldn't be doing:

ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y)
QT5CONNECTIVITY_DEPENDENCIES += bluez_utils
endif

ifeq ($(BR2_PACKAGE_NEARD),y)
QT5CONNECTIVITY_DEPENDENCIES += neard
endif

in the .mk file, instead of forcefully selecting both bluez_utils and neard.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 2/2 qt5connectivity: add QtNfc submodule

Hello,

Quoted 4 lines · Thomas Petazzoni

So until now, neard was not necessary, and without any version bump or anything, it should become a mandatory dependency? This seems weird, and does not quite follow the policy of Buildroot that we should have as much as possible the smallest set of mandatory dependencies.

I just tested, and indeed you can build Qt5Connectivity without Bluetooth support and have only NFC support. Or build only Bluetooth support without NFC support.

So could you make these optional?

I'll mark your patch as Changes Requested in patchwork in the mean time.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH v2 1/2 qt5connectivity: add QtNfc submodule

In reply to Julien Corjon
---
 package/qt5/qt5connectivity/Config.in          | 15 +++++++----
 package/qt5/qt5connectivity/qt5connectivity.mk | 36 +++++++++++++++++++++-----
 2 files changed, 40 insertions(+), 11 deletions(-)
package/qt5/qt5connectivity/Config.in +10 -5
index d529ea7..83df06a 100644
@@ -1,13 +1,10 @@
 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_STATIC_LIBS
+	depends on BR2_PACKAGE_NEARD || BR2_PACKAGE_BLUEZ_UTILS
 	help
 	  Qt is a cross-platform application and UI framework for
 	  developers using C++.
@@ -19,3 +16,11 @@ config BR2_PACKAGE_QT5CONNECTIVITY
 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 need neard and/or bluez_utils"
+	depends on BR2_USE_MMU
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
+	depends on !BR2_PACKAGE_NEARD
+	depends on !BR2_PACKAGE_BLUEZ_UTILS
package/qt5/qt5connectivity/qt5connectivity.mk +30 -6
index 936bc6f..6a446e9 100644
@@ -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,14 +36,38 @@ 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
+define QT5CONNECTIVITY_INSTALL_TARGET_QMLS
+	$(QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH_QMLS)
+	$(QT5CONNECTIVITY_INSTALL_TARGET_NFC_QMLS)
+endef
+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
+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_QMLS)
 endef
 
Signature · 1 line
2.5.0
#6 lore raw

PATCH v2 2/2 qt5connectivity: add bluez5_utils option for QtBluetooth submodule

---
 package/qt5/qt5connectivity/Config.in          | 3 ++-
 package/qt5/qt5connectivity/qt5connectivity.mk | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)
package/qt5/qt5connectivity/Config.in +2 -1
index 83df06a..f10d001 100644
@@ -4,7 +4,7 @@ config BR2_PACKAGE_QT5CONNECTIVITY
 	select BR2_PACKAGE_QT5BASE_CONCURRENT
 	select BR2_PACKAGE_QT5BASE_DBUS
 	depends on !BR2_STATIC_LIBS
-	depends on BR2_PACKAGE_NEARD || BR2_PACKAGE_BLUEZ_UTILS
+	depends on BR2_PACKAGE_NEARD || BR2_PACKAGE_BLUEZ_UTILS || BR2_PACKAGE_BLUEZ5_UTILS
 	help
 	  Qt is a cross-platform application and UI framework for
 	  developers using C++.
@@ -24,3 +24,4 @@ comment "qt5connectivity need neard and/or bluez_utils"
 	depends on !BR2_STATIC_LIBS
 	depends on !BR2_PACKAGE_NEARD
 	depends on !BR2_PACKAGE_BLUEZ_UTILS
+	depends on !BR2_PACKAGE_BLUEZ5_UTILS
package/qt5/qt5connectivity/qt5connectivity.mk +3 -2
index 6a446e9..a95f30f 100644
@@ -20,6 +20,7 @@ endif
 
 QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5DECLARATIVE),qt5declarative)
 QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_BLUEZ_UTILS),bluez_utils)
+QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_BLUEZ5_UTILS),bluez5_utils)
 QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_NEARD),neard)
 
 define QT5CONNECTIVITY_CONFIGURE_CMDS
@@ -36,7 +37,7 @@ define QT5CONNECTIVITY_INSTALL_STAGING_CMDS
 endef
 
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
-ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y)
+ifneq (,$(filter y,$(BR2_PACKAGE_BLUEZ_UTILS) $(BR2_PACKAGE_BLUEZ5_UTILS)))
 define QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH_QMLS
 	cp -dpfr $(STAGING_DIR)/usr/qml/QtBluetooth $(TARGET_DIR)/usr/qml/
 endef
@@ -52,7 +53,7 @@ define QT5CONNECTIVITY_INSTALL_TARGET_QMLS
 endef
 endif
 
-ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y)
+ifneq (,$(filter y,$(BR2_PACKAGE_BLUEZ_UTILS) $(BR2_PACKAGE_BLUEZ5_UTILS)))
 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
Signature · 1 line
2.5.0
#7 lore raw

PATCH v2 2/2 qt5connectivity: add bluez5_utils option for QtBluetooth submodule

Hello,

Review

Quoted 3 lines · Julien Corjon

ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)

(quoted diff) +1 -1
-ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y)
+ifneq (,$(filter y,$(BR2_PACKAGE_BLUEZ_UTILS) $(BR2_PACKAGE_BLUEZ5_UTILS)))

I've changed that to:

ifneq ($(BR2_PACKAGE_BLUEZ_UTILS)$(BR2_PACKAGE_BLUEZ5_UTILS),)

which I believe is simpler.

And then I've applied.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#8 lore raw

PATCH v2 1/2 qt5connectivity: add QtNfc submodule

In reply to Julien Corjon

Hello,

Quoted 5 lines · Julien Corjon
---
 package/qt5/qt5connectivity/Config.in          | 15 +++++++----
 package/qt5/qt5connectivity/qt5connectivity.mk | 36 +++++++++++++++++++++-----
 2 files changed, 40 insertions(+), 11 deletions(-)

I've applied your patch, but after doing a few changes. See below.

Quoted 6 lines
package/qt5/qt5connectivity/Config.in +0 -0
index d529ea7..83df06a 100644
@@ -1,13 +1,10 @@
 config BR2_PACKAGE_QT5CONNECTIVITY

package/qt5/qt5connectivity/Config.in line 6

Quoted 10 lines
package/qt5/qt5connectivity/Config.in +1 -5
 	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_STATIC_LIBS

This dependency is no longer needed, since you now depend on neard and bluez_utils.

Quoted 5 lines
package/qt5/qt5connectivity/Config.in +1 -0
+	depends on BR2_PACKAGE_NEARD || BR2_PACKAGE_BLUEZ_UTILS
 	help
 	  Qt is a cross-platform application and UI framework for
 	  developers using C++.

package/qt5/qt5connectivity/Config.in config BR2_PACKAGE_QT5CONNECTIVITY · line 24

Quoted 9 lines
package/qt5/qt5connectivity/Config.in +6 -0
@@ -19,3 +16,11 @@ config BR2_PACKAGE_QT5CONNECTIVITY
 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 need neard and/or bluez_utils"
+	depends on BR2_USE_MMU
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS

All these are no longer needed. If you no longer have them for the main option, there's no reason to have them for the comment.

package/qt5/qt5connectivity/Config.in config BR2_PACKAGE_QT5CONNECTIVITY · line 25

Quoted 1 line
package/qt5/qt5connectivity/Config.in +1 -0
+define QT5CONNECTIVITY_INSTALL_TARGET_QMLS

This variable was not really needed, using QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH_QMLS and QT5CONNECTIVITY_INSTALL_TARGET_NFC_QMLS from INSTALL_TARGET_CMDS is sufficient.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#9 lore raw

PATCH 1/2 qt5connectivity: add sdpscanner tool for Qt5Bluetooth

In reply to Julien Corjon

Hi Julien, all,

Quoted 10 lines · Julien Corjon
---
 package/qt5/qt5connectivity/qt5connectivity.mk | 1 +
 1 file changed, 1 insertion(+)
package/qt5/qt5connectivity/qt5connectivity.mk +0 -0
index a68f5ec..936bc6f 100644

package/qt5/qt5connectivity/qt5connectivity.mk endif · line 46

Quoted 4 lines
package/qt5/qt5connectivity/qt5connectivity.mk +1 -0
@@ -43,6 +43,7 @@ endif
 
 define QT5CONNECTIVITY_INSTALL_TARGET_CMDS
        cp -dpf $(STAGING_DIR)/usr/lib/libQt5Bluetooth.so.* $(TARGET_DIR)/usr/lib
+       cp -dpf $(STAGING_DIR)/usr/bin/sdpscanner $(TARGET_DIR)/usr/bin

would $(INSTALL) be preferable here? Do we have any rules?

Yegor

Quoted 10 lines
package/qt5/qt5connectivity/qt5connectivity.mk +0 -1
        $(QT5CONNECTIVITY_INSTALL_TARGET_QMLS)
 endef
 
--

2.5.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#10 lore raw

PATCH 1/2 qt5connectivity: add sdpscanner tool for Qt5Bluetooth

Quoted 14 lines · Yegor Yefremov

Hi Julien, all,

Quoted 11 lines · Julien Corjon
---
  package/qt5/qt5connectivity/qt5connectivity.mk | 1 +
  1 file changed, 1 insertion(+)
package/qt5/qt5connectivity/qt5connectivity.mk +0 -0
index a68f5ec..936bc6f 100644
@@ -43,6 +43,7 @@ endif
 
Quoted 5 lines

package/qt5/qt5connectivity/qt5connectivity.mk endif · line 46

Quoted 3 lines
package/qt5/qt5connectivity/qt5connectivity.mk +1 -0
  define QT5CONNECTIVITY_INSTALL_TARGET_CMDS
         cp -dpf $(STAGING_DIR)/usr/lib/libQt5Bluetooth.so.* $(TARGET_DIR)/usr/lib
+       cp -dpf $(STAGING_DIR)/usr/bin/sdpscanner $(TARGET_DIR)/usr/bin

would $(INSTALL) be preferable here? Do we have any rules?

We generally prefer install, but in this case it's nice to keep the same
construct as the previous line, so I'm OK with it. So:

That said, I wonder why we are doing all this manual copying for qt5, instead
of just running 'make install'. AFAICS the only thing that isn't already cleaned up in the finalize step are the QML files, and these can easily be cleaned up as a finalize hook. Thomas, do you remember why you did it this way?

Regards,
Arnout

Quoted 18 lines

Yegor

Quoted 10 lines
package/qt5/qt5connectivity/qt5connectivity.mk +0 -1
         $(QT5CONNECTIVITY_INSTALL_TARGET_QMLS)
  endef
 
--

2.5.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#11 lore raw

PATCH 1/2 qt5connectivity: add sdpscanner tool for Qt5Bluetooth

Hello,

Quoted 4 lines · Arnout Vandecappelle

That said, I wonder why we are doing all this manual copying for qt5, instead
of just running 'make install'. AFAICS the only thing that isn't already cleaned up in the finalize step are the QML files, and these can easily be cleaned up as a finalize hook. Thomas, do you remember why you did it this way?

No, I don't quite remember. It is worth trying to use "make install" and see if there is any problem. I think the reason for qt5base.mk is that we want to conditionally install some libraries. But for the other qt5* packages, I don't remember.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#12 lore raw

PATCH 1/2 qt5connectivity: add sdpscanner tool for Qt5Bluetooth

In reply to Arnout Vandecappelle

Hello,

Quoted 4 lines · Arnout Vandecappelle

That said, I wonder why we are doing all this manual copying for qt5, instead
of just running 'make install'. AFAICS the only thing that isn't already cleaned up in the finalize step are the QML files, and these can easily be cleaned up as a finalize hook. Thomas, do you remember why you did it this way?

I had a look at this, and I know why. If you look at the staging installation, we do just:

	$(MAKE) -C $(@D) install

without passing any DESTDIR=$(STAGING_DIR) or anything like that.

The makefiles generated by qmake support a $(INSTALL_ROOT) variable that prefixes all installation paths. However, due to how we configure qmake, the fixed path (after $(INSTALL_ROOT)) already contains the full path to our staging directory. From some random Qt5-generated Makefile:

-$(INSTALL_PROGRAM) ../../lib/$(TARGET) $(INSTALL_ROOT)/home/test/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/$(TARGET)

That's why we don't pass any DESTDIR/INSTALL_ROOT during staging installation, and why we do the target installation manually.

So one could say that our initial qmake configuration in qt5base.mk is broken. That's possible. But I believe that if we try to fix this (so that the generated Makefile don't contain this hardcoded path to the staging directory), then qmake would no longer work "automagically" as it currently. However, it would be really interesting to have a look at that and see if a good solution can be found. If our Qt5 folks (Julien and Peter Seiderer) want to have a look, it'd be great.

I had a quick look at meta-qt5 in Yocto, and here is what they do:

find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"

so in essence, they fixup the generated Makefile after the fact so that they don't contain the hardcoded sysroot path. If we can't find a clean solution with qmake, maybe that's a possible solution to simplify the target installation of all those qt5 packages.

One thing I wonder is how packages like qwt or quazip get properly installed to the target/staging, since they do use INSTALL_ROOT. I had a quick look at quazip, and its Makefiles are correct, they contain:

-$(INSTALL_FILE) /home/test/buildroot/output/build/quazip-0.7.2/quazip/crypt.h $(INSTALL_ROOT)/usr/include/quazip/

I'm puzzled. Some Qt5 person to chime in and look into this problem?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#13 lore raw

PATCH 1/2 qt5connectivity: add sdpscanner tool for Qt5Bluetooth

Thomas, all,

Le 19/04/2016 00:10, Thomas Petazzoni a ?crit :

Quoted 14 lines

Hello,

Quoted 4 lines · Arnout Vandecappelle

That said, I wonder why we are doing all this manual copying for qt5, instead
of just running 'make install'. AFAICS the only thing that isn't already cleaned up in the finalize step are the QML files, and these can easily be cleaned up as a finalize hook. Thomas, do you remember why you did it this way?

I had a look at this, and I know why. If you look at the staging installation, we do just:

	$(MAKE) -C $(@D) install
Quoted 8 lines

without passing any DESTDIR=$(STAGING_DIR) or anything like that.

The makefiles generated by qmake support a $(INSTALL_ROOT) variable that prefixes all installation paths. However, due to how we configure qmake, the fixed path (after $(INSTALL_ROOT)) already contains the full path to our staging directory. From some random Qt5-generated Makefile:

-$(INSTALL_PROGRAM) ../../lib/$(TARGET) $(INSTALL_ROOT)/home/test/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/$(TARGET)

Just made a bit of digging into qt5base source. This behaviour is from qtbase/qmake/generators/unix/unixmake.cpp :
UnixMakefileGenerator::defaultInstall . Even if I understand how it append the full path after the $(INSTALL_ROOT) I cannot understand the why...

Quoted 11 lines

That's why we don't pass any DESTDIR/INSTALL_ROOT during staging installation, and why we do the target installation manually.

So one could say that our initial qmake configuration in qt5base.mk is broken. That's possible. But I believe that if we try to fix this (so that the generated Makefile don't contain this hardcoded path to the staging directory), then qmake would no longer work "automagically" as it currently. However, it would be really interesting to have a look at that and see if a good solution can be found. If our Qt5 folks (Julien and Peter Seiderer) want to have a look, it'd be great.

We can (and probably should) fix this misfunction but we will have to force DESTDIR to staging and target in all qmake-based packages. Fixing only defaultInstall should keep qmake "automagically". Also It will be difficult to push such modification in Qt mainline.

Quoted 9 lines

I had a quick look at meta-qt5 in Yocto, and here is what they do:

find . -name "Makefile*" | xargs -r sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"

so in essence, they fixup the generated Makefile after the fact so that they don't contain the hardcoded sysroot path. If we can't find a clean solution with qmake, maybe that's a possible solution to simplify the target installation of all those qt5 packages.

How can we handle this kind of fixup with make *-install-staging / * -install-target?

Quoted 8 lines

One thing I wonder is how packages like qwt or quazip get properly installed to the target/staging, since they do use INSTALL_ROOT. I had a quick look at quazip, and its Makefiles are correct, they contain:

-$(INSTALL_FILE) /home/test/buildroot/output/build/quazip-0.7.2/quazip/crypt.h $(INSTALL_ROOT)/usr/include/quazip/

I'm puzzled. Some Qt5 person to chime in and look into this problem?

I'm puzzled too on that one...

Regards,

Julien

Quoted 5 lines

Best regards,

Thomas

#14 lore raw

PATCH 1/2 qt5connectivity: add sdpscanner tool for Qt5Bluetooth

Hello Julien,

Thanks for looking into this!

Quoted 7 lines · Julien CORJON
Quoted 1 line

-$(INSTALL_PROGRAM) ../../lib/$(TARGET) $(INSTALL_ROOT)/home/test/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/$(TARGET)

Just made a bit of digging into qt5base source. This behaviour is from qtbase/qmake/generators/unix/unixmake.cpp :
UnixMakefileGenerator::defaultInstall . Even if I understand how it append the full path after the $(INSTALL_ROOT) I cannot understand the why...

My guess is that since were passing -sysroot $(STAGING_DIR) to qt5's configure script, this sysroot pass get prefixed everywhere.

Quoted 2 lines

We can (and probably should) fix this misfunction but we will have to force DESTDIR to staging and target in all qmake-based packages.

That's not a big deal, we're doing this for autotools packages already, and it should be the normal thing to do.

Ideally, the installation for staging should be:

	$(MAKE) -C $(@D) INSTALL_ROOT=$(STAGING_DIR) install

and for the target:

	$(MAKE) -C $(@D) INSTALL_ROOT=$(TARGET_DIR) install
Quoted 2 lines

Fixing only defaultInstall should keep qmake "automagically". Also It will be difficult to push such modification in Qt mainline.

Well, we need to understand why Qt behaves this way, and fix it properly.

Quoted 7 lines
Quoted 4 lines

so in essence, they fixup the generated Makefile after the fact so that they don't contain the hardcoded sysroot path. If we can't find a clean solution with qmake, maybe that's a possible solution to simplify the target installation of all those qt5 packages.

How can we handle this kind of fixup with make *-install-staging / * -install-target?

We could have a generic "fixup" macro, which we register in all qt5 packages as a post-configure hook or something like that.

Quoted 11 lines
Quoted 9 lines

One thing I wonder is how packages like qwt or quazip get properly installed to the target/staging, since they do use INSTALL_ROOT. I had a quick look at quazip, and its Makefiles are correct, they contain:

-$(INSTALL_FILE) /home/test/buildroot/output/build/quazip-0.7.2/quazip/crypt.h $(INSTALL_ROOT)/usr/include/quazip/

I'm puzzled. Some Qt5 person to chime in and look into this problem?

I'm puzzled too on that one...

I think I might an idea for this one: we're passing -headerdir /usr/include/qt5 to qt5's configure script, so the sysroot path doesn't get prepended for header files installation.

Argh, no, not possible: this would mean that the other Qt5 packages would install their headers in /usr/include, which is not the case.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#15 lore raw

PATCH 1/2 qt5connectivity: add sdpscanner tool for Qt5Bluetooth

In reply to Julien Corjon

Hello,

Quoted 4 lines · Julien Corjon
---
 package/qt5/qt5connectivity/qt5connectivity.mk | 1 +
 1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com