[PATCH 3/6] ecm.eclass: Unconditionally set BUILD_WITH_QT6 to ON

Andreas Sturmlechner <[email protected]> Sat, 06 Jun 2026 00:58:03 +0200
Newsgroups gmane.linux.gentoo.devel
Message-ID <[email protected]>
...instead of setting QT_MAJOR_VERSION=6, which upstream have discouraged.

This could lead to Qt5 preference in case a build system finds Qt5Core
before including any module that inits QtVersionOption.cmake, but almost
none of those should be left at this point [that we package].

Signed-off-by: Andreas Sturmlechner <[email protected]>
---
 eclass/ecm.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 300572dc6bce..ad042e3545a2 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -554,7 +554,7 @@ ecm_src_configure() {
 		append-cppflags -DQT_NO_DEBUG
 	fi
 
-	local cmakeargs=( -DQT_MAJOR_VERSION=6 )
+	local cmakeargs
 
 	if in_iuse test; then
 		cmakeargs+=( $(usev !test -DBUILD_TESTING=OFF) )
@@ -584,6 +584,7 @@ ecm_src_configure() {
 		set(ECM_DISABLE_APPSTREAMTEST ON CACHE BOOL "") # *-
disable-appstreamtest.patch
 		set(ECM_DISABLE_GIT ON CACHE BOOL "") # *-disable-git-
commit-hooks.patch
 
+		set(BUILD_WITH_QT6 ON CACHE BOOL "") # 
QtVersionOption.cmake: Hard-require Qt6
 		# KDEInstallDirs6 section
 		set(KDE_INSTALL_USE_QT_SYS_PATHS ON CACHE BOOL "") # 
install mkspecs in same dir as Qt stuff
 		# move handbook outside of doc dir, bug #667138
-- 
2.54.0
signature.asc (application/pgp-signature, 829 B)
-----BEGIN PGP SIGNATURE-----

iQIvBAABCgCZFiEE34gXUSooizdYNDu3S5FW4z0PgBkFAmojVHwbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z
Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRERjg4MTc1MTJBMjg4QjM3NTgzNDNC
Qjc0QjkxNTZFMzNEMEY4MDE5AAoJEEuRVuM9D4AZVH0L/1VykaRUemBsGiROsYyu
Q2kZ0Ad0Ye/F0F/3vWo1HnGTs77wOtviryDxNjonsM0qe3bstoVFN9zwrifftiXh
wZy0/UWH/b5KjnWXctlbtqOxj3RD3IbEkqQGBn9EGxzyfMciI4lMQ0EZPNKSELE8
fF5JhbIp1WtarkXSYHP3RmpJ77yqJWZifQe87f/bOMiJVoEk7pvXKqw9WSgoN+7z
TDdiKXNRr7SUloOvBZtVH4vWuSuxCc1Yuy2ydbzRiuoC1eq1NulruN+1RJ9So+Y9
2BUH1oDJXT8rbHLzdqg3gFoygxcHxlDBe+OIskS0gmm0EPCIgqxz+f6rSNaUFizn
5vDSU9Guicw8ristaGTMW9OHD+InK7x6urNwdmhUtaYtU0RuoCmTJYtYcovsYq03
5HxfsDX2z2ku0lPZFBEe6cCWm0IvMbg/0JeL1XANlRQSxCt7u4DyFwmSvtHz0pBv
21sxSgdLjLYrSbSbAttEcC1pm4n9l9LR3D6wjMF6iODyUg==
=LAHh
-----END PGP SIGNATURE-----