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/Device-SerialPort/
Date: Fri, 20 Oct 2017 07:40:18
Message-Id: 1508485191.b5dfb800693ccbf78a0b90c1603ce6200af48228.kentnl@gentoo
1 commit: b5dfb800693ccbf78a0b90c1603ce6200af48228
2 Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 20 07:39:28 2017 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 20 07:39:51 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5dfb800
7
8 dev-perl/Device-SerialPort: EAPI6 + Basic tests
9
10 - EAPI6
11 - Add compile tests
12 - Fence/Document advanced testing
13 - Add USE="examples"
14
15 Package-Manager: Portage-2.3.8, Repoman-2.3.3
16
17 .../Device-SerialPort-1.40.0-r2.ebuild | 53 ++++++++++++++++++++++
18 1 file changed, 53 insertions(+)
19
20 diff --git a/dev-perl/Device-SerialPort/Device-SerialPort-1.40.0-r2.ebuild b/dev-perl/Device-SerialPort/Device-SerialPort-1.40.0-r2.ebuild
21 new file mode 100644
22 index 00000000000..175ab8c6cee
23 --- /dev/null
24 +++ b/dev-perl/Device-SerialPort/Device-SerialPort-1.40.0-r2.ebuild
25 @@ -0,0 +1,53 @@
26 +# Copyright 1999-2017 Gentoo Foundation
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=6
30 +
31 +DIST_AUTHOR=COOK
32 +DIST_VERSION=1.04
33 +DIST_EXAMPLES=("eg/*")
34 +inherit perl-module
35 +
36 +DESCRIPTION="A Serial port Perl Module"
37 +
38 +SLOT="0"
39 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~sparc ~x86"
40 +IUSE=""
41 +
42 +#From the module:
43 +# If you run 'make test', you must make sure that nothing is plugged
44 +# into '/dev/ttyS1'!
45 +# Doesn't sound wise to enable SRC_TEST="do" - mcummings
46 +
47 +src_configure() {
48 + myconf=()
49 + [[ -n "${DEVICE_SERIALPORT_PORT}" ]] && myconf+=( "TESTPORT=${DEVICE_SERIALPORT_PORT}" )
50 + perl-module_src_configure
51 +}
52 +src_test() {
53 + local MODULES=(
54 + "Device::SerialPort ${DIST_VERSION}"
55 + )
56 + local failed=()
57 + for dep in "${MODULES[@]}"; do
58 + ebegin "Compile testing ${dep}"
59 + perl -Mblib="${S}" -M"${dep} ()" -e1
60 + eend $? || failed+=( "$dep" )
61 + done
62 + if [[ ${failed[@]} ]]; then
63 + echo
64 + eerror "One or more modules failed compile:";
65 + for dep in "${failed[@]}"; do
66 + eerror " ${dep}"
67 + done
68 + die "Failing due to module compilation errors";
69 + fi
70 + if [[ -n "${DEVICE_SERIALPORT_PORT}" ]]; then
71 + DIST_TEST="do"; # Parallel testing a serial port sounds unsmart.
72 + perl-module_src_test;
73 + else
74 + ewarn "Functional tests are disabled without manual intervention."
75 + ewarn "For details, read:"
76 + ewarn "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/dev-perl/Device-SerialPort"
77 + fi
78 +}