From aac5cb1d5bf08bae7fbca49d8186e349e6f296ae Mon Sep 17 00:00:00 2001 From: Jens Maus Date: Sun, 22 Sep 2024 00:30:50 +0200 Subject: [PATCH] add new buildroot patch adding the missing xcb-util-cursor dependency preventing qt6base from correctly compiling with enabled XCB support. --- .../package/qutselect/Config.in | 1 - .../0009-qt6base-xcb-cursor.patch | 20 + .../buildroot/package/qt6/qt6base/Config.in | 250 ++++++++++ .../package/qt6/qt6base/Config.in.orig | 249 ++++++++++ .../buildroot/package/qt6/qt6base/qt6base.mk | 435 ++++++++++++++++++ .../package/qt6/qt6base/qt6base.mk.orig | 434 +++++++++++++++++ 6 files changed, 1388 insertions(+), 1 deletion(-) create mode 100644 buildroot-patches/0009-qt6base-xcb-cursor.patch create mode 100644 buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/Config.in create mode 100644 buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/Config.in.orig create mode 100644 buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/qt6base.mk create mode 100644 buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/qt6base.mk.orig diff --git a/buildroot-external/package/qutselect/Config.in b/buildroot-external/package/qutselect/Config.in index d504196..5b0942d 100644 --- a/buildroot-external/package/qutselect/Config.in +++ b/buildroot-external/package/qutselect/Config.in @@ -12,7 +12,6 @@ config BR2_PACKAGE_QUTSELECT select BR2_PACKAGE_JQ select BR2_PACKAGE_LIBCURL select BR2_PACKAGE_LIBCURL_CURL - select BR2_PACKAGE_XCB_UTIL_CURSOR help A Qt-based (unix) terminal server selection tool diff --git a/buildroot-patches/0009-qt6base-xcb-cursor.patch b/buildroot-patches/0009-qt6base-xcb-cursor.patch new file mode 100644 index 0000000..8e12d42 --- /dev/null +++ b/buildroot-patches/0009-qt6base-xcb-cursor.patch @@ -0,0 +1,20 @@ +--- buildroot/package/qt6/qt6base/Config.in.orig ++++ buildroot/package/qt6/qt6base/Config.in +@@ -65,6 +65,7 @@ + select BR2_PACKAGE_XCB_UTIL_KEYSYMS + select BR2_PACKAGE_XCB_UTIL_RENDERUTIL + select BR2_PACKAGE_XCB_UTIL_WM ++ select BR2_PACKAGE_XCB_UTIL_CURSOR + select BR2_PACKAGE_LIBXKBCOMMON + + comment "X.org XCB backend available if X.org is enabled" +--- buildroot/package/qt6/qt6base/qt6base.mk.orig ++++ buildroot/package/qt6/qt6base/qt6base.mk +@@ -207,6 +207,7 @@ + xcb-util-image \ + xcb-util-keysyms \ + xcb-util-renderutil \ ++ xcb-util-cursor \ + xlib_libX11 + else + QT6BASE_CONF_OPTS += -DFEATURE_xcb=OFF diff --git a/buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/Config.in b/buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/Config.in new file mode 100644 index 0000000..a9c4c39 --- /dev/null +++ b/buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/Config.in @@ -0,0 +1,250 @@ +config BR2_PACKAGE_QT6BASE + bool "qt6base" + select BR2_PACKAGE_DOUBLE_CONVERSION + select BR2_PACKAGE_LIBB2 + select BR2_PACKAGE_PCRE2 + select BR2_PACKAGE_PCRE2_16 + select BR2_PACKAGE_ZLIB + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt6base module, which + contains the base Qt libraries: QtCore, QtNetwork, QtGui, + QtWidgets, etc. + + http://qt.io + +if BR2_PACKAGE_QT6BASE + +config BR2_PACKAGE_QT6BASE_CONCURRENT + bool "concurrent module" + help + This options enables the Qt6Concurrent library. + +config BR2_PACKAGE_QT6BASE_DBUS + bool "DBus module" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + select BR2_PACKAGE_DBUS + help + This option enables the D-Bus module. + +config BR2_PACKAGE_QT6BASE_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_QT6BASE_LINUXFB if \ + !BR2_PACKAGE_QT6BASE_XCB && \ + !BR2_PACKAGE_QT6BASE_EGLFS + help + This option enables the Qt6Gui library. + +if BR2_PACKAGE_QT6BASE_GUI + +config BR2_PACKAGE_QT6BASE_VULKAN + bool "Vulkan support" + depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader + depends on !BR2_STATIC_LIBS # vulkan-loader + depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader + select BR2_PACKAGE_VULKAN_HEADERS + select BR2_PACKAGE_VULKAN_LOADER + help + This option enables Vulkan support. + +config BR2_PACKAGE_QT6BASE_LINUXFB + bool "linuxfb support" + +config BR2_PACKAGE_QT6BASE_XCB + bool "X.org XCB support" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL_IMAGE + select BR2_PACKAGE_XCB_UTIL_KEYSYMS + select BR2_PACKAGE_XCB_UTIL_RENDERUTIL + select BR2_PACKAGE_XCB_UTIL_WM + select BR2_PACKAGE_XCB_UTIL_CURSOR + select BR2_PACKAGE_LIBXKBCOMMON + +comment "X.org XCB backend available if X.org is enabled" + depends on !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_QT6BASE_EGLFS + bool "eglfs support" + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_HAS_LIBGBM + depends on BR2_PACKAGE_QT6_GL_SUPPORTS + select BR2_PACKAGE_QT6BASE_OPENGL + +config BR2_PACKAGE_QT6BASE_DEFAULT_QPA + string "Default graphical platform" + help + Choose the default platform abstraction to use for graphical + applications (e.g xcb, linuxfb, eglfs, ...). If this is + empty, the default for your architecture will be used + (usually this is eglfs). + + You can get a list of supported platforms by running a Qt + application with the option "-platform help" on your + target. You can choose a different platform at runtime with + the -platform option. + +config BR2_PACKAGE_QT6BASE_OPENGL + bool "OpenGL support" + depends on BR2_PACKAGE_QT6_GL_SUPPORTS + help + This option enables OpenGL support. + +comment "OpenGL support needs an OpenGL-capable backend" + depends on !BR2_PACKAGE_QT6_GL_SUPPORTS + +if BR2_PACKAGE_QT6BASE_OPENGL + +choice + prompt "OpenGL API" + help + Select OpenGL API. + +config BR2_PACKAGE_QT6BASE_OPENGL_DESKTOP + bool "Desktop OpenGL" + depends on BR2_PACKAGE_HAS_LIBGL + help + Use desktop OpenGL. + +config BR2_PACKAGE_QT6BASE_OPENGL_ES2 + bool "OpenGL ES 2.0+" + depends on BR2_PACKAGE_HAS_LIBGLES + help + Use OpenGL ES 2.0 and later versions. + +endchoice + +endif + +config BR2_PACKAGE_QT6BASE_FONTCONFIG + bool "fontconfig support" + select BR2_PACKAGE_FONTCONFIG + help + This option enables Fontconfig support using the system + fontconfig library. + +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). + +config BR2_PACKAGE_QT6BASE_GIF + bool "GIF support" + help + This compiles and installs the plugin for GIF reading support. + +config BR2_PACKAGE_QT6BASE_JPEG + bool "JPEG support" + select BR2_PACKAGE_JPEG + help + This option enables JPEG support using the system libjpeg + library. + +config BR2_PACKAGE_QT6BASE_PNG + bool "PNG support" + select BR2_PACKAGE_LIBPNG + help + This option enables PNG support using the system libpng + library. + +config BR2_PACKAGE_QT6BASE_WIDGETS + bool "widgets module" + help + This option enables the Qt6Widgets library. + +config BR2_PACKAGE_QT6BASE_PRINTSUPPORT + bool "printing support" + # yes, print support needs widgets + depends on BR2_PACKAGE_QT6BASE_WIDGETS + help + This option enables printing support, optionally using CUPS + if available. + +endif + +config BR2_PACKAGE_QT6BASE_NETWORK + bool "network module" + select BR2_PACKAGE_LIBOPENSSL_ENABLE_PSK if BR2_PACKAGE_LIBOPENSSL + help + This options enables the Qt6Network library. + +config BR2_PACKAGE_QT6BASE_SQL + bool "sql module" + help + This options enables the Qt6Sql library. + +if BR2_PACKAGE_QT6BASE_SQL +config BR2_PACKAGE_QT6BASE_MYSQL + bool "MySQL Plugin" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_MARIADB + help + Build MySQL plugin + +comment "MySQL plugin needs a toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_QT6BASE_PSQL + bool "PostgreSQL Plugin" + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR + depends on !BR2_OPTIMIZE_FAST + select BR2_PACKAGE_POSTGRESQL + help + Build PostgreSQL plugin + +comment "PostgreSQL plugin needs a toolchain w/ wchar, dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR + +comment "PostgreSQL plugin can't be built with optimize for fast" + depends on BR2_USE_MMU + depends on BR2_OPTIMIZE_FAST + +config BR2_PACKAGE_QT6BASE_SQLITE + bool "SQLite plugin" + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_SQLITE_ENABLE_COLUMN_METADATA + help + Build SQLite plugin + +endif + +config BR2_PACKAGE_QT6BASE_SYSLOG + bool "syslog support" + help + Logs to the standard UNIX logging mechanism. + +config BR2_PACKAGE_QT6BASE_TEST + bool "test module" + help + This options enables the Qt6Test library. + +config BR2_PACKAGE_QT6BASE_TSLIB + bool "Enable Tslib support" + select BR2_PACKAGE_TSLIB + help + This options enables the Tslib plugin + +config BR2_PACKAGE_QT6BASE_XML + bool "XML module" + help + This options enables the Qt6Xml library. + +endif diff --git a/buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/Config.in.orig b/buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/Config.in.orig new file mode 100644 index 0000000..3b15d40 --- /dev/null +++ b/buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/Config.in.orig @@ -0,0 +1,249 @@ +config BR2_PACKAGE_QT6BASE + bool "qt6base" + select BR2_PACKAGE_DOUBLE_CONVERSION + select BR2_PACKAGE_LIBB2 + select BR2_PACKAGE_PCRE2 + select BR2_PACKAGE_PCRE2_16 + select BR2_PACKAGE_ZLIB + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt6base module, which + contains the base Qt libraries: QtCore, QtNetwork, QtGui, + QtWidgets, etc. + + http://qt.io + +if BR2_PACKAGE_QT6BASE + +config BR2_PACKAGE_QT6BASE_CONCURRENT + bool "concurrent module" + help + This options enables the Qt6Concurrent library. + +config BR2_PACKAGE_QT6BASE_DBUS + bool "DBus module" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + select BR2_PACKAGE_DBUS + help + This option enables the D-Bus module. + +config BR2_PACKAGE_QT6BASE_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_QT6BASE_LINUXFB if \ + !BR2_PACKAGE_QT6BASE_XCB && \ + !BR2_PACKAGE_QT6BASE_EGLFS + help + This option enables the Qt6Gui library. + +if BR2_PACKAGE_QT6BASE_GUI + +config BR2_PACKAGE_QT6BASE_VULKAN + bool "Vulkan support" + depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader + depends on !BR2_STATIC_LIBS # vulkan-loader + depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader + select BR2_PACKAGE_VULKAN_HEADERS + select BR2_PACKAGE_VULKAN_LOADER + help + This option enables Vulkan support. + +config BR2_PACKAGE_QT6BASE_LINUXFB + bool "linuxfb support" + +config BR2_PACKAGE_QT6BASE_XCB + bool "X.org XCB support" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL_IMAGE + select BR2_PACKAGE_XCB_UTIL_KEYSYMS + select BR2_PACKAGE_XCB_UTIL_RENDERUTIL + select BR2_PACKAGE_XCB_UTIL_WM + select BR2_PACKAGE_LIBXKBCOMMON + +comment "X.org XCB backend available if X.org is enabled" + depends on !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_QT6BASE_EGLFS + bool "eglfs support" + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_HAS_LIBGBM + depends on BR2_PACKAGE_QT6_GL_SUPPORTS + select BR2_PACKAGE_QT6BASE_OPENGL + +config BR2_PACKAGE_QT6BASE_DEFAULT_QPA + string "Default graphical platform" + help + Choose the default platform abstraction to use for graphical + applications (e.g xcb, linuxfb, eglfs, ...). If this is + empty, the default for your architecture will be used + (usually this is eglfs). + + You can get a list of supported platforms by running a Qt + application with the option "-platform help" on your + target. You can choose a different platform at runtime with + the -platform option. + +config BR2_PACKAGE_QT6BASE_OPENGL + bool "OpenGL support" + depends on BR2_PACKAGE_QT6_GL_SUPPORTS + help + This option enables OpenGL support. + +comment "OpenGL support needs an OpenGL-capable backend" + depends on !BR2_PACKAGE_QT6_GL_SUPPORTS + +if BR2_PACKAGE_QT6BASE_OPENGL + +choice + prompt "OpenGL API" + help + Select OpenGL API. + +config BR2_PACKAGE_QT6BASE_OPENGL_DESKTOP + bool "Desktop OpenGL" + depends on BR2_PACKAGE_HAS_LIBGL + help + Use desktop OpenGL. + +config BR2_PACKAGE_QT6BASE_OPENGL_ES2 + bool "OpenGL ES 2.0+" + depends on BR2_PACKAGE_HAS_LIBGLES + help + Use OpenGL ES 2.0 and later versions. + +endchoice + +endif + +config BR2_PACKAGE_QT6BASE_FONTCONFIG + bool "fontconfig support" + select BR2_PACKAGE_FONTCONFIG + help + This option enables Fontconfig support using the system + fontconfig library. + +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). + +config BR2_PACKAGE_QT6BASE_GIF + bool "GIF support" + help + This compiles and installs the plugin for GIF reading support. + +config BR2_PACKAGE_QT6BASE_JPEG + bool "JPEG support" + select BR2_PACKAGE_JPEG + help + This option enables JPEG support using the system libjpeg + library. + +config BR2_PACKAGE_QT6BASE_PNG + bool "PNG support" + select BR2_PACKAGE_LIBPNG + help + This option enables PNG support using the system libpng + library. + +config BR2_PACKAGE_QT6BASE_WIDGETS + bool "widgets module" + help + This option enables the Qt6Widgets library. + +config BR2_PACKAGE_QT6BASE_PRINTSUPPORT + bool "printing support" + # yes, print support needs widgets + depends on BR2_PACKAGE_QT6BASE_WIDGETS + help + This option enables printing support, optionally using CUPS + if available. + +endif + +config BR2_PACKAGE_QT6BASE_NETWORK + bool "network module" + select BR2_PACKAGE_LIBOPENSSL_ENABLE_PSK if BR2_PACKAGE_LIBOPENSSL + help + This options enables the Qt6Network library. + +config BR2_PACKAGE_QT6BASE_SQL + bool "sql module" + help + This options enables the Qt6Sql library. + +if BR2_PACKAGE_QT6BASE_SQL +config BR2_PACKAGE_QT6BASE_MYSQL + bool "MySQL Plugin" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_MARIADB + help + Build MySQL plugin + +comment "MySQL plugin needs a toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_QT6BASE_PSQL + bool "PostgreSQL Plugin" + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR + depends on !BR2_OPTIMIZE_FAST + select BR2_PACKAGE_POSTGRESQL + help + Build PostgreSQL plugin + +comment "PostgreSQL plugin needs a toolchain w/ wchar, dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR + +comment "PostgreSQL plugin can't be built with optimize for fast" + depends on BR2_USE_MMU + depends on BR2_OPTIMIZE_FAST + +config BR2_PACKAGE_QT6BASE_SQLITE + bool "SQLite plugin" + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_SQLITE_ENABLE_COLUMN_METADATA + help + Build SQLite plugin + +endif + +config BR2_PACKAGE_QT6BASE_SYSLOG + bool "syslog support" + help + Logs to the standard UNIX logging mechanism. + +config BR2_PACKAGE_QT6BASE_TEST + bool "test module" + help + This options enables the Qt6Test library. + +config BR2_PACKAGE_QT6BASE_TSLIB + bool "Enable Tslib support" + select BR2_PACKAGE_TSLIB + help + This options enables the Tslib plugin + +config BR2_PACKAGE_QT6BASE_XML + bool "XML module" + help + This options enables the Qt6Xml library. + +endif diff --git a/buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/qt6base.mk b/buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/qt6base.mk new file mode 100644 index 0000000..5210a31 --- /dev/null +++ b/buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/qt6base.mk @@ -0,0 +1,435 @@ +################################################################################ +# +# qt6base +# +################################################################################ + +QT6BASE_VERSION = $(QT6_VERSION) +QT6BASE_SITE = $(QT6_SITE) +QT6BASE_SOURCE = qtbase-$(QT6_SOURCE_TARBALL_PREFIX)-$(QT6BASE_VERSION).tar.xz +QT6BASE_CPE_ID_VENDOR = qt +QT6BASE_CPE_ID_PRODUCT = qt + +# 0001-fix-CVE-2024-39936.patch +QT6BASE_IGNORE_CVES += CVE-2024-39936 + +QT6BASE_CMAKE_BACKEND = ninja + +QT6BASE_LICENSE = \ + GPL-2.0+ or LGPL-3.0, \ + GPL-3.0 with exception (tools), \ + GFDL-1.3 (docs), \ + Apache-2.0, \ + BSD-3-Clause, \ + BSL-1.0, \ + MIT + +QT6BASE_LICENSE_FILES = \ + LICENSES/Apache-2.0.txt \ + LICENSES/BSD-3-Clause.txt \ + LICENSES/BSL-1.0.txt \ + LICENSES/GFDL-1.3-no-invariants-only.txt \ + LICENSES/GPL-2.0-only.txt \ + LICENSES/GPL-3.0-only.txt \ + LICENSES/LGPL-3.0-only.txt \ + LICENSES/MIT.txt \ + LICENSES/Qt-GPL-exception-1.0.txt + +QT6BASE_DEPENDENCIES = \ + host-qt6base \ + double-conversion \ + libb2 \ + pcre2 \ + zlib +QT6BASE_INSTALL_STAGING = YES + +QT6BASE_CONF_OPTS = \ + -DQT_HOST_PATH=$(HOST_DIR) \ + -DINSTALL_ARCHDATADIR=lib/qt6 \ + -DFEATURE_concurrent=OFF \ + -DFEATURE_xml=OFF \ + -DFEATURE_sql=OFF \ + -DFEATURE_testlib=OFF \ + -DFEATURE_network=OFF \ + -DFEATURE_dbus=OFF \ + -DFEATURE_icu=OFF \ + -DFEATURE_glib=OFF \ + -DFEATURE_system_doubleconversion=ON \ + -DFEATURE_system_pcre2=ON \ + -DFEATURE_system_zlib=ON \ + -DFEATURE_system_libb2=ON + +# x86 optimization options. While we have a BR2_X86_CPU_HAS_AVX512, it +# is not clear yet how it maps to all the avx512* options of Qt, so we +# for now keeps them disabled. +QT6BASE_CONF_OPTS += \ + -DFEATURE_sse2=$(if $(BR2_X86_CPU_HAS_SSE2),ON,OFF) \ + -DFEATURE_sse3=$(if $(BR2_X86_CPU_HAS_SSE3),ON,OFF) \ + -DFEATURE_sse4_1=$(if $(BR2_X86_CPU_HAS_SSE4),ON,OFF) \ + -DFEATURE_sse4_2=$(if $(BR2_X86_CPU_HAS_SSE42),ON,OFF) \ + -DFEATURE_ssse3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF) \ + -DFEATURE_avx=$(if $(BR2_X86_CPU_HAS_AVX),ON,OFF) \ + -DFEATURE_avx2=$(if $(BR2_X86_CPU_HAS_AVX2),ON,OFF) \ + -DFEATURE_avx512bw=OFF \ + -DFEATURE_avx512cd=OFF \ + -DFEATURE_avx512dq=OFF \ + -DFEATURE_avx512er=OFF \ + -DFEATURE_avx512f=OFF \ + -DFEATURE_avx512ifma=OFF \ + -DFEATURE_avx512pf=OFF \ + -DFEATURE_avx512vbmi=OFF \ + -DFEATURE_avx512vbmi2=OFF \ + -DFEATURE_avx512vl=OFF \ + -DFEATURE_vaes=OFF + +HOST_QT6BASE_DEPENDENCIES = \ + host-double-conversion \ + host-libb2 \ + host-pcre2 \ + host-zlib +HOST_QT6BASE_CONF_OPTS = \ + -DFEATURE_concurrent=OFF \ + -DFEATURE_xml=ON \ + -DFEATURE_dbus=OFF \ + -DFEATURE_icu=OFF \ + -DFEATURE_glib=OFF \ + -DFEATURE_system_doubleconversion=ON \ + -DFEATURE_system_libb2=ON \ + -DFEATURE_system_pcre2=ON \ + -DFEATURE_system_zlib=ON + +# We need host-qt6base with Gui support when building host-qt6shadertools, +# otherwise the build is skipped and no qsb host tool is generated. +# qt6shadertools fail to build if qsb is not available. +ifeq ($(BR2_PACKAGE_HOST_QT6BASE_GUI),y) +HOST_QT6BASE_CONF_OPTS += \ + -DFEATURE_gui=ON \ + -DFEATURE_freetype=OFF \ + -DFEATURE_vulkan=OFF \ + -DFEATURE_linuxfb=ON \ + -DFEATURE_xcb=OFF \ + -DFEATURE_opengl=OFF -DINPUT_opengl=no \ + -DFEATURE_harfbuzz=OFF \ + -DFEATURE_png=OFF \ + -DFEATURE_gif=OFF \ + -DFEATURE_jpeg=OFF \ + -DFEATURE_printsupport=OFF \ + -DFEATURE_kms=OFF \ + -DFEATURE_fontconfig=OFF \ + -DFEATURE_widgets=OFF \ + -DFEATURE_libinput=OFF \ + -DFEATURE_tslib=OFF \ + -DFEATURE_eglfs=OFF +else +HOST_QT6BASE_CONF_OPTS += -DFEATURE_gui=OFF +endif + +# The Network module is explicitly required by qt6tools. +ifeq ($(BR2_PACKAGE_HOST_QT6BASE_NETWORK),y) +HOST_QT6BASE_CONF_OPTS += -DFEATURE_network=ON +else +HOST_QT6BASE_CONF_OPTS += -DFEATURE_network=OFF +endif + +# We need host qt6base with Sql support for host-qt6tools to generate the +# qhelpgenerator host tool. qt6tools will fail to build if qhelpgenerator is not +# available. +ifeq ($(BR2_PACKAGE_HOST_QT6BASE_SQL),y) +HOST_QT6BASE_CONF_OPTS += -DFEATURE_sql=ON +else +HOST_QT6BASE_CONF_OPTS += -DFEATURE_sql=OFF +endif + +# We need host-qt6base with Testlib support when building host-qt6declarative +# with QuickTest support. QuickTest support is further required for building the +# qmltestrunner host tool. qt6declarative will fail to build if qmltestrunner is +# not available. +ifeq ($(BR2_PACKAGE_HOST_QT6BASE_TEST),y) +HOST_QT6BASE_CONF_OPTS += -DFEATURE_testlib=ON +else +HOST_QT6BASE_CONF_OPTS += -DFEATURE_testlib=OFF +endif + +# Conditional blocks below are ordered by alphabetic ordering of the +# BR2_PACKAGE_* option. + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +QT6BASE_CONF_OPTS += -DFEATURE_libudev=ON +QT6BASE_DEPENDENCIES += udev +else +QT6BASE_CONF_OPTS += -DFEATURE_libudev=OFF +endif + +ifeq ($(BR2_PACKAGE_ICU),y) +QT6BASE_CONF_OPTS += -DFEATURE_icu=ON +QT6BASE_DEPENDENCIES += icu +else +QT6BASE_CONF_OPTS += -DFEATURE_icu=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +QT6BASE_CONF_OPTS += -DFEATURE_glib=ON +QT6BASE_DEPENDENCIES += libglib2 +else +QT6BASE_CONF_OPTS += -DFEATURE_glib=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_GUI),y) +QT6BASE_CONF_OPTS += \ + -DFEATURE_gui=ON \ + -DFEATURE_freetype=ON \ + -DFEATURE_vulkan=OFF +QT6BASE_DEPENDENCIES += freetype + +ifeq ($(BR2_PACKAGE_QT6BASE_VULKAN),y) +QT6BASE_DEPENDENCIES += vulkan-headers vulkan-loader +QT6BASE_CONFIGURE_OPTS += -DFEATURE_vulkan=ON +else +QT6BASE_CONFIGURE_OPTS += -DFEATURE_vulkan=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_LINUXFB),y) +QT6BASE_CONF_OPTS += -DFEATURE_linuxfb=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_linuxfb=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_XCB),y) +QT6BASE_CONF_OPTS += \ + -DFEATURE_xcb=ON \ + -DFEATURE_xcb_xlib=ON \ + -DFEATURE_xkbcommon=ON \ + -DFEATURE_xkbcommon_x11=ON +QT6BASE_DEPENDENCIES += \ + libxcb \ + libxkbcommon \ + xcb-util-wm \ + xcb-util-image \ + xcb-util-keysyms \ + xcb-util-renderutil \ + xcb-util-cursor \ + xlib_libX11 +else +QT6BASE_CONF_OPTS += -DFEATURE_xcb=OFF +endif + +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_PNG),y) +QT6BASE_CONF_OPTS += -DFEATURE_png=ON -DFEATURE_system_png=ON +QT6BASE_DEPENDENCIES += libpng +else +QT6BASE_CONF_OPTS += -DFEATURE_png=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_GIF),y) +QT6BASE_CONF_OPTS += -DFEATURE_gif=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_gif=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_JPEG),y) +QT6BASE_CONF_OPTS += -DFEATURE_jpeg=ON +QT6BASE_DEPENDENCIES += jpeg +else +QT6BASE_CONF_OPTS += -DFEATURE_jpeg=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_PRINTSUPPORT),y) +QT6BASE_CONF_OPTS += -DFEATURE_printsupport=ON +ifeq ($(BR2_PACKAGE_CUPS),y) +QT6BASE_CONF_OPTS += -DFEATURE_cups=ON +QT6BASE_DEPENDENCIES += cups +else +QT6BASE_CONF_OPTS += -DFEATURE_cups=OFF +endif +else +QT6BASE_CONF_OPTS += -DFEATURE_printsupport=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBDRM),y) +QT6BASE_CONF_OPTS += -DFEATURE_kms=ON +QT6BASE_DEPENDENCIES += libdrm +else +QT6BASE_CONF_OPTS += -DFEATURE_kms=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 + +ifeq ($(BR2_PACKAGE_QT6BASE_WIDGETS),y) +QT6BASE_CONF_OPTS += -DFEATURE_widgets=ON + +# only enable gtk support if libgtk3 X11 backend is enabled +ifeq ($(BR2_PACKAGE_LIBGTK3)$(BR2_PACKAGE_LIBGTK3_X11),yy) +QT6BASE_CONF_OPTS += -DFEATURE_gtk3=ON +QT6BASE_DEPENDENCIES += libgtk3 +else +QT6BASE_CONF_OPTS += -DFEATURE_gtk3=OFF +endif + +else +QT6BASE_CONF_OPTS += -DFEATURE_widgets=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBINPUT),y) +QT6BASE_CONF_OPTS += -DFEATURE_libinput=ON +QT6BASE_DEPENDENCIES += libinput +else +QT6BASE_CONF_OPTS += -DFEATURE_libinput=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_TSLIB),y) +QT6BASE_CONF_OPTS += -DFEATURE_tslib=ON +QT6BASE_DEPENDENCIES += tslib +else +QT6BASE_CONF_OPTS += -DFEATURE_tslib=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_EGLFS),y) +QT6BASE_CONF_OPTS += -DFEATURE_egl=ON -DFEATURE_eglfs=ON +QT6BASE_DEPENDENCIES += libegl libgbm +else +QT6BASE_CONF_OPTS += -DFEATURE_eglfs=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_OPENGL_DESKTOP),y) +QT6BASE_CONF_OPTS += \ + -DFEATURE_opengl=ON \ + -DFEATURE_opengl_desktop=ON +QT6BASE_DEPENDENCIES += libgl +else ifeq ($(BR2_PACKAGE_QT6BASE_OPENGL_ES2),y) +QT6BASE_CONF_OPTS += \ + -DFEATURE_opengl=ON \ + -DFEATURE_opengles2=ON \ + -DFEATURE_opengl_desktop=OFF +QT6BASE_DEPENDENCIES += libgles +else +QT6BASE_CONF_OPTS += -DFEATURE_opengl=OFF -DINPUT_opengl=no +endif + +else +QT6BASE_CONF_OPTS += -DFEATURE_gui=OFF +endif + +QT6BASE_DEFAULT_QPA = $(call qstrip,$(BR2_PACKAGE_QT6BASE_DEFAULT_QPA)) +QT6BASE_CONF_OPTS += $(if $(QT6BASE_DEFAULT_QPA),-DQT_QPA_DEFAULT_PLATFORM=$(QT6BASE_DEFAULT_QPA)) + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +QT6BASE_CONF_OPTS += -DINPUT_openssl=yes +QT6BASE_DEPENDENCIES += openssl +else +QT6BASE_CONF_OPTS += -DINPUT_openssl=no +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_CONCURRENT),y) +QT6BASE_CONF_OPTS += -DFEATURE_concurrent=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_concurrent=OFF +endif + +# We need host-qt6base with D-Bus support, otherwise: "the tool +# "Qt6::qdbuscpp2xml" was not found in the Qt6DBusTools package." +ifeq ($(BR2_PACKAGE_QT6BASE_DBUS),y) +QT6BASE_CONF_OPTS += -DFEATURE_dbus=ON -DINPUT_dbus=linked +QT6BASE_DEPENDENCIES += dbus +HOST_QT6BASE_CONF_OPTS += -DFEATURE_dbus=ON +HOST_QT6BASE_DEPENDENCIES += host-dbus +else +QT6BASE_CONF_OPTS += -DFEATURE_dbus=OFF +HOST_QT6BASE_CONF_OPTS += -DFEATURE_dbus=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_NETWORK),y) +QT6BASE_CONF_OPTS += -DFEATURE_network=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_network=OFF +endif + +# Qt6 SQL Plugins +ifeq ($(BR2_PACKAGE_QT6BASE_SQL),y) +QT6BASE_CONF_OPTS += -DFEATURE_sql=ON +QT6BASE_CONF_OPTS += -DFEATURE_sql_db2=OFF -DFEATURE_sql_ibase=OFF -DFEATURE_sql_oci=OFF -DFEATURE_sql_odbc=OFF + +ifeq ($(BR2_PACKAGE_QT6BASE_MYSQL),y) +QT6BASE_CONF_OPTS += -DFEATURE_sql_mysql=ON +QT6BASE_DEPENDENCIES += mariadb +else +QT6BASE_CONF_OPTS += -DFEATURE_sql_mysql=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_PSQL),y) +QT6BASE_CONF_OPTS += -DFEATURE_sql_psql=ON +QT6BASE_DEPENDENCIES += postgresql +else +QT6BASE_CONF_OPTS += -DFEATURE_sql_psql=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_SQLITE),y) +QT6BASE_CONF_OPTS += -DFEATURE_sql_sqlite=ON -DFEATURE_system_sqlite=ON +QT6BASE_DEPENDENCIES += sqlite +else +QT6BASE_CONF_OPTS += -DFEATURE_sql_sqlite=OFF +endif + +else +QT6BASE_CONF_OPTS += -DFEATURE_sql=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_SYSLOG),y) +QT6BASE_CONF_OPTS += -DFEATURE_syslog=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_syslog=OFF +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +QT6BASE_CONF_OPTS += -DFEATURE_journald=ON +QT6BASE_DEPENDENCIES += systemd +else +QT6BASE_CONF_OPTS += -DFEATURE_journald=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_TEST),y) +QT6BASE_CONF_OPTS += -DFEATURE_testlib=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_testlib=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_XML),y) +QT6BASE_CONF_OPTS += -DFEATURE_xml=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_xml=OFF +endif + +ifeq ($(BR2_PACKAGE_ZSTD),y) +QT6BASE_CONF_OPTS += -DFEATURE_zstd=ON +QT6BASE_DEPENDENCIES += zstd +else +QT6BASE_CONF_OPTS += -DFEATURE_zstd=OFF +endif + +define QT6BASE_RM_USR_MKSPECS + $(Q)rm -rf $(TARGET_DIR)/usr/mkspecs +endef +QT6BASE_TARGET_FINALIZE_HOOKS += QT6BASE_RM_USR_MKSPECS + +$(eval $(cmake-package)) +$(eval $(host-cmake-package)) diff --git a/buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/qt6base.mk.orig b/buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/qt6base.mk.orig new file mode 100644 index 0000000..4c0392f --- /dev/null +++ b/buildroot-patches/0009-qt6base-xcb-cursor/buildroot/package/qt6/qt6base/qt6base.mk.orig @@ -0,0 +1,434 @@ +################################################################################ +# +# qt6base +# +################################################################################ + +QT6BASE_VERSION = $(QT6_VERSION) +QT6BASE_SITE = $(QT6_SITE) +QT6BASE_SOURCE = qtbase-$(QT6_SOURCE_TARBALL_PREFIX)-$(QT6BASE_VERSION).tar.xz +QT6BASE_CPE_ID_VENDOR = qt +QT6BASE_CPE_ID_PRODUCT = qt + +# 0001-fix-CVE-2024-39936.patch +QT6BASE_IGNORE_CVES += CVE-2024-39936 + +QT6BASE_CMAKE_BACKEND = ninja + +QT6BASE_LICENSE = \ + GPL-2.0+ or LGPL-3.0, \ + GPL-3.0 with exception (tools), \ + GFDL-1.3 (docs), \ + Apache-2.0, \ + BSD-3-Clause, \ + BSL-1.0, \ + MIT + +QT6BASE_LICENSE_FILES = \ + LICENSES/Apache-2.0.txt \ + LICENSES/BSD-3-Clause.txt \ + LICENSES/BSL-1.0.txt \ + LICENSES/GFDL-1.3-no-invariants-only.txt \ + LICENSES/GPL-2.0-only.txt \ + LICENSES/GPL-3.0-only.txt \ + LICENSES/LGPL-3.0-only.txt \ + LICENSES/MIT.txt \ + LICENSES/Qt-GPL-exception-1.0.txt + +QT6BASE_DEPENDENCIES = \ + host-qt6base \ + double-conversion \ + libb2 \ + pcre2 \ + zlib +QT6BASE_INSTALL_STAGING = YES + +QT6BASE_CONF_OPTS = \ + -DQT_HOST_PATH=$(HOST_DIR) \ + -DINSTALL_ARCHDATADIR=lib/qt6 \ + -DFEATURE_concurrent=OFF \ + -DFEATURE_xml=OFF \ + -DFEATURE_sql=OFF \ + -DFEATURE_testlib=OFF \ + -DFEATURE_network=OFF \ + -DFEATURE_dbus=OFF \ + -DFEATURE_icu=OFF \ + -DFEATURE_glib=OFF \ + -DFEATURE_system_doubleconversion=ON \ + -DFEATURE_system_pcre2=ON \ + -DFEATURE_system_zlib=ON \ + -DFEATURE_system_libb2=ON + +# x86 optimization options. While we have a BR2_X86_CPU_HAS_AVX512, it +# is not clear yet how it maps to all the avx512* options of Qt, so we +# for now keeps them disabled. +QT6BASE_CONF_OPTS += \ + -DFEATURE_sse2=$(if $(BR2_X86_CPU_HAS_SSE2),ON,OFF) \ + -DFEATURE_sse3=$(if $(BR2_X86_CPU_HAS_SSE3),ON,OFF) \ + -DFEATURE_sse4_1=$(if $(BR2_X86_CPU_HAS_SSE4),ON,OFF) \ + -DFEATURE_sse4_2=$(if $(BR2_X86_CPU_HAS_SSE42),ON,OFF) \ + -DFEATURE_ssse3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF) \ + -DFEATURE_avx=$(if $(BR2_X86_CPU_HAS_AVX),ON,OFF) \ + -DFEATURE_avx2=$(if $(BR2_X86_CPU_HAS_AVX2),ON,OFF) \ + -DFEATURE_avx512bw=OFF \ + -DFEATURE_avx512cd=OFF \ + -DFEATURE_avx512dq=OFF \ + -DFEATURE_avx512er=OFF \ + -DFEATURE_avx512f=OFF \ + -DFEATURE_avx512ifma=OFF \ + -DFEATURE_avx512pf=OFF \ + -DFEATURE_avx512vbmi=OFF \ + -DFEATURE_avx512vbmi2=OFF \ + -DFEATURE_avx512vl=OFF \ + -DFEATURE_vaes=OFF + +HOST_QT6BASE_DEPENDENCIES = \ + host-double-conversion \ + host-libb2 \ + host-pcre2 \ + host-zlib +HOST_QT6BASE_CONF_OPTS = \ + -DFEATURE_concurrent=OFF \ + -DFEATURE_xml=ON \ + -DFEATURE_dbus=OFF \ + -DFEATURE_icu=OFF \ + -DFEATURE_glib=OFF \ + -DFEATURE_system_doubleconversion=ON \ + -DFEATURE_system_libb2=ON \ + -DFEATURE_system_pcre2=ON \ + -DFEATURE_system_zlib=ON + +# We need host-qt6base with Gui support when building host-qt6shadertools, +# otherwise the build is skipped and no qsb host tool is generated. +# qt6shadertools fail to build if qsb is not available. +ifeq ($(BR2_PACKAGE_HOST_QT6BASE_GUI),y) +HOST_QT6BASE_CONF_OPTS += \ + -DFEATURE_gui=ON \ + -DFEATURE_freetype=OFF \ + -DFEATURE_vulkan=OFF \ + -DFEATURE_linuxfb=ON \ + -DFEATURE_xcb=OFF \ + -DFEATURE_opengl=OFF -DINPUT_opengl=no \ + -DFEATURE_harfbuzz=OFF \ + -DFEATURE_png=OFF \ + -DFEATURE_gif=OFF \ + -DFEATURE_jpeg=OFF \ + -DFEATURE_printsupport=OFF \ + -DFEATURE_kms=OFF \ + -DFEATURE_fontconfig=OFF \ + -DFEATURE_widgets=OFF \ + -DFEATURE_libinput=OFF \ + -DFEATURE_tslib=OFF \ + -DFEATURE_eglfs=OFF +else +HOST_QT6BASE_CONF_OPTS += -DFEATURE_gui=OFF +endif + +# The Network module is explicitly required by qt6tools. +ifeq ($(BR2_PACKAGE_HOST_QT6BASE_NETWORK),y) +HOST_QT6BASE_CONF_OPTS += -DFEATURE_network=ON +else +HOST_QT6BASE_CONF_OPTS += -DFEATURE_network=OFF +endif + +# We need host qt6base with Sql support for host-qt6tools to generate the +# qhelpgenerator host tool. qt6tools will fail to build if qhelpgenerator is not +# available. +ifeq ($(BR2_PACKAGE_HOST_QT6BASE_SQL),y) +HOST_QT6BASE_CONF_OPTS += -DFEATURE_sql=ON +else +HOST_QT6BASE_CONF_OPTS += -DFEATURE_sql=OFF +endif + +# We need host-qt6base with Testlib support when building host-qt6declarative +# with QuickTest support. QuickTest support is further required for building the +# qmltestrunner host tool. qt6declarative will fail to build if qmltestrunner is +# not available. +ifeq ($(BR2_PACKAGE_HOST_QT6BASE_TEST),y) +HOST_QT6BASE_CONF_OPTS += -DFEATURE_testlib=ON +else +HOST_QT6BASE_CONF_OPTS += -DFEATURE_testlib=OFF +endif + +# Conditional blocks below are ordered by alphabetic ordering of the +# BR2_PACKAGE_* option. + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +QT6BASE_CONF_OPTS += -DFEATURE_libudev=ON +QT6BASE_DEPENDENCIES += udev +else +QT6BASE_CONF_OPTS += -DFEATURE_libudev=OFF +endif + +ifeq ($(BR2_PACKAGE_ICU),y) +QT6BASE_CONF_OPTS += -DFEATURE_icu=ON +QT6BASE_DEPENDENCIES += icu +else +QT6BASE_CONF_OPTS += -DFEATURE_icu=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +QT6BASE_CONF_OPTS += -DFEATURE_glib=ON +QT6BASE_DEPENDENCIES += libglib2 +else +QT6BASE_CONF_OPTS += -DFEATURE_glib=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_GUI),y) +QT6BASE_CONF_OPTS += \ + -DFEATURE_gui=ON \ + -DFEATURE_freetype=ON \ + -DFEATURE_vulkan=OFF +QT6BASE_DEPENDENCIES += freetype + +ifeq ($(BR2_PACKAGE_QT6BASE_VULKAN),y) +QT6BASE_DEPENDENCIES += vulkan-headers vulkan-loader +QT6BASE_CONFIGURE_OPTS += -DFEATURE_vulkan=ON +else +QT6BASE_CONFIGURE_OPTS += -DFEATURE_vulkan=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_LINUXFB),y) +QT6BASE_CONF_OPTS += -DFEATURE_linuxfb=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_linuxfb=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_XCB),y) +QT6BASE_CONF_OPTS += \ + -DFEATURE_xcb=ON \ + -DFEATURE_xcb_xlib=ON \ + -DFEATURE_xkbcommon=ON \ + -DFEATURE_xkbcommon_x11=ON +QT6BASE_DEPENDENCIES += \ + libxcb \ + libxkbcommon \ + xcb-util-wm \ + xcb-util-image \ + xcb-util-keysyms \ + xcb-util-renderutil \ + xlib_libX11 +else +QT6BASE_CONF_OPTS += -DFEATURE_xcb=OFF +endif + +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_PNG),y) +QT6BASE_CONF_OPTS += -DFEATURE_png=ON -DFEATURE_system_png=ON +QT6BASE_DEPENDENCIES += libpng +else +QT6BASE_CONF_OPTS += -DFEATURE_png=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_GIF),y) +QT6BASE_CONF_OPTS += -DFEATURE_gif=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_gif=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_JPEG),y) +QT6BASE_CONF_OPTS += -DFEATURE_jpeg=ON +QT6BASE_DEPENDENCIES += jpeg +else +QT6BASE_CONF_OPTS += -DFEATURE_jpeg=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_PRINTSUPPORT),y) +QT6BASE_CONF_OPTS += -DFEATURE_printsupport=ON +ifeq ($(BR2_PACKAGE_CUPS),y) +QT6BASE_CONF_OPTS += -DFEATURE_cups=ON +QT6BASE_DEPENDENCIES += cups +else +QT6BASE_CONF_OPTS += -DFEATURE_cups=OFF +endif +else +QT6BASE_CONF_OPTS += -DFEATURE_printsupport=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBDRM),y) +QT6BASE_CONF_OPTS += -DFEATURE_kms=ON +QT6BASE_DEPENDENCIES += libdrm +else +QT6BASE_CONF_OPTS += -DFEATURE_kms=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 + +ifeq ($(BR2_PACKAGE_QT6BASE_WIDGETS),y) +QT6BASE_CONF_OPTS += -DFEATURE_widgets=ON + +# only enable gtk support if libgtk3 X11 backend is enabled +ifeq ($(BR2_PACKAGE_LIBGTK3)$(BR2_PACKAGE_LIBGTK3_X11),yy) +QT6BASE_CONF_OPTS += -DFEATURE_gtk3=ON +QT6BASE_DEPENDENCIES += libgtk3 +else +QT6BASE_CONF_OPTS += -DFEATURE_gtk3=OFF +endif + +else +QT6BASE_CONF_OPTS += -DFEATURE_widgets=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBINPUT),y) +QT6BASE_CONF_OPTS += -DFEATURE_libinput=ON +QT6BASE_DEPENDENCIES += libinput +else +QT6BASE_CONF_OPTS += -DFEATURE_libinput=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_TSLIB),y) +QT6BASE_CONF_OPTS += -DFEATURE_tslib=ON +QT6BASE_DEPENDENCIES += tslib +else +QT6BASE_CONF_OPTS += -DFEATURE_tslib=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_EGLFS),y) +QT6BASE_CONF_OPTS += -DFEATURE_egl=ON -DFEATURE_eglfs=ON +QT6BASE_DEPENDENCIES += libegl libgbm +else +QT6BASE_CONF_OPTS += -DFEATURE_eglfs=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_OPENGL_DESKTOP),y) +QT6BASE_CONF_OPTS += \ + -DFEATURE_opengl=ON \ + -DFEATURE_opengl_desktop=ON +QT6BASE_DEPENDENCIES += libgl +else ifeq ($(BR2_PACKAGE_QT6BASE_OPENGL_ES2),y) +QT6BASE_CONF_OPTS += \ + -DFEATURE_opengl=ON \ + -DFEATURE_opengles2=ON \ + -DFEATURE_opengl_desktop=OFF +QT6BASE_DEPENDENCIES += libgles +else +QT6BASE_CONF_OPTS += -DFEATURE_opengl=OFF -DINPUT_opengl=no +endif + +else +QT6BASE_CONF_OPTS += -DFEATURE_gui=OFF +endif + +QT6BASE_DEFAULT_QPA = $(call qstrip,$(BR2_PACKAGE_QT6BASE_DEFAULT_QPA)) +QT6BASE_CONF_OPTS += $(if $(QT6BASE_DEFAULT_QPA),-DQT_QPA_DEFAULT_PLATFORM=$(QT6BASE_DEFAULT_QPA)) + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +QT6BASE_CONF_OPTS += -DINPUT_openssl=yes +QT6BASE_DEPENDENCIES += openssl +else +QT6BASE_CONF_OPTS += -DINPUT_openssl=no +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_CONCURRENT),y) +QT6BASE_CONF_OPTS += -DFEATURE_concurrent=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_concurrent=OFF +endif + +# We need host-qt6base with D-Bus support, otherwise: "the tool +# "Qt6::qdbuscpp2xml" was not found in the Qt6DBusTools package." +ifeq ($(BR2_PACKAGE_QT6BASE_DBUS),y) +QT6BASE_CONF_OPTS += -DFEATURE_dbus=ON -DINPUT_dbus=linked +QT6BASE_DEPENDENCIES += dbus +HOST_QT6BASE_CONF_OPTS += -DFEATURE_dbus=ON +HOST_QT6BASE_DEPENDENCIES += host-dbus +else +QT6BASE_CONF_OPTS += -DFEATURE_dbus=OFF +HOST_QT6BASE_CONF_OPTS += -DFEATURE_dbus=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_NETWORK),y) +QT6BASE_CONF_OPTS += -DFEATURE_network=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_network=OFF +endif + +# Qt6 SQL Plugins +ifeq ($(BR2_PACKAGE_QT6BASE_SQL),y) +QT6BASE_CONF_OPTS += -DFEATURE_sql=ON +QT6BASE_CONF_OPTS += -DFEATURE_sql_db2=OFF -DFEATURE_sql_ibase=OFF -DFEATURE_sql_oci=OFF -DFEATURE_sql_odbc=OFF + +ifeq ($(BR2_PACKAGE_QT6BASE_MYSQL),y) +QT6BASE_CONF_OPTS += -DFEATURE_sql_mysql=ON +QT6BASE_DEPENDENCIES += mariadb +else +QT6BASE_CONF_OPTS += -DFEATURE_sql_mysql=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_PSQL),y) +QT6BASE_CONF_OPTS += -DFEATURE_sql_psql=ON +QT6BASE_DEPENDENCIES += postgresql +else +QT6BASE_CONF_OPTS += -DFEATURE_sql_psql=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_SQLITE),y) +QT6BASE_CONF_OPTS += -DFEATURE_sql_sqlite=ON -DFEATURE_system_sqlite=ON +QT6BASE_DEPENDENCIES += sqlite +else +QT6BASE_CONF_OPTS += -DFEATURE_sql_sqlite=OFF +endif + +else +QT6BASE_CONF_OPTS += -DFEATURE_sql=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_SYSLOG),y) +QT6BASE_CONF_OPTS += -DFEATURE_syslog=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_syslog=OFF +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +QT6BASE_CONF_OPTS += -DFEATURE_journald=ON +QT6BASE_DEPENDENCIES += systemd +else +QT6BASE_CONF_OPTS += -DFEATURE_journald=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_TEST),y) +QT6BASE_CONF_OPTS += -DFEATURE_testlib=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_testlib=OFF +endif + +ifeq ($(BR2_PACKAGE_QT6BASE_XML),y) +QT6BASE_CONF_OPTS += -DFEATURE_xml=ON +else +QT6BASE_CONF_OPTS += -DFEATURE_xml=OFF +endif + +ifeq ($(BR2_PACKAGE_ZSTD),y) +QT6BASE_CONF_OPTS += -DFEATURE_zstd=ON +QT6BASE_DEPENDENCIES += zstd +else +QT6BASE_CONF_OPTS += -DFEATURE_zstd=OFF +endif + +define QT6BASE_RM_USR_MKSPECS + $(Q)rm -rf $(TARGET_DIR)/usr/mkspecs +endef +QT6BASE_TARGET_FINALIZE_HOOKS += QT6BASE_RM_USR_MKSPECS + +$(eval $(cmake-package)) +$(eval $(host-cmake-package))