From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 B85A8158064 for ; Fri, 3 May 2024 11:43:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 00FCCE2ACB; Fri, 3 May 2024 11:43:36 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 D19ECE2ACB for ; Fri, 3 May 2024 11:43:35 +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 DBC7934302F for ; Fri, 3 May 2024 11:43:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2259D1765 for ; Fri, 3 May 2024 11:43:33 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1714736408.59b986917e336e0e161ef75bcc0b29b3357686d9.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/gnuconfig.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 59b986917e336e0e161ef75bcc0b29b3357686d9 X-VCS-Branch: master Date: Fri, 3 May 2024 11:43:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b59937a1-2656-4e1b-86ec-f25d49ff71b7 X-Archives-Hash: adf8b9fbdd8d8ba0c52c0664f6d79c77 commit: 59b986917e336e0e161ef75bcc0b29b3357686d9 Author: Sam James gentoo org> AuthorDate: Fri May 3 03:20:15 2024 +0000 Commit: Sam James gentoo org> CommitDate: Fri May 3 11:40:08 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59b98691 gnuconfig.eclass: add GNUCONFIG_DEPEND The motivation here is to allow autotools.eclass consumers setting AUTOTOOLS_AUTO_DEPEND=no to not have a useless gnuconfig dependency. Signed-off-by: Sam James gentoo.org> eclass/gnuconfig.eclass | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/eclass/gnuconfig.eclass b/eclass/gnuconfig.eclass index 0791798632cd..df3c74867608 100644 --- a/eclass/gnuconfig.eclass +++ b/eclass/gnuconfig.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: gnuconfig.eclass @@ -24,9 +24,25 @@ esac if [[ -z ${_GNUCONFIG_ECLASS} ]] ; then _GNUCONFIG_CLASS=1 -BDEPEND="sys-devel/gnuconfig" +# @ECLASS_VARIABLE: GNUCONFIG_DEPEND +# @OUTPUT_VARIABLE +# @DESCRIPTION: +# Contains dependency on gnuconfig in *DEPEND format. +GNUCONFIG_DEPEND="sys-devel/gnuconfig" -[[ ${EAPI} == [56] ]] && DEPEND="${BDEPEND}" +# @ECLASS_VARIABLE: GNUCONFIG_AUTO_DEPEND +# @PRE_INHERIT +# @DESCRIPTION: +# Set to 'no' to disable automatically adding to DEPEND. This lets +# ebuilds form conditional depends by using ${GNUCONFIG_DEPEND} in +# their own DEPEND string. +: "${GNUCONFIG_AUTO_DEPEND:=yes}" +if [[ ${GNUCONFIG_AUTO_DEPEND} != "no" ]] ; then + case ${EAPI} in + 5|6) DEPEND=${GNUCONFIG_DEPEND} ;; + *) BDEPEND=${GNUCONFIG_DEPEND} ;; + esac +fi # @FUNCTION: gnuconfig_update # @USAGE: [file1 file2 ...]