diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2025-01-04 19:10:37 -0500 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2025-01-04 19:21:03 -0500 |
commit | 9236888aaf7b3b8ca17f9bcaebbe8f2c9977991b (patch) | |
tree | 6737d81cea65e9bc57b062bfd14f3d11529f7e70 /app-misc | |
parent | app-misc/resolve-march-native: 6.0.1 (with experimental Clang support) (diff) | |
download | gentoo-9236888aaf7b3b8ca17f9bcaebbe8f2c9977991b.tar.gz gentoo-9236888aaf7b3b8ca17f9bcaebbe8f2c9977991b.tar.bz2 gentoo-9236888aaf7b3b8ca17f9bcaebbe8f2c9977991b.zip |
app-misc/ranger: backport ncurses usage fix affecting bulkrename
Fix is not in the 1.9.x stable branch right now, but backport appears
to work fine with it as-is.
Closes: https://github.com/gentoo/gentoo/pull/39977
Thanks-to: Adrian Schollmeyer
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/ranger/files/ranger-1.9.4-ncurses-bulkrename.patch | 27 | ||||
-rw-r--r-- | app-misc/ranger/ranger-1.9.4-r1.ebuild | 49 |
2 files changed, 76 insertions, 0 deletions
diff --git a/app-misc/ranger/files/ranger-1.9.4-ncurses-bulkrename.patch b/app-misc/ranger/files/ranger-1.9.4-ncurses-bulkrename.patch new file mode 100644 index 000000000000..39dddf8480ac --- /dev/null +++ b/app-misc/ranger/files/ranger-1.9.4-ncurses-bulkrename.patch @@ -0,0 +1,27 @@ +:bulkrename is broken[1] when using >=ncurses-6.4_p20231209 or so. + +Backport of [2]. + +[1] https://github.com/ranger/ranger/issues/2934 +[2] https://github.com/ranger/ranger/pull/3039 +--- a/ranger/gui/ui.py ++++ b/ranger/gui/ui.py +@@ -119,7 +119,8 @@ + self.setup() + self.win.addstr("loading...") +- self.win.refresh() + self._draw_title = curses.tigetflag('hs') # has_status_line + ++ self.win.refresh() ++ + self.update_size() + self.is_on = True +@@ -142,8 +143,4 @@ + curses.nocbreak() + curses.echo() +- try: +- curses.curs_set(1) +- except curses.error: +- pass + if self.settings.mouse_enabled: + _setup_mouse(dict(value=False)) diff --git a/app-misc/ranger/ranger-1.9.4-r1.ebuild b/app-misc/ranger/ranger-1.9.4-r1.ebuild new file mode 100644 index 000000000000..3fe00135df13 --- /dev/null +++ b/app-misc/ranger/ranger-1.9.4-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2025 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_{10..13} ) +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 ~arm ~arm64 ~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 + +PATCHES=( + "${FILESDIR}"/${PN}-1.9.3-color-crash-fix.patch + "${FILESDIR}"/${PN}-1.9.4-ncurses-bulkrename.patch +) + +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 +} |