pkgsrc/sysutils/nnn/Makefile

74 lines
2.2 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.22 2020/08/23 22:31:29 sjmulder Exp $
DISTNAME= nnn-3.4
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_GITHUB:=jarun/}
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= sjmulder@NetBSD.org
HOMEPAGE= https://github.com/jarun/nnn/
COMMENT= Optimized, feature-packed terminal file manager
LICENSE= 2-clause-bsd
USE_TOOLS+= gmake pkg-config
nnn: Update to 3.1 Package changes: - Now installs completions for fish, zsh, and bash. - New option 'mouse' (enabled by default) makes mouse support optional. - New option 'pcre' (enabled by default) for Perl regular expressions. - Removed checksum for deleted patch-src_nnn.c in distinfo. Upstream changes: - unlimited bookmarks and plugin keys - status bar text in context color - support config `NO_COLOR` to disable colors - config `NNN_OPTS` to specify binary options to `nnn` - config `NNN_MCLICK` to emulate configurable key - toggle selection on right click - ignore hard links when calculating disk usage - dim (hard/sym) link names (symlink to file has `@`) - more special keys at empty filter prompt in _type-to-nav_ - key `>` to export file list - option `-F` to show fortune in help and settings screen - option `-T` to specify sort order (obsoletes `-v`) - option to clear sort order - key `T` to change time type (access/change/mod) - `.nmv` - internal fully-functional batch renamer plugin - make var `O_NOBATCH` to disable native batch renamer - `nuke` & `imgview` - open all images in directory sxiv - `nuke` - open log files in vi - plugin `x2sel` - system clipboard to selection copier - plugin `fzy` - cd using z database - plugin `fzopen` - support `FZF_DEFAULT_COMMAND` - create new context on TAB without prompt - hover and connect by dir name (within config dir) - move to next entry on current file delete - on single file copy/move, select the copied/moved file - option `-f` to to use readline history file (off by default) - use `s` in status bar to indicate selection in progress - make var `O_NOMOUSE` to disable mouse support - do not store `NNN_TRASH` and `-Q` in config/session - add sample .desktop file for XDG compatible DEs - rename _nav-as-you-type_ to _type-to-nav_ mode - fix PCRE case-insensitive regex search - fix no error msg when filter length limit exceeded - fix static package generation - fix broken abort message when started in du-mode - fix filter lost on context switch in non _type-to-nav_ mode - fix broken readline prompt - fix long strings treated as action keys in filter prompt - fix `NNNLVL` not reset when spawned shell is exited
2020-04-29 11:29:38 +02:00
USE_CURSES= wide set_escdelay
INSTALLATION_DIRS+= share/bash-completion/completions
INSTALLATION_DIRS+= share/fish/vendor_completions.d
INSTALLATION_DIRS+= share/zsh/site-functions
nnn: Update to 2.9 Package changes: - New debug option - Fix for build failure CentOS & RHEL 6 - Workaround for startup crash on NetBSD Upstream changes: - all keybinds and options reviewed by the team and frozen (see #422) - reduced number of keybinds - greatly improved help screen readability - nuke: sample opener (CLI-only by default) and plugin - fast line redraws instead of full screen refresh (thanks @annagrram) - auto archive handling by extension (see config NNN_ARCHIVE) - Lead key simplified to bookmark key (<b> or <^/>) - single key to toggle order (<t> or <^T>) - plugins - .cbcp: copy selection to system clipboard (internal, program option -x) - .ntfy: show noti on cp, mv, rm completion (internal, program option -x) - autojump: navigate using autojump - upload: paste text files to http://ix.io, upload rest to https://file.io - all fuzzy plugins modified to support both fzf and fzy - more control on plugins - prefix - to skip directory refresh after running (cmd as) plugin - suffix * to skip confirmation after running cmd as plugin - indicate range selection mode with * - list keys at bookmark and plugin key prompts - visit to pinned dir like bookmarks (Bookmark key followed by <,>) - toggle executable (key <*>) - show mime along with file details - more special keys at empty filter prompt: - apply the last filter (<^L>) - toggle between string and regex (</>) - toggle case-sensitivity (<:>) - retain filter on <Esc>, <Up>, <Down> - show filter details when filter is on - remove option to run filter as cmd on prompt key (can be disruptive) - program options - option -x: enable notis and copy selection to system clipboard - option -g: regex filters (string filter is default now) - option -Q: quit program without confirmation - option -s: load session - option -n: start in nav-as-you-type mode - option -v: version sort - option -V: show program version - option -A: disable dir auto-select - ISO 8601 compliant date in status bar - ported to Haiku OS (thanks @annagrram) - sort only filtered entries (to avoid directory refresh) - fix getplugs to install hidden files - fix several selection issues (see #400) - fix detail mode not restored on loading session - fix symlink to directory not auto-selected - fix regex error on partial regex patterns - fix symlink not shown if stat(2) on target fails - fix flags when spawning a CLI opener as default FM - fix issue with stat flag on Sun (no support for dirent.d_type) - fix current file in current context not saved correctly in session - signed source distribution on release - simplified debugging with line numbers in logs
2020-01-28 15:31:19 +01:00
.include "../../mk/bsd.prefs.mk"
# NetBSD:
# Prevent pulling in builtin termcap which conflicts with ncurses'
# implementation, causing a crash at startup. See:
# https://github.com/jarun/nnn/issues/445
#
# Illumos:
# -lreadline links to system curses, causing conflicts with ncurses
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS"
nnn: Update to 2.9 Package changes: - New debug option - Fix for build failure CentOS & RHEL 6 - Workaround for startup crash on NetBSD Upstream changes: - all keybinds and options reviewed by the team and frozen (see #422) - reduced number of keybinds - greatly improved help screen readability - nuke: sample opener (CLI-only by default) and plugin - fast line redraws instead of full screen refresh (thanks @annagrram) - auto archive handling by extension (see config NNN_ARCHIVE) - Lead key simplified to bookmark key (<b> or <^/>) - single key to toggle order (<t> or <^T>) - plugins - .cbcp: copy selection to system clipboard (internal, program option -x) - .ntfy: show noti on cp, mv, rm completion (internal, program option -x) - autojump: navigate using autojump - upload: paste text files to http://ix.io, upload rest to https://file.io - all fuzzy plugins modified to support both fzf and fzy - more control on plugins - prefix - to skip directory refresh after running (cmd as) plugin - suffix * to skip confirmation after running cmd as plugin - indicate range selection mode with * - list keys at bookmark and plugin key prompts - visit to pinned dir like bookmarks (Bookmark key followed by <,>) - toggle executable (key <*>) - show mime along with file details - more special keys at empty filter prompt: - apply the last filter (<^L>) - toggle between string and regex (</>) - toggle case-sensitivity (<:>) - retain filter on <Esc>, <Up>, <Down> - show filter details when filter is on - remove option to run filter as cmd on prompt key (can be disruptive) - program options - option -x: enable notis and copy selection to system clipboard - option -g: regex filters (string filter is default now) - option -Q: quit program without confirmation - option -s: load session - option -n: start in nav-as-you-type mode - option -v: version sort - option -V: show program version - option -A: disable dir auto-select - ISO 8601 compliant date in status bar - ported to Haiku OS (thanks @annagrram) - sort only filtered entries (to avoid directory refresh) - fix getplugs to install hidden files - fix several selection issues (see #400) - fix detail mode not restored on loading session - fix symlink to directory not auto-selected - fix regex error on partial regex patterns - fix symlink not shown if stat(2) on target fails - fix flags when spawning a CLI opener as default FM - fix issue with stat flag on Sun (no support for dirent.d_type) - fix current file in current context not saved correctly in session - signed source distribution on release - simplified debugging with line numbers in logs
2020-01-28 15:31:19 +01:00
READLINE_DEFAULT= readline
.endif
# clock_gettime() on older glibc (eg RHEL 6). See:
nnn: Update to 2.9 Package changes: - New debug option - Fix for build failure CentOS & RHEL 6 - Workaround for startup crash on NetBSD Upstream changes: - all keybinds and options reviewed by the team and frozen (see #422) - reduced number of keybinds - greatly improved help screen readability - nuke: sample opener (CLI-only by default) and plugin - fast line redraws instead of full screen refresh (thanks @annagrram) - auto archive handling by extension (see config NNN_ARCHIVE) - Lead key simplified to bookmark key (<b> or <^/>) - single key to toggle order (<t> or <^T>) - plugins - .cbcp: copy selection to system clipboard (internal, program option -x) - .ntfy: show noti on cp, mv, rm completion (internal, program option -x) - autojump: navigate using autojump - upload: paste text files to http://ix.io, upload rest to https://file.io - all fuzzy plugins modified to support both fzf and fzy - more control on plugins - prefix - to skip directory refresh after running (cmd as) plugin - suffix * to skip confirmation after running cmd as plugin - indicate range selection mode with * - list keys at bookmark and plugin key prompts - visit to pinned dir like bookmarks (Bookmark key followed by <,>) - toggle executable (key <*>) - show mime along with file details - more special keys at empty filter prompt: - apply the last filter (<^L>) - toggle between string and regex (</>) - toggle case-sensitivity (<:>) - retain filter on <Esc>, <Up>, <Down> - show filter details when filter is on - remove option to run filter as cmd on prompt key (can be disruptive) - program options - option -x: enable notis and copy selection to system clipboard - option -g: regex filters (string filter is default now) - option -Q: quit program without confirmation - option -s: load session - option -n: start in nav-as-you-type mode - option -v: version sort - option -V: show program version - option -A: disable dir auto-select - ISO 8601 compliant date in status bar - ported to Haiku OS (thanks @annagrram) - sort only filtered entries (to avoid directory refresh) - fix getplugs to install hidden files - fix several selection issues (see #400) - fix detail mode not restored on loading session - fix symlink to directory not auto-selected - fix regex error on partial regex patterns - fix symlink not shown if stat(2) on target fails - fix flags when spawning a CLI opener as default FM - fix issue with stat flag on Sun (no support for dirent.d_type) - fix current file in current context not saved correctly in session - signed source distribution on release - simplified debugging with line numbers in logs
2020-01-28 15:31:19 +01:00
# https://github.com/jarun/nnn/issues/453
MAKE_ENV.Linux+= LDLIBS=-lrt
sysutils/nnn: Update to 3.3 Changes: - subdir mounts for remote and archive mounts - remove mount point on successful unmount of remote/archive - show error and prompt user if cp/mv/rm operation fails - support absolute/relative paths in cp/mv as - mark current path automatically on archive/remote mount - mark current path automatically on target file visit in find and list mode - option -C to place HW cursor on hovered for screen readers and braille displays - option -u to use selection (if available) and skip current/sel prompt - key Alt+Esc to clear filter prompt and redraw - support Esc to cancel remove operation - gpge & gpgd: encrypt and decrypt with GPG - blknew: create new files and directories in bulk - preview-tui: - unified to support tmux/kitty/xterm/$TERMINAL - auto-determine split orientation based on terminal height and width - provision to use scope.sh and pistol - various other improvements - upload: send to Firefox Send if ffsend is found - hexview: add hx as alternative hex viewer - nuke and imgview: add imv as alternative image viewer - add find (with fd) and grep (with rg) examples in plugins doc - key Esc or left click to resend hovered file path to NNN_FIFO - show + instead of s in status bar on selection - F5 removed (misfit for toggle hidden), ^S removed (often masked, redundant) - handle abnormal program termination and remove NNN_PIPE and/or NNN_FIFO - clear selection after successful batch rename, link creation - make option O_CTX8 for 8 contexts (NOT backward compatible with 4 contexts) - fix issue with child window resize (see #656) - fix issue with NNNLVL on macOS (see #639) - fix issue with restoring session with du/au enabled Package changes: - New 8 context mode is enabled - Patches have been merged
2020-07-14 14:51:01 +02:00
CFLAGS+= -DCTX8
CFLAGS.SunOS+= -D__EXTENSIONS__
sysutils/nnn: Update to 3.2 Changes: - an official logo - previews - config `NNN_FIFO` to write hovered file paths a previewer can read - plugin `preview-tabbed`: tabbed[1]/xembed based file previewer - plugin `preview-tui`: simple TUI file previewer in tmux/xterm - plugin `preview-kitty`: preview using kitty terminal's capabilities - live preview[2] configuration example - find & list - send list of files from (cmd run as) plugin to `nnn` - plugin `finder`: find/fd/fzf/grep/ripgrep/fzf (in subtree) and list in `nnn` - `Right` or `l` on symlink in list dir takes to target file - persistent session option `-S` [for disk usage, run `nnn -T d` (see help)] - hover on the file when a file path is passed as positional argument - go to first file or match with `'` (followed by `'` or `char`) - config `NNN_SEL` to specify custom selection file - config `NNN_LOCKER` to specify locker program - dim file details in detail mode - call `chdir()` on directory change - option `-l`: number of lines to move on mouse scroll - graphical keybind map[3] - let `NNN_COLORS` override `NO_COLOR` - plugins - option `-P`: run plugin by key at start - run plugins with `Alt+key` - allow `NNN_PIPE` usage by commands run as plugin - input format to `NNN_PIPE`: `<ctxcode><opcode><data>` (see plugins doc) - set `ctxcode` to `+` for smart context usage (next inactive, else current) - `getplugs` to fetch plugins by installed version of `nnn` - plugin `mimelist`: list files by mime type in subtree - plugin `bookmarks`: named bookmarks using symlinks - plugin `nbak`: backup `nnn` config - `nuke` adds lowdown as alternative markdown viewer - several plugin improvements - fix broken screen on resize (see #520) - fix broken version sort (see #550) - fix list and pipe modes not working together - fix multiple issues with listing files - fix `@` shown in detail mode for symlink to dir - fix listing files directly under `/` - move to `-std=c11` Package changes: - To retain more backwards compatibility, on old GCC versions (<4.7), -std=c99 is used instead of -std=c11. [1] https://tools.suckless.org/tabbed [2] https://github.com/jarun/nnn/wiki/Live-previews [3] https://github.com/jarun/nnn/wiki/Usage#graphical-map
2020-05-30 05:06:03 +02:00
.include "../../mk/compiler.mk"
# nnn uses -std=c11 for `restrict` but c99 has it too, so use that on
# old GCC versions that don't support c11.
# https://github.com/jarun/nnn/issues/605
.if !empty(CC_VERSION:Mgcc-[123].*) || \
!empty(CC_VERSION:Mgcc-4.[0123456].*)
SUBST_CLASSES+= c11
SUBST_MESSAGE.c11= Use c99 on old GCC instead of c11
SUBST_STAGE.c11= pre-configure
SUBST_FILES.c11= Makefile
SUBST_SED.c11= -e 's/-std=c11/-std=c99/'
.endif
MAKE_ENV+= MANPREFIX=${PREFIX}/${PKGMANDIR}
MAKE_ENV+= CFLAGS_OPTIMIZATION=
MAKE_ENV+= CFLAGS_CURSES=${BUILDLINK_CFLAGS.curses:Q}
MAKE_ENV+= LDLIBS_CURSES=${BUILDLINK_LDADD.curses:Q}
nnn: Update to 3.1 Package changes: - Now installs completions for fish, zsh, and bash. - New option 'mouse' (enabled by default) makes mouse support optional. - New option 'pcre' (enabled by default) for Perl regular expressions. - Removed checksum for deleted patch-src_nnn.c in distinfo. Upstream changes: - unlimited bookmarks and plugin keys - status bar text in context color - support config `NO_COLOR` to disable colors - config `NNN_OPTS` to specify binary options to `nnn` - config `NNN_MCLICK` to emulate configurable key - toggle selection on right click - ignore hard links when calculating disk usage - dim (hard/sym) link names (symlink to file has `@`) - more special keys at empty filter prompt in _type-to-nav_ - key `>` to export file list - option `-F` to show fortune in help and settings screen - option `-T` to specify sort order (obsoletes `-v`) - option to clear sort order - key `T` to change time type (access/change/mod) - `.nmv` - internal fully-functional batch renamer plugin - make var `O_NOBATCH` to disable native batch renamer - `nuke` & `imgview` - open all images in directory sxiv - `nuke` - open log files in vi - plugin `x2sel` - system clipboard to selection copier - plugin `fzy` - cd using z database - plugin `fzopen` - support `FZF_DEFAULT_COMMAND` - create new context on TAB without prompt - hover and connect by dir name (within config dir) - move to next entry on current file delete - on single file copy/move, select the copied/moved file - option `-f` to to use readline history file (off by default) - use `s` in status bar to indicate selection in progress - make var `O_NOMOUSE` to disable mouse support - do not store `NNN_TRASH` and `-Q` in config/session - add sample .desktop file for XDG compatible DEs - rename _nav-as-you-type_ to _type-to-nav_ mode - fix PCRE case-insensitive regex search - fix no error msg when filter length limit exceeded - fix static package generation - fix broken abort message when started in du-mode - fix filter lost on context switch in non _type-to-nav_ mode - fix broken readline prompt - fix long strings treated as action keys in filter prompt - fix `NNNLVL` not reset when spawned shell is exited
2020-04-29 11:29:38 +02:00
post-install:
${INSTALL_DATA} \
${WRKSRC}/misc/auto-completion/bash/nnn-completion.bash \
${DESTDIR}${PREFIX}/share/bash-completion/completions/nnn
${INSTALL_DATA} \
${WRKSRC}/misc/auto-completion/fish/nnn.fish \
${DESTDIR}${PREFIX}/share/fish/vendor_completions.d/
${INSTALL_DATA} \
${WRKSRC}/misc/auto-completion/zsh/_nnn \
${DESTDIR}${PREFIX}/share/zsh/site-functions
.include "options.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"