Date: Wed, 27 Dec 2017 17:47:29 +0000 (UTC) From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r457381 - in head/misc: . nnn nnn/files Message-ID: <201712271747.vBRHlTJ9019179@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yuri Date: Wed Dec 27 17:47:29 2017 New Revision: 457381 URL: https://svnweb.freebsd.org/changeset/ports/457381 Log: New port: misc/nnn: Missing terminal file browser for X Submitted by: 224600 Reported by: Dmitri Goutnik <dg@syrec.org> Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D13646 Added: head/misc/nnn/ head/misc/nnn/Makefile (contents, props changed) head/misc/nnn/distinfo (contents, props changed) head/misc/nnn/files/ head/misc/nnn/files/patch-Makefile (contents, props changed) head/misc/nnn/files/patch-nnn.c (contents, props changed) head/misc/nnn/pkg-descr (contents, props changed) Modified: head/misc/Makefile Modified: head/misc/Makefile ============================================================================== --- head/misc/Makefile Wed Dec 27 17:47:08 2017 (r457380) +++ head/misc/Makefile Wed Dec 27 17:47:29 2017 (r457381) @@ -280,6 +280,7 @@ SUBDIR += najitool SUBDIR += newer SUBDIR += nms + SUBDIR += nnn SUBDIR += nsf SUBDIR += numchar SUBDIR += nut Added: head/misc/nnn/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/nnn/Makefile Wed Dec 27 17:47:29 2017 (r457381) @@ -0,0 +1,67 @@ +# $FreeBSD$ + +PORTNAME= nnn +DISTVERSIONPREFIX= v +DISTVERSION= 1.6 +CATEGORIES= misc shells + +MAINTAINER= dg@syrec.org +COMMENT= Missing terminal file browser for X + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= bash:shells/bash \ + xdg-open:devel/xdg-utils + +USES= gmake localbase ncurses readline shebangfix +USE_GITHUB= yes +GH_ACCOUNT= jarun +SHEBANG_FILES= nlay + +MAKE_ARGS= PREFIX=${PREFIX} MANPREFIX=${PREFIX}/man +CFLAGS+= -D_WITH_DPRINTF # enable dprintf prototype + +OPTIONS_DEFINE= ATOOL BASH DOCS EXAMPLES FISH MEDIAINFO ZSH +OPTIONS_DEFAULT= ATOOL MEDIAINFO +ATOOL_DESC= List and extract archives +MEDIAINFO_DESC= Show media information + +ATOOL_RUN_DEPENDS= atool:archivers/atool +MEDIAINFO_RUN_DEPENDS= mediainfo:multimedia/mediainfo + +BASH_PLIST_FILES= etc/bash_completion.d/nnn-completion.bash +FISH_PLIST_FILES= share/fish/completions/nnn.fish +ZSH_PLIST_FILES= share/zsh/site-functions/_nnn + +PLIST_FILES= bin/nnn \ + bin/nlay \ + man/man1/nnn.1.gz + +PORTDOCS= README.md +PORTEXAMPLES= * + +post-install-BASH-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d + ${INSTALL_DATA} ${WRKSRC}/scripts/auto-completion/bash/nnn-completion.bash \ + ${STAGEDIR}${PREFIX}/etc/bash_completion.d + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} + +post-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + cd ${WRKSRC}/scripts && ${COPYTREE_SHARE} "copier quitcd" ${STAGEDIR}${EXAMPLESDIR} + +post-install-FISH-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/completions + ${INSTALL_DATA} ${WRKSRC}/scripts/auto-completion/fish/nnn.fish \ + ${STAGEDIR}${PREFIX}/share/fish/completions + +post-install-ZSH-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions + ${INSTALL_DATA} ${WRKSRC}/scripts/auto-completion/zsh/_nnn \ + ${STAGEDIR}${PREFIX}/share/zsh/site-functions + +.include <bsd.port.mk> Added: head/misc/nnn/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/nnn/distinfo Wed Dec 27 17:47:29 2017 (r457381) @@ -0,0 +1,3 @@ +TIMESTAMP = 1514234740 +SHA256 (jarun-nnn-v1.6_GH0.tar.gz) = e8b10a3b9847ba7ad3317f608691aaebcdaf2b67219d732f7a5d468221d3e83e +SIZE (jarun-nnn-v1.6_GH0.tar.gz) = 37456 Added: head/misc/nnn/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/nnn/files/patch-Makefile Wed Dec 27 17:47:29 2017 (r457381) @@ -0,0 +1,20 @@ +--- Makefile.orig 2017-12-25 13:40:20 UTC ++++ Makefile +@@ -10,7 +10,7 @@ ifeq ($(shell pkg-config ncursesw && ech + CFLAGS += $(shell pkg-config --cflags ncursesw) + LDLIBS += $(shell pkg-config --libs ncursesw) + else +- LDLIBS += -lncurses ++ LDLIBS += -lncursesw + endif + + DISTFILES = nlay nnn.c nnn.h nnn.1 Makefile README.md LICENSE +@@ -23,7 +23,7 @@ all: $(BIN) $(PLAYER) + $(SRC): nnn.h + + $(BIN): $(SRC) +- $(CC) -O2 $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS) ++ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS) + strip $@ + + debug: $(SRC) Added: head/misc/nnn/files/patch-nnn.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/nnn/files/patch-nnn.c Wed Dec 27 17:47:29 2017 (r457381) @@ -0,0 +1,40 @@ +Upstreamed, remove after the next release: + - https://github.com/jarun/nnn/pull/70 + - https://github.com/jarun/nnn/pull/69 + +--- nnn.c.orig 2017-12-25 13:40:20 UTC ++++ nnn.c +@@ -260,7 +260,7 @@ static char * const utils[] = { + #ifdef __APPLE__ + "/usr/bin/open", + #else +- "/usr/bin/xdg-open", ++ "xdg-open", + #endif + "nlay", + "atool" +@@ -1544,20 +1544,22 @@ show_stats(char *fpath, char *fname, str + /* Show size, blocks, file type */ + #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) + dprintf(fd, "\n Size: %-15lld Blocks: %-10lld IO Block: %-6d %s", ++ (long long)sb->st_size, (long long)sb->st_blocks, sb->st_blksize, desc); + #else + dprintf(fd, "\n Size: %-15ld Blocks: %-10ld IO Block: %-6ld %s", +-#endif + sb->st_size, sb->st_blocks, sb->st_blksize, desc); ++#endif + + /* Show containing device, inode, hardlink count */ + #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) + sprintf(g_buf, "%xh/%ud", sb->st_dev, sb->st_dev); + dprintf(fd, "\n Device: %-15s Inode: %-11llu Links: %-9hu", ++ g_buf, (unsigned long long)sb->st_ino, sb->st_nlink); + #else + sprintf(g_buf, "%lxh/%lud", sb->st_dev, sb->st_dev); + dprintf(fd, "\n Device: %-15s Inode: %-11lu Links: %-9lu", +-#endif + g_buf, sb->st_ino, sb->st_nlink); ++#endif + + /* Show major, minor number for block or char device */ + if (perms[0] == 'b' || perms[0] == 'c') Added: head/misc/nnn/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/misc/nnn/pkg-descr Wed Dec 27 17:47:29 2017 (r457381) @@ -0,0 +1,23 @@ +nnn is a fast and resource-sensitive file browser which integrates well with +your DE and favorite GUI utilities, works with the desktop opener, supports +bookmarks, has smart navigation shortcuts, has navigate-as-you-type mode, +disk usage analyzer mode, comprehensive file details and much more. + +nnn can: + + - open any file in the default desktop application or a custom one + - navigate-as-you-type (search-as-you-type enabled even on directory + switch) + - check disk usage with number of files in current directory tree + - run desktop search utility (gnome-search-tool or catfish) in any + directory + - copy absolute file path to clipboard, spawn a terminal and use the file + path + - navigate instantly using shortcuts like ~, -, & or handy bookmarks + - use cd ..... at chdir prompt to go to a parent directory + - show detailed file stats, media info, list and extract archives + - pin a directory you may need to revisit and jump to it anytime + - lock the current terminal after a specified idle time + - change directory on exit + +WWW: https://github.com/jarun/nnn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712271747.vBRHlTJ9019179>