From 01233808796a1cadcb14f04ae2bd53f357216566 Mon Sep 17 00:00:00 2001
From: Ionen Wolkens <ionen@gentoo.org>
Date: Fri, 13 Jan 2023 21:09:09 -0500
Subject: app-misc/ranger: EAPI7->8, use pep517 + single impl

wrt single, not aware of anything using ranger site-packages directly,
please file of a bug if was actually useful for something.

Also preemptively cleanup python3_8 as target is about to get removed.

Closes: https://bugs.gentoo.org/800650
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
---
 app-misc/ranger/Manifest               |  1 +
 app-misc/ranger/ranger-1.9.3-r1.ebuild | 41 ++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 app-misc/ranger/ranger-1.9.3-r1.ebuild

(limited to 'app-misc/ranger')

diff --git a/app-misc/ranger/Manifest b/app-misc/ranger/Manifest
index 463e10d6436c..c817f322d2ac 100644
--- a/app-misc/ranger/Manifest
+++ b/app-misc/ranger/Manifest
@@ -1 +1,2 @@
+DIST ranger-1.9.3.gh.tar.gz 280363 BLAKE2B 2698f82773aae0224e7385413a1f939cdd4b3374eddad496781a42b054e26a8d7e5944bf19bc846736a9171df317c0dbc3c8bdf83c6ca9bdb95de17f9229809e SHA512 5cd7bea714a6542d0a5445f5f0cf929b2df4377df3ef710f3786c6c46dd58b017a8060cde3969076637bfaac03c13297d3020fd82f4574dc49546ca223c0e8d3
 DIST ranger-1.9.3.tar.gz 280363 BLAKE2B 2698f82773aae0224e7385413a1f939cdd4b3374eddad496781a42b054e26a8d7e5944bf19bc846736a9171df317c0dbc3c8bdf83c6ca9bdb95de17f9229809e SHA512 5cd7bea714a6542d0a5445f5f0cf929b2df4377df3ef710f3786c6c46dd58b017a8060cde3969076637bfaac03c13297d3020fd82f4574dc49546ca223c0e8d3
diff --git a/app-misc/ranger/ranger-1.9.3-r1.ebuild b/app-misc/ranger/ranger-1.9.3-r1.ebuild
new file mode 100644
index 000000000000..7343792b5712
--- /dev/null
+++ b/app-misc/ranger/ranger-1.9.3-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_SINGLE_IMPL=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE="ncurses"
+inherit distutils-r1 xdg
+
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/ranger/ranger.git"
+else
+	SRC_URI="https://github.com/ranger/ranger/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
+	KEYWORDS="~amd64 ~ppc ~riscv ~x86"
+fi
+
+DESCRIPTION="Vim-inspired file manager for the console"
+HOMEPAGE="https://ranger.github.io/"
+
+LICENSE="GPL-3"
+SLOT="0"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+	distutils-r1_src_prepare
+
+	sed -i "s|share/doc/ranger|share/doc/${PF}|" setup.py doc/ranger.1 || die
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+
+	if [[ ! ${REPLACING_VERSIONS} ]]; then
+		elog "${PN^} has many optional dependencies to support enhanced file previews."
+		elog "See ${EROOT}/usr/share/doc/${PF}/README.md* for more details."
+	fi
+}
-- 
cgit v1.2.3-65-gdbad