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 26af184c17
Sync with portage [Sun Jun 9 15:45:16 MSK 2013].
12 years ago
..
ELT-patches Sync with portage [Sat May 4 14:35:57 MSK 2013]. 12 years ago
tests Sync with portage [Sun Feb 10 22:32:33 MSK 2013]. 12 years ago
alternatives.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
ant-tasks.eclass Sync with portage [Sat Jun 2 16:03:44 MSK 2012]. 13 years ago
apache-2.eclass Sync with portage [Sun Apr 28 22:37:33 MSK 2013]. 12 years ago
apache-module.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
aspell-dict.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
autotools-multilib.eclass Sync with portage [Wed May 15 10:03:05 MSK 2013]. 12 years ago
autotools-utils.eclass Sync with portage [Sun Jun 9 00:12:37 MSK 2013]. 12 years ago
autotools.eclass Sync with portage [Mon Apr 29 15:11:31 MSK 2013]. 12 years ago
base.eclass Sync with portage [Fri Sep 28 00:48:58 MSK 2012]. 12 years ago
bash-completion-r1.eclass Sync with portage [Fri Sep 28 00:48:58 MSK 2012]. 12 years ago
bash-completion.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
boost-utils.eclass Sync with portage [Mon Oct 8 10:40:48 MSK 2012]. 12 years ago
bsdmk.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
bzr.eclass Sync with portage [Wed Sep 19 14:46:10 MSK 2012]. 12 years ago
cannadic.eclass Sync with portage [Sun Sep 16 23:42:15 MSK 2012]. 12 years ago
cdrom.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
check-reqs.eclass Sync with portage [Fri Oct 19 12:05:59 MSK 2012]. 12 years ago
chromium.eclass Sync with portage [Wed Sep 12 14:52:17 MSK 2012]. 12 years ago
clutter.eclass Sync with portage [Fri Sep 28 00:48:58 MSK 2012]. 12 years ago
cmake-multilib.eclass Sync with portage [Mon Apr 15 09:49:10 MSK 2013]. 12 years ago
cmake-utils.eclass Sync with portage [Mon Apr 8 04:43:06 MSK 2013]. 12 years ago
common-lisp-common-2.eclass Sync with portage [Sun Jun 3 20:17:30 MSK 2012]. 13 years ago
common-lisp-common-3.eclass Sync with portage [Sun Jun 3 20:17:30 MSK 2012]. 13 years ago
common-lisp-common.eclass Sync with portage [Sun Jun 3 20:17:30 MSK 2012]. 13 years ago
common-lisp.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
confutils.eclass Sync with portage [Sun Sep 16 23:42:15 MSK 2012]. 12 years ago
cron.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
cuda.eclass Sync with portage [Sat Jan 12 02:19:15 MSK 2013]. 12 years ago
cvs.eclass Sync with portage [Tue Jan 22 15:26:31 MSK 2013]. 12 years ago
darcs.eclass Sync with portage [Fri Jun 8 17:39:40 MSK 2012]. 13 years ago
db-use.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
db.eclass Sync with portage [Tue Oct 9 15:58:22 MSK 2012]. 12 years ago
depend.apache.eclass Sync with portage [Sat Apr 21 00:10:29 MSK 2012]. 13 years ago
depend.php.eclass Sync with portage [Sun Jun 3 20:17:30 MSK 2012]. 13 years ago
distutils-r1.eclass Sync with portage [Tue May 21 16:13:22 MSK 2013]. 12 years ago
distutils.eclass Sync with portage [Sat Feb 9 21:04:09 MSK 2013]. 12 years ago
elisp-common.eclass Sync with portage [Sun Mar 17 19:31:52 MSK 2013]. 12 years ago
elisp.eclass Sync with portage [Sun Mar 17 19:31:52 MSK 2013]. 12 years ago
embassy.eclass Sync with portage [Sun Sep 16 23:42:15 MSK 2012]. 12 years ago
emboss.eclass Sync with portage [Fri Sep 28 00:48:58 MSK 2012]. 12 years ago
emul-linux-x86.eclass Sync with portage [Mon Feb 25 20:14:08 MSK 2013]. 12 years ago
enlightenment.eclass Sync with portage [Mon Nov 26 14:47:07 MSK 2012]. 12 years ago
eutils.eclass Sync with portage [Wed May 22 17:13:38 MSK 2013]. 12 years ago
fcaps.eclass Sync with portage [Sun Jun 2 23:02:11 MSK 2013]. 12 years ago
fdo-mime.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
findlib.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
fixheadtails.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
flag-o-matic.eclass Sync with portage [Sun Jan 13 16:14:22 MSK 2013]. 12 years ago
font-ebdftopcf.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
font.eclass Sync with portage [Sun Jun 9 15:45:16 MSK 2013]. 12 years ago
fortran-2.eclass Sync with portage [Wed Mar 13 23:03:00 MSK 2013]. 12 years ago
fox.eclass Sync with portage [Fri Sep 28 00:48:58 MSK 2012]. 12 years ago
freebsd.eclass Sync with portage [Sat Nov 24 22:55:10 MSK 2012]. 12 years ago
freedict.eclass Sync with portage [Sun Jun 3 20:17:30 MSK 2012]. 13 years ago
games-ggz.eclass Sync with portage [Fri Sep 28 00:48:58 MSK 2012]. 12 years ago
games-mods.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
games.eclass Sync with portage [Mon Apr 8 17:37:28 MSK 2013]. 12 years ago
gdesklets.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
gems.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
ghc-package.eclass Sync with portage [Sun May 12 19:55:41 MSK 2013]. 12 years ago
git-2.eclass Sync with portage [Thu Jan 10 09:31:43 MSK 2013]. 12 years ago
git.eclass Sync with portage [Thu Jan 17 00:06:22 MSK 2013]. 12 years ago
gkrellm-plugin.eclass Sync with portage [Thu May 3 08:04:48 MSK 2012]. 13 years ago
gnat.eclass Sync with portage [Sun Jun 3 20:17:30 MSK 2012]. 13 years ago
gnatbuild.eclass Sync with portage [Sun Sep 16 23:42:15 MSK 2012]. 12 years ago
gnome-python-common.eclass Sync with portage [Thu May 3 08:04:48 MSK 2012]. 13 years ago
gnome.org.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
gnome2-utils.eclass Sync with portage [Sun Oct 28 22:18:24 MSK 2012]. 12 years ago
gnome2.eclass Sync with portage [Mon May 27 09:46:11 MSK 2013]. 12 years ago
gnuconfig.eclass Sync with portage [Wed May 22 17:13:38 MSK 2013]. 12 years ago
gnustep-2.eclass Sync with portage [Tue May 29 14:03:23 MSK 2012]. 13 years ago
gnustep-base.eclass Sync with portage [Sat Jun 23 22:14:17 MSK 2012]. 13 years ago
go-mono.eclass Sync with portage [Thu May 3 08:04:48 MSK 2012]. 13 years ago
gpe.eclass Sync with portage [Thu May 3 08:04:48 MSK 2012]. 13 years ago
gst-plugins-bad.eclass Sync with portage [Mon Dec 3 10:18:23 MSK 2012]. 12 years ago
gst-plugins-base.eclass Sync with portage [Mon Dec 3 10:18:23 MSK 2012]. 12 years ago
gst-plugins-good.eclass Sync with portage [Mon Dec 3 10:18:23 MSK 2012]. 12 years ago
gst-plugins-ugly.eclass Sync with portage [Mon Dec 3 10:18:23 MSK 2012]. 12 years ago
gst-plugins10.eclass Sync with portage [Fri Feb 1 09:12:46 MSK 2013]. 12 years ago
gtk-sharp-module.eclass Sync with portage [Fri Sep 28 00:48:58 MSK 2012]. 12 years ago
haskell-cabal.eclass Sync with portage [Sun May 12 19:55:41 MSK 2013]. 12 years ago
horde.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
intel-sdp.eclass Sync with portage [Fri Feb 15 18:15:54 MSK 2013]. 12 years ago
java-ant-2.eclass Sync with portage [Mon Apr 22 18:57:32 MSK 2013]. 12 years ago
java-mvn-src.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
java-osgi.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
java-pkg-2.eclass Sync with portage [Sun Jul 22 23:13:16 MSK 2012]. 12 years ago
java-pkg-opt-2.eclass Sync with portage [Sun Jul 22 23:13:16 MSK 2012]. 12 years ago
java-pkg-simple.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
java-utils-2.eclass Sync with portage [Thu Apr 18 10:35:38 MSK 2013]. 12 years ago
java-virtuals-2.eclass Sync with portage [Thu Jul 19 11:55:05 MSK 2012]. 12 years ago
java-vm-2.eclass Sync with portage [Tue Jul 24 09:41:13 MSK 2012]. 12 years ago
kde4-base.eclass Sync with portage [Mon Apr 8 04:43:06 MSK 2013]. 12 years ago
kde4-functions.eclass Sync with portage [Mon Apr 8 04:43:06 MSK 2013]. 12 years ago
kde4-meta-pkg.eclass Sync with portage [Mon Apr 8 04:43:06 MSK 2013]. 12 years ago
kde4-meta.eclass Sync with portage [Mon Apr 8 04:43:06 MSK 2013]. 12 years ago
kernel-2.eclass Sync with portage [Tue Apr 30 17:28:49 MSK 2013]. 12 years ago
l10n.eclass Sync with portage [Fri Jul 27 02:10:11 MSK 2012]. 12 years ago
latex-package.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
leechcraft.eclass Sync with portage [Fri May 10 18:11:05 MSK 2013]. 12 years ago
libtool.eclass Sync with portage [Sun May 12 19:55:41 MSK 2013]. 12 years ago
linux-info.eclass Sync with portage [Sun Feb 10 22:32:33 MSK 2013]. 12 years ago
linux-mod.eclass Sync with portage [Tue Mar 26 18:13:45 MSK 2013]. 12 years ago
makeedit.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
mercurial.eclass Sync with portage [Sun Apr 28 22:37:33 MSK 2013]. 12 years ago
mono-env.eclass Sync with portage [Sat May 25 20:23:04 MSK 2013]. 12 years ago
mono.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
mount-boot.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
mozconfig-3.eclass Sync with portage [Thu Apr 11 00:10:37 MSK 2013]. 12 years ago
mozcoreconf-2.eclass Sync with portage [Tue Mar 26 11:36:46 MSK 2013]. 12 years ago
mozextension.eclass Sync with portage [Tue May 28 18:50:56 MSK 2013]. 12 years ago
mozilla-launcher.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
mozlinguas.eclass Sync with portage [Fri Apr 5 22:32:44 MSK 2013]. 12 years ago
multibuild.eclass Sync with portage [Sat May 25 20:23:04 MSK 2013]. 12 years ago
multilib-build.eclass Sync with portage [Sat Jun 1 01:58:15 MSK 2013]. 12 years ago
multilib-minimal.eclass Sync with portage [Sun May 5 12:54:02 MSK 2013]. 12 years ago
multilib.eclass Sync with portage [Mon Apr 22 18:57:32 MSK 2013]. 12 years ago
multiprocessing.eclass Sync with portage [Tue Jul 31 09:24:55 MSK 2012]. 12 years ago
myspell-r2.eclass Sync with portage [Thu Oct 25 08:55:33 MSK 2012]. 12 years ago
myspell.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
mysql-autotools.eclass Sync with portage [Sun Mar 17 19:31:52 MSK 2013]. 12 years ago
mysql-cmake.eclass Sync with portage [Tue Mar 5 11:57:28 MSK 2013]. 12 years ago
mysql-v2.eclass Sync with portage [Wed Feb 13 09:16:35 MSK 2013]. 12 years ago
mysql.eclass Sync with portage [Sun Mar 17 19:31:52 MSK 2013]. 12 years ago
mysql_fx.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
mythtv-plugins.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
mythtv.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
nsplugins.eclass Sync with portage [Tue May 28 18:50:56 MSK 2013]. 12 years ago
nvidia-driver.eclass Sync with portage [Fri May 17 17:45:25 MSK 2013]. 12 years ago
oasis.eclass Sync with portage [Thu Feb 7 20:59:23 MSK 2013]. 12 years ago
obs-download.eclass Sync with portage [Wed Oct 3 09:46:14 MSK 2012]. 12 years ago
obs-service.eclass Sync with portage [Wed Mar 27 15:52:29 MSK 2013]. 12 years ago
office-ext-r1.eclass Sync with portage [Sun Mar 31 18:49:15 MSK 2013]. 12 years ago
office-ext.eclass Sync with portage [Fri May 17 17:45:25 MSK 2013]. 12 years ago
openib.eclass Sync with portage [Mon Oct 15 09:31:57 MSK 2012]. 12 years ago
pam.eclass Sync with portage [Mon Aug 6 12:57:34 MSK 2012]. 12 years ago
pax-utils.eclass Sync with portage [Sat May 18 23:33:57 MSK 2013]. 12 years ago
perl-app.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
perl-module.eclass Sync with portage [Sun Apr 28 22:37:33 MSK 2013]. 12 years ago
php-common-r1.eclass Sync with portage [Sun Apr 28 22:37:33 MSK 2013]. 12 years ago
php-ext-base-r1.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
php-ext-pecl-r2.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
php-ext-source-r2.eclass Sync with portage [Sun Jun 2 23:02:11 MSK 2013]. 12 years ago
php-ezc.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
php-lib-r1.eclass Sync with portage [Mon Feb 13 09:23:03 MSK 2012]. 13 years ago
php-pear-lib-r1.eclass Sync with portage [Wed Aug 22 23:28:28 MSK 2012]. 12 years ago
php-pear-r1.eclass Sync with portage [Wed Aug 22 23:28:28 MSK 2012]. 12 years ago
phpconfutils.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
portability.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
prefix.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
python-any-r1.eclass Sync with portage [Sat May 11 13:31:09 MSK 2013]. 12 years ago
python-distutils-ng.eclass Sync with portage [Thu Nov 1 10:40:16 MSK 2012]. 12 years ago
python-r1.eclass Sync with portage [Tue May 21 16:13:22 MSK 2013]. 12 years ago
python-single-r1.eclass Sync with portage [Tue May 21 16:13:22 MSK 2013]. 12 years ago
python-utils-r1.eclass Sync with portage [Fri Jun 7 08:26:29 MSK 2013]. 12 years ago
python.eclass Sync with portage [Sat Mar 9 01:29:32 MSK 2013]. 12 years ago
qmail.eclass Sync with portage [Mon May 27 09:46:11 MSK 2013]. 12 years ago
qt4-build.eclass Sync with portage [Sun Apr 28 22:37:33 MSK 2013]. 12 years ago
qt4-r2.eclass Sync with portage [Mon Jun 3 22:45:46 MSK 2013]. 12 years ago
readme.gentoo.eclass Sync with portage [Sat May 25 20:23:04 MSK 2013]. 12 years ago
rox-0install.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
rox.eclass Sync with portage [Thu May 3 08:04:48 MSK 2012]. 13 years ago
rpm.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
ruby-fakegem.eclass Sync with portage [Sun Jun 2 23:02:11 MSK 2013]. 12 years ago
ruby-ng-gnome2.eclass Sync with portage [Sat Aug 18 13:27:02 MSK 2012]. 12 years ago
ruby-ng.eclass Sync with portage [Fri Sep 28 00:48:58 MSK 2012]. 12 years ago
ruby.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
savedconfig.eclass Sync with portage [Tue Jan 29 23:07:10 MSK 2013]. 12 years ago
scons-utils.eclass Sync with portage [Fri Sep 28 00:48:58 MSK 2012]. 12 years ago
scsh.eclass Sync with portage [Wed Nov 28 02:22:11 MSK 2012]. 12 years ago
selinux-policy-2.eclass Sync with portage [Tue May 7 16:15:57 MSK 2013]. 12 years ago
sgml-catalog.eclass Sync with portage [Tue May 1 11:13:34 MSK 2012]. 13 years ago
ssl-cert.eclass Sync with portage [Fri Jan 4 03:31:46 MSK 2013]. 12 years ago
stardict.eclass Sync with portage [Tue Jun 5 23:18:53 MSK 2012]. 13 years ago
subversion.eclass Sync with portage [Sun Apr 28 22:37:33 MSK 2013]. 12 years ago
sword-module.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
systemd.eclass Sync with portage [Mon Apr 15 09:49:10 MSK 2013]. 12 years ago
texlive-common.eclass Sync with portage [Thu Oct 18 10:07:04 MSK 2012]. 12 years ago
texlive-module.eclass Sync with portage [Fri Jul 27 02:10:11 MSK 2012]. 12 years ago
toolchain-binutils.eclass Sync with portage [Sat Feb 9 21:04:09 MSK 2013]. 12 years ago
toolchain-funcs.eclass Sync with portage [Wed May 15 10:03:05 MSK 2013]. 12 years ago
toolchain.eclass Sync with portage [Sat May 25 20:23:04 MSK 2013]. 12 years ago
twisted.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
udev.eclass Sync with portage [Sun Mar 24 22:48:34 MSK 2013]. 12 years ago
unpacker.eclass Sync with portage [Thu Apr 11 00:10:37 MSK 2013]. 12 years ago
user.eclass Sync with portage [Sat Jun 23 22:14:17 MSK 2012]. 13 years ago
vala.eclass Sync with portage [Sun Mar 31 18:49:15 MSK 2013]. 12 years ago
vcs-snapshot.eclass Sync with portage [Sat Feb 9 21:04:09 MSK 2013]. 12 years ago
vdr-plugin-2.eclass Sync with portage [Mon Apr 15 09:49:10 MSK 2013]. 12 years ago
vdr-plugin.eclass Sync with portage [Mon Feb 18 17:28:16 MSK 2013]. 12 years ago
versionator.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
vim-doc.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
vim-plugin.eclass Sync with portage [Sun Jun 2 23:02:11 MSK 2013]. 12 years ago
vim-spell.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
vim.eclass Sync with portage [Thu May 30 12:56:01 MSK 2013]. 12 years ago
virtualx.eclass Sync with portage [Thu Oct 4 09:37:59 MSK 2012]. 12 years ago
virtuoso.eclass Sync with portage [Fri Sep 28 00:48:58 MSK 2012]. 12 years ago
vmware-bundle.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
waf-utils.eclass Sync with portage [Thu Dec 6 23:54:43 MSK 2012]. 12 years ago
webapp.eclass Sync with portage [Wed Jul 18 23:38:13 MSK 2012]. 12 years ago
wxwidgets.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
x-modular.eclass Sync with portage [Thu May 3 08:04:48 MSK 2012]. 13 years ago
xemacs-elisp-common.eclass Sync with portage [Wed Jul 18 23:38:13 MSK 2012]. 12 years ago
xemacs-elisp.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
xemacs-packages.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
xfconf.eclass Sync with portage [Wed Nov 28 17:46:26 MSK 2012]. 12 years ago
xorg-2.eclass Sync with portage [Tue Feb 26 12:07:51 MSK 2013]. 12 years ago
zproduct.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago

readme.gentoo.eclass

# Copyright 1999-2013 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/readme.gentoo.eclass,v 1.7 2013/05/24 18:05:27 pacho Exp $

# @ECLASS: readme.gentoo
# @MAINTAINER:
# Pacho Ramos <pacho@gentoo.org>
# @AUTHOR:
# Author: Pacho Ramos <pacho@gentoo.org>
# @BLURB: An eclass for installing a README.gentoo doc file recording tips
# 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}

if [[ ${___ECLASS_ONCE_README_GENTOO} != "recur -_+^+_- spank" ]] ; then
___ECLASS_ONCE_README_GENTOO="recur -_+^+_- spank"

inherit eutils

case "${EAPI:-0}" in
0|1|2|3)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
4|5)
# EAPI>=4 is required for REPLACING_VERSIONS preventing us
# from needing to export another pkg_preinst phase to save has_version
# result. Also relies on EAPI >=4 default src_install phase.
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
;;
esac

EXPORT_FUNCTIONS src_install pkg_postinst

# @ECLASS-VARIABLE: DISABLE_AUTOFORMATTING
# @DEFAULT_UNSET
# @DESCRIPTION:
# If non-empty, DOC_CONTENTS information will be strictly respected,
# not getting it automatically formatted by fmt. If empty, it will
# rely on fmt 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.

# @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
eshopts_push
set -f
if [[ -n "${DISABLE_AUTOFORMATTING}" ]]; then
echo "${DOC_CONTENTS}" > "${T}"/README.gentoo
else
echo -e ${DOC_CONTENTS} | fold -s -w 70 \
| sed 's/[[:space:]]*$//' > "${T}"/README.gentoo
fi
eshopts_pop
elif [[ -f "${FILESDIR}/README.gentoo-${SLOT%/*}" ]]; then
cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo
elif [[ -f "${FILESDIR}/README.gentoo" ]]; then
cp "${FILESDIR}/README.gentoo" "${T}"/README.gentoo
else
die "You are not specifying README.gentoo contents!"
fi

dodoc "${T}"/README.gentoo
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 /usr/share/doc/${PF}/README.gentoo*"
elog "for future reference)"
fi
}


# @FUNCTION: readme.gentoo_src_install
# @DESCRIPTION:
# Install generated doc file automatically.
readme.gentoo_src_install() {
debug-print-function ${FUNCNAME} "${@}"
default
readme.gentoo_create_doc
}

# @FUNCTION: readme.gentoo_pkg_postinst
# @DESCRIPTION:
# Show elog messages from from just generated doc file.
readme.gentoo_pkg_postinst() {
debug-print-function ${FUNCNAME} "${@}"
readme.gentoo_print_elog
}

fi