--- /home/nrk/nnn-4.0.ebuild 2021-05-22 17:41:22.301656248 +0600 +++ nnn-4.0.ebuild 2021-05-22 20:12:09.792944042 +0600 @@ -12,15 +12,29 @@ LICENSE="BSD-2" SLOT="0" KEYWORDS="~amd64 ~ppc64 ~x86" +IUSE="+readline +mouse +batch-renamer + 8context nerd-icons" DEPEND="sys-libs/ncurses:0= - sys-libs/readline:0=" + readline? ( sys-libs/readline:0= )" RDEPEND="${DEPEND}" src_prepare() { default tc-export CC sed -i -e '/install: all/install:/' Makefile || die "sed failed" + + nnnopts=( + O_NORL=$(usex readline 0 1) + O_NOMOUSE=$(usex mouse 0 1) + O_NOBATCH=$(usex batch-renamer 0 1) + O_CTX8=$(usex 8context 1 0) + O_NERD=$(usex nerd-icons 1 0) + ) +} + +src_compile() { + emake "${nnnopts[@]}" } src_install() { @@ -41,6 +55,12 @@ pkg_postinst() { xdg_desktop_database_update + + if use nerd-icons ; then + ewarn "In order for nerd-icons to work your terminal font must be set to one of the Nerd-Fonts." + ewarn "You can get a Nerd-Font from here: https://www.nerdfonts.com" + ewarn "Alternatively, you can use the Nerd-Font Patcher to create your own Nerd-Font." + fi } pkg_postrm() {