summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRepository mirror & CI <repomirrorci@gentoo.org>2019-11-10 20:29:37 +0000
committerRepository mirror & CI <repomirrorci@gentoo.org>2019-11-10 20:29:37 +0000
commit1011f5ddedff338421757017f88678c79578b938 (patch)
tree00d3c017202fafbb62f8a954d5b6d694bd7e3bc6
parent2019-11-10 19:26:38 UTC (diff)
parentapp-admin/perl-cleaner: Version bump (diff)
downloadgentoo-1011f5ddedff338421757017f88678c79578b938.tar.gz
gentoo-1011f5ddedff338421757017f88678c79578b938.tar.bz2
gentoo-1011f5ddedff338421757017f88678c79578b938.zip
Merge updates from master
-rw-r--r--app-admin/perl-cleaner/Manifest1
-rw-r--r--app-admin/perl-cleaner/perl-cleaner-2.28.ebuild41
-rw-r--r--eclass/distutils-r1.eclass60
3 files changed, 102 insertions, 0 deletions
diff --git a/app-admin/perl-cleaner/Manifest b/app-admin/perl-cleaner/Manifest
index 27d2c0adf8c4..c7ac625a7929 100644
--- a/app-admin/perl-cleaner/Manifest
+++ b/app-admin/perl-cleaner/Manifest
@@ -1 +1,2 @@
DIST perl-cleaner-2.27.tar.bz2 7493 BLAKE2B 03d8bc336fd0a42bce16c4bf8b2272a7ff24d605b483af777ef7ab3d59accd0082709200705638ab116934f675b17c5cf109c40a3ab739654ff64abebd8c0558 SHA512 097d68dff30da198636f73fc44600f1863c7f69f87110315bb83297c96d826f2f101f56ab546fde94ff60ca00da0aaa569fefea3c2599155f3bd69c66fb42ed6
+DIST perl-cleaner-2.28.tar.bz2 7222 BLAKE2B 8b90b6d7be8b21de3de2d946baba2ea96e145072c1d6cb4fc9a45bd2181941155791e022f59139fbd440fd1dbc16a76e635e5d4bb420e9051efd87aa08a3aa0d SHA512 c53f2a48002ab45ec0e43cbdc6153792a540efb9ce9a272388707987a76a292a1f90ece85e2f5dfa94f75a1afae13a5768d3712f183ca9d10fa0c559bba132d5
diff --git a/app-admin/perl-cleaner/perl-cleaner-2.28.ebuild b/app-admin/perl-cleaner/perl-cleaner-2.28.ebuild
new file mode 100644
index 000000000000..8fe627b27446
--- /dev/null
+++ b/app-admin/perl-cleaner/perl-cleaner-2.28.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit prefix
+
+DESCRIPTION="User land tool for cleaning up old perl installs"
+HOMEPAGE="https://www.gentoo.org/proj/en/perl/"
+
+if [[ "${PV}" == "9999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/gentoo-perl/perl-cleaner.git"
+else
+ SRC_URI="mirror://gentoo/${P}.tar.bz2 https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+[[ "${PV}" == "9999" ]] && DEPEND="sys-apps/help2man"
+
+RDEPEND="app-shells/bash
+ dev-lang/perl
+ || (
+ ( sys-apps/portage app-portage/portage-utils )
+ sys-apps/pkgcore
+ )
+"
+
+src_prepare() {
+ default
+ eprefixify ${PN}
+}
+
+src_install() {
+ dosbin perl-cleaner
+ doman perl-cleaner.1
+}
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index d3eb8f22ead2..2edffdb2d7c5 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -232,6 +232,66 @@ fi
# }
# @CODE
+# @FUNCTION: distutils_enable_tests
+# @USAGE: <test-runner>
+# @DESCRIPTION:
+# Set up IUSE, RESTRICT, BDEPEND and python_test() for running tests
+# with the specified test runner. Also copies the current value
+# of RDEPEND to test?-BDEPEND. The test-runner argument must be one of:
+#
+# - nose: nosetests (dev-python/nose)
+# - pytest: dev-python/pytest
+# - unittest: for built-in Python unittest module
+#
+# This function is meant as a helper for common use cases, and it only
+# takes care of basic setup. You still need to list additional test
+# dependencies manually. If you have uncommon use case, you should
+# not use it and instead enable tests manually.
+#
+# This function must be called in global scope, after RDEPEND has been
+# declared. Take care not to overwrite the variables set by it.
+distutils_enable_tests() {
+ debug-print-function ${FUNCNAME} "${@}"
+ [[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: test-runner"
+
+ [[ ${EAPI} == [56] ]] && local BDEPEND
+
+ IUSE+=" test"
+ RESTRICT+=" !test? ( test )"
+ BDEPEND+=" test? ("
+
+ case ${1} in
+ nose)
+ BDEPEND+=" dev-python/nose[${PYTHON_USEDEP}]"
+ python_test() {
+ nosetests -v || die "Tests fail with ${EPYTHON}"
+ }
+ ;;
+ pytest)
+ BDEPEND+=" dev-python/pytest[${PYTHON_USEDEP}]"
+ python_test() {
+ pytest -vv || die "Tests fail with ${EPYTHON}"
+ }
+ ;;
+ unittest)
+ python_test() {
+ "${EPYTHON}" -m unittest discover -v ||
+ die "Tests fail with ${EPYTHON}"
+ }
+ ;;
+ *)
+ die "${FUNCNAME}: unsupported argument: ${1}"
+ esac
+
+ BDEPEND+=" ${RDEPEND} )"
+
+ [[ ${EAPI} == [56] ]] && DEPEND+=" ${BDEPEND}"
+
+ # we need to ensure successful return in case we're called last,
+ # otherwise Portage may wrongly assume sourcing failed
+ return 0
+}
+
# @FUNCTION: esetup.py
# @USAGE: [<args>...]
# @DESCRIPTION: