package: prepare to support modules that work with Qt or Qt5
PATCH 1/4 package: prepare to support modules that work with Qt or Qt5
Currently, all the Qt external modules (qtuio, qjson, etc.) can only be compiled against Qt4. However, some of them (qjson, qextserialport at least) can compile with either Qt4 or Qt5.
Therefore, this commit adjusts the Config.in logic to make it possible for certain modules to be selected with either Qt4 or Qt5. We use the same approach as the one of for Python 2 vs. Python 3 modules:
- in package/Config.in, the package Config.in files are included either if BR2_PACKAGE_QT or BR2_PACKAGE_QT5 are enabled.
- each individual package is then responsible for having a dependency on either BR2_PACKAGE_QT, or BR2_PACKAGE_QT5 or both depending on what they support. In this commit, we add a dependency on BR2_PACKAGE_QT to all packages, since for now, they only support Qt4.
--- package/Config.in | 6 ++---- package/grantlee/Config.in | 1 + package/qjson/Config.in | 1 + package/qtuio/Config.in | 2 ++ package/qwt/Config.in | 2 ++ 5 files changed, 8 insertions(+), 4 deletions(-)
package/Config.in +2 -4
@@ -223,8 +223,8 @@ endif comment "Other GUIs" source "package/efl/Config.in" source "package/qt/Config.in" - -if BR2_PACKAGE_QT + source "package/qt5/Config.in" +if BR2_PACKAGE_QT || BR2_PACKAGE_QT5 comment "QT libraries and helper libraries" source "package/grantlee/Config.in" source "package/qextserialport/Config.in"
@@ -232,8 +232,6 @@ comment "QT libraries and helper libraries" source "package/qtuio/Config.in" source "package/qwt/Config.in" endif - - source "package/qt5/Config.in" source "package/weston/Config.in" source "package/x11r7/Config.in"
package/grantlee/Config.in +1 -0
@@ -1,6 +1,7 @@ config BR2_PACKAGE_GRANTLEE bool "grantlee" depends on BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT + depends on BR2_PACKAGE_QT select BR2_PACKAGE_QT_STL select BR2_PACKAGE_QT_SCRIPT select BR2_PACKAGE_QT_GUI_MODULE
package/qjson/Config.in +1 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_QJSON bool "qjson" + depends on BR2_PACKAGE_QT help QJson is a Qt-based library that maps JSON data to QVariant objects and vice versa.
package/qtuio/Config.in +2 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_QTUIO bool "qtuio" + depends on BR2_PACKAGE_QT depends on BR2_PACKAGE_QT_GUI_MODULE help Implementation of an interface connecting TUIO messages
@@ -17,4 +18,5 @@ config BR2_QTUIO_EXAMPLES endif comment "qtuio depends on QT gui module" + depends on BR2_PACKAGE_QT depends on !BR2_PACKAGE_QT_GUI_MODULE
package/qwt/Config.in +2 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_QWT bool "qwt" + depends on BR2_PACKAGE_QT depends on BR2_PACKAGE_QT_GUI_MODULE help Qwt is a graphics extension to the Qt GUI application
@@ -25,4 +26,5 @@ config BR2_PACKAGE_QWT_OPENGL endif comment "qwt depends on QT gui module" + depends on BR2_PACKAGE_QT depends on !BR2_PACKAGE_QT_GUI_MODULE
Signature · 1 line
2.0.0
PATCH 2/4 qt5: expose a QT5_QMAKE variable for other Qt5 packages
Much like package/qt/qt.mk exposes a QT_QMAKE variable that other qmake-based Qt4 libraries/applications can use in their .mk file, this commit adds a QT5_QMAKE variable to allow the same for Qt5 packages.
--- package/qt5/qt5.mk | 3 +++ 1 file changed, 3 insertions(+)
package/qt5/qt5.mk +3 -0
@@ -17,3 +17,6 @@ define QT5_LA_PRL_FILES_FIXUP $(SED) "s%-L/usr/lib%%" $$i; \ done endef + +# Variable for other Qt applications to use +QT5_QMAKE = $(HOST_DIR)/usr/bin/qmake -spec devices/linux-buildroot-g++
Signature · 1 line
2.0.0
PATCH 2/4 qt5: expose a QT5_QMAKE variable for other Qt5 packages
Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Much like
package/qt/qt.mkexposes aQT_QMAKEvariable that other qmake-based Qt4 libraries/applications can use in their .mk file, this commit adds aQT5_QMAKEvariable to allow the same for Qt5 packages.Signed-off-by Thomas Petazzoni <[email protected]>--- package/qt5/qt5.mk | 3 +++ 1 file changed, 3 insertions(+)package/qt5/qt5.mk +0
-0
package/qt5/qt5.mk define QT5_LA_PRL_FILES_FIXUP · line 22
Quoted 6 lines
package/qt5/qt5.mk +3
-0@@ -17,3 +17,6 @@ define QT5_LA_PRL_FILES_FIXUP $(SED) "s%-L/usr/lib%%" $$i; \ done endef + +# Variable for other Qt applications to use +QT5_QMAKE = $(HOST_DIR)/usr/bin/qmake -spec devices/linux-buildroot-g++
This (and elsewhere) shows a bit of a mixup between BR2_PACKAGE_QT5 and qt5base - But ok, having BR2_PACKAGE_QT5 enabled without qt5base isn't really sensible (but is allowed by kconfig).
Should we just use BR2_PACKAGE_QT5BASE everywhere you check for BR2_PACKAGE_QT5?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/4 qt5: expose a QT5_QMAKE variable for other Qt5 packages
Dear Peter Korsgaard,
Quoted 7 lines · Peter Korsgaard
Quoted 7 lines
package/qt5/qt5.mk +0
-0@@ -17,3 +17,6 @@ define QT5_LA_PRL_FILES_FIXUP $(SED) "s%-L/usr/lib%%" $$i; \ done
Quoted 8 lines
package/qt5/qt5.mk define QT5_LA_PRL_FILES_FIXUP · line 22
Quoted 4 lines
package/qt5/qt5.mk +3
-0endef + +# Variable for other Qt applications to use +QT5_QMAKE = $(HOST_DIR)/usr/bin/qmake -spec devices/linux-buildroot-g++This (and elsewhere) shows a bit of a mixup between
BR2_PACKAGE_QT5and qt5base - But ok, havingBR2_PACKAGE_QT5enabled without qt5base isn't really sensible (but is allowed by kconfig).
I hesitated between qt5.mk or qt5base.mk. I decided to go with qt5.mk, with the following reasoning:
* I wanted to name the variable QT5_QMAKE and not QT5BASE_QMAKE, to mimic what exists for qt4 (variable is named QT_QMAKE).
* Since the variable was going to be named QT5_QMAKE, I found it would be odd to have it in qt5base.mk where all variables are QT5BASE_<foo>. So I went with qt5.mk instead.
Quoted 1 line
Should we just use
BR2_PACKAGE_QT5BASEeverywhere you check forBR2_PACKAGE_QT5?
Where exactly? Or shouldn't we have qt5base selected as soon as qt5 is enabled?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 2/4 qt5: expose a QT5_QMAKE variable for other Qt5 packages
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 7 lines
Quoted 3 lines
This (and elsewhere) shows a bit of a mixup between
BR2_PACKAGE_QT5and qt5base - But ok, havingBR2_PACKAGE_QT5enabled without qt5base isn't really sensible (but is allowed by kconfig).I hesitated between qt5.mk or qt5base.mk. I decided to go with qt5.mk, with the following reasoning:
Quoted 6 lines
* I wanted to name the variable
QT5_QMAKEand notQT5BASE_QMAKE, to mimic what exists for qt4 (variable is namedQT_QMAKE).* Since the variable was going to be named
QT5_QMAKE, I found it would be odd to have it in qt5base.mk where all variables are QT5BASE_<foo>. So I went with qt5.mk instead.
Ok.
Quoted 4 lines
Quoted 1 line
Should we just use
BR2_PACKAGE_QT5BASEeverywhere you check forBR2_PACKAGE_QT5?Where exactly? Or shouldn't we have qt5base selected as soon as qt5 is enabled?
Well, that's perhaps the easiest solution, yes. Having qt5 enabled but not qt5base doesn't make any sense.
Will you send an updated series or should I do that here?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/4 qt5: expose a QT5_QMAKE variable for other Qt5 packages
Dear Peter Korsgaard,
Quoted 9 lines · Peter Korsgaard
Quoted 4 lines
Quoted 1 line
Should we just use
BR2_PACKAGE_QT5BASEeverywhere you check forBR2_PACKAGE_QT5?Where exactly? Or shouldn't we have qt5base selected as soon as qt5 is enabled?
Well, that's perhaps the easiest solution, yes. Having qt5 enabled but not qt5base doesn't make any sense.
Will you send an updated series or should I do that here?
I can, but not this week. I'm busy giving a training, and will not have much free time.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 2/4 qt5: expose a QT5_QMAKE variable for other Qt5 packages
Quoted 9 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Well, that's perhaps the easiest solution, yes. Having qt5 enabled but not qt5base doesn't make any sense.
Will you send an updated series or should I do that here?
I can, but not this week. I'm busy giving a training, and will not have much free time.
Ok, I'll take a look so we can have it for 2014.11-rc1.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 3/4 qjson: allow building with Qt5
In reply to Thomas PetazzoniSince commit 18714011b231fc326c96782134fbea778ab6a94d ("qjson: bump version"), qjson can be built either against Qt4 or Qt5. This commit therefore allows this package to be selected when Qt5 is enabled.
--- package/qjson/Config.in | 2 +- package/qjson/qjson.mk | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)
package/qjson/Config.in +1 -1
@@ -1,6 +1,6 @@ config BR2_PACKAGE_QJSON bool "qjson" - depends on BR2_PACKAGE_QT + depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5 help QJson is a Qt-based library that maps JSON data to QVariant objects and vice versa.
package/qjson/qjson.mk +3 -1
@@ -7,7 +7,9 @@ QJSON_VERSION = ba273682a9d33a7b3090e74f4742b5f3bf6c9b02 QJSON_SITE = $(call github,flavio,qjson,$(QJSON_VERSION)) QJSON_INSTALL_STAGING = YES -QJSON_DEPENDENCIES = qt +QJSON_DEPENDENCIES = \ + $(if $(BR2_PACKAGE_QT),qt) \ + $(if $(BR2_PACKAGE_QT5),qt5base) QJSON_LICENSE = LGPLv2.1 QJSON_LICENSE_FILES = COPYING.lib
Signature · 1 line
2.0.0
PATCH 4/4 qextserialport: allow building with Qt5
In reply to Thomas Petazzoniqextserialport builds fine with both Qt4 and Qt5, so this commit enables it for Qt5.
--- package/qextserialport/Config.in | 4 +--- package/qextserialport/qextserialport.mk | 10 ++++++++-- 2 files changed, 9 insertions(+), 5 deletions(-)
package/qextserialport/Config.in +1 -3
@@ -1,8 +1,6 @@ config BR2_PACKAGE_QEXTSERIALPORT bool "qextserialport" - # Qt is a big library, we don't want to select it - # automatically without the user knowing - depends on BR2_PACKAGE_QT + depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5 help A Qt library to manage serial ports
package/qextserialport/qextserialport.mk +8 -2
@@ -10,13 +10,19 @@ QEXTSERIALPORT_SITE_METHOD = git QEXTSERIALPORT_LICENSE = MIT -QEXTSERIALPORT_DEPENDENCIES = qt - QEXTSERIALPORT_INSTALL_STAGING = YES +ifeq ($(BR2_PACKAGE_QT),y) +QEXTSERIALPORT_DEPENDENCIES += qt define QEXTSERIALPORT_CONFIGURE_CMDS (cd $(@D); $(TARGET_MAKE_ENV) $(QT_QMAKE)) endef +else ifeq ($(BR2_PACKAGE_QT5),y) +QEXTSERIALPORT_DEPENDENCIES += qt5base +define QEXTSERIALPORT_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE)) +endef +endif define QEXTSERIALPORT_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
Signature · 1 line
2.0.0
PATCH 1/4 package: prepare to support modules that work with Qt or Qt5
In reply to Thomas PetazzoniQuoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Currently, all the Qt external modules (qtuio, qjson, etc.) can only be compiled against Qt4. However, some of them (qjson, qextserialport at least) can compile with either Qt4 or Qt5.
Therefore, this commit adjusts the Config.in logic to make it possible for certain modules to be selected with either Qt4 or Qt5. We use the same approach as the one of for Python 2 vs. Python 3 modules:
Quoted 8 lines
- in package/Config.in, the package Config.in files are included either if
BR2_PACKAGE_QTorBR2_PACKAGE_QT5are enabled.- each individual package is then responsible for having a dependency on either
BR2_PACKAGE_QT, orBR2_PACKAGE_QT5or both depending on what they support. In this commit, we add a dependency onBR2_PACKAGE_QTto all packages, since for now, they only support Qt4.
Committed series after adding a select of qt5base to qt5, thanks.
Signature · 1 line
Bye, Peter Korsgaard