From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1573722-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 12D2C1580D3
	for <garchives@archives.gentoo.org>; Sat, 25 Nov 2023 23:34:31 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0BACB2BC043;
	Sat, 25 Nov 2023 23:34:30 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id EA7592BC043
	for <gentoo-commits@lists.gentoo.org>; Sat, 25 Nov 2023 23:34:29 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 1175433FD24
	for <gentoo-commits@lists.gentoo.org>; Sat, 25 Nov 2023 23:34:29 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 6C34D13B3
	for <gentoo-commits@lists.gentoo.org>; Sat, 25 Nov 2023 23:34:27 +0000 (UTC)
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org>
Message-ID: <1700955195.a11feb4b6d5e640375c2f15ecab79b61f1077419.asturm@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
X-VCS-Repository: repo/gentoo
X-VCS-Files: eclass/ecm.eclass
X-VCS-Directories: eclass/
X-VCS-Committer: asturm
X-VCS-Committer-Name: Andreas Sturmlechner
X-VCS-Revision: a11feb4b6d5e640375c2f15ecab79b61f1077419
X-VCS-Branch: master
Date: Sat, 25 Nov 2023 23:34:27 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: caf9bfe0-f190-46c0-9ec8-b703e449fceb
X-Archives-Hash: a96b625ade253823729f073a6f56e15c

commit:     a11feb4b6d5e640375c2f15ecab79b61f1077419
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu May 18 20:28:51 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Nov 25 23:33:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a11feb4b

ecm.eclass: Add SLOT=6 dependencies if KFMIN is >=5.240

- Excluding KDE Frameworks 5.9999 from KFMIN>=5.240 check
- Enforce QT_MAJOR_VERSION=6 for packages w/ KFMIN >= 5.240

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

 eclass/ecm.eclass | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 1bf11a946363..46cc53afd5cb 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.
-# Version will also be used to differentiate between KF5/Qt5 and KF6/Qt6.
+# 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
@@ -158,8 +159,16 @@ fi
 # @INTERNAL
 # @DESCRIPTION:
 # KDE Frameworks and Qt slot dependency, implied by KFMIN version.
-: ${_KFSLOT:=5}
-[[ ${KFMIN/.*} == 6 ]] && _KFSLOT=6
+: "${_KFSLOT:=5}"
+if [[ ${CATEGORY} == kde-frameworks ]]; then
+	if [[ ${PV} != 5.9999 ]] && $(ver_test ${KFMIN} -ge 5.240); then
+		_KFSLOT=6
+	fi
+else
+	if [[ ${KFMIN/.*} == 6 ]] || $(ver_test ${KFMIN} -ge 5.240); then
+		_KFSLOT=6
+	fi
+fi
 
 case ${ECM_NONGUI} in
 	true) ;;
@@ -534,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 )