eclass/readme.gentoo-r1: Sync with gentoo

It's from gentoo commit 31ee069b09e50b3f5d57da61e9fc2e0a731cd9cc.
This commit is contained in:
Krzesimir Nowak 2022-03-01 14:32:25 +01:00
parent bf5a838c18
commit 917f5e23c5

View File

@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: readme.gentoo-r1.eclass
@ -6,7 +6,7 @@
# Pacho Ramos <pacho@gentoo.org>
# @AUTHOR:
# Author: Pacho Ramos <pacho@gentoo.org>
# @SUPPORTED_EAPIS: 4 5 6 7
# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: install a doc file shown via elog messages
# @DESCRIPTION:
# An eclass for installing a README.gentoo doc file recording tips
@ -20,17 +20,16 @@
if [[ -z ${_README_GENTOO_ECLASS} ]]; then
_README_GENTOO_ECLASS=1
case "${EAPI:-0}" in
0|1|2|3)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
4|5|6|7)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
;;
case ${EAPI} in
6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
# @ECLASS-VARIABLE: DOC_CONTENTS
# @DEFAULT_UNSET
# @DESCRIPTION:
# The information that is used to create the README.gentoo file.
# @ECLASS-VARIABLE: DISABLE_AUTOFORMATTING
# @DEFAULT_UNSET
# @DESCRIPTION:
@ -76,7 +75,10 @@ readme.gentoo_create_doc() {
die "You are not specifying README.gentoo contents!"
fi
dodoc "${T}"/README.gentoo
( # subshell to avoid pollution of calling environment
docinto .
dodoc "${T}"/README.gentoo
) || die
README_GENTOO_DOC_VALUE=$(< "${T}/README.gentoo")
}