commit:     306d1be4b48b586196f00210f5f46f0c496eeae9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 18 22:56:55 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Nov 25 23:25:47 2023 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=306d1be4

ecm.eclass: Enforce QT_MAJOR_VERSION=6 for packages w/ KFMIN >= 5.240

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 eclass/ecm.eclass | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 39780f422f..6b870688a1 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -148,7 +148,8 @@ fi
 # @DESCRIPTION:
 # Minimum version of Frameworks to require. Default value for kde-frameworks
 # is ${PV} and 5.106.0 baseline for everything else.
-# If set to >=5.240, KF6/Qt6 will be assumed thus SLOT=6 dependencies added.
+# If set to >=5.240, KF6/Qt6 is assumed thus SLOT=6 dependencies added and
+# -DQT_MAJOR_VERSION=6 added to cmake args.
 if [[ ${CATEGORY} = kde-frameworks ]]; then
        : "${KFMIN:=$(ver_cut 1-2)}"
 fi
@@ -542,6 +543,10 @@ ecm_src_configure() {
 
        local cmakeargs
 
+       if [[ ${_KFSLOT} == 6 ]]; then
+               cmakeargs+=( -DQT_MAJOR_VERSION=6 )
+       fi
+
        if in_iuse test && ! use test ; then
                cmakeargs+=( -DBUILD_TESTING=OFF )
 

Reply via email to