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

Collapse All | Expand All

(-)misc/nnn/Makefile (+68 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
SHEBANG_FILES=	nlay
19
USE_GITHUB=	yes
20
GH_ACCOUNT=	jarun
21
22
MAKE_ARGS=	PREFIX=${PREFIX} MANPREFIX=${PREFIX}/man
23
CFLAGS+=	-D_WITH_DPRINTF # enable dprintf prototype
24
25
PORTDOCS=	README.md
26
PORTEXAMPLES=	*
27
28
PLIST_FILES=	bin/nnn \
29
		bin/nlay \
30
		man/man1/nnn.1.gz
31
32
OPTIONS_DEFINE=	ATOOL BASH DOCS FISH EXAMPLES MEDIAINFO ZSH
33
OPTIONS_DEFAULT=ATOOL MEDIAINFO
34
35
ATOOL_DESC=	List and extract archives
36
MEDIAINFO_DESC=	Show media information
37
38
ATOOL_RUN_DEPENDS=	atool:archivers/atool
39
MEDIAINFO_RUN_DEPENDS=	mediainfo:multimedia/mediainfo
40
41
BASH_PLIST_FILES=	etc/bash_completion.d/nnn-completion.bash
42
FISH_PLIST_FILES=	share/fish/completions/nnn.fish
43
ZSH_PLIST_FILES=	share/zsh/site-functions/_nnn
44
45
post-install-BASH-on:
46
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
47
	${INSTALL_DATA} ${WRKSRC}/scripts/auto-completion/bash/nnn-completion.bash \
48
		${STAGEDIR}${PREFIX}/etc/bash_completion.d
49
50
post-install-DOCS-on:
51
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
52
	${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
53
54
post-install-EXAMPLES-on:
55
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
56
	cd ${WRKSRC}/scripts && ${COPYTREE_SHARE} "copier quitcd" ${STAGEDIR}${EXAMPLESDIR}
57
58
post-install-FISH-on:
59
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/completions
60
	${INSTALL_DATA} ${WRKSRC}/scripts/auto-completion/fish/nnn.fish \
61
		${STAGEDIR}${PREFIX}/share/fish/completions
62
63
post-install-ZSH-on:
64
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
65
	${INSTALL_DATA} ${WRKSRC}/scripts/auto-completion/zsh/_nnn \
66
		${STAGEDIR}${PREFIX}/share/zsh/site-functions
67
68
.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 (+40 lines)
Line 0 Link Here
1
Upstreamed, remove after the next release:
2
  - https://github.com/jarun/nnn/pull/70
3
  - https://github.com/jarun/nnn/pull/69
4
5
--- nnn.c.orig	2017-12-25 13:40:20 UTC
6
+++ nnn.c
7
@@ -260,7 +260,7 @@ static char * const utils[] = {
8
 #ifdef __APPLE__
9
 	"/usr/bin/open",
10
 #else
11
-	"/usr/bin/xdg-open",
12
+	"xdg-open",
13
 #endif
14
 	"nlay",
15
 	"atool"
16
@@ -1544,20 +1544,22 @@ show_stats(char *fpath, char *fname, str
17
 	/* Show size, blocks, file type */
18
 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
19
 	dprintf(fd, "\n    Size: %-15lld Blocks: %-10lld IO Block: %-6d %s",
20
+	       (long long)sb->st_size, (long long)sb->st_blocks, sb->st_blksize, desc);
21
 #else
22
 	dprintf(fd, "\n    Size: %-15ld Blocks: %-10ld IO Block: %-6ld %s",
23
-#endif
24
 	       sb->st_size, sb->st_blocks, sb->st_blksize, desc);
25
+#endif
26
 
27
 	/* Show containing device, inode, hardlink count */
28
 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
29
 	sprintf(g_buf, "%xh/%ud", sb->st_dev, sb->st_dev);
30
 	dprintf(fd, "\n  Device: %-15s Inode: %-11llu Links: %-9hu",
31
+		g_buf, (unsigned long long)sb->st_ino, sb->st_nlink);
32
 #else
33
 	sprintf(g_buf, "%lxh/%lud", sb->st_dev, sb->st_dev);
34
 	dprintf(fd, "\n  Device: %-15s Inode: %-11lu Links: %-9lu",
35
-#endif
36
 		g_buf, sb->st_ino, sb->st_nlink);
37
+#endif
38
 
39
 	/* Show major, minor number for block or char device */
40
 	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