From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1700339-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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 309E51581F2 for <garchives@archives.gentoo.org>; Sat, 14 Dec 2024 21:37:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 00C34E0905; Sat, 14 Dec 2024 21:37:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 DB21CE08FF for <gentoo-commits@lists.gentoo.org>; Sat, 14 Dec 2024 21:37:46 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 25407335DEB for <gentoo-commits@lists.gentoo.org>; Sat, 14 Dec 2024 21:37:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7F3AB1F41 for <gentoo-commits@lists.gentoo.org>; Sat, 14 Dec 2024 21:37:43 +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: <1734211955.25ce3518cbaf9a73bfff78b2a2e53825489a5c51.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/ecm.eclass X-VCS-Directories: eclass/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 25ce3518cbaf9a73bfff78b2a2e53825489a5c51 X-VCS-Branch: master Date: Sat, 14 Dec 2024 21:37:43 +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: bd8e93e4-7749-4a2b-908e-06ff06bae605 X-Archives-Hash: 121fcb97497de7f5a2524f78692b55db commit: 25ce3518cbaf9a73bfff78b2a2e53825489a5c51 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Sat Nov 9 23:05:17 2024 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Sat Dec 14 21:32:35 2024 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=25ce3518 ecm.eclass: Unexport pkg_setup w/ KFMIN >=6.9, drop KDE_GCC_MINIMAL Keep inheriting toolchain-funcs.eclass for EAPI-8 only. Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> eclass/ecm.eclass | 80 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass index 7c0ba85b03..0fb74141cc 100644 --- a/eclass/ecm.eclass +++ b/eclass/ecm.eclass @@ -29,7 +29,7 @@ esac if [[ -z ${_ECM_ECLASS} ]]; then _ECM_ECLASS=1 -inherit cmake flag-o-matic toolchain-funcs +inherit cmake flag-o-matic if [[ ${EAPI} == 8 ]]; then # @ECLASS_VARIABLE: VIRTUALX_REQUIRED @@ -39,7 +39,7 @@ if [[ ${EAPI} == 8 ]]; then # for tests you should proceed with setting VIRTUALX_REQUIRED=test. : "${VIRTUALX_REQUIRED:=manual}" -inherit virtualx +inherit toolchain-funcs virtualx fi # @ECLASS_VARIABLE: ECM_NONGUI @@ -196,6 +196,14 @@ else fi fi +# @ECLASS_VARIABLE: KDE_GCC_MINIMAL +# @DEFAULT_UNSET +# @DESCRIPTION: +# Minimum version of active GCC to require. This is checked in +# ecm_pkg_pretend and ecm_pkg_setup. +[[ ${KDE_GCC_MINIMAL} ]] && ver_test ${KFMIN} -ge 6.9 && + die "KDE_GCC_MINIMAL has been banned with KFMIN >=6.9.0." + case ${ECM_NONGUI} in true) ;; false) @@ -326,30 +334,6 @@ DEPEND+=" ${COMMONDEPEND}" RDEPEND+=" ${COMMONDEPEND}" unset COMMONDEPEND -# @ECLASS_VARIABLE: KDE_GCC_MINIMAL -# @DEFAULT_UNSET -# @DESCRIPTION: -# Minimum version of active GCC to require. This is checked in -# ecm_pkg_pretend and ecm_pkg_setup. - -# @FUNCTION: _ecm_check_gcc_version -# @INTERNAL -# @DESCRIPTION: -# Determine if the current GCC version is acceptable, otherwise die. -_ecm_check_gcc_version() { - if [[ ${MERGE_TYPE} != binary && -v KDE_GCC_MINIMAL ]] && tc-is-gcc; then - - local version=$(gcc-version) - - debug-print "GCC version check activated" - debug-print "Version detected: ${version}" - debug-print "Version required: ${KDE_GCC_MINIMAL}" - - ver_test ${version} -lt ${KDE_GCC_MINIMAL} && - die "Sorry, but gcc-${KDE_GCC_MINIMAL} or later is required for this package (found ${version})." - fi -} - # @FUNCTION: _ecm_strip_handbook_translations # @INTERNAL # @DESCRIPTION: @@ -495,22 +479,49 @@ ecm_punt_po_install() { -i CMakeLists.txt || die } +if [[ ${EAPI} == 8 ]]; then +# @FUNCTION: _ecm_deprecated_check_gcc_version +# @INTERNAL +# @DESCRIPTION: +# Determine if the current GCC version is acceptable, otherwise die. +_ecm_deprecated_check_gcc_version() { + if ver_test ${KFMIN} -ge 6.9; then + eqawarn "QA notice: ecm_pkg_${1} has become a no-op." + eqawarn "It is no longer being exported with KFMIN >=6.9.0." + return + fi + if [[ ${MERGE_TYPE} != binary && -v KDE_GCC_MINIMAL ]] && tc-is-gcc; then + + local version=$(gcc-version) + + debug-print "GCC version check activated" + debug-print "Version detected: ${version}" + debug-print "Version required: ${KDE_GCC_MINIMAL}" + + ver_test ${version} -lt ${KDE_GCC_MINIMAL} && + die "Sorry, but gcc-${KDE_GCC_MINIMAL} or later is required for this package (found ${version})." + fi +} + # @FUNCTION: ecm_pkg_pretend # @DESCRIPTION: # Checks if the active compiler meets the minimum version requirements. -# phase function is only exported if KDE_GCC_MINIMAL is defined. +# Phase function is only exported if KFMIN is <6.9.0 and KDE_GCC_MINIMAL +# is defined. ecm_pkg_pretend() { debug-print-function ${FUNCNAME} "$@" - _ecm_check_gcc_version + _ecm_deprecated_check_gcc_version pretend } # @FUNCTION: ecm_pkg_setup # @DESCRIPTION: # Checks if the active compiler meets the minimum version requirements. +# Phase function is only exported if KFMIN is <6.9.0. ecm_pkg_setup() { debug-print-function ${FUNCNAME} "$@" - _ecm_check_gcc_version + _ecm_deprecated_check_gcc_version setup } +fi # @FUNCTION: ecm_src_prepare # @DESCRIPTION: @@ -807,11 +818,10 @@ fi fi if ver_test ${KFMIN} -lt 6.9; then - EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm -fi - -if [[ -v ${KDE_GCC_MINIMAL} ]]; then - EXPORT_FUNCTIONS pkg_pretend + EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_postrm + if [[ -v ${KDE_GCC_MINIMAL} ]]; then + EXPORT_FUNCTIONS pkg_pretend + fi fi -EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_test src_install +EXPORT_FUNCTIONS src_prepare src_configure src_test src_install