summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-12-27 23:35:42 +0000
committerSam James <sam@gentoo.org>2022-12-27 23:37:02 +0000
commit3ece5e5e0258e7f57458c979ffb91781a66d40ac (patch)
treeac47578e860bb7fa0f0078c79172c5a4fb54e7c0 /app-admin/perl-cleaner
parentdev-python/responses: fix tests (diff)
downloadgentoo-3ece5e5e0258e7f57458c979ffb91781a66d40ac.tar.gz
gentoo-3ece5e5e0258e7f57458c979ffb91781a66d40ac.tar.bz2
gentoo-3ece5e5e0258e7f57458c979ffb91781a66d40ac.zip
app-admin/perl-cleaner: rework portage/pkgcore dependencies
This gives us a runtime-only USE flag but it's better than the alternative which regularly leads to at least portage-utils being depcleaned because pkgcore is installed, and then perl-cleaner being broken at runtime because it doesn't actually detect which to use based on available tools. Closes: https://bugs.gentoo.org/779007 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-admin/perl-cleaner')
-rw-r--r--app-admin/perl-cleaner/metadata.xml14
-rw-r--r--app-admin/perl-cleaner/perl-cleaner-2.30-r1.ebuild45
-rw-r--r--app-admin/perl-cleaner/perl-cleaner-9999.ebuild20
3 files changed, 66 insertions, 13 deletions
diff --git a/app-admin/perl-cleaner/metadata.xml b/app-admin/perl-cleaner/metadata.xml
index d1aa590a84f5..97ce6f33156c 100644
--- a/app-admin/perl-cleaner/metadata.xml
+++ b/app-admin/perl-cleaner/metadata.xml
@@ -1,8 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>perl@gentoo.org</email>
- <name>Gentoo Perl Project</name>
-</maintainer>
+ <maintainer type="project">
+ <email>perl@gentoo.org</email>
+ <name>Gentoo Perl Project</name>
+ </maintainer>
+ <use>
+ <flag name="pkgcore">
+ Use <pkg>sys-apps/pkgcore</pkg> instead of <pkg>sys-apps/portage</pkg>
+ and <pkg>app-portage/portage-utils</pkg>.
+ </flag>
+ </use>
</pkgmetadata>
diff --git a/app-admin/perl-cleaner/perl-cleaner-2.30-r1.ebuild b/app-admin/perl-cleaner/perl-cleaner-2.30-r1.ebuild
new file mode 100644
index 000000000000..ff13ed8ec124
--- /dev/null
+++ b/app-admin/perl-cleaner/perl-cleaner-2.30-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+# TODO: Detect at runtime what's available and fallback if needed, possibly
+# integrate with eselect-package-manager, bug #779007.
+IUSE="pkgcore"
+
+[[ "${PV}" == "9999" ]] && BDEPEND="sys-apps/help2man"
+
+RDEPEND="
+ app-shells/bash
+ dev-lang/perl
+ pkgcore? ( sys-apps/pkgcore )
+ !pkgcore? (
+ app-portage/portage-utils
+ sys-apps/portage
+ )
+"
+
+src_prepare() {
+ default
+ eprefixify ${PN}
+}
+
+src_install() {
+ dosbin perl-cleaner
+ doman perl-cleaner.1
+}
diff --git a/app-admin/perl-cleaner/perl-cleaner-9999.ebuild b/app-admin/perl-cleaner/perl-cleaner-9999.ebuild
index a7624afba081..87ae00a7f9e3 100644
--- a/app-admin/perl-cleaner/perl-cleaner-9999.ebuild
+++ b/app-admin/perl-cleaner/perl-cleaner-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit prefix
@@ -13,20 +13,22 @@ if [[ "${PV}" == "9999" ]] ; then
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 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
LICENSE="GPL-2"
SLOT="0"
-IUSE=""
+IUSE="pkgcore"
-[[ "${PV}" == "9999" ]] && DEPEND="sys-apps/help2man"
+[[ "${PV}" == "9999" ]] && BDEPEND="sys-apps/help2man"
-RDEPEND="app-shells/bash
+RDEPEND="
+ app-shells/bash
dev-lang/perl
- || (
- ( sys-apps/portage app-portage/portage-utils )
- sys-apps/pkgcore
+ pkgcore? ( sys-apps/pkgcore )
+ !pkgcore? (
+ app-portage/portage-utils
+ sys-apps/portage
)
"