From 14866757225815b9374acfc8453518951e0f910d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 8 Aug 2024 12:38:45 +0100 Subject: gentoo auto-resync : 08:08:2024 - 12:38:45 --- app-misc/ranger/Manifest | 3 +- .../files/ranger-1.9.3-color-crash-fix.patch | 25 ++++++++++++ app-misc/ranger/ranger-1.9.3-r1.ebuild | 41 -------------------- app-misc/ranger/ranger-1.9.3-r2.ebuild | 45 ++++++++++++++++++++++ 4 files changed, 72 insertions(+), 42 deletions(-) create mode 100644 app-misc/ranger/files/ranger-1.9.3-color-crash-fix.patch delete mode 100644 app-misc/ranger/ranger-1.9.3-r1.ebuild create mode 100644 app-misc/ranger/ranger-1.9.3-r2.ebuild (limited to 'app-misc/ranger') diff --git a/app-misc/ranger/Manifest b/app-misc/ranger/Manifest index 18c2c17c5739..62aa57ae88f4 100644 --- a/app-misc/ranger/Manifest +++ b/app-misc/ranger/Manifest @@ -1,4 +1,5 @@ +AUX ranger-1.9.3-color-crash-fix.patch 1077 BLAKE2B 4063deae9b17023d30f5308cb3187e6215d3e37b84404d02d38cecda7cd33928f4f416c13e5933ae60cdeaabf9c25a8ab693d3d0824b361ce7d471c70e54ba58 SHA512 b03afde4670813be7a17c2c273d91323868d4051f4d06f9ab79e05bd62b9520b08556a095dd52ecb429a0b22ce4bf78c86c5b025393502319f29068df1e4c322 DIST ranger-1.9.3.gh.tar.gz 280363 BLAKE2B 2698f82773aae0224e7385413a1f939cdd4b3374eddad496781a42b054e26a8d7e5944bf19bc846736a9171df317c0dbc3c8bdf83c6ca9bdb95de17f9229809e SHA512 5cd7bea714a6542d0a5445f5f0cf929b2df4377df3ef710f3786c6c46dd58b017a8060cde3969076637bfaac03c13297d3020fd82f4574dc49546ca223c0e8d3 -EBUILD ranger-1.9.3-r1.ebuild 1000 BLAKE2B f317d8d49721673c85bdcfc4c0df384ba8af2dd33fc3c2876eda9b7b0598acec3d58b11475f6da83a4ce444223d48f3f1d1638c4fac3c8bb2a8b92c3d5a775bc SHA512 59d6f4129441ce0a29dddaf72d2e10373be8edeebd3310ff7f4c5921fbcfed71a48525af9fc04148eb6a03ffd5b23a68a0a1ad2ee9d6a4db82df3be99882798b +EBUILD ranger-1.9.3-r2.ebuild 1055 BLAKE2B 099de9bfc8d33d34d686eb1ce42f83e0520b704f62550ec649f6475ca46a3a8c7a6f4563e6ed3abb2660e11c4d436fe22cbadb335b7c2ee4ec64eae8578a1460 SHA512 721a70fc02119a6354d0f761d590dff7c24085e8dcce2407fdfd72a1bb146a0b20bd4769cdc3620c9f32762c4ea6793601c4a99fd59fb4d3bb61e745bbfd8abb EBUILD ranger-9999.ebuild 1024 BLAKE2B 531a541cd68640631542a782b3fe529ee12e69ec3499179f16a5d2eb6fe5d6b85cf5acf1f098df38dd8df1db277cef13e483ebf1b2f5f697460debc86585cf98 SHA512 fe17f4b644013bb43f33c8b9e5dbc1eb209c4a89bfdd857ac3d501f19c1d0524b408165db9c4e4e92503aa7823f9367648bf79917bc5664c467001b669604b2f MISC metadata.xml 1023 BLAKE2B 9876633c736dac3f07968e6d8cffebba44eeeb69a644b04978912a621b6950a1d0eef52cae8044f18feae0a9706e21898116f68302e61ffb73a74c942814d9c0 SHA512 65844b6f3b7ca5a7e0c36a487fa336a28be54444d1e45d58f31f1144c8475d9b830eea000a0795318cfc2ccadc18374e0ea5234739e85851e9d712c8f42c1685 diff --git a/app-misc/ranger/files/ranger-1.9.3-color-crash-fix.patch b/app-misc/ranger/files/ranger-1.9.3-color-crash-fix.patch new file mode 100644 index 000000000000..4d28c529eca2 --- /dev/null +++ b/app-misc/ranger/files/ranger-1.9.3-color-crash-fix.patch @@ -0,0 +1,25 @@ +Backport of crash fix when previewing some files with colors. +https://forums.gentoo.org/viewtopic-t-1170286.html +https://github.com/ranger/ranger/commit/82eef55b1664 +https://github.com/ranger/ranger/commit/642d594b8328 (also needed) +--- a/ranger/gui/color.py ++++ b/ranger/gui/color.py +@@ -20,5 +20,6 @@ + DEFAULT_FOREGROUND = curses.COLOR_WHITE + DEFAULT_BACKGROUND = curses.COLOR_BLACK +-COLOR_PAIRS = {10: 0} ++# Color pair 0 is wired to white on black and cannot be changed ++COLOR_PAIRS = {(DEFAULT_FOREGROUND, DEFAULT_BACKGROUND): 0} + + +@@ -31,4 +32,10 @@ + try: + curses.init_pair(size, fg, bg) ++ except ValueError: ++ # We're trying to add more pairs than the terminal can store, ++ # approximating to the closest color pair that's already stored ++ # would be cool but the easier solution is to just fall back to the ++ # default fore and background colors, pair 0 ++ COLOR_PAIRS[key] = 0 + except curses.error: + # If curses.use_default_colors() failed during the initialization diff --git a/app-misc/ranger/ranger-1.9.3-r1.ebuild b/app-misc/ranger/ranger-1.9.3-r1.ebuild deleted file mode 100644 index 161d96848cd0..000000000000 --- a/app-misc/ranger/ranger-1.9.3-r1.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2024 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..12} ) -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 - -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 -} diff --git a/app-misc/ranger/ranger-1.9.3-r2.ebuild b/app-misc/ranger/ranger-1.9.3-r2.ebuild new file mode 100644 index 000000000000..28989e2d080d --- /dev/null +++ b/app-misc/ranger/ranger-1.9.3-r2.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2024 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..12} ) +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}"/${P}-color-crash-fix.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 +} -- cgit v1.2.3