Skip to contentSkip to conversation

qt5base: move linuxfb configure option comment

PATCH New Peter Seiderer 3 participants 11 messages Feb 18, 2017 – Oct 21, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/3 qt5base: move linuxfb configure option comment

Move the two comment lines to where they apply.

---
 package/qt5/qt5base/qt5base.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/qt5/qt5base/qt5base.mk +2 -2
index 09bf5cf7b..582421ac5 100644
@@ -97,10 +97,10 @@ QT5BASE_DEPENDENCIES   += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),sqlite)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_NONE),-no-sql-sqlite)
 endif
 
-# We have to use --enable-linuxfb, otherwise Qt thinks that -linuxfb
-# is to add a link against the "inuxfb" library.
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-gui,-no-gui)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_WIDGETS),-widgets,-no-widgets)
+# We have to use --enable-linuxfb, otherwise Qt thinks that -linuxfb
+# is to add a link against the "inuxfb" library.
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_LINUXFB),--enable-linuxfb,-no-linuxfb)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),-directfb,-no-directfb)
 QT5BASE_DEPENDENCIES   += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),directfb)
Signature · 1 line
2.11.0
#1 lore raw

PATCH v3 2/3 qt5base: use system/buildroot provided freetype

Select (and use) builroot provided freetype in case qt5base gui is selected (gui without freetype/font support makes not much sense and gives compile errors).

Qt 5.6 needs some support to find the include headers, 5.8 is clever enough inherently.

Fixes [1] (by avoiding the build-in freetype library which depends on activated libpng support):

Project ERROR: Library 'libpng' is not defined. make[3]: *** [sub-3rdparty-freetype-make_first] Error 3

[1] http://autobuild.buildroot.net/results/219162ba616289f799a5053c4dcc6b8574284283

---
Changes v2 -> v3:
- fix typo in patch description s/avtivated/activated (Arnout Vandecappelle)
- group freetype related options into ifeq and only set freetype include path in case GUI is selected (Arnout Vandecappelle)
- add Reviewed-by: Arnout Vandecappelle

Changes v1 -> v2:
- updated patch description
- checked and fixed for Qt 5.6

---
 package/qt5/qt5base/Config.in  | 1 +
 package/qt5/qt5base/qt5base.mk | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
package/qt5/qt5base/Config.in +1 -0
index f22e034b3..337dcf245 100644
@@ -128,6 +128,7 @@ config BR2_PACKAGE_QT5BASE_XML
 
 config BR2_PACKAGE_QT5BASE_GUI
 	bool "gui module"
+	select BR2_PACKAGE_FREETYPE
 	# At least one graphic backend must be enabled, so enable
 	# linuxfb if nothing is enabled.
 	select BR2_PACKAGE_QT5BASE_LINUXFB if \
package/qt5/qt5base/qt5base.mk +7 -1
index 582421ac5..78db08ce4 100644
@@ -97,7 +97,13 @@ QT5BASE_DEPENDENCIES   += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),sqlite)
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_NONE),-no-sql-sqlite)
 endif
 
-QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-gui,-no-gui)
+ifeq ($(BR2_PACKAGE_QT5BASE_GUI),y)
+QT5BASE_CONFIGURE_OPTS += -gui -system-freetype
+QT5BASE_CONFIGURE_OPTS +=  $(if $(BR2_PACKAGE_QT5_VERSION_5_6),-I$(STAGING_DIR)/usr/include/freetype2)
+QT5BASE_DEPENDENCIES += freetype
+else
+QT5BASE_CONFIGURE_OPTS += -no-gui -no-freetype
+endif
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_WIDGETS),-widgets,-no-widgets)
 # We have to use --enable-linuxfb, otherwise Qt thinks that -linuxfb
 # is to add a link against the "inuxfb" library.
Signature · 1 line
2.11.0
#2 lore raw

PATCH v3 2/3 qt5base: use system/buildroot provided freetype

Hello,

Quoted 15 lines · Peter Seiderer

Select (and use) builroot provided freetype in case qt5base gui is selected (gui without freetype/font support makes not much sense and gives compile errors).

Qt 5.6 needs some support to find the include headers, 5.8 is clever enough inherently.

Fixes [1] (by avoiding the build-in freetype library which depends on activated libpng support):

Project ERROR: Library 'libpng' is not defined. make[3]: *** [sub-3rdparty-freetype-make_first] Error 3

[1] http://autobuild.buildroot.net/results/219162ba616289f799a5053c4dcc6b8574284283

Quoted 8 lines

---
Changes v2 -> v3:
- fix typo in patch description s/avtivated/activated (Arnout Vandecappelle)
- group freetype related options into ifeq and only set freetype include path in case GUI is selected (Arnout Vandecappelle)
- add Reviewed-by: Arnout Vandecappelle

Applied to master, thanks.

Thomas

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

PATCH v3 3/3 qt5base: make harfbuzz support selectable

In reply to Peter Seiderer

If selected use:

- system/buildroot harfbuzz in case __sync for 4 bytes is supported
- qt harfbuzz otherwise (using QAtomic instead)

---
Changes v2 -> v3:
- add empty lines for better seperation (Arnout Vandecappelle)

Changes v1 -> v2:
- make harfbuzz support selectable, preferre the system provided one, but fall back to qt provided one

---
 package/qt5/qt5base/Config.in  |  9 +++++++++
 package/qt5/qt5base/qt5base.mk | 16 ++++++++++++++++
 2 files changed, 25 insertions(+)
package/qt5/qt5base/Config.in +9 -0
index 337dcf245..27f225026 100644
@@ -239,6 +239,15 @@ config BR2_PACKAGE_QT5BASE_FONTCONFIG
 	  This option enables Fontconfig and Freetype support using
 	  the system fontconfig and freetype2 libraries.
 
+config BR2_PACKAGE_QT5BASE_HARFBUZZ
+	bool "harfbuzz support"
+	select BR2_PACKAGE_HARFBUZZ if BR2_TOOLCHAIN_HAS_SYNC_4
+	help
+	  This option enables HarfBuzz support (either system
+	  harfbuzz if the toolchain supports __sync for 4 bytes
+	  or qt provided one which avoids this dependenc by using
+	  QAtomic).
+
 config BR2_PACKAGE_QT5BASE_GIF
 	bool "GIF support"
 	help
package/qt5/qt5base/qt5base.mk +16 -0
index 78db08ce4..155f994a8 100644
@@ -104,6 +104,22 @@ QT5BASE_DEPENDENCIES += freetype
 else
 QT5BASE_CONFIGURE_OPTS += -no-gui -no-freetype
 endif
+
+ifeq ($(BR2_PACKAGE_QT5BASE_HARFBUZZ),y)
+ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_4),y)
+# system harfbuzz in case __sync for 4 bytes is supported
+QT5BASE_CONFIGURE_OPTS += -system-harfbuzz
+QT5BASE_DEPENDENCIES += harfbuzz
+else
+# qt harfbuzz otherwise (using QAtomic instead)
+QT5BASE_CONFIGURE_OPTS += -qt-harfbuzz
+QT5BASE_LICENSE := $(QT5BASE_LICENSE), MIT (harfbuzz)
+QT5BASE_LICENSE_FILES += src/3rdparty/harfbuzz-ng/COPYING
+endif
+else
+QT5BASE_CONFIGURE_OPTS += -no-harfbuzz
+endif
+
 QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_WIDGETS),-widgets,-no-widgets)
 # We have to use --enable-linuxfb, otherwise Qt thinks that -linuxfb
 # is to add a link against the "inuxfb" library.
Signature · 1 line
2.11.0
#4 lore raw

PATCH v3 3/3 qt5base: make harfbuzz support selectable

Hello,

Quoted 6 lines · Peter Seiderer

If selected use:

- system/buildroot harfbuzz in case __sync for 4 bytes is supported
- qt harfbuzz otherwise (using QAtomic instead)

From this description, it is not clear whether this is material for master or for next. What happens currently with Harfbuzz? Qt is always using its internal version?

Thomas

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

PATCH v3 3/3 qt5base: make harfbuzz support selectable

Hello Thomas,

Quoted 5 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · Peter Seiderer

If selected use:

Quoted 8 lines
Quoted 4 lines

- system/buildroot harfbuzz in case __sync for 4 bytes is supported
- qt harfbuzz otherwise (using QAtomic instead)

From this description, it is not clear whether this is material for master or for next. What happens currently with Harfbuzz? Qt is always using its internal version?

This patch is a follow up on your (and Arnout's) suggestion to prefer system libraries, freetype first, harzbuzz second..., so logically it belongs to the freetype patch...

But no mandatory need for this patch to be applied to master, maybe next is enough...

At the moment always the qt built-in harfbuzz is used...

Regards,
Peter

Quoted 2 lines

Thomas

#6 lore raw

PATCH v3 3/3 qt5base: make harfbuzz support selectable

Hello,

Quoted 8 lines · Peter Seiderer

This patch is a follow up on your (and Arnout's) suggestion to prefer system libraries, freetype first, harzbuzz second..., so logically it belongs to the freetype patch...

But no mandatory need for this patch to be applied to master, maybe next is enough...

At the moment always the qt built-in harfbuzz is used...

OK. The freetype one was really needed in master as it was fixing a build issue.

However, I'll keep the harfbuzz patch around until next gets merged back into master after the release. We've been building Qt with the internal harfbuzz so far, so let's keep it this way for the release.

Are you also looking at the other qt5 failures on various architectures?

Thanks!

Thomas

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

PATCH v3 3/3 qt5base: make harfbuzz support selectable

In reply to Peter Seiderer

Hello,

Quoted 6 lines · Peter Seiderer

If selected use:

- system/buildroot harfbuzz in case __sync for 4 bytes is supported
- qt harfbuzz otherwise (using QAtomic instead)

We still have this patch pending. Could you summarize if it's still needed. From a quick read of our past discussion, it seems like it is still needed, but I prefer to ask before applying. Thanks!

Thomas

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

PATCH v3 3/3 qt5base: make harfbuzz support selectable

Hello Thomas,

Quoted 5 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · Peter Seiderer

If selected use:

Quoted 9 lines
Quoted 4 lines

- system/buildroot harfbuzz in case __sync for 4 bytes is supported
- qt harfbuzz otherwise (using QAtomic instead)

We still have this patch pending. Could you summarize if it's still needed. From a quick read of our past discussion, it seems like it is still needed, but I prefer to ask before applying. Thanks!

...considering your quote 'We generally don't like to use the builtin libraries.' ([1]) I would say yes ;-)

Otherwise at least the harfbuzz license part is needed...

Regards,
Peter

[1] http://lists.busybox.net/pipermail/buildroot/2017-February/183615.html

Quoted 1 line

Thomas

#9 lore raw

PATCH v3 3/3 qt5base: make harfbuzz support selectable

In reply to Peter Seiderer
Quoted 6 lines · Peter Seiderer

If selected use:

- system/buildroot harfbuzz in case __sync for 4 bytes is supported
- qt harfbuzz otherwise (using QAtomic instead)

*Finally* applied to master, thanks.

Regards,
Arnout

[snip]

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
#10 lore raw

PATCH v3 1/3 qt5base: move linuxfb configure option comment

In reply to Peter Seiderer

Hello,

Quoted 6 lines · Peter Seiderer

Move the two comment lines to where they apply.

---
 package/qt5/qt5base/qt5base.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

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