Gentoo Archives: gentoo-commits

From: Kent Fredric <kentnl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/CDDB/
Date: Sun, 15 Oct 2017 23:56:16
Message-Id: 1508111755.0d52ae38a34300eb38c5f7e0d789f4c2640ed47f.kentnl@gentoo
1 commit: 0d52ae38a34300eb38c5f7e0d789f4c2640ed47f
2 Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 15 23:53:50 2017 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 15 23:55:55 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d52ae38
7
8 dev-perl/CDDB: EAPI6 / Testing overhaul
9
10 - EAPI6
11 - Add lots of missing deps
12 - Add basic test capacity which doesn't require network IO
13 - Document/advertise Network IO
14 - Advertise optional dependencies
15
16 Package-Manager: Portage-2.3.8, Repoman-2.3.3
17
18 dev-perl/CDDB/CDDB-1.222.0-r2.ebuild | 84 ++++++++++++++++++++++++++++++++++++
19 1 file changed, 84 insertions(+)
20
21 diff --git a/dev-perl/CDDB/CDDB-1.222.0-r2.ebuild b/dev-perl/CDDB/CDDB-1.222.0-r2.ebuild
22 new file mode 100644
23 index 00000000000..b39c4d8b858
24 --- /dev/null
25 +++ b/dev-perl/CDDB/CDDB-1.222.0-r2.ebuild
26 @@ -0,0 +1,84 @@
27 +# Copyright 1999-2017 Gentoo Foundation
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +EAPI=6
31 +
32 +DIST_AUTHOR=RCAPUTO
33 +DIST_VERSION=1.222
34 +DIST_EXAMPLES=( "eg/*" )
35 +inherit perl-module
36 +
37 +DESCRIPTION="high-level interface to cddb/freedb protocol"
38 +
39 +SLOT="0"
40 +KEYWORDS="~amd64 ~ia64 ~ppc ~sparc ~x86"
41 +IUSE="test"
42 +
43 +RDEPEND="
44 + >=virtual/perl-Carp-1.260.0
45 + >=virtual/perl-Encode-2.510.0
46 + >=virtual/perl-IO-1.310.0
47 + >=virtual/perl-MIME-Base64-3.130.0
48 +"
49 +DEPEND="
50 + >=virtual/perl-ExtUtils-MakeMaker-6.300.0
51 + test? (
52 + $RDEPEND
53 + >=virtual/perl-Scalar-List-Utils-1.290.0
54 + >=virtual/perl-Test-Simple-0.980.0
55 + )
56 +"
57 +optdep_installed() {
58 + local chr=" "
59 + has_version "${1}" && chr="I"
60 + printf '[%s] %s\n' "${chr}" "${1}";
61 +}
62 +
63 +optdep_notice() {
64 + elog "This package has support for optional features via the following packages"
65 + elog "which you may want to install seperately:"
66 + elog
67 + elog " - Support for submitting disc changes via email:"
68 + elog " $(optdep_installed ">=dev-perl/MailTools-2.40.0")"
69 + elog " $(optdep_installed ">=virtual/perl-MIME-Base64-3.130.0")"
70 + if use test; then
71 + elog
72 + elog "Additional tests may be performed automatically if the above packages"
73 + elog "are pre-installed."
74 + fi
75 +}
76 +
77 +pkg_postinst() {
78 + use test || optdep_notice
79 +}
80 +
81 +src_test() {
82 + optdep_notice
83 + local MODULES=(
84 + # https://rt.cpan.org/Ticket/Display.html?id=123290
85 + "CDDB 1.220"
86 + )
87 + local failed=()
88 + for dep in "${MODULES[@]}"; do
89 + ebegin "Compile testing ${dep}"
90 + perl -Mblib="${S}" -M"${dep} ()" -e1
91 + eend $? || failed+=( "$dep" )
92 + done
93 + if [[ ${failed[@]} ]]; then
94 + echo
95 + eerror "One or more modules failed compile:";
96 + for dep in "${failed[@]}"; do
97 + eerror " ${dep}"
98 + done
99 + die "Failing due to module compilation errors";
100 + fi
101 +
102 + if has network ${DIST_TEST_OVERRIDE:-${DIST_TEST:-do parallel}}; then
103 + perl_rm_files t/release-pod-coverage.t t/release-pod-syntax.t t/000-report-versions.t
104 + perl-module_src_test
105 + else
106 + ewarn "This package needs network access to run functional tests."
107 + ewarn "For details, see:"
108 + ewarn "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/dev-perl/CDDB"
109 + fi
110 +}