From f6114f43b7c5c556273a520c43d20bf7baad32e6 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 | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/srcpkgs/nnn/template b/srcpkgs/nnn/template index cea82d368152..8b8e2d9a406d 100644 --- a/srcpkgs/nnn/template +++ b/srcpkgs/nnn/template @@ -1,11 +1,19 @@ # Template file for 'nnn' pkgname=nnn version=4.6 -revision=1 +revision=2 build_style=gnu-makefile +make_build_args="O_PCRE=$(vopt_if pcre 1 0) + 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_MATCHFLTR=$(vopt_if matchfilter 1 0) + O_STATIC=$(vopt_if static 1 0)" make_install_target="install install-desktop" hostmakedepends="pkg-config" -makedepends="ncurses-devel readline-devel" +makedepends="ncurses-devel readline-devel $(vopt_if static gpm-devel) $(vopt_if pcre pcre-devel)" short_desc="Missing terminal file browser for X" maintainer="Dennis Kraus " license="BSD-2-Clause" @@ -14,6 +22,29 @@ changelog="https://raw.githubusercontent.com/jarun/nnn/master/CHANGELOG" distfiles="https://github.com/jarun/nnn/archive/v${version}.tar.gz" checksum=15acaf9a88cfb5a2a640d3ef55a48af644fba92b46aac0768efe94c4addf7e3f +build_options="ecre + icons + nerdfont + emojis + qsort + ctx8 + matchfilter + static" + +# See https://github.com/jarun/nnn/wiki/Developer-guides#make-options +desc_option_pcre="PCRE instead of POSIX regex" +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_qsort="Alexey Tourbin's QSORT" +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" + +# Following are mutually exclusive +vopt_conflict icons nerdfont +vopt_conflict nerdfont emojis +vopt_conflict emojis icons + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then makedepends+=" musl-fts-devel" fi