@@ -117,6 +117,27 @@ config BR2_PACKAGE_QT6BASE_GUI
help
This option enables the Qt6Gui library.
+if BR2_PACKAGE_QT6BASE_GUI
+
+config BR2_PACKAGE_QT6BASE_FONTCONFIG
+ bool "fontconfig support"
+ select BR2_PACKAGE_FONTCONFIG
+ help
+ This option enables Fontconfig and Freetype support using
+ the system fontconfig and freetype2 libraries.
+
+config BR2_PACKAGE_QT6BASE_HARFBUZZ
+ bool "harfbuzz support"
+ select BR2_PACKAGE_HARFBUZZ if \
+ BR2_TOOLCHAIN_HAS_SYNC_4 && \
+ BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+ 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).
+
+endif
+
config BR2_PACKAGE_QT6BASE_SYSLOG
bool "syslog support"
help
@@ -139,6 +139,29 @@ ifeq ($(BR2_PACKAGE_QT6BASE_GUI),y)
QT6BASE_CONF_OPTS += -DFEATURE_gui=ON -DFEATURE_freetype=ON -DINPUT_opengl=no -DFEATURE_vulkan=OFF
QT6BASE_DEPENDENCIES += freetype
+ifeq ($(BR2_PACKAGE_QT6BASE_HARFBUZZ),y)
+QT6BASE_CONF_OPTS += -DFEATURE_harfbuzz=ON
+ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_4),y)
+# system harfbuzz in case __sync for 4 bytes is supported
+QT6BASE_CONF_OPTS += -DQT_USE_BUNDLED_BundledHarfbuzz=OFF
+QT6BASE_DEPENDENCIES += harfbuzz
+else #BR2_TOOLCHAIN_HAS_SYNC_4
+# qt harfbuzz otherwise (using QAtomic instead)
+QT6BASE_CONF_OPTS += -DQT_USE_BUNDLED_BundledHarfbuzz=ON
+QT6BASE_LICENSE += , MIT (harfbuzz)
+QT6BASE_LICENSE_FILES += src/3rdparty/harfbuzz-ng/COPYING
+endif
+else
+QT6BASE_CONF_OPTS += -DFEATURE_harfbuzz=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_QT6BASE_FONTCONFIG),y)
+QT6BASE_CONF_OPTS += -DFEATURE_fontconfig=ON
+QT6BASE_DEPENDENCIES += fontconfig
+else
+QT6BASE_CONF_OPTS += -DFEATURE_fontconfig=OFF
+endif
+
else
QT6BASE_CONF_OPTS += -DFEATURE_gui=OFF
endif