View | Details | Raw Unified | Return to bug 224600 | Differences between
and this patch

Collapse All | Expand All

(-)misc/nnn/Makefile (+60 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
PORTNAME=	nnn
4
DISTVERSIONPREFIX=	v
5
DISTVERSION=	1.6
6
CATEGORIES=	misc shells
7
8
MAINTAINER=	dg@syrec.org
9
COMMENT=	Missing terminal file browser for X
10
11
LICENSE=	BSD2CLAUSE
12
LICENSE_FILE=	${WRKSRC}/LICENSE
13
14
RUN_DEPENDS=	bash:shells/bash \
15
		xdg-open:devel/xdg-utils
16
17
USES=		gmake localbase ncurses readline shebangfix
18
MAKE_ARGS=	PREFIX=${PREFIX} MANPREFIX=${PREFIX}/man
19
CFLAGS+=	-D_WITH_DPRINTF # enable dprintf prototype
20
SHEBANG_FILES=	nlay
21
USE_GITHUB=	yes
22
GH_ACCOUNT=	jarun
23
24
PORTDOCS=	README.md
25
PORTEXAMPLES=	*
26
27
PLIST_FILES=	bin/nnn \
28
		bin/nlay \
29
		man/man1/nnn.1.gz
30
31
OPTIONS_DEFINE=	BASH DOCS FISH EXAMPLES ZSH
32
33
BASH_PLIST_FILES=	etc/bash_completion.d/nnn-completion.bash
34
FISH_PLIST_FILES=	share/fish/completions/nnn.fish
35
ZSH_PLIST_FILES=	share/zsh/site-functions/_nnn
36
37
post-install-BASH-on:
38
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
39
	${INSTALL_DATA} ${WRKSRC}/scripts/auto-completion/bash/nnn-completion.bash \
40
		${STAGEDIR}${PREFIX}/etc/bash_completion.d
41
42
post-install-DOCS-on:
43
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
44
	${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
45
46
post-install-EXAMPLES-on:
47
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
48
	cd ${WRKSRC}/scripts && ${COPYTREE_SHARE} "copier quitcd" ${STAGEDIR}${EXAMPLESDIR}
49
50
post-install-FISH-on:
51
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/completions
52
	${INSTALL_DATA} ${WRKSRC}/scripts/auto-completion/fish/nnn.fish \
53
		${STAGEDIR}${PREFIX}/share/fish/completions
54
55
post-install-ZSH-on:
56
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
57
	${INSTALL_DATA} ${WRKSRC}/scripts/auto-completion/zsh/_nnn \
58
		${STAGEDIR}${PREFIX}/share/zsh/site-functions
59
60
.include <bsd.port.mk>
(-)misc/nnn/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1514234740
2
SHA256 (jarun-nnn-v1.6_GH0.tar.gz) = e8b10a3b9847ba7ad3317f608691aaebcdaf2b67219d732f7a5d468221d3e83e
3
SIZE (jarun-nnn-v1.6_GH0.tar.gz) = 37456
(-)misc/nnn/files/patch-Makefile (+20 lines)
Line 0 Link Here
1
--- Makefile.orig	2017-12-25 13:40:20 UTC
2
+++ Makefile
3
@@ -10,7 +10,7 @@ ifeq ($(shell pkg-config ncursesw && ech
4
 	CFLAGS += $(shell pkg-config --cflags ncursesw)
5
 	LDLIBS += $(shell pkg-config --libs   ncursesw)
6
 else
7
-	LDLIBS += -lncurses
8
+	LDLIBS += -lncursesw
9
 endif
10
 
11
 DISTFILES = nlay nnn.c nnn.h nnn.1 Makefile README.md LICENSE
12
@@ -23,7 +23,7 @@ all: $(BIN) $(PLAYER)
13
 $(SRC): nnn.h
14
 
15
 $(BIN): $(SRC)
16
-	$(CC) -O2 $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
17
+	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
18
 	strip $@
19
 
20
 debug: $(SRC)
(-)misc/nnn/files/patch-nnn.c (+36 lines)
Line 0 Link Here
1
--- nnn.c.orig	2017-12-25 13:40:20 UTC
2
+++ nnn.c
3
@@ -260,7 +260,7 @@ static char * const utils[] = {
4
 #ifdef __APPLE__
5
 	"/usr/bin/open",
6
 #else
7
-	"/usr/bin/xdg-open",
8
+	"xdg-open",
9
 #endif
10
 	"nlay",
11
 	"atool"
12
@@ -1544,20 +1544,22 @@ show_stats(char *fpath, char *fname, str
13
 	/* Show size, blocks, file type */
14
 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
15
 	dprintf(fd, "\n    Size: %-15lld Blocks: %-10lld IO Block: %-6d %s",
16
+	       (long long)sb->st_size, (long long)sb->st_blocks, sb->st_blksize, desc);
17
 #else
18
 	dprintf(fd, "\n    Size: %-15ld Blocks: %-10ld IO Block: %-6ld %s",
19
-#endif
20
 	       sb->st_size, sb->st_blocks, sb->st_blksize, desc);
21
+#endif
22
 
23
 	/* Show containing device, inode, hardlink count */
24
 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
25
 	sprintf(g_buf, "%xh/%ud", sb->st_dev, sb->st_dev);
26
 	dprintf(fd, "\n  Device: %-15s Inode: %-11llu Links: %-9hu",
27
+		g_buf, (unsigned long long)sb->st_ino, sb->st_nlink);
28
 #else
29
 	sprintf(g_buf, "%lxh/%lud", sb->st_dev, sb->st_dev);
30
 	dprintf(fd, "\n  Device: %-15s Inode: %-11lu Links: %-9lu",
31
-#endif
32
 		g_buf, sb->st_ino, sb->st_nlink);
33
+#endif
34
 
35
 	/* Show major, minor number for block or char device */
36
 	if (perms[0] == 'b' || perms[0] == 'c')
(-)misc/nnn/pkg-descr (+23 lines)
Line 0 Link Here
1
nnn is a fast and resource-sensitive file browser which integrates well with
2
your DE and favorite GUI utilities, works with the desktop opener, supports
3
bookmarks, has smart navigation shortcuts, has navigate-as-you-type mode,
4
disk usage analyzer mode, comprehensive file details and much more.
5
6
nnn can:
7
8
  - open any file in the default desktop application or a custom one
9
  - navigate-as-you-type (search-as-you-type enabled even on directory
10
    switch)
11
  - check disk usage with number of files in current directory tree
12
  - run desktop search utility (gnome-search-tool or catfish) in any
13
    directory
14
  - copy absolute file path to clipboard, spawn a terminal and use the file
15
    path
16
  - navigate instantly using shortcuts like ~, -, & or handy bookmarks
17
  - use cd ..... at chdir prompt to go to a parent directory
18
  - show detailed file stats, media info, list and extract archives
19
  - pin a directory you may need to revisit and jump to it anytime
20
  - lock the current terminal after a specified idle time
21
  - change directory on exit
22
23
WWW: https://github.com/jarun/nnn

Return to bug 224600