public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-misc/nnn/, app-misc/nnn/files/
@ 2023-10-08 15:46 Joonas Niilola
  0 siblings, 0 replies; 2+ messages in thread
From: Joonas Niilola @ 2023-10-08 15:46 UTC (permalink / raw
  To: gentoo-commits

commit:     e4c87cab3a0629e3201f5201b2a843806155b778
Author:     Sebastian Hamann <code <AT> ares-macrotechnology <DOT> com>
AuthorDate: Sun Aug 27 12:34:49 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Oct  8 15:46:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4c87cab

app-misc/nnn: add 4.9

Drop colemak-dh USE flag. Rationale:
The patch is broken and upstream does not maintain it any
longer.

Include patch for colemak from upstream PR #1744.

Signed-off-by: Sebastian Hamann <code <AT> ares-macrotechnology.com>
Closes: https://github.com/gentoo/gentoo/pull/32472
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-misc/nnn/Manifest                              |  1 +
 app-misc/nnn/files/nnn-4.9_fix_colemak_patch.patch | 29 +++++++
 app-misc/nnn/nnn-4.9.ebuild                        | 96 ++++++++++++++++++++++
 3 files changed, 126 insertions(+)

diff --git a/app-misc/nnn/Manifest b/app-misc/nnn/Manifest
index 16261ed54a50..8968e6018682 100644
--- a/app-misc/nnn/Manifest
+++ b/app-misc/nnn/Manifest
@@ -1 +1,2 @@
 DIST nnn-4.8.tar.gz 253547 BLAKE2B 36e6e1dc39bfbce7fa72fd322339395fa78a410c93043860be845ff3d5be3178fd37966f57da17f115cab8a6973462d44243052a6c736665ef9a180cd9fd6978 SHA512 932e27ec1d7cd3db6ccba33edb3d1ad2620109cde3c4114b734eef3e04d6c6c22ddaa1c4727908dba2a107dd4cfe1f5193aec450f680a390671f48e63d0133bd
+DIST nnn-4.9.tar.gz 255144 BLAKE2B 3ad257f931dee7803c44f9f4db478a8de0c898a2d8e818457aeb00dcc7936a0a1f51ce3c199a1421a014d197c7f9d2f17bccccbc985b93d78e5994b9cc707c94 SHA512 3c16ed1cbc5466b05306e38c6f5d8eb7ade9cf5ad766f9ff3bf7d20d5bfb9bdf1564527e27191e2cd85542c25245f338e1236630de3d1c8e5fbd10d54d628a14

diff --git a/app-misc/nnn/files/nnn-4.9_fix_colemak_patch.patch b/app-misc/nnn/files/nnn-4.9_fix_colemak_patch.patch
new file mode 100644
index 000000000000..b4078c945753
--- /dev/null
+++ b/app-misc/nnn/files/nnn-4.9_fix_colemak_patch.patch
@@ -0,0 +1,29 @@
+diff --git a/patches/colemak/mainline.diff b/patches/colemak/mainline.diff
+index 09cdfe61..387fde0c 100644
+--- a/patches/colemak/mainline.diff
++++ b/patches/colemak/mainline.diff
+@@ -3,10 +3,10 @@
+ #
+ # Author: github.com/jacmoe
+ diff --git a/src/nnn.c b/src/nnn.c
+-index ecedee43..fdf5a80e 100644
++index 21a7370b..2ddb4053 100644
+ --- a/src/nnn.c
+ +++ b/src/nnn.c
+-@@ -5098,32 +5098,32 @@ static void show_help(const char *path)
++@@ -5109,12 +5109,12 @@ static void show_help(const char *path)
+  	"2(___n))\n"
+  	"0\n"
+  	"1NAVIGATION\n"
+@@ -23,8 +23,9 @@ index ecedee43..fdf5a80e 100644
+ +	       "9G ^N  End%20^J  Toggle auto-advance on open\n"
+  	      "8B (,)  Book(mark)%11b ^/  Select bookmark\n"
+  		"a1-4  Context%11(Sh)Tab  Cycle/new context\n"
+- 	    "62Esc ^Q  Quit%20q  Quit context\n"
+- 		 "b^G  QuitCD%18Q  Pick/err, quit\n"
++ 	    "62Esc ^Q  Quit%19^y  Next young\n"
++@@ -5122,20 +5122,20 @@ static void show_help(const char *path)
++ 		  "cq  Quit context\n"
+  	"0\n"
+  	"1FILTER & PROMPT\n"
+ -		  "c/  Filter%17^N  Toggle type-to-nav\n"

diff --git a/app-misc/nnn/nnn-4.9.ebuild b/app-misc/nnn/nnn-4.9.ebuild
new file mode 100644
index 000000000000..4819666da402
--- /dev/null
+++ b/app-misc/nnn/nnn-4.9.ebuild
@@ -0,0 +1,96 @@
+# 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
+
+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="8contexts colemak emoji gitstatus icons namefirst nerdfonts pcre qsort +readline 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 )"
+
+PATCHES=(
+	"${FILESDIR}/nnn-4.9_fix_colemak_patch.patch"
+)
+
+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
+	insopts -m0755
+	doins -r plugins
+	fperms 0644 /usr/share/nnn/plugins/README.md
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+
+	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
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-misc/nnn/, app-misc/nnn/files/
@ 2024-10-17  7:30 Joonas Niilola
  0 siblings, 0 replies; 2+ messages in thread
From: Joonas Niilola @ 2024-10-17  7:30 UTC (permalink / raw
  To: gentoo-commits

commit:     479d0caa5e1cb7c6798ca1c2a333081afff9f6bc
Author:     Sebastian Hamann <code <AT> ares-macrotechnology <DOT> com>
AuthorDate: Mon Aug 26 16:18:54 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Oct 17 07:30:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=479d0caa

app-misc/nnn: add 5.0

Signed-off-by: Sebastian Hamann <code <AT> ares-macrotechnology.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-misc/nnn/Manifest                           |  1 +
 app-misc/nnn/files/nnn-5.0_fix_strcasecmp.patch | 12 ++++
 app-misc/nnn/nnn-5.0.ebuild                     | 96 +++++++++++++++++++++++++
 3 files changed, 109 insertions(+)

diff --git a/app-misc/nnn/Manifest b/app-misc/nnn/Manifest
index 8968e6018682..8687e1646064 100644
--- a/app-misc/nnn/Manifest
+++ b/app-misc/nnn/Manifest
@@ -1,2 +1,3 @@
 DIST nnn-4.8.tar.gz 253547 BLAKE2B 36e6e1dc39bfbce7fa72fd322339395fa78a410c93043860be845ff3d5be3178fd37966f57da17f115cab8a6973462d44243052a6c736665ef9a180cd9fd6978 SHA512 932e27ec1d7cd3db6ccba33edb3d1ad2620109cde3c4114b734eef3e04d6c6c22ddaa1c4727908dba2a107dd4cfe1f5193aec450f680a390671f48e63d0133bd
 DIST nnn-4.9.tar.gz 255144 BLAKE2B 3ad257f931dee7803c44f9f4db478a8de0c898a2d8e818457aeb00dcc7936a0a1f51ce3c199a1421a014d197c7f9d2f17bccccbc985b93d78e5994b9cc707c94 SHA512 3c16ed1cbc5466b05306e38c6f5d8eb7ade9cf5ad766f9ff3bf7d20d5bfb9bdf1564527e27191e2cd85542c25245f338e1236630de3d1c8e5fbd10d54d628a14
+DIST nnn-5.0.tar.gz 258474 BLAKE2B d8d5ca626c163ae3adbce9260f48b7c09673ffa70c3f9707ed85a077477f0cf1ce46ca1c91811539863f0a25a1289cb5f136180e10b872ce854744a507d79740 SHA512 648889de4e636882bf92d45a9fe273288858d76a28e34c6fcb27fc3d1e1b576eaec7e611f55a7f809a067ebf5a09c3a209ad84f44e2da528cfce71ed98a7a999

diff --git a/app-misc/nnn/files/nnn-5.0_fix_strcasecmp.patch b/app-misc/nnn/files/nnn-5.0_fix_strcasecmp.patch
new file mode 100644
index 000000000000..15fcdaca3c64
--- /dev/null
+++ b/app-misc/nnn/files/nnn-5.0_fix_strcasecmp.patch
@@ -0,0 +1,12 @@
+diff --git a/src/icons-hash.c b/src/icons-hash.c
+index f0f2b0947..699af33b5 100644
+--- a/src/icons-hash.c
++++ b/src/icons-hash.c
+@@ -23,6 +23,7 @@
+ 
+ #include <stdio.h>
+ #include <string.h>
++#include <strings.h>
+ #include <stdlib.h>
+ #include <limits.h>
+ #include "icons.h"

diff --git a/app-misc/nnn/nnn-5.0.ebuild b/app-misc/nnn/nnn-5.0.ebuild
new file mode 100644
index 000000000000..934a1b8efc83
--- /dev/null
+++ b/app-misc/nnn/nnn-5.0.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2024 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
+
+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 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="8contexts colemak emoji gitstatus icons namefirst nerdfonts pcre qsort +readline 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 )"
+
+PATCHES=(
+	"${FILESDIR}/nnn-5.0_fix_strcasecmp.patch"
+)
+
+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
+	insopts -m0755
+	doins -r plugins
+	fperms 0644 /usr/share/nnn/plugins/README.md
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+
+	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
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-17  7:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-17  7:30 [gentoo-commits] repo/gentoo:master commit in: app-misc/nnn/, app-misc/nnn/files/ Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2023-10-08 15:46 Joonas Niilola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox