Gentoo Archives: gentoo-commits

From: Kent Fredric <kentnl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/rex/
Date: Wed, 09 Sep 2020 08:39:14
Message-Id: 1599640718.834e3cd31b81d3fa3c39ab10b412aeb29da21932.kentnl@gentoo
1 commit: 834e3cd31b81d3fa3c39ab10b412aeb29da21932
2 Author: Ferenc Erki <erkiferenc <AT> gmail <DOT> com>
3 AuthorDate: Mon Sep 7 17:08:24 2020 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 9 08:38:38 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=834e3cd3
7
8 app-admin/rex: bump version to 1.12.2
9
10 Closes: https://github.com/gentoo/gentoo/pull/17454
11 Signed-off-by: Ferenc Erki <erkiferenc <AT> gmail.com>
12 Signed-off-by: Kent Fredric <kentnl <AT> gentoo.org>
13
14 app-admin/rex/Manifest | 1 +
15 app-admin/rex/rex-1.12.2.ebuild | 203 ++++++++++++++++++++++++++++++++++++++++
16 2 files changed, 204 insertions(+)
17
18 diff --git a/app-admin/rex/Manifest b/app-admin/rex/Manifest
19 index 2343566f2db..e5e4e469fd9 100644
20 --- a/app-admin/rex/Manifest
21 +++ b/app-admin/rex/Manifest
22 @@ -1 +1,2 @@
23 DIST Rex-1.12.1.tar.gz 339065 BLAKE2B fd026e66a4e1cf6d4c8b15f7fcba0525a3e98346464170f27d5ef7bb54f1decd7450d87d9f23bee8378df4647eacf512c06a8d051bb76021cbcae472e2c2012d SHA512 774452511d97106bb6586324ff4e8642b05be628c80f3adbba7fd82558c82236878e969512bab398e26a1a7a271a7614108761bd0fb888a2122167806796bad1
24 +DIST Rex-1.12.2.tar.gz 343716 BLAKE2B bb546298305e2e210ea67a21c948f364d3c0ee5947c8d716606fc81cfd07c4b1eea9e6ce8fd3fd49a0cffd33a964e0d328f60d570fa18fa3452b334a7882b279 SHA512 867942eec63ba71b591b93d6c0af794605f86571ef6d1be473989314cb7fc7d4e8d906ef25e30ea56beeaefe953c884661d9b769452587a3d4892de10163b6c7
25
26 diff --git a/app-admin/rex/rex-1.12.2.ebuild b/app-admin/rex/rex-1.12.2.ebuild
27 new file mode 100644
28 index 00000000000..d832e4f2b87
29 --- /dev/null
30 +++ b/app-admin/rex/rex-1.12.2.ebuild
31 @@ -0,0 +1,203 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +if [[ ${PV} == 9999 ]]; then
38 + GITHUB_USER=RexOps
39 + GITHUB_REPO=Rex
40 + EGIT_REPO_URI="https://github.com/${GITHUB_USER}/${GITHUB_REPO}.git"
41 + EGIT_BRANCH="master"
42 + EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}-git"
43 + VCS_ECLASS="git-r3"
44 +else
45 + # This is intentional to stop perl-module.eclass doing magic things when it
46 + # shouldn't. Like making ${S} contain "Rex" when the git clone has "rex"
47 + # Also prevents perl-module.eclass provisioning SRC_URI
48 + DIST_AUTHOR=FERKI
49 + DIST_NAME=Rex
50 + KEYWORDS="~amd64 ~x86"
51 +fi
52 +inherit bash-completion-r1 perl-module ${VCS_ECLASS}
53 +
54 +DESCRIPTION="(R)?ex, the friendly automation framework"
55 +
56 +SLOT="0"
57 +IUSE="minimal test"
58 +RESTRICT="!test? ( test )"
59 +
60 +DZIL_DEPENDS="
61 + dev-perl/Dist-Zilla
62 + dev-perl/Dist-Zilla-Plugin-CheckExtraTests
63 + dev-perl/Dist-Zilla-Plugin-ContributorsFile
64 + dev-perl/Dist-Zilla-Plugin-Git
65 + dev-perl/Dist-Zilla-Plugin-Git-Contributors
66 + dev-perl/Dist-Zilla-Plugin-MakeMaker-Awesome
67 + dev-perl/Dist-Zilla-Plugin-Meta-Contributors
68 + dev-perl/Dist-Zilla-Plugin-MetaProvides-Package
69 + dev-perl/Dist-Zilla-Plugin-NextVersion-Semantic
70 + dev-perl/Dist-Zilla-Plugin-OSPrereqs
71 + dev-perl/Dist-Zilla-Plugin-OurPkgVersion
72 + dev-perl/Dist-Zilla-Plugin-Run
73 + dev-perl/Software-License
74 +"
75 +RDEPEND="
76 + !minimal? (
77 + dev-perl/DBI
78 + dev-perl/Expect
79 + dev-perl/IPC-Shareable
80 + dev-perl/XML-LibXML
81 + )
82 + virtual/perl-Carp
83 + virtual/perl-Data-Dumper
84 + dev-perl/Data-Validate-IP
85 + dev-perl/Devel-Caller
86 + dev-perl/Digest-HMAC
87 + virtual/perl-Digest-MD5
88 + virtual/perl-Exporter
89 + virtual/perl-File-Spec
90 + dev-perl/HTTP-Message
91 + dev-perl/Hash-Merge
92 + virtual/perl-IO
93 + dev-perl/IO-String
94 + dev-perl/IO-Tty
95 + dev-perl/JSON-MaybeXS
96 + dev-perl/List-MoreUtils
97 + virtual/perl-MIME-Base64
98 + dev-perl/Net-OpenSSH
99 + dev-perl/Net-SFTP-Foreign
100 + virtual/perl-Scalar-List-Utils
101 + dev-perl/Parallel-ForkManager
102 + dev-perl/Sort-Naturally
103 + dev-perl/String-Escape
104 + virtual/perl-Storable
105 + dev-perl/TermReadKey
106 + virtual/perl-Test-Simple
107 + dev-perl/Text-Glob
108 + virtual/perl-Text-Tabs+Wrap
109 + virtual/perl-Time-HiRes
110 + dev-perl/URI
111 + dev-perl/XML-Simple
112 + dev-perl/libwww-perl
113 + dev-perl/YAML
114 + virtual/perl-version
115 +"
116 +
117 +BDEPEND="
118 + ${RDEPEND}
119 + >=virtual/perl-CPAN-Meta-Requirements-2.120.620
120 + >=virtual/perl-ExtUtils-MakeMaker-7.110.100
121 + >=dev-perl/File-ShareDir-Install-0.60.0
122 + virtual/perl-Module-Metadata
123 + test? (
124 + virtual/perl-File-Temp
125 + dev-perl/Test-Deep
126 + dev-perl/Test-Output
127 + dev-perl/Test-UseAllModules
128 + virtual/perl-autodie
129 + )
130 +"
131 +
132 +[[ ${PV} == 9999 ]] && BDEPEND+=" ${DZIL_DEPENDS}"
133 +
134 +src_unpack() {
135 + if [[ $PV == 9999 ]]; then
136 + "${VCS_ECLASS}"_src_unpack
137 + mkdir -p "${S}" || die "Can't make ${S}"
138 + else
139 + default
140 + fi
141 +}
142 +
143 +dzil_src_prep() {
144 + einfo "Patching dist.ini"
145 +
146 + # This block of sed invocations removes all plugins that aren't
147 + # useful for users to have on Gentoo, because all of them are
148 + # conditional and subjective style checks, which don't indicate
149 + # a real issue for users, and paying the price of their dependencies is undesired.
150 +
151 + # The {N;d} trick adds the [n]ext line after the match to the pattern-space
152 + # so that the final [d]elete deletes the next line too. Can be expanded for each
153 + # line, ie: {N;N;N;d} deletes 3 lines after the match as well as the match.
154 + sed -e '/^\[Test::Kwalitee\]/d' \
155 + -e '/^\[Test::Perl::Critic\]/d' \
156 + -e '/^\[PodSyntaxTests\]/d' \
157 + -e '/^Test::Kwalitee =/d' \
158 + -e '/^Test::PerlTidy =/d' \
159 + -e '/^Test::Pod =/d' \
160 + -e '/^\[Test::CPAN::Changes\]/{N;d}' \
161 + -e '/^\[OptionalFeature/,/^$/d' \
162 + -e '/^\[Test::MinimumVersion\]/{N;d}' \
163 + -i dist.ini || die "Can't patch dist.ini"
164 +}
165 +dzil_env_setup() {
166 + # NextRelease noise :(
167 + mkdir -p ~/.dzil/
168 + local user="$(whoami)"
169 + local host="$(hostname)"
170 + printf '[%%User]\nname = %s\nemail = %s' "${user}" "${user}@${host}" >> ~/.dzil/config.ini
171 +
172 +}
173 +dzil_to_distdir() {
174 + local dzil_root dest has_missing modname dzil_version
175 + dzil_root="$1"
176 + dest="$2"
177 +
178 + cd "${dzil_root}" || die "Can't enter git workdir '${dzil_root}'";
179 +
180 + dzil_src_prep
181 + dzil_env_setup
182 +
183 + dzil_version="$(dzil version)" || die "Error invoking 'dzil version'"
184 + einfo "Generating CPAN dist with ${dzil_version}"
185 +
186 + has_missing=""
187 +
188 + einfo "Checking dzil authordeps"
189 + while IFS= read -d $'\n' -r modname; do
190 + if [[ -z "${has_missing}" ]]; then
191 + has_missing=1
192 + eerror "'dzil authordeps' indicates missing build dependencies"
193 + eerror "These will prevent building, please report a bug"
194 + eerror "Missing:"
195 + fi
196 + eerror " ${modname}"
197 + done < <( dzil authordeps --missing --versions )
198 +
199 + [[ -z "${has_missing}" ]] || die "Satisfy all missing authordeps first"
200 +
201 + einfo "Checking dzil build deps"
202 + while IFS= read -d $'\n' -r modname; do
203 + if [[ -z "${has_missing}" ]]; then
204 + has_missing=1
205 + ewarn "'dzil listdeps' indicates missing build dependencies"
206 + ewarn "These may prevent building, please report a bug if they do"
207 + ewarn "Missing:"
208 + fi
209 + ewarn " ${modname}"
210 + done < <( dzil listdeps --missing --versions --author )
211 +
212 + einfo "Generating release"
213 + dzil build --notgz --in "${dest}" || die "Unable to build CPAN dist in '${dest}'"
214 +}
215 +
216 +src_prepare() {
217 + if [[ ${PV} == 9999 ]]; then
218 + # Uses git sources in WORKDIR/rex-git
219 + # to generate a CPAN-style tree in ${S}
220 + # before letting perl-module.eclass do the rest
221 + dzil_to_distdir "${EGIT_CHECKOUT_DIR}" "${S}"
222 + fi
223 + cd "${S}" || die "Can't enter build dir"
224 + perl-module_src_prepare
225 +}
226 +
227 +src_install() {
228 + newbashcomp "share/${PN}-tab-completion.bash" "${PN}"
229 +
230 + insinto /usr/share/zsh/site-functions
231 + newins "share/${PN}-tab-completion.zsh" "_${PN}"
232 +
233 + perl-module_src_install
234 +}