mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-14 00:16:59 +02:00
eclass/gnuconfig: Sync with Gentoo
It's from Gentoo commit 1bb3b5e672ba80e446b4c9dc27918a80c97c1be9.
This commit is contained in:
parent
c61ff0d71e
commit
6054a9fd55
@ -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}"
|
||||
;;
|
||||
*)
|
||||
|
Loading…
Reference in New Issue
Block a user