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 62fb684a03
Sync with portage [Fri Jul 11 23:20:23 MSK 2014].
10 years ago
..
ELT-patches Sync with portage [Tue Jul 8 18:35:22 MSK 2014]. 10 years ago
tests Sync with portage [Mon Jul 7 10:29:26 MSK 2014]. 10 years ago
ChangeLog-2013 Sync with portage [Thu Jan 2 12:55:05 MSK 2014]. 11 years ago
alternatives.eclass Sync with portage [Sat Sep 21 21:38:44 MSK 2013]. 11 years ago
ant-tasks.eclass Sync with portage [Mon Oct 7 02:21:12 MSK 2013]. 11 years ago
apache-2.eclass Sync with portage [Fri May 23 09:41:09 MSK 2014]. 11 years ago
apache-module.eclass Sync with portage [Sat Jun 22 11:47:23 MSK 2013]. 12 years ago
aspell-dict.eclass Sync with portage [Mon Jan 6 21:02:41 MSK 2014]. 11 years ago
autotools-multilib.eclass Sync with portage [Fri May 2 23:36:39 MSK 2014]. 11 years ago
autotools-utils.eclass Sync with portage [Wed Mar 12 14:33:09 MSK 2014]. 11 years ago
autotools.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
base.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
bash-completion-r1.eclass Sync with portage [Thu Jan 23 09:54:36 MSK 2014]. 11 years ago
bash-completion.eclass Sync with portage [Sat Jul 6 13:10:11 MSK 2013]. 12 years ago
bsdmk.eclass Sync with portage [Fri Aug 9 23:31:16 MSK 2013]. 11 years ago
bzr.eclass Sync with portage [Fri Jul 12 14:28:13 MSK 2013]. 11 years ago
cannadic.eclass Sync with portage [Sun Sep 16 23:42:15 MSK 2012]. 12 years ago
cdrom.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
check-reqs.eclass Sync with portage [Mon Mar 31 09:13:07 MSK 2014]. 11 years ago
chromium.eclass Sync with portage [Wed Dec 4 10:15:01 MSK 2013]. 11 years ago
clutter.eclass Sync with portage [Fri Sep 28 00:48:58 MSK 2012]. 12 years ago
cmake-multilib.eclass Sync with portage [Sat May 10 00:55:06 MSK 2014]. 11 years ago
cmake-utils.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 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 Sync with portage [Thu Sep 5 17:28:57 MSK 2013]. 11 years ago
cuda.eclass Sync with portage [Mon Aug 12 10:46:34 MSK 2013]. 11 years ago
cvs.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
darcs.eclass Sync with portage [Fri May 23 09:41:09 MSK 2014]. 11 years ago
db-use.eclass Sync with portage [Sun Jul 21 22:59:07 MSK 2013]. 11 years ago
db.eclass Sync with portage [Sun Jul 21 22:59:07 MSK 2013]. 11 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 Jul 8 18:35:22 MSK 2014]. 10 years ago
distutils.eclass Sync with portage [Mon Aug 5 09:48:38 MSK 2013]. 11 years ago
elisp-common.eclass Sync with portage [Wed Jun 11 17:28:17 MSK 2014]. 11 years ago
elisp.eclass Sync with portage [Sun Jun 8 16:29:28 MSK 2014]. 11 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 [Sat May 10 00:55:06 MSK 2014]. 11 years ago
enlightenment.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
eutils.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
fcaps.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 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 Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
flag-o-matic.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
font-ebdftopcf.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
font.eclass Sync with portage [Sat Jul 27 21:35:35 MSK 2013]. 11 years ago
fortran-2.eclass Sync with portage [Tue Jul 30 13:03:08 MSK 2013]. 11 years ago
fox.eclass Sync with portage [Fri Sep 28 00:48:58 MSK 2012]. 12 years ago
freebsd.eclass Sync with portage [Thu Aug 29 10:48:42 MSK 2013]. 11 years ago
freedict.eclass Sync with portage [Mon Jan 6 21:02:41 MSK 2014]. 11 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 [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
gdesklets.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
ghc-package.eclass Sync with portage [Wed Feb 12 21:43:20 MSK 2014]. 11 years ago
git-2.eclass Sync with portage [Wed Oct 9 11:36:05 MSK 2013]. 11 years ago
git-r3.eclass Sync with portage [Tue Jul 8 18:35:22 MSK 2014]. 10 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 [Tue Nov 26 10:02:06 MSK 2013]. 11 years ago
gnome-games.eclass Sync with portage [Mon Aug 26 08:09:41 MSK 2013]. 11 years ago
gnome-python-common-r1.eclass Sync with portage [Tue May 27 10:46:42 MSK 2014]. 11 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 [Sat Mar 1 21:56:21 MSK 2014]. 11 years ago
gnome2.eclass Sync with portage [Wed Feb 12 21:43:20 MSK 2014]. 11 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 [Mon Jul 29 00:02:23 MSK 2013]. 11 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 [Mon Apr 7 09:03:32 MSK 2014]. 11 years ago
gstreamer.eclass Sync with portage [Fri Jun 20 07:49:23 MSK 2014]. 11 years ago
gtk-sharp-module.eclass Sync with portage [Mon Jan 20 16:14:39 MSK 2014]. 11 years ago
haskell-cabal.eclass Sync with portage [Fri Jun 27 16:22:42 MSK 2014]. 11 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 21 22:35:37 MSK 2014]. 11 years ago
java-ant-2.eclass Sync with portage [Tue Apr 1 10:21:50 MSK 2014]. 11 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 10 13:12:11 MSK 2014]. 11 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 [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
kde4-functions.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
kde4-meta-pkg.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
kde4-meta.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
kernel-2.eclass Sync with portage [Mon Apr 21 09:19:26 MSK 2014]. 11 years ago
l10n.eclass Sync with portage [Fri Jul 27 02:10:11 MSK 2012]. 12 years ago
latex-package.eclass Sync with portage [Sat Jul 6 13:10:11 MSK 2013]. 12 years ago
leechcraft.eclass Sync with portage [Sun May 4 19:59:25 MSK 2014]. 11 years ago
libtool.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
linux-info.eclass Sync with portage [Sat Jun 28 17:10:00 MSK 2014]. 11 years ago
linux-mod.eclass Sync with portage [Wed Jan 15 23:23:01 MSK 2014]. 11 years ago
makeedit.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
mercurial.eclass Sync with portage [Wed Nov 6 16:01:41 MSK 2013]. 11 years ago
mono-env.eclass Sync with portage [Mon Jun 17 10:47:44 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 Aug 29 10:48:42 MSK 2013]. 11 years ago
mozcoreconf-2.eclass Sync with portage [Sun Jan 19 13:14:27 MSK 2014]. 11 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 [Sun May 11 11:41:24 MSK 2014]. 11 years ago
multilib-build.eclass Sync with portage [Sun Jul 6 01:20:23 MSK 2014]. 10 years ago
multilib-minimal.eclass Sync with portage [Fri May 2 23:36:39 MSK 2014]. 11 years ago
multilib.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
multiprocessing.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
myspell-r2.eclass Sync with portage [Mon Jan 27 09:10:39 MSK 2014]. 11 years ago
myspell.eclass Sync with portage [Mon Jan 6 21:02:41 MSK 2014]. 11 years ago
mysql-autotools.eclass Sync with portage [Thu Jun 27 19:53:31 MSK 2013]. 12 years ago
mysql-cmake.eclass Sync with portage [Fri Jun 20 07:49:23 MSK 2014]. 11 years ago
mysql-v2.eclass Sync with portage [Fri Jun 20 07:49:23 MSK 2014]. 11 years ago
mysql.eclass Sync with portage [Wed Jan 8 15:55:25 MSK 2014]. 11 years ago
mysql_fx.eclass Sync with portage [Mon May 19 08:49:51 MSK 2014]. 11 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
netsurf.eclass Sync with portage [Sun Jun 23 23:51:48 MSK 2013]. 12 years ago
nsplugins.eclass Sync with portage [Tue May 28 18:50:56 MSK 2013]. 12 years ago
nvidia-driver.eclass Sync with portage [Sun Oct 13 22:30:24 MSK 2013]. 11 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
openib.eclass Sync with portage [Wed Apr 16 19:12:21 MSK 2014]. 11 years ago
pam.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
pax-utils.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
perl-app.eclass Sync with portage [Mon Dec 30 15:54:33 MSK 2013]. 11 years ago
perl-module.eclass Sync with portage [Mon Mar 31 09:13:07 MSK 2014]. 11 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 [Tue Nov 26 10:02:06 MSK 2013]. 11 years ago
phpconfutils.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
portability.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
prefix.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
python-any-r1.eclass Sync with portage [Wed Apr 9 09:22:11 MSK 2014]. 11 years ago
python-r1.eclass Sync with portage [Mon Jul 7 10:29:26 MSK 2014]. 10 years ago
python-single-r1.eclass Sync with portage [Tue May 27 10:46:42 MSK 2014]. 11 years ago
python-utils-r1.eclass Sync with portage [Mon Jul 7 10:29:26 MSK 2014]. 10 years ago
python.eclass Sync with portage [Thu Feb 6 12:13:25 MSK 2014]. 11 years ago
qmail.eclass Sync with portage [Wed Jan 8 15:55:25 MSK 2014]. 11 years ago
qmake-utils.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
qt4-build.eclass Sync with portage [Tue Nov 12 10:17:06 MSK 2013]. 11 years ago
qt4-r2.eclass Sync with portage [Mon Jun 23 16:46:18 MSK 2014]. 11 years ago
readme.gentoo.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 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 [Mon Apr 21 16:13:48 MSK 2014]. 11 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 [Thu Jan 16 17:49:52 MSK 2014]. 11 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 [Mon Mar 31 09:13:07 MSK 2014]. 11 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 [Sat Mar 22 22:33:30 MSK 2014]. 11 years ago
stardict.eclass Sync with portage [Tue Jun 5 23:18:53 MSK 2012]. 13 years ago
subversion.eclass Sync with portage [Tue Jan 7 17:46:37 MSK 2014]. 11 years ago
sword-module.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago
systemd.eclass Sync with portage [Sat May 31 17:01:49 MSK 2014]. 11 years ago
texlive-common.eclass Sync with portage [Wed Mar 19 11:03:21 MSK 2014]. 11 years ago
texlive-module.eclass Sync with portage [Mon Mar 10 01:12:22 MSK 2014]. 11 years ago
toolchain-binutils.eclass Sync with portage [Sun Jun 8 16:29:28 MSK 2014]. 11 years ago
toolchain-funcs.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
toolchain.eclass Sync with portage [Mon Jun 2 13:39:23 MSK 2014]. 11 years ago
twisted-r1.eclass Sync with portage [Mon Jan 6 21:02:41 MSK 2014]. 11 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 [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
user.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 years ago
vala.eclass Sync with portage [Sun May 4 19:59:25 MSK 2014]. 11 years ago
vcs-snapshot.eclass Sync with portage [Sat Jul 27 21:35:35 MSK 2013]. 11 years ago
vdr-plugin-2.eclass Sync with portage [Sun Feb 9 01:30:53 MSK 2014]. 11 years ago
versionator.eclass Sync with portage [Fri Jul 11 23:20:23 MSK 2014]. 10 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 [Mon Jun 17 18:34:23 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 [Tue Jun 11 17:15:29 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 Mar 7 09:17:54 MSK 2014]. 11 years ago
vmware-bundle.eclass Automatic update [Wed Nov 9 11:33:18 MSK 2011]. 13 years ago
waf-utils.eclass Sync with portage [Wed Apr 16 19:12:21 MSK 2014]. 11 years ago
webapp.eclass Sync with portage [Wed Jul 18 23:38:13 MSK 2012]. 12 years ago
wxwidgets.eclass Sync with portage [Tue Apr 22 19:35:36 MSK 2014]. 11 years ago
x-modular.eclass Sync with portage [Sat Jul 6 13:10:11 MSK 2013]. 12 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 [Fri Feb 28 11:03:23 MSK 2014]. 11 years ago
xorg-2.eclass Sync with portage [Mon Mar 3 10:01:24 MSK 2014]. 11 years ago
zproduct.eclass Sync with portage [Wed Feb 8 10:13:09 MSK 2012]. 13 years ago

readme.gentoo.eclass

# Copyright 1999-2014 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/readme.gentoo.eclass,v 1.12 2014/07/11 08:21:58 ulm 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 [[ -z ${_README_GENTOO_ECLASS} ]]; then
_README_GENTOO_ECLASS=1

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.

# @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
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 || 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

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 ${EPREFIX}/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