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: Thu, 30 Jul 2020 09:48:14
Message-Id: 1596102421.035bf924263ce3c55e0b42d4560c3dbcdd239b6c.kentnl@gentoo
1 commit: 035bf924263ce3c55e0b42d4560c3dbcdd239b6c
2 Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 30 09:47:01 2020 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 30 09:47:01 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=035bf924
7
8 dev-perl/Device-SerialPort: -r bump for EAPI7 & Fixes
9
10 - EAPI7
11 - Fix license as best as possible
12 - Ensure CFLAGS passed to make/compiler
13 - Indent wiki link slightly for clearer readability
14
15 Bug: https://bugs.gentoo.org/734728
16 Package-Manager: Portage-2.3.103, Repoman-2.3.22
17 Signed-off-by: Kent Fredric <kentnl <AT> gentoo.org>
18
19 .../Device-SerialPort-1.40.0-r3.ebuild | 59 ++++++++++++++++++++++
20 1 file changed, 59 insertions(+)
21
22 diff --git a/dev-perl/Device-SerialPort/Device-SerialPort-1.40.0-r3.ebuild b/dev-perl/Device-SerialPort/Device-SerialPort-1.40.0-r3.ebuild
23 new file mode 100644
24 index 00000000000..1964f6c577e
25 --- /dev/null
26 +++ b/dev-perl/Device-SerialPort/Device-SerialPort-1.40.0-r3.ebuild
27 @@ -0,0 +1,59 @@
28 +# Copyright 1999-2020 Gentoo Authors
29 +# Distributed under the terms of the GNU General Public License v2
30 +
31 +EAPI=7
32 +
33 +DIST_AUTHOR=COOK
34 +DIST_VERSION=1.04
35 +DIST_EXAMPLES=("eg/*")
36 +inherit perl-module
37 +
38 +DESCRIPTION="A Serial port Perl Module"
39 +# https://bugs.gentoo.org/734728
40 +LICENSE="GPL-2+"
41 +SLOT="0"
42 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~sparc ~x86"
43 +
44 +#From the module:
45 +# If you run 'make test', you must make sure that nothing is plugged
46 +# into '/dev/ttyS1'!
47 +# Doesn't sound wise to enable SRC_TEST="do" - mcummings
48 +
49 +src_configure() {
50 + myconf=()
51 + [[ -n "${DEVICE_SERIALPORT_PORT}" ]] && myconf+=( "TESTPORT=${DEVICE_SERIALPORT_PORT}" )
52 + perl-module_src_configure
53 +}
54 +src_compile() {
55 + mymake=(
56 + "OPTIMIZE=${CFLAGS}"
57 + )
58 + perl-module_src_compile
59 +}
60 +src_test() {
61 + local MODULES=(
62 + "Device::SerialPort ${DIST_VERSION}"
63 + )
64 + local failed=()
65 + for dep in "${MODULES[@]}"; do
66 + ebegin "Compile testing ${dep}"
67 + perl -Mblib="${S}" -M"${dep} ()" -e1
68 + eend $? || failed+=( "$dep" )
69 + done
70 + if [[ ${failed[@]} ]]; then
71 + echo
72 + eerror "One or more modules failed compile:";
73 + for dep in "${failed[@]}"; do
74 + eerror " ${dep}"
75 + done
76 + die "Failing due to module compilation errors";
77 + fi
78 + if [[ -n "${DEVICE_SERIALPORT_PORT}" ]]; then
79 + DIST_TEST="do"; # Parallel testing a serial port sounds unsmart.
80 + perl-module_src_test;
81 + else
82 + ewarn "Functional tests are disabled without manual intervention."
83 + ewarn "For details, read:"
84 + ewarn " https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}#Tests"
85 + fi
86 +}