diff --git a/cross/nnn/Makefile b/cross/nnn/Makefile new file mode 100644 index 00000000000..d46cbde6d5f --- /dev/null +++ b/cross/nnn/Makefile @@ -0,0 +1,24 @@ +PKG_NAME = nnn +PKG_VERS = 4.4 +PKG_EXT = tar.gz +PKG_DIST_NAME = $(PKG_NAME)-v$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = https://github.com/jarun/nnn/releases/download/v$(PKG_VERS) +PKG_DIR = $(PKG_NAME)-$(PKG_VERS) + +DEPENDS = cross/ncursesw cross/readline + +# compiler too old (-std=c11 required) +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCS) $(ARMv5_ARCHS) + +HOMEPAGE = https://github.com/jarun/nnn +COMMENT = n³ The unorthodox terminal file manager. +LICENSE = 2-clause BSD + +CONFIGURE_TARGET = nop +INSTALL_TARGET = nnn_install + +include ../../mk/spksrc.cross-cc.mk + +.PHONY: nnn_install +nnn_install: + @$(RUN) $(MAKE) install DESTDIR=$(INSTALL_DIR) PREFIX=$(INSTALL_PREFIX) diff --git a/cross/nnn/PLIST b/cross/nnn/PLIST new file mode 100644 index 00000000000..47a47d5a7b5 --- /dev/null +++ b/cross/nnn/PLIST @@ -0,0 +1,2 @@ +bin:bin/nnn + diff --git a/cross/nnn/digests b/cross/nnn/digests new file mode 100644 index 00000000000..542b664f5f0 --- /dev/null +++ b/cross/nnn/digests @@ -0,0 +1,3 @@ +nnn-v4.4.tar.gz SHA1 5ff16a0513a3f1ad0000cf0d4fb8c5677b73629d +nnn-v4.4.tar.gz SHA256 e04a3f0f0c2af1e18cb6f005d18267c7703644274d21bb93f03b30e4fd3d1653 +nnn-v4.4.tar.gz MD5 3f5d7734648c9c0993131efe4158f1b8 diff --git a/cross/nnn/patches/DSM-6.1/001-avoid-file-offset-64-for-32-bit-archs-on-dsm6.patch b/cross/nnn/patches/DSM-6.1/001-avoid-file-offset-64-for-32-bit-archs-on-dsm6.patch new file mode 100644 index 00000000000..875406bdb36 --- /dev/null +++ b/cross/nnn/patches/DSM-6.1/001-avoid-file-offset-64-for-32-bit-archs-on-dsm6.patch @@ -0,0 +1,17 @@ +# older toolchains do not support _FILE_OFFSET_BITS=64 for 32-bit archs, +# only DSM 7+ toolchains do. +# +# /sysroot/usr/include/fts.h:41:3: error: #error " cannot be used with -D_FILE_OFFSET_BITS==64" +# +--- src/nnn.c.orig 2021-11-23 13:03:45.000000000 +0000 ++++ src/nnn.c 2021-12-16 19:45:28.030685890 +0000 +@@ -33,9 +33,6 @@ + #ifndef _GNU_SOURCE + #define _GNU_SOURCE + #endif +-#if defined(__arm__) || defined(__i386__) +-#define _FILE_OFFSET_BITS 64 /* Support large files on 32-bit */ +-#endif + #if defined(__linux__) + #include + #define LINUX_INOTIFY diff --git a/diyspk/nnn/Makefile b/diyspk/nnn/Makefile new file mode 100644 index 00000000000..8214837dab7 --- /dev/null +++ b/diyspk/nnn/Makefile @@ -0,0 +1,19 @@ +SPK_NAME = nnn +SPK_VERS = 4.4 +SPK_REV = 1 +SPK_ICON = src/nnn.png + +DEPENDS = cross/nnn + +MAINTAINER = SynoCommunity +DESCRIPTION = n³ The unorthodox terminal file manager. +DISPLAY_NAME = n³ +STARTABLE = no +CHANGELOG = "Initial package release" + +HOMEPAGE = https://github.com/jarun/nnn +LICENSE = 2-clause BSD + +SPK_COMMANDS = bin/nnn + +include ../../mk/spksrc.spk.mk diff --git a/diyspk/nnn/src/nnn.png b/diyspk/nnn/src/nnn.png new file mode 100644 index 00000000000..ef6eee581b4 Binary files /dev/null and b/diyspk/nnn/src/nnn.png differ diff --git a/spk/synocli-file/Makefile b/spk/synocli-file/Makefile index 9e6061b0034..309de640495 100644 --- a/spk/synocli-file/Makefile +++ b/spk/synocli-file/Makefile @@ -9,6 +9,7 @@ DEPENDS += cross/detox DEPENDS += cross/lzip cross/plzip DEPENDS += cross/mg DEPENDS += cross/jupp +DEPENDS += cross/nnn OPTIONAL_DEPENDS = cross/rmlint cross/rnm cross/micro cross/fzf cross/ripgrep cross/fd cross/bat cross/exa @@ -60,9 +61,9 @@ endif PCRE2_CLI_FULL = 1 export PCRE2_CLI_FULL -DESCRIPTION = "SynoCli File Tools provides a set of small command-line utilities: less, tree, ncdu, jdupes, fdupes, rhash, mc \(midnight commander\), mg \(emacs-like text editor\), nano, jupp \(based on JOE - Joe\'s Own Editor 3.1\), file, detox, pcre2, zstd, lzip, plzip, detox$(OPTIONAL_DESC)." +DESCRIPTION = "SynoCli File Tools provides a set of small command-line utilities: less, tree, ncdu, jdupes, fdupes, rhash, mc \(midnight commander\), nnn (n³), mg \(emacs-like text editor\), nano, jupp \(based on JOE - Joe\'s Own Editor 3.1\), file, detox, pcre2, zstd, lzip, plzip, detox$(OPTIONAL_DESC)." STARTABLE = no -CHANGELOG = "1. Add jupp editor." +CHANGELOG = "1. Add jupp editor.
2. Add nnn (n³) file manager." SERVICE_SETUP = src/service-setup.sh @@ -91,6 +92,7 @@ SPK_COMMANDS += bin/mg SPK_COMMANDS += bin/bat SPK_COMMANDS += bin/exa SPK_COMMANDS += bin/jmacs bin/joe bin/jpico bin/jstar bin/jupp bin/rjoe +SPK_COMMANDS += bin/nnn SPK_COMMANDS += bin/rhash SPK_COMMANDS += bin/ed2k-link