commit: 535b81644901cbce9df3885c15602a38db380331
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 11 21:44:10 2016 +0000
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Apr 11 21:48:42 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=535b8164
perl-functions.eclass: Add new function perl_doexamples
eclass/perl-functions.eclass | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
index e9c3fcb..1542b98 100644
--- a/eclass/perl-functions.eclass
+++ b/eclass/perl-functions.eclass
@@ -298,3 +298,24 @@ perl_check_env() {
eerror "Your environment settings may lead to undefined behavior and/or
build failures."
die "Please fix your environment ( ~/.bashrc, package.env, ... ), see
above for details."
}
+
+# @FUNCTION: perl_doexamples
+# @USAGE: perl_doexamples "file_1" "file_2"
+# @DESCRIPTION:
+# Install example files ready-to-run.
+# Is called under certain circumstances in perl-module.eclass src_install
+# (see the documentation there).
+#
+perl_doexamples() {
+ debug-print-function $FUNCNAME "$@"
+
+ einfo "Installing examples into /usr/share/doc/${PF}/examples"
+
+ # no compression since we want ready-to-run scripts
+ docompress -x /usr/share/doc/${PF}/examples
+
+ docinto examples/
+ dodoc -r $@
+
+ # is there a way to undo "docinto" ?
+}