app-misc/nnn: add 4.7

Closes: https://bugs.gentoo.org/783228
Closes: https://bugs.gentoo.org/857534
Signed-off-by: Sebastian Hamann <code@ares-macrotechnology.com>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
Sebastian Hamann
2023-02-01 08:16:17 +02:00
committed by Joonas Niilola
parent 099bc8bfec
commit a2cc1e770b
3 changed files with 106 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
DIST nnn-4.0.tar.gz 214555 BLAKE2B b0490662bad07213ff79b8865b8d9672d1ff98d93e3705e0aa45d103c151274934dc0cff66731f7b157007a81b9dbb5d9f3edb6a17daddcfb265f73b6faa400e SHA512 fde552a31674c9bf50a2e98de4456621bdc97aee36cd5efd7ad0cc33959965d01469fb20b12868ebffd4c8da79990b502e26895cb5b047ac8821e2ca09b0a234
DIST nnn-4.3.tar.gz 236606 BLAKE2B cec0a73a40fae76e478c3299e2ae8a613c2e1b16e009d4f69cc3c9c9f6ea5df4048fc7f941ae6369293cf56df9b91a496531f4b34bf05f1dbbf8fab9120ffe78 SHA512 588af174d86db14acf5d1e2ac42f88ca5c6f0e105996a58771e7e0f989f224616e7a12d74fecc96540a9782db0cf8857c21bf0f50df4ee3b4b5c641291c64575
DIST nnn-4.5.tar.gz 242191 BLAKE2B 2a1564520222bc51df64c495ffa7a22fc3200f4572281e4b4e998e999b41c171f4b832502a054741040fa9d87d0da0d0d23949c0d867fc4c2830722045654c3d SHA512 ab64f0e6211b14e90a4632bb0da9a1214635c9a06718c7c434d344d69d1087b4d5d978d44f38c1b03bb555e3055ca5033bcbca40927135757a468e6f1b99046e
DIST nnn-4.7.tar.gz 250038 BLAKE2B b63da6ac8a0ac6b8b2bce0ed45c43c9e707f11f99e6b456131728d7fde5f638162d8e3bbf1b3a0fadba315d38d9cc1b38c0d4a644ee800fbea00ffe1c92beef0 SHA512 28ec9b9ab93f979d77e80957df2a70ec687e56ada6d5e8555c121f2454b5c049466120e5eb3570174411a61e3855c869f96d306a43516cceff8c4cb7f1075875
+11
View File
@@ -2,4 +2,15 @@
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<use>
<flag name="8contexts">Enable 8 contexts (instead of 4)</flag>
<flag name="qsort">Use Alexey Tourbin's quick sort implementation</flag>
<flag name="icons">Display icons using icons-in-terminal</flag>
<flag name="nerdfonts">Display icons using nerdfonts icons</flag>
<flag name="emoji">Display icons using emoji</flag>
<flag name="colemak">Key bindings for Colemak-DH keyboard layout</flag>
<flag name="gitstatus">Add git status column to the detail view</flag>
<flag name="namefirst">Print filenames first in the detail view</flag>
<flag name="restorepreview">Add pipe to close and restore preview-tui for internal undetached edits</flag>
</use>
</pkgmetadata>
+94
View File
@@ -0,0 +1,94 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit bash-completion-r1 flag-o-matic toolchain-funcs xdg-utils
DESCRIPTION="The missing terminal file browser for X"
HOMEPAGE="https://github.com/jarun/nnn"
SRC_URI="https://github.com/jarun/nnn/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc64 ~x86"
IUSE="+readline pcre 8contexts icons nerdfonts emoji qsort colemak gitstatus namefirst restorepreview"
DEPEND="sys-libs/ncurses:=
pcre? ( dev-libs/libpcre )
readline? ( sys-libs/readline:= )
elibc_musl? ( sys-libs/fts-standalone )"
BDEPEND="virtual/pkgconfig"
RDEPEND="${DEPEND}"
REQUIRED_USE="?? ( icons nerdfonts emoji )"
src_prepare() {
default
tc-export CC
use elibc_musl && append-flags "-lfts"
# When using nnn's bundled patches, the 'install' target should not depend
# on 'all'. See: https://github.com/jarun/nnn/issues/1493
sed -i -e 's/install: all/install:/' Makefile || die "sed failed"
}
src_compile() {
nnn_opts=(
O_NORL=$(usex readline 0 1)
O_PCRE=$(usex pcre 1 0)
O_CTX8=$(usex 8contexts 1 0)
O_ICONS=$(usex icons 1 0)
O_NERD=$(usex nerdfonts 1 0)
O_EMOJI=$(usex emoji 1 0)
O_QSORT=$(usex qsort 1 0)
# nnn's user-submitted patches
O_COLEMAK=$(usex colemak 1 0)
O_GITSTATUS=$(usex gitstatus 1 0)
O_NAMEFIRST=$(usex namefirst 1 0)
O_RESTOREPREVIEW=$(usex restorepreview 1 0)
)
emake "${nnn_opts[@]}"
}
src_install() {
emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" install
emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" install-desktop
newbashcomp misc/auto-completion/bash/nnn-completion.bash nnn
insinto /usr/share/fish/vendor_completions.d
doins misc/auto-completion/fish/nnn.fish
insinto /usr/share/zsh/site-functions
doins misc/auto-completion/zsh/_nnn
einstalldocs
insinto /usr/share/nnn
doins -r plugins
}
pkg_postinst() {
xdg_desktop_database_update
elog "nnn plugins are installed to /usr/share/nnn/plugins/, but nnn does not"
elog "load them fom this directory. You will need to copy/symlink them to"
elog "~/.config/nnn/plugins/ if you want to use them."
elog "Note that some plugins have runtime dependencies that may need to be installed."
elog "Refer to the individual plugin's in-file documentation for more information."
if use icons; then
elog "In order for file icons to work, your terminal needs to use icons-in-terminal."
elog "See https://github.com/sebastiencs/icons-in-terminal"
elif use nerdfonts; then
elog "In order for file icons to work, your terminal needs to use a patched nerdfont."
elog "See https://www.nerdfonts.com/"
elif use emoji; then
elog "In order for file icons to work, your terminal needs to use a font that"
elog "includes standard unicode emoji."
fi
}
pkg_postrm() {
xdg_desktop_database_update
}