qt5base: use system/buildroot provided freetype
authorPeter Seiderer <ps.report@gmx.net>
Sat, 18 Feb 2017 11:32:01 +0000 (12:32 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 20 Feb 2017 21:01:26 +0000 (22:01 +0100)
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

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/qt5/qt5base/Config.in
package/qt5/qt5base/qt5base.mk

index f22e034b3086710c0cbc57b73b8972860e634295..337dcf245427956f8d1757844f74d9cb86f93a2f 100644 (file)
@@ -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 \
index 582421ac55d80f1490da0fa37168d9822e34cf3b..7a335736db21c40097295058a6ba88545937c6f1 100644 (file)
@@ -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.