*/*: [QA] Fix trivial cases of MissingTestRestrict
[gentoo.git] / dev-perl / Schedule-Cron-Events / Schedule-Cron-Events-1.950.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 DIST_AUTHOR=KOHTS
7 DIST_VERSION=1.95
8
9 inherit perl-module
10
11 DESCRIPTION="Take a line from a crontab and find out when events will occur"
12
13 SLOT="0"
14 KEYWORDS="~amd64"
15 IUSE="test examples"
16 RESTRICT="!test? ( test )"
17
18 RDEPEND="virtual/perl-Time-Local
19         dev-perl/Set-Crontab"
20 DEPEND="${RDEPEND}
21         virtual/perl-ExtUtils-MakeMaker
22         test? (
23                 virtual/perl-Data-Dumper
24                 virtual/perl-Test
25                 virtual/perl-Test-Simple
26                 dev-perl/Test-Deep
27         )"
28
29 src_prepare() {
30         perl-module_src_prepare
31         mkdir "${S}"/examples/ || die
32         mv "${S}/cron_event_predict.plx" "${S}/examples/cron_event_predict.plx" || die
33         sed -i 's|^cron_event_predict.plx|examples/cron_event_predict.plx|' "${S}"/MANIFEST || die
34         sed -i "/cron_event_predict.plx/d" Makefile.PL || die
35 }
36 src_install() {
37         perl-module_src_install
38         if use examples; then
39                 docompress -x /usr/share/doc/${PF}/examples
40                 dodoc -r examples
41         fi
42 }