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