mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-29 09:31:06 +02:00
eclass/gnuconfig: Sync with Gentoo
It's from Gentoo commit db33b25dcc1506032efab49f55db709c1544feda.
This commit is contained in:
parent
71867c8a22
commit
8f1ed8d4c9
@ -6,7 +6,7 @@
|
|||||||
# Sam James <sam@gentoo.org>
|
# Sam James <sam@gentoo.org>
|
||||||
# @AUTHOR:
|
# @AUTHOR:
|
||||||
# Will Woods <wwoods@gentoo.org>
|
# Will Woods <wwoods@gentoo.org>
|
||||||
# @SUPPORTED_EAPIS: 6 7 8
|
# @SUPPORTED_EAPIS: 7 8
|
||||||
# @BLURB: Refresh bundled gnuconfig files (config.guess, config.sub)
|
# @BLURB: Refresh bundled gnuconfig files (config.guess, config.sub)
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# This eclass is used to automatically update files that typically come with
|
# This eclass is used to automatically update files that typically come with
|
||||||
@ -20,10 +20,6 @@ if [[ -z ${_GNUCONFIG_ECLASS} ]] ; then
|
|||||||
_GNUCONFIG_CLASS=1
|
_GNUCONFIG_CLASS=1
|
||||||
|
|
||||||
case ${EAPI} in
|
case ${EAPI} in
|
||||||
6)
|
|
||||||
ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
|
|
||||||
ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
|
|
||||||
;;
|
|
||||||
7|8) ;;
|
7|8) ;;
|
||||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||||
esac
|
esac
|
||||||
@ -41,12 +37,7 @@ GNUCONFIG_DEPEND="sys-devel/gnuconfig"
|
|||||||
# ebuilds form conditional depends by using ${GNUCONFIG_DEPEND} in
|
# ebuilds form conditional depends by using ${GNUCONFIG_DEPEND} in
|
||||||
# their own DEPEND string.
|
# their own DEPEND string.
|
||||||
: "${GNUCONFIG_AUTO_DEPEND:=yes}"
|
: "${GNUCONFIG_AUTO_DEPEND:=yes}"
|
||||||
if [[ ${GNUCONFIG_AUTO_DEPEND} != "no" ]] ; then
|
[[ ${GNUCONFIG_AUTO_DEPEND} != "no" ]] && BDEPEND=${GNUCONFIG_DEPEND}
|
||||||
case ${EAPI} in
|
|
||||||
6) DEPEND=${GNUCONFIG_DEPEND} ;;
|
|
||||||
*) BDEPEND=${GNUCONFIG_DEPEND} ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# @FUNCTION: gnuconfig_update
|
# @FUNCTION: gnuconfig_update
|
||||||
# @USAGE: [file1 file2 ...]
|
# @USAGE: [file1 file2 ...]
|
||||||
@ -122,23 +113,11 @@ gnuconfig_do_update() {
|
|||||||
# This searches the standard locations for the newest config.{sub|guess}, and
|
# This searches the standard locations for the newest config.{sub|guess}, and
|
||||||
# returns the directory where they can be found.
|
# returns the directory where they can be found.
|
||||||
gnuconfig_findnewest() {
|
gnuconfig_findnewest() {
|
||||||
local locations=()
|
local locations=(
|
||||||
local prefix
|
"${BROOT}"/usr/share/misc/config.sub
|
||||||
|
"${BROOT}"/usr/share/gnuconfig/config.sub
|
||||||
case ${EAPI} in
|
"${BROOT}"/usr/share/automake*/config.sub
|
||||||
6)
|
"${BROOT}"/usr/share/libtool/config.sub
|
||||||
prefix="${EPREFIX}"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
prefix="${BROOT}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
locations+=(
|
|
||||||
"${prefix}"/usr/share/misc/config.sub
|
|
||||||
"${prefix}"/usr/share/gnuconfig/config.sub
|
|
||||||
"${prefix}"/usr/share/automake*/config.sub
|
|
||||||
"${prefix}"/usr/share/libtool/config.sub
|
|
||||||
)
|
)
|
||||||
|
|
||||||
grep -s '^timestamp' "${locations[@]}" | \
|
grep -s '^timestamp' "${locations[@]}" | \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user