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

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