Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144115966
D13646.id37074.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D13646.id37074.diff
View Options
Index: misc/Makefile
===================================================================
--- misc/Makefile
+++ misc/Makefile
@@ -280,6 +280,7 @@
SUBDIR += najitool
SUBDIR += newer
SUBDIR += nms
+ SUBDIR += nnn
SUBDIR += nsf
SUBDIR += numchar
SUBDIR += nut
Index: misc/nnn/Makefile
===================================================================
--- /dev/null
+++ misc/nnn/Makefile
@@ -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>
Index: misc/nnn/distinfo
===================================================================
--- /dev/null
+++ misc/nnn/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1514234740
+SHA256 (jarun-nnn-v1.6_GH0.tar.gz) = e8b10a3b9847ba7ad3317f608691aaebcdaf2b67219d732f7a5d468221d3e83e
+SIZE (jarun-nnn-v1.6_GH0.tar.gz) = 37456
Index: misc/nnn/files/patch-Makefile
===================================================================
--- /dev/null
+++ misc/nnn/files/patch-Makefile
@@ -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)
Index: misc/nnn/files/patch-nnn.c
===================================================================
--- /dev/null
+++ misc/nnn/files/patch-nnn.c
@@ -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')
Index: misc/nnn/pkg-descr
===================================================================
--- /dev/null
+++ misc/nnn/pkg-descr
@@ -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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 6, 12:58 AM (15 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28445126
Default Alt Text
D13646.id37074.diff (6 KB)
Attached To
Mode
D13646: New port: misc/nnn: Missing terminal file browser for X
Attached
Detach File
Event Timeline
Log In to Comment