diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-27 15:46:42 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-27 15:46:42 -0500 |
| commit | 4b8cec66a417569a11af0de934f9b6a59f13bc87 (patch) | |
| tree | 8834ca08cb31e152c6b4108bddcdaec7a4bd565d /eclass | |
| parent | c6e6588bafac78d585ece24e4dabdf99f3af211d (diff) | |
| download | baldeagleos-repo-4b8cec66a417569a11af0de934f9b6a59f13bc87.tar.gz baldeagleos-repo-4b8cec66a417569a11af0de934f9b6a59f13bc87.tar.xz baldeagleos-repo-4b8cec66a417569a11af0de934f9b6a59f13bc87.zip | |
Adding metadata
Diffstat (limited to 'eclass')
| -rw-r--r-- | eclass/greadme.eclass | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/eclass/greadme.eclass b/eclass/greadme.eclass index 6c1e1fd57458..7e3f715fffa8 100644 --- a/eclass/greadme.eclass +++ b/eclass/greadme.eclass @@ -4,7 +4,7 @@ # @ECLASS: greadme.eclass # @MAINTAINER: # Florian Schmaus <flow@gentoo.org> -# @SUPPORTED_EAPIS: 8 +# @SUPPORTED_EAPIS: 8 9 # @BLURB: install a doc file, that will be conditionally shown via elog messages # @DESCRIPTION: # An eclass for installing a README.gentoo doc file with important @@ -45,6 +45,7 @@ _GREADME_ECLASS=1 case ${EAPI} in 8) inherit eapi9-pipestatus ;; + 9) ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac @@ -61,7 +62,14 @@ _GREADME_REL_PATH="/usr/share/doc/${PF}/README.gentoo" # @ECLASS_VARIABLE: GREADME_DISABLE_AUTOFORMAT # @DEFAULT_UNSET # @DESCRIPTION: -# If non-empty, the readme file will not be automatically formatted. +# If non-empty, the readme file will not be automatically formatted if +# EAPI < 9. + +# @ECLASS_VARIABLE: GREADME_AUTOFORMAT +# @DEFAULT_UNSET +# @DESCRIPTION: +# If non-empty, the readme file will be automatically formatted if +# EAPI >= 9. # @FUNCTION: greadme_stdin # @USAGE: [--append] @@ -113,7 +121,19 @@ _greadme_install_doc() { debug-print-function ${FUNCNAME} "$@" local greadme="${_GREADME_TMP_FILE}" - if [[ ! ${GREADME_DISABLE_AUTOFORMAT} ]]; then + + local autoformat + if [[ ${EAPI} == 8 ]]; then + # Older EAPI default is to auto-format. + autoformat=1 + [[ ${GREADME_DISABLE_AUTOFORMAT} ]] && autoformat= + else + # The modern default is not to auto-format. + autoformat= + [[ ${GREADME_AUTOFORMAT} ]] && autoformat=1 + fi + + if [[ ${autoformat} ]]; then greadme="${_GREADME_TMP_FILE}".formatted # Use fold, followed by a sed to strip trailing whitespace. |
