From 282edd04c8fd26c938f9a2b673e5757ec1d3765a Mon Sep 17 00:00:00 2001 From: Freddy List Date: Mon, 19 Sep 2022 10:33:34 +0200 Subject: [PATCH] nnn: add build options --- srcpkgs/nnn/template | 85 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/srcpkgs/nnn/template b/srcpkgs/nnn/template index cea82d368152..63752e4d6383 100644 --- a/srcpkgs/nnn/template +++ b/srcpkgs/nnn/template @@ -1,7 +1,7 @@ # Template file for 'nnn' pkgname=nnn version=4.6 -revision=1 +revision=2 build_style=gnu-makefile make_install_target="install install-desktop" hostmakedepends="pkg-config" @@ -14,6 +14,84 @@ changelog="https://raw.githubusercontent.com/jarun/nnn/master/CHANGELOG" distfiles="https://github.com/jarun/nnn/archive/v${version}.tar.gz" checksum=15acaf9a88cfb5a2a640d3ef55a48af644fba92b46aac0768efe94c4addf7e3f +# Package build options +build_options="readline \ +pcre \ +mouse \ +batch \ +fifo \ +session \ +details \ +icons \ +nerdfont \ +emojis \ +locale \ +x11 \ +qsort \ +bench \ +ctx8 \ +matchfilter \ +sort \ +colemak \ +gitstatus \ +namefirst \ +restorepreview \ +static" +build_options_default="readline mouse batch fifo session details locale x11 sort" + +# See https://github.com/jarun/nnn/wiki/Developer-guides#make-options +desc_option_pcre="Link with PCRE library" +desc_option_mouse="Mouse support" +desc_option_batch="Built-in feature-limited batch renamer" +#desc_option_fifo="" +#desc_option_session="" +desc_option_details="User, group details in status bar" +desc_option_icons="icons-in-terminal support, not compatible with set nerdfont or emojis or unset locale" +desc_option_nerdfont="Nerdfont icons, not compatible with set icons or emojis or unset locale" +desc_option_emojis="Emoji icons, not compatible with set nerdfont or icons or unset locale" +desc_option_locale="Locale support, unsupported characters in filenames will be replaced with '?' when unset" +desc_option_qsort="Alexey Tourbin's QSORT" +desc_option_bench="Benchmark mode" +desc_option_ctx8="Enable 8 contexts, however, saved sessions may no longer be usable" +desc_option_matchfilter="Matching filters only, discard filter key when there's no match" +desc_option_sort="Load directories sorted, unsetting requires xterm 256 colors" + +# See https://github.com/jarun/nnn/tree/master/patches#user-patch-framework +desc_option_colemak="Key bindings for Colemak-DH keyboard layout" +desc_option_gitstatus="Add git status column to the detail view" +desc_option_namefirst="Print filenames first in the detail view" +desc_option_restorepreview="Add pipe to close and restore preview-tui for internal undetached edits (e key)" + +# Following are mutually exclusive +vopt_conflict icons nerdfont +vopt_conflict nerdfont emojis +vopt_conflict emojis icons + +make_build_args="O_NORL=$(vopt_if readline 0 1) \ +O_PCRE=$(vopt_if pcre 1 0) \ +O_NOLC=$(vopt_if locale 0 1) \ +O_NOMOUSE=$(vopt_if mouse 0 1) \ +O_NOBATCH=$(vopt_if batch 0 1) \ +O_NOFIFO=$(vopt_if fifo 0 1) \ +O_CTX8=$(vopt_if ctx8 1 0) \ +O_ICONS=$(vopt_if icons 1 0) \ +O_NERD=$(vopt_if nerdfont 1 0) \ +O_EMOJI=$(vopt_if emojis 1 0) \ +O_QSORT=$(vopt_if qsort 1 0) \ +O_BENCH=$(vopt_if bench 1 0) \ +O_NOSSN=$(vopt_if session 0 1) \ +O_NOUG=$(vopt_if details 0 1) \ +O_NOX11=$(vopt_if x11 0 1) \ +O_MATCHFLTR=$(vopt_if matchfilter 1 0) \ +O_NOSORT=$(vopt_if sort 0 1) \ +O_COLEMAK=$(vopt_if colemak 1 0) \ +O_GITSTATUS=$(vopt_if gitstatus 1 0) \ +O_NAMEFIRST=$(vopt_if namefirst 1 0) \ +O_RESTOREPREVIEW=$(vopt_if restorepreview 1 0) \ +O_STATIC=$(vopt_if static 1 0)" + +makedepends+=$(vopt_if static " gpm-devel") + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then makedepends+=" musl-fts-devel" fi @@ -24,6 +102,11 @@ pre_build() { fi } +# See https://github.com/jarun/nnn/issues/1493 +pre_install() { + touch nnn +} + post_install() { vinstall misc/auto-completion/bash/nnn-completion.bash 644 \ usr/share/bash-completion/completions nnn