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