qt5base: make harfbuzz support selectable
authorPeter Seiderer <ps.report@gmx.net>
Sat, 18 Feb 2017 11:32:02 +0000 (12:32 +0100)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sat, 21 Oct 2017 19:37:28 +0000 (21:37 +0200)
If selected use:

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

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/qt5/qt5base/Config.in
package/qt5/qt5base/qt5base.mk

index f5de27228d7b7171df3e5eea5c9c068be78bd4ab..dc56474bbb89d1a0fb5097f5ba072107f67ffede 100644 (file)
@@ -229,6 +229,14 @@ 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 the qt
+         provided one which avoids this dependency by using QAtomic).
+
 config BR2_PACKAGE_QT5BASE_GIF
        bool "GIF support"
        help
index 0ca11a5edb24d7bd7f62c3fb61d2a840bbef86cc..1683eda83809d27d82a63b24f0aa7bc869bc84a8 100644 (file)
@@ -105,6 +105,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.