You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/eclass
root 7ae8979333
Sync with portage [Thu Aug 8 19:58:55 MSK 2024].
3 months ago
..
tests Sync with portage [Thu Aug 8 19:58:55 MSK 2024]. 3 months ago
Manifest.gz Sync with portage [Thu Aug 8 19:58:55 MSK 2024]. 3 months ago
acct-group.eclass Sync with portage [Tue May 14 12:11:41 MSK 2024]. 6 months ago
acct-user.eclass Sync with portage [Tue May 14 12:11:41 MSK 2024]. 6 months ago
ada.eclass Sync with portage [Thu Mar 14 21:22:22 MSK 2024]. 8 months ago
alternatives.eclass Sync with portage [Sun May 12 10:39:31 MSK 2024]. 6 months ago
apache-2.eclass Sync with portage [Sun May 12 10:39:31 MSK 2024]. 6 months ago
apache-module.eclass Sync with portage [Mon Oct 9 23:52:30 MSK 2023]. 1 year ago
app-alternatives.eclass Sync with portage [Fri Dec 9 12:14:29 MSK 2022]. 2 years ago
aspell-dict-r1.eclass Sync with portage [Fri Dec 1 14:16:37 MSK 2023]. 12 months ago
autotools.eclass Sync with portage [Sun Jul 14 21:39:21 MSK 2024]. 4 months ago
bash-completion-r1.eclass Sync with portage [Sat May 13 23:47:25 MSK 2023]. 2 years ago
bzr.eclass Sync with portage [Thu Jul 11 20:20:07 MSK 2024]. 4 months ago
cargo.eclass Sync with portage [Thu Aug 8 19:58:55 MSK 2024]. 3 months ago
cdrom.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
check-reqs.eclass Sync with portage [Wed Aug 23 13:42:29 MSK 2023]. 1 year ago
chromium-2.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
cmake-multilib.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
cmake.eclass Sync with portage [Thu Jul 4 10:42:35 MSK 2024]. 4 months ago
common-lisp-3.eclass Sync with portage [Tue Jun 25 22:49:59 MSK 2024]. 5 months ago
cron.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
crossdev.eclass Sync with portage [Wed Aug 23 13:42:29 MSK 2023]. 1 year ago
cuda.eclass Sync with portage [Sat Nov 11 20:34:50 MSK 2023]. 1 year ago
cvs.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
db-use.eclass Sync with portage [Sun Dec 18 17:37:36 MSK 2022]. 2 years ago
db.eclass Sync with portage [Tue Mar 21 08:28:10 MSK 2023]. 2 years ago
depend.apache.eclass Sync with portage [Mon Oct 9 23:52:30 MSK 2023]. 1 year ago
desktop.eclass Sync with portage [Fri Feb 24 18:44:55 MSK 2023]. 2 years ago
dist-kernel-utils.eclass Sync with portage [Thu Aug 8 19:58:55 MSK 2024]. 3 months ago
distutils-r1.eclass Sync with portage [Wed Aug 7 08:54:22 MSK 2024]. 3 months ago
docs.eclass Sync with portage [Sat Jan 13 21:41:53 MSK 2024]. 10 months ago
dotnet-pkg-base.eclass Sync with portage [Sat Feb 10 20:47:10 MSK 2024]. 9 months ago
dotnet-pkg.eclass Sync with portage [Sat Feb 10 20:47:10 MSK 2024]. 9 months ago
dotnet.eclass Sync with portage [Thu Jan 5 16:30:30 MSK 2023]. 2 years ago
dune.eclass Sync with portage [Mon Jun 3 22:33:56 MSK 2024]. 5 months ago
eapi7-ver.eclass Sync with portage [Tue Jun 29 07:30:37 MSK 2021]. 3 years ago
eapi8-dosym.eclass Sync with portage [Thu Jun 8 13:58:35 MSK 2023]. 1 year ago
ecm.eclass Sync with portage [Fri Jun 21 08:13:49 MSK 2024]. 5 months ago
edo.eclass Sync with portage [Wed May 15 08:44:23 MSK 2024]. 6 months ago
edos2unix.eclass Sync with portage [Mon Sep 14 01:19:38 MSK 2020]. 4 years ago
elisp-common.eclass Sync with portage [Wed May 8 21:42:41 MSK 2024]. 6 months ago
elisp.eclass Sync with portage [Mon Jul 17 08:39:53 MSK 2023]. 1 year ago
emboss-r3.eclass Sync with portage [Thu Mar 24 17:02:53 MSK 2022]. 3 years ago
eqawarn.eclass Sync with portage [Tue Jul 26 17:40:47 MSK 2022]. 2 years ago
estack.eclass Sync with portage [Fri Jun 16 15:37:21 MSK 2023]. 1 year ago
fcaps.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
findlib.eclass Sync with portage [Mon Jun 3 22:33:56 MSK 2024]. 5 months ago
fixheadtails.eclass Sync with portage [Wed Mar 31 11:32:33 MSK 2021]. 4 years ago
flag-o-matic.eclass Sync with portage [Mon Jul 8 09:41:14 MSK 2024]. 4 months ago
font-ebdftopcf.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
font.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
fortran-2.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
frameworks.kde.org.eclass Sync with portage [Fri Mar 1 23:27:10 MSK 2024]. 9 months ago
freedict.eclass Sync with portage [Thu May 9 23:33:52 MSK 2024]. 6 months ago
gap-pkg.eclass Sync with portage [Wed Jan 24 22:01:18 MSK 2024]. 10 months ago
gear.kde.org.eclass Sync with portage [Sun Apr 28 15:10:04 MSK 2024]. 7 months ago
ghc-package.eclass Sync with portage [Mon Dec 11 22:08:42 MSK 2023]. 11 months ago
git-r3.eclass Sync with portage [Sun Jul 14 21:39:21 MSK 2024]. 4 months ago
gkrellm-plugin.eclass Sync with portage [Tue Feb 14 22:27:18 MSK 2023]. 2 years ago
gnome.org.eclass Sync with portage [Tue Jul 16 15:09:25 MSK 2024]. 4 months ago
gnome2-utils.eclass Sync with portage [Tue Jul 16 15:09:25 MSK 2024]. 4 months ago
gnome2.eclass Sync with portage [Tue Jul 16 15:09:25 MSK 2024]. 4 months ago
gnuconfig.eclass Sync with portage [Sun May 5 21:25:22 MSK 2024]. 6 months ago
gnustep-2.eclass Sync with portage [Sun Apr 14 23:36:23 MSK 2024]. 7 months ago
gnustep-base.eclass Sync with portage [Sun Apr 14 23:36:23 MSK 2024]. 7 months ago
go-env.eclass Sync with portage [Tue Jul 16 15:09:25 MSK 2024]. 4 months ago
go-module.eclass Sync with portage [Wed Feb 28 13:47:39 MSK 2024]. 9 months ago
golang-base.eclass Sync with portage [Tue Jul 16 15:09:25 MSK 2024]. 4 months ago
golang-build.eclass Sync with portage [Tue Jul 16 15:09:25 MSK 2024]. 4 months ago
golang-vcs-snapshot.eclass Sync with portage [Tue Jul 16 15:09:25 MSK 2024]. 4 months ago
golang-vcs.eclass Sync with portage [Tue Jul 16 15:09:25 MSK 2024]. 4 months ago
greadme.eclass Sync with portage [Sat Jul 27 22:31:12 MSK 2024]. 4 months ago
gstreamer-meson.eclass Sync with portage [Tue Jul 2 07:50:03 MSK 2024]. 5 months ago
haskell-cabal.eclass Sync with portage [Mon Dec 11 22:08:42 MSK 2023]. 11 months ago
java-ant-2.eclass Sync with portage [Sun Apr 14 23:36:23 MSK 2024]. 7 months ago
java-osgi.eclass Sync with portage [Mon May 27 12:26:35 MSK 2024]. 6 months ago
java-pkg-2.eclass Sync with portage [Mon Dec 11 22:08:42 MSK 2023]. 11 months ago
java-pkg-opt-2.eclass Sync with portage [Mon Dec 11 22:08:42 MSK 2023]. 11 months ago
java-pkg-simple.eclass Sync with portage [Tue Jul 23 16:10:28 MSK 2024]. 4 months ago
java-utils-2.eclass Sync with portage [Thu Aug 1 18:51:18 MSK 2024]. 3 months ago
java-vm-2.eclass Sync with portage [Wed Aug 7 08:54:22 MSK 2024]. 3 months ago
kde.org.eclass Sync with portage [Sat Jun 15 23:03:51 MSK 2024]. 5 months ago
kernel-2.eclass Sync with portage [Mon Jul 8 21:08:05 MSK 2024]. 4 months ago
kernel-build.eclass Sync with portage [Tue Jul 30 12:17:09 MSK 2024]. 4 months ago
kernel-install.eclass Sync with portage [Thu Aug 8 19:58:55 MSK 2024]. 3 months ago
kodi-addon.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
latex-package.eclass Sync with portage [Fri Apr 15 13:06:33 MSK 2022]. 3 years ago
libretro-core.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
libtool.eclass Sync with portage [Mon Mar 25 20:38:59 MSK 2024]. 8 months ago
linux-info.eclass Sync with portage [Mon Jul 8 21:08:05 MSK 2024]. 4 months ago
linux-mod-r1.eclass Sync with portage [Sun Jun 30 21:32:34 MSK 2024]. 5 months ago
linux-mod.eclass Sync with portage [Mon Jan 1 15:21:29 MSK 2024]. 11 months ago
llvm-r1.eclass Sync with portage [Wed Jul 24 08:05:06 MSK 2024]. 4 months ago
llvm-utils.eclass Sync with portage [Sat Feb 10 20:47:10 MSK 2024]. 9 months ago
llvm.eclass Sync with portage [Wed Jul 24 08:05:06 MSK 2024]. 4 months ago
llvm.org.eclass Sync with portage [Sun Aug 4 08:51:05 MSK 2024]. 3 months ago
ltprune.eclass Sync with portage [Mon Jun 10 20:15:08 MSK 2024]. 5 months ago
lua-single.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
lua-utils.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
lua.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
mate-desktop.org.eclass Sync with portage [Sat Aug 19 12:18:39 MSK 2023]. 1 year ago
mate.eclass Sync with portage [Sat Aug 19 12:18:39 MSK 2023]. 1 year ago
mercurial.eclass Sync with portage [Sun Jun 18 19:27:49 MSK 2023]. 1 year ago
meson-multilib.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
meson.eclass Sync with portage [Fri Jun 7 08:36:57 MSK 2024]. 5 months ago
mono-env.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
mono.eclass Sync with portage [Thu Jan 5 16:30:30 MSK 2023]. 2 years ago
mount-boot-utils.eclass Sync with portage [Sun Jul 14 21:39:21 MSK 2024]. 4 months ago
mount-boot.eclass Sync with portage [Sun Jul 14 21:39:21 MSK 2024]. 4 months ago
mozcoreconf-v6.eclass Sync with portage [Mon Sep 11 00:11:34 MSK 2023]. 1 year ago
mozextension.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
mozlinguas-v2.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
multibuild.eclass Sync with portage [Sun Nov 26 00:49:03 MSK 2023]. 12 months ago
multilib-build.eclass Sync with portage [Sun Jan 8 00:37:49 MSK 2023]. 2 years ago
multilib-minimal.eclass Sync with portage [Mon Jan 17 21:18:20 MSK 2022]. 3 years ago
multilib.eclass Sync with portage [Wed May 31 01:16:14 MSK 2023]. 1 year ago
multiprocessing.eclass Sync with portage [Mon Oct 9 23:52:30 MSK 2023]. 1 year ago
myspell-r2.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
netsurf.eclass Sync with portage [Tue Aug 15 21:55:20 MSK 2023]. 1 year ago
ninja-utils.eclass Sync with portage [Thu Jan 11 09:08:42 MSK 2024]. 10 months ago
nuget.eclass Sync with portage [Sat Feb 10 20:47:10 MSK 2024]. 9 months ago
office-ext-r1.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
opam.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
optfeature.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
out-of-source-utils.eclass Sync with portage [Sun Jan 8 00:37:49 MSK 2023]. 2 years ago
out-of-source.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
pam.eclass Sync with portage [Wed Aug 2 18:05:06 MSK 2023]. 1 year ago
pax-utils.eclass Sync with portage [Thu Mar 24 17:02:53 MSK 2022]. 3 years ago
perl-functions.eclass Sync with portage [Tue Jul 19 10:24:06 MSK 2022]. 2 years ago
perl-module.eclass Sync with portage [Fri Jun 21 08:13:49 MSK 2024]. 5 months ago
php-ext-pecl-r3.eclass Sync with portage [Wed Dec 28 23:55:47 MSK 2022]. 2 years ago
php-ext-source-r3.eclass Sync with portage [Sun Jan 21 16:11:41 MSK 2024]. 10 months ago
php-pear-r2.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
plasma-mobile.kde.org.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
plasma.kde.org.eclass Sync with portage [Sat May 25 23:02:45 MSK 2024]. 6 months ago
plocale.eclass Sync with portage [Mon Dec 26 07:10:10 MSK 2022]. 2 years ago
portability.eclass Sync with portage [Sat Jan 13 21:41:53 MSK 2024]. 10 months ago
postgres-multi.eclass Sync with portage [Sat Jun 15 23:03:51 MSK 2024]. 5 months ago
postgres.eclass Sync with portage [Sun Jan 21 16:11:41 MSK 2024]. 10 months ago
prefix.eclass Sync with portage [Thu Mar 24 17:02:53 MSK 2022]. 3 years ago
preserve-libs.eclass Sync with portage [Fri Apr 7 21:05:03 MSK 2023]. 2 years ago
pypi.eclass Sync with portage [Mon Jul 17 16:00:00 MSK 2023]. 1 year ago
python-any-r1.eclass Sync with portage [Wed Aug 7 08:54:22 MSK 2024]. 3 months ago
python-r1.eclass Sync with portage [Wed Aug 7 08:54:22 MSK 2024]. 3 months ago
python-single-r1.eclass Sync with portage [Wed Aug 7 08:54:22 MSK 2024]. 3 months ago
python-utils-r1.eclass Sync with portage [Wed Aug 7 08:54:22 MSK 2024]. 3 months ago
qmail.eclass Sync with portage [Thu Apr 6 09:02:24 MSK 2023]. 2 years ago
qmake-utils.eclass Sync with portage [Thu Jun 15 00:28:13 MSK 2023]. 1 year ago
qt5-build.eclass Sync with portage [Thu Jul 4 10:42:35 MSK 2024]. 4 months ago
qt6-build.eclass Sync with portage [Tue Jun 25 22:49:59 MSK 2024]. 5 months ago
readme.gentoo-r1.eclass Sync with portage [Fri Jun 21 08:13:49 MSK 2024]. 5 months ago
rebar-utils.eclass Sync with portage [Sun Jul 14 21:39:21 MSK 2024]. 4 months ago
rebar.eclass Sync with portage [Sun Jul 14 21:39:21 MSK 2024]. 4 months ago
rebar3.eclass Sync with portage [Sun Jul 14 21:39:21 MSK 2024]. 4 months ago
rocm.eclass Sync with portage [Sat May 18 22:07:17 MSK 2024]. 6 months ago
rpm.eclass Sync with portage [Sun Apr 14 23:36:23 MSK 2024]. 7 months ago
ruby-fakegem.eclass Sync with portage [Mon Aug 14 14:41:39 MSK 2023]. 1 year ago
ruby-ng-gnome2.eclass Sync with portage [Mon Jun 3 22:33:56 MSK 2024]. 5 months ago
ruby-ng.eclass Sync with portage [Sun Sep 24 14:52:41 MSK 2023]. 1 year ago
ruby-single.eclass Sync with portage [Sun Jun 18 19:27:49 MSK 2023]. 1 year ago
ruby-utils.eclass Sync with portage [Tue Dec 26 14:36:55 MSK 2023]. 11 months ago
rust-toolchain.eclass Sync with portage [Wed Aug 7 08:54:22 MSK 2024]. 3 months ago
s6.eclass Sync with portage [Thu Jan 5 16:30:30 MSK 2023]. 2 years ago
savedconfig.eclass Sync with portage [Sat Jul 27 22:31:12 MSK 2024]. 4 months ago
scons-utils.eclass Sync with portage [Sun Jan 21 16:11:41 MSK 2024]. 10 months ago
secureboot.eclass Sync with portage [Tue Jul 23 16:10:28 MSK 2024]. 4 months ago
selinux-policy-2.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
sgml-catalog-r1.eclass Sync with portage [Thu Apr 6 09:02:24 MSK 2023]. 2 years ago
shell-completion.eclass Sync with portage [Wed Aug 2 18:05:06 MSK 2023]. 1 year ago
ssl-cert.eclass Sync with portage [Mon Jan 1 15:21:29 MSK 2024]. 11 months ago
stardict.eclass Sync with portage [Wed May 8 21:42:41 MSK 2024]. 6 months ago
strip-linguas.eclass Sync with portage [Sun Jun 27 23:20:26 MSK 2021]. 3 years ago
subversion.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
systemd.eclass Sync with portage [Tue Oct 3 01:01:04 MSK 2023]. 1 year ago
texlive-common.eclass Sync with portage [Sat Jul 27 22:31:12 MSK 2024]. 4 months ago
texlive-module.eclass Sync with portage [Fri May 24 17:40:14 MSK 2024]. 6 months ago
tmpfiles.eclass Sync with portage [Sun Mar 27 00:04:59 MSK 2022]. 3 years ago
toolchain-autoconf.eclass Sync with portage [Wed Jan 24 22:01:18 MSK 2024]. 10 months ago
toolchain-funcs.eclass Sync with portage [Wed Aug 7 08:54:22 MSK 2024]. 3 months ago
toolchain.eclass Sync with portage [Thu Aug 8 19:58:55 MSK 2024]. 3 months ago
tree-sitter-grammar.eclass Sync with portage [Mon Jul 8 09:41:14 MSK 2024]. 4 months ago
udev.eclass Sync with portage [Wed Sep 14 23:50:53 MSK 2022]. 2 years ago
unpacker.eclass Sync with portage [Sat Jul 20 22:26:02 MSK 2024]. 4 months ago
user-info.eclass Sync with portage [Mon Jul 10 09:26:34 MSK 2023]. 1 year ago
usr-ldscript.eclass Sync with portage [Tue Jun 13 12:21:29 MSK 2023]. 1 year ago
vala.eclass Sync with portage [Wed Dec 6 16:13:06 MSK 2023]. 11 months ago
vcs-clean.eclass Sync with portage [Wed Feb 2 14:00:10 MSK 2022]. 3 years ago
vcs-snapshot.eclass Sync with portage [Sun Jul 14 21:39:21 MSK 2024]. 4 months ago
vdr-plugin-2.eclass Sync with portage [Thu Jul 4 10:42:35 MSK 2024]. 4 months ago
verify-sig.eclass Sync with portage [Thu Jan 11 09:08:42 MSK 2024]. 10 months ago
versionator.eclass Sync with portage [Sun Nov 8 12:37:53 MSK 2020]. 4 years ago
vim-doc.eclass Sync with portage [Tue May 31 09:39:41 MSK 2022]. 2 years ago
vim-plugin.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
vim-spell.eclass Sync with portage [Thu May 9 23:33:52 MSK 2024]. 6 months ago
virtualx.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
waf-utils.eclass Sync with portage [Fri May 19 17:18:43 MSK 2023]. 2 years ago
webapp.eclass Sync with portage [Wed Oct 18 18:13:25 MSK 2023]. 1 year ago
wrapper.eclass Sync with portage [Sun Apr 3 01:46:14 MSK 2022]. 3 years ago
wxwidgets.eclass Sync with portage [Sat Jan 21 23:01:17 MSK 2023]. 2 years ago
xdg-utils.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
xdg.eclass Sync with portage [Sat Mar 18 09:45:58 MSK 2023]. 2 years ago
xemacs-packages.eclass Sync with portage [Sun Mar 26 20:19:26 MSK 2023]. 2 years ago
xorg-3.eclass Sync with portage [Fri May 3 13:34:44 MSK 2024]. 6 months ago

readme.gentoo-r1.eclass

# Copyright 1999-2024 Gentoo Authors

# Distributed under the terms of the GNU General Public License v2

# @ECLASS: readme.gentoo-r1.eclass
# @MAINTAINER:
# Pacho Ramos <pacho@gentoo.org>
# @AUTHOR:
# Author: Pacho Ramos <pacho@gentoo.org>
# @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
# shown via elog messages. With this eclass, those elog messages will only be
# shown at first package installation and a file for later reviewing will be
# installed under /usr/share/doc/${PF}
#
# You need to call readme.gentoo_create_doc in src_install phase and
# readme.gentoo_print_elog in pkg_postinst

if [[ -z ${_README_GENTOO_ECLASS} ]]; then
_README_GENTOO_ECLASS=1

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:
# If non-empty, DOC_CONTENTS information will be strictly respected,
# not getting it automatically formatted by fold. If empty, it will
# rely on fold for formatting and 'echo -e' options to tweak lines a bit.

# @ECLASS_VARIABLE: FORCE_PRINT_ELOG
# @DEFAULT_UNSET
# @DESCRIPTION:
# If non-empty this variable forces elog messages to be printed.

# @ECLASS_VARIABLE: README_GENTOO_SUFFIX
# @DESCRIPTION:
# If you want to specify a suffix for README.gentoo file please export it.
: "${README_GENTOO_SUFFIX:=""}"

# @FUNCTION: readme.gentoo_create_doc
# @DESCRIPTION:
# Create doc file with ${DOC_CONTENTS} variable (preferred) and, if not set,
# look for "${FILESDIR}/README.gentoo" contents. You can use
# ${FILESDIR}/README.gentoo-${SLOT} also.
# Usually called at src_install phase.
readme.gentoo_create_doc() {
debug-print-function ${FUNCNAME} "${@}"

if [[ -n "${DOC_CONTENTS}" ]]; then
if [[ -n "${DISABLE_AUTOFORMATTING}" ]]; then
echo "${DOC_CONTENTS}" > "${T}"/README.gentoo || die
else
local saved_flags=$-
set -f # disable filename expansion in echo arguments
echo -e ${DOC_CONTENTS} | fold -s -w 70 \
| sed 's/[[:space:]]*$//' > "${T}"/README.gentoo
assert
set +f -${saved_flags}
fi
elif [[ -f "${FILESDIR}/README.gentoo-${SLOT%/*}" ]]; then
cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo || die
elif [[ -f "${FILESDIR}/README.gentoo${README_GENTOO_SUFFIX}" ]]; then
cp "${FILESDIR}/README.gentoo${README_GENTOO_SUFFIX}" "${T}"/README.gentoo || die
else
die "You are not specifying README.gentoo contents!"
fi

( # subshell to avoid pollution of calling environment
docinto .
dodoc "${T}"/README.gentoo
) || die
README_GENTOO_DOC_VALUE=$(< "${T}/README.gentoo")
}

# @FUNCTION: readme.gentoo_print_elog
# @DESCRIPTION:
# Print elog messages with "${T}"/README.gentoo contents. They will be
# shown only when package is installed at first time.
# Usually called at pkg_postinst phase.
#
# If you want to show them always, please set FORCE_PRINT_ELOG to a non empty
# value in your ebuild before this function is called.
# This can be useful when, for example, DOC_CONTENTS is modified, then, you can
# rely on specific REPLACING_VERSIONS handling in your ebuild to print messages
# when people update from versions still providing old message.
readme.gentoo_print_elog() {
debug-print-function ${FUNCNAME} "${@}"

if [[ -z "${README_GENTOO_DOC_VALUE}" ]]; then
die "readme.gentoo_print_elog invoked without matching readme.gentoo_create_doc call!"
elif ! [[ -n "${REPLACING_VERSIONS}" ]] || [[ -n "${FORCE_PRINT_ELOG}" ]]; then
echo -e "${README_GENTOO_DOC_VALUE}" | while read -r ELINE; do elog "${ELINE}"; done
elog ""
elog "(Note: Above message is only printed the first time package is"
elog "installed. Please look at ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
elog "for future reference)"
fi
}

fi