Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/4] package: prepare to support modules that work with Qt or Qt5
@ 2014-11-01 22:15 Thomas Petazzoni
  2014-11-01 22:15 ` [Buildroot] [PATCH 2/4] qt5: expose a QT5_QMAKE variable for other Qt5 packages Thomas Petazzoni
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2014-11-01 22:15 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 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(-)

diff --git a/package/Config.in b/package/Config.in
index 3b3c372..28cf703 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
 
diff --git a/package/grantlee/Config.in b/package/grantlee/Config.in
index 09ec70c..ce1342c 100644
--- a/package/grantlee/Config.in
+++ b/package/grantlee/Config.in
@@ -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
diff --git a/package/qjson/Config.in b/package/qjson/Config.in
index c15b12f..2dc2cc4 100644
--- a/package/qjson/Config.in
+++ b/package/qjson/Config.in
@@ -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.
diff --git a/package/qtuio/Config.in b/package/qtuio/Config.in
index f3f5e3c..f46f1dd 100644
--- a/package/qtuio/Config.in
+++ b/package/qtuio/Config.in
@@ -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
diff --git a/package/qwt/Config.in b/package/qwt/Config.in
index 7718b59..8c7bc56 100644
--- a/package/qwt/Config.in
+++ b/package/qwt/Config.in
@@ -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
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/4] qt5: expose a QT5_QMAKE variable for other Qt5 packages
  2014-11-01 22:15 [Buildroot] [PATCH 1/4] package: prepare to support modules that work with Qt or Qt5 Thomas Petazzoni
@ 2014-11-01 22:15 ` Thomas Petazzoni
  2014-11-02 22:46   ` Peter Korsgaard
  2014-11-01 22:15 ` [Buildroot] [PATCH 3/4] qjson: allow building with Qt5 Thomas Petazzoni
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2014-11-01 22:15 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/qt5/qt5.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
index e9c59db..2a3e274 100644
--- a/package/qt5/qt5.mk
+++ b/package/qt5/qt5.mk
@@ -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++
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 3/4] qjson: allow building with Qt5
  2014-11-01 22:15 [Buildroot] [PATCH 1/4] package: prepare to support modules that work with Qt or Qt5 Thomas Petazzoni
  2014-11-01 22:15 ` [Buildroot] [PATCH 2/4] qt5: expose a QT5_QMAKE variable for other Qt5 packages Thomas Petazzoni
@ 2014-11-01 22:15 ` Thomas Petazzoni
  2014-11-01 22:15 ` [Buildroot] [PATCH 4/4] qextserialport: " Thomas Petazzoni
  2014-11-03 22:07 ` [Buildroot] [PATCH 1/4] package: prepare to support modules that work with Qt or Qt5 Peter Korsgaard
  3 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2014-11-01 22:15 UTC (permalink / raw)
  To: buildroot

Since 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.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/qjson/Config.in | 2 +-
 package/qjson/qjson.mk  | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/qjson/Config.in b/package/qjson/Config.in
index 2dc2cc4..0f0cc09 100644
--- a/package/qjson/Config.in
+++ b/package/qjson/Config.in
@@ -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.
diff --git a/package/qjson/qjson.mk b/package/qjson/qjson.mk
index 17f2d00..6a16617 100644
--- a/package/qjson/qjson.mk
+++ b/package/qjson/qjson.mk
@@ -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
 
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 4/4] qextserialport: allow building with Qt5
  2014-11-01 22:15 [Buildroot] [PATCH 1/4] package: prepare to support modules that work with Qt or Qt5 Thomas Petazzoni
  2014-11-01 22:15 ` [Buildroot] [PATCH 2/4] qt5: expose a QT5_QMAKE variable for other Qt5 packages Thomas Petazzoni
  2014-11-01 22:15 ` [Buildroot] [PATCH 3/4] qjson: allow building with Qt5 Thomas Petazzoni
@ 2014-11-01 22:15 ` Thomas Petazzoni
  2014-11-03 22:07 ` [Buildroot] [PATCH 1/4] package: prepare to support modules that work with Qt or Qt5 Peter Korsgaard
  3 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2014-11-01 22:15 UTC (permalink / raw)
  To: buildroot

qextserialport builds fine with both Qt4 and Qt5, so this commit
enables it for Qt5.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/qextserialport/Config.in         |  4 +---
 package/qextserialport/qextserialport.mk | 10 ++++++++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/package/qextserialport/Config.in b/package/qextserialport/Config.in
index 4e92ecf..ab05920 100644
--- a/package/qextserialport/Config.in
+++ b/package/qextserialport/Config.in
@@ -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
 
diff --git a/package/qextserialport/qextserialport.mk b/package/qextserialport/qextserialport.mk
index 85abe19..2949da9 100644
--- a/package/qextserialport/qextserialport.mk
+++ b/package/qextserialport/qextserialport.mk
@@ -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)
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/4] qt5: expose a QT5_QMAKE variable for other Qt5 packages
  2014-11-01 22:15 ` [Buildroot] [PATCH 2/4] qt5: expose a QT5_QMAKE variable for other Qt5 packages Thomas Petazzoni
@ 2014-11-02 22:46   ` Peter Korsgaard
  2014-11-03 21:25     ` Thomas Petazzoni
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Korsgaard @ 2014-11-02 22:46 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > 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.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 > ---
 >  package/qt5/qt5.mk | 3 +++
 >  1 file changed, 3 insertions(+)

 > diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
 > index e9c59db..2a3e274 100644
 > --- a/package/qt5/qt5.mk
 > +++ b/package/qt5/qt5.mk
 > @@ -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?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/4] qt5: expose a QT5_QMAKE variable for other Qt5 packages
  2014-11-02 22:46   ` Peter Korsgaard
@ 2014-11-03 21:25     ` Thomas Petazzoni
  2014-11-03 21:39       ` Peter Korsgaard
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2014-11-03 21:25 UTC (permalink / raw)
  To: buildroot

Dear Peter Korsgaard,

On Sun, 02 Nov 2014 23:46:43 +0100, Peter Korsgaard wrote:

>  > diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk
>  > index e9c59db..2a3e274 100644
>  > --- a/package/qt5/qt5.mk
>  > +++ b/package/qt5/qt5.mk
>  > @@ -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).

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.

> Should we just use BR2_PACKAGE_QT5BASE everywhere you check for BR2_PACKAGE_QT5?

Where exactly? Or shouldn't we have qt5base selected as soon as qt5 is
enabled?

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/4] qt5: expose a QT5_QMAKE variable for other Qt5 packages
  2014-11-03 21:25     ` Thomas Petazzoni
@ 2014-11-03 21:39       ` Peter Korsgaard
  2014-11-03 21:46         ` Thomas Petazzoni
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Korsgaard @ 2014-11-03 21:39 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 >> 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).

 > 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.

Ok.

 >> Should we just use BR2_PACKAGE_QT5BASE everywhere you check for BR2_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?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/4] qt5: expose a QT5_QMAKE variable for other Qt5 packages
  2014-11-03 21:39       ` Peter Korsgaard
@ 2014-11-03 21:46         ` Thomas Petazzoni
  2014-11-03 22:00           ` Peter Korsgaard
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2014-11-03 21:46 UTC (permalink / raw)
  To: buildroot

Dear Peter Korsgaard,

On Mon, 03 Nov 2014 22:39:41 +0100, Peter Korsgaard wrote:

>  >> Should we just use BR2_PACKAGE_QT5BASE everywhere you check for BR2_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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/4] qt5: expose a QT5_QMAKE variable for other Qt5 packages
  2014-11-03 21:46         ` Thomas Petazzoni
@ 2014-11-03 22:00           ` Peter Korsgaard
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2014-11-03 22:00 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 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.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 1/4] package: prepare to support modules that work with Qt or Qt5
  2014-11-01 22:15 [Buildroot] [PATCH 1/4] package: prepare to support modules that work with Qt or Qt5 Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2014-11-01 22:15 ` [Buildroot] [PATCH 4/4] qextserialport: " Thomas Petazzoni
@ 2014-11-03 22:07 ` Peter Korsgaard
  3 siblings, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2014-11-03 22:07 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 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:

 >  - 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.

Committed series after adding a select of qt5base to qt5, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-11-03 22:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-01 22:15 [Buildroot] [PATCH 1/4] package: prepare to support modules that work with Qt or Qt5 Thomas Petazzoni
2014-11-01 22:15 ` [Buildroot] [PATCH 2/4] qt5: expose a QT5_QMAKE variable for other Qt5 packages Thomas Petazzoni
2014-11-02 22:46   ` Peter Korsgaard
2014-11-03 21:25     ` Thomas Petazzoni
2014-11-03 21:39       ` Peter Korsgaard
2014-11-03 21:46         ` Thomas Petazzoni
2014-11-03 22:00           ` Peter Korsgaard
2014-11-01 22:15 ` [Buildroot] [PATCH 3/4] qjson: allow building with Qt5 Thomas Petazzoni
2014-11-01 22:15 ` [Buildroot] [PATCH 4/4] qextserialport: " Thomas Petazzoni
2014-11-03 22:07 ` [Buildroot] [PATCH 1/4] package: prepare to support modules that work with Qt or Qt5 Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox