summaryrefslogtreecommitdiff
path: root/eclass/gnuconfig.eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/gnuconfig.eclass')
-rw-r--r--eclass/gnuconfig.eclass28
1 files changed, 22 insertions, 6 deletions
diff --git a/eclass/gnuconfig.eclass b/eclass/gnuconfig.eclass
index 0791798632cd..fb73087aeacf 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
@@ -6,7 +6,7 @@
# Sam James <sam@gentoo.org>
# @AUTHOR:
# Will Woods <wwoods@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: Refresh bundled gnuconfig files (config.guess, config.sub)
# @DESCRIPTION:
# This eclass is used to automatically update files that typically come with
@@ -17,16 +17,32 @@
#
case ${EAPI:-0} in
- 5|6|7|8) ;;
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
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
+ 6) DEPEND=${GNUCONFIG_DEPEND} ;;
+ *) BDEPEND=${GNUCONFIG_DEPEND} ;;
+ esac
+fi
# @FUNCTION: gnuconfig_update
# @USAGE: [file1 file2 ...]
@@ -106,7 +122,7 @@ gnuconfig_findnewest() {
local prefix
case ${EAPI} in
- 5|6)
+ 6)
prefix="${EPREFIX}"
;;
*)