summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2016-04-11 23:44:10 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2016-04-11 23:48:42 +0200
commit535b81644901cbce9df3885c15602a38db380331 (patch)
tree218e94c43e8b40d45c3c15534656fa499b730c4d
parentnet-misc/netctl: bump to 1.11 (diff)
downloadgentoo-535b81644901cbce9df3885c15602a38db380331.tar.gz
gentoo-535b81644901cbce9df3885c15602a38db380331.tar.bz2
gentoo-535b81644901cbce9df3885c15602a38db380331.zip
perl-functions.eclass: Add new function perl_doexamples
-rw-r--r--eclass/perl-functions.eclass21
1 files changed, 21 insertions, 0 deletions
diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
index e9c3fcbda0f6..1542b98cd45f 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" ?
+}