summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/rex/rex-9999.ebuild')
-rw-r--r--app-admin/rex/rex-9999.ebuild42
1 files changed, 33 insertions, 9 deletions
diff --git a/app-admin/rex/rex-9999.ebuild b/app-admin/rex/rex-9999.ebuild
index d832e4f2b87a..1b5ca9f0db12 100644
--- a/app-admin/rex/rex-9999.ebuild
+++ b/app-admin/rex/rex-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
if [[ ${PV} == 9999 ]]; then
GITHUB_USER=RexOps
@@ -21,6 +21,7 @@ fi
inherit bash-completion-r1 perl-module ${VCS_ECLASS}
DESCRIPTION="(R)?ex, the friendly automation framework"
+HOMEPAGE="https://metacpan.org/dist/Rex https://www.rexify.org"
SLOT="0"
IUSE="minimal test"
@@ -47,6 +48,7 @@ RDEPEND="
dev-perl/Expect
dev-perl/IPC-Shareable
dev-perl/XML-LibXML
+ net-misc/rsync
)
virtual/perl-Carp
virtual/perl-Data-Dumper
@@ -62,11 +64,10 @@ RDEPEND="
dev-perl/IO-String
dev-perl/IO-Tty
dev-perl/JSON-MaybeXS
- dev-perl/List-MoreUtils
virtual/perl-MIME-Base64
dev-perl/Net-OpenSSH
dev-perl/Net-SFTP-Foreign
- virtual/perl-Scalar-List-Utils
+ >=virtual/perl-Scalar-List-Utils-1.450.0
dev-perl/Parallel-ForkManager
dev-perl/Sort-Naturally
dev-perl/String-Escape
@@ -81,8 +82,9 @@ RDEPEND="
dev-perl/libwww-perl
dev-perl/YAML
virtual/perl-version
+ virtual/perl-Term-ANSIColor
"
-
+# NB: would add test? !minimal? Test-mysqld, but I can't get that to work
BDEPEND="
${RDEPEND}
>=virtual/perl-CPAN-Meta-Requirements-2.120.620
@@ -90,18 +92,26 @@ BDEPEND="
>=dev-perl/File-ShareDir-Install-0.60.0
virtual/perl-Module-Metadata
test? (
+ !minimal? (
+ || ( dev-perl/File-LibMagic sys-apps/file )
+ dev-vcs/git
+ )
virtual/perl-File-Temp
+ dev-perl/Sub-Override
dev-perl/Test-Deep
+ dev-perl/Test-Exception
dev-perl/Test-Output
dev-perl/Test-UseAllModules
+ dev-perl/Test-Warnings
virtual/perl-autodie
+ virtual/perl-Module-Load-Conditional
)
"
[[ ${PV} == 9999 ]] && BDEPEND+=" ${DZIL_DEPENDS}"
src_unpack() {
- if [[ $PV == 9999 ]]; then
+ if [[ ${PV} == 9999 ]]; then
"${VCS_ECLASS}"_src_unpack
mkdir -p "${S}" || die "Can't make ${S}"
else
@@ -121,8 +131,9 @@ dzil_src_prep() {
# so that the final [d]elete deletes the next line too. Can be expanded for each
# line, ie: {N;N;N;d} deletes 3 lines after the match as well as the match.
sed -e '/^\[Test::Kwalitee\]/d' \
- -e '/^\[Test::Perl::Critic\]/d' \
-e '/^\[PodSyntaxTests\]/d' \
+ -e '/^Perl::Critic::Freenode =/d' \
+ -e '/^Perl::Critic::TooMuchCode =/d' \
-e '/^Test::Kwalitee =/d' \
-e '/^Test::PerlTidy =/d' \
-e '/^Test::Pod =/d' \
@@ -130,10 +141,16 @@ dzil_src_prep() {
-e '/^\[OptionalFeature/,/^$/d' \
-e '/^\[Test::MinimumVersion\]/{N;d}' \
-i dist.ini || die "Can't patch dist.ini"
+
+ # Removals/additions have to be tracked by git or dzil build fails
+ # Spurious warning during src_prepare
+ git rm -f xt/author/critic-progressive.t || die "Can't rm author/critic-progressive.t"
+ # Spurious warning during src_prepare
+ git rm -f xt/author/perltidy.t || die "Can't rm author/perltidy.t"
}
dzil_env_setup() {
# NextRelease noise :(
- mkdir -p ~/.dzil/
+ mkdir -p ~/.dzil/ || die "mkdir -p ~/.dzil/ failed"
local user="$(whoami)"
local host="$(hostname)"
printf '[%%User]\nname = %s\nemail = %s' "${user}" "${user}@${host}" >> ~/.dzil/config.ini
@@ -146,7 +163,7 @@ dzil_to_distdir() {
cd "${dzil_root}" || die "Can't enter git workdir '${dzil_root}'";
- dzil_src_prep
+ S="${dzil_root}" dzil_src_prep
dzil_env_setup
dzil_version="$(dzil version)" || die "Error invoking 'dzil version'"
@@ -190,6 +207,13 @@ src_prepare() {
dzil_to_distdir "${EGIT_CHECKOUT_DIR}" "${S}"
fi
cd "${S}" || die "Can't enter build dir"
+
+ # If you DIY installed Test::mysqld, but didn't patch
+ # it to handle the fact on Gentoo, mysql_install_db is NOT in PATH
+ # tests fail. So this test is patched out if mysql_install_db is not in PATH
+ if perl_has_module "Test::mysqld" && ! type -P mysql_install_db >/dev/null; then
+ perl_rm_files "t/db.t"
+ fi
perl-module_src_prepare
}