summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-02-21 23:18:56 +0000
committerMichał Górny <mgorny@gentoo.org>2013-02-21 23:18:56 +0000
commitb510a64bab1ceb55eee983540c3b703d5b309fa6 (patch)
tree15b5f8c29a742f711d380e78b6cc48bc049291b5 /eclass
parentindent (diff)
downloadgentoo-2-b510a64bab1ceb55eee983540c3b703d5b309fa6.tar.gz
gentoo-2-b510a64bab1ceb55eee983540c3b703d5b309fa6.tar.bz2
gentoo-2-b510a64bab1ceb55eee983540c3b703d5b309fa6.zip
Support EXAMPLES to install examples in a consistent manner.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/distutils-r1.eclass35
2 files changed, 34 insertions, 6 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 218f8530a433..df61d3beec6e 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.678 2013/02/18 09:43:18 hd_brummy Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.679 2013/02/21 23:18:56 mgorny Exp $
+
+ 21 Feb 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
+ Support EXAMPLES to install examples in a consistent manner.
18 Feb 2013; Joerg Bornkessel <hd_brummy@gentoo.org> vdr-plugin.eclass:
vdr-plugin.eclass, add eerror to get .eclass depricated
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index e662fa24af90..df46d598dc14 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.53 2013/02/11 09:46:07 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.54 2013/02/21 23:18:56 mgorny Exp $
# @ECLASS: distutils-r1
# @MAINTAINER:
@@ -151,7 +151,25 @@ fi
#
# Example:
# @CODE
-# HTML_DOCS=( doc/html/ )
+# HTML_DOCS=( doc/html/. )
+# @CODE
+
+# @ECLASS-VARIABLE: EXAMPLES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# An array containing examples installed into 'examples' doc
+# subdirectory. The files and directories listed there must exist
+# in the directory from which distutils-r1_python_install_all() is run
+# (${S} by default).
+#
+# The 'examples' subdirectory will be marked not to be compressed
+# automatically.
+#
+# If unset, no examples will be installed.
+#
+# Example:
+# @CODE
+# EXAMPLES=( examples/. demos/. )
# @CODE
# @ECLASS-VARIABLE: DISTUTILS_IN_SOURCE_BUILD
@@ -487,7 +505,7 @@ distutils-r1_python_install_all() {
if declare -p DOCS &>/dev/null; then
# an empty list == don't install anything
if [[ ${DOCS[@]} ]]; then
- dodoc -r "${DOCS[@]}" || die "dodoc failed"
+ dodoc -r "${DOCS[@]}"
fi
else
local f
@@ -495,13 +513,20 @@ distutils-r1_python_install_all() {
for f in README* ChangeLog AUTHORS NEWS TODO CHANGES \
THANKS BUGS FAQ CREDITS CHANGELOG; do
if [[ -s ${f} ]]; then
- dodoc "${f}" || die "(default) dodoc ${f} failed"
+ dodoc "${f}"
fi
done
fi
if declare -p HTML_DOCS &>/dev/null; then
- dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed"
+ dohtml -r "${HTML_DOCS[@]}"
+ fi
+
+ if declare -p EXAMPLES &>/dev/null; then
+ local DOCDESTTREE=examples
+ dodoc -r "${EXAMPLES[@]}"
+
+ docompress -x /usr/share/doc/${PF}/examples
fi
}