pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
nvimpager: Import nvimpager-0.13.0 as wip/nvimpager
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Sun May 11 21:01:41 2025 +0200
Changeset: 27ff28179838a4a81aa8a9676a7d41ea3a969058
Added Files:
nvimpager/DESCR
nvimpager/Makefile
nvimpager/PLIST
nvimpager/TODO
nvimpager/distinfo
nvimpager/patches/patch-makefile
Log Message:
nvimpager: Import nvimpager-0.13.0 as wip/nvimpager
nvimpager permits to use neovim as a pager to view man pages, git
diffs, whatnot with neovim's syntax highlighting and mouse support.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=27ff28179838a4a81aa8a9676a7d41ea3a969058
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
nvimpager/DESCR | 2 ++
nvimpager/Makefile | 32 +++++++++++++++++++++++
nvimpager/PLIST | 10 +++++++
nvimpager/TODO | 2 ++
nvimpager/distinfo | 6 +++++
nvimpager/patches/patch-makefile | 56 ++++++++++++++++++++++++++++++++++++++++
6 files changed, 108 insertions(+)
diffs:
diff --git a/nvimpager/DESCR b/nvimpager/DESCR
new file mode 100644
index 0000000000..8f37cb6eaa
--- /dev/null
+++ b/nvimpager/DESCR
@@ -0,0 +1,2 @@
+nvimpager permits to use neovim as a pager to view man pages, git
+diffs, whatnot with neovim's syntax highlighting and mouse support.
diff --git a/nvimpager/Makefile b/nvimpager/Makefile
new file mode 100644
index 0000000000..d7986d98c1
--- /dev/null
+++ b/nvimpager/Makefile
@@ -0,0 +1,32 @@
+# $NetBSD$
+
+DISTNAME= nvimpager-0.13.0
+CATEGORIES= misc
+MASTER_SITES= ${MASTER_SITE_GITHUB:=lucc/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/lucc/nvimpager/
+COMMENT= Use nvim as a pager
+LICENSE= 2-clause-bsd
+
+MAKE_FILE= makefile
+USE_TOOLS+= bash:run
+
+TOOL_DEPENDS+= scdoc-[0-9]*:../../textproc/scdoc
+
+REPLACE_BASH+= nvimpager
+
+SUBST_CLASSES+= makefile
+SUBST_STAGE.makefile= pre-configure
+SUBST_MESSAGE.makefile= Adjusting paths and version for pkgsrc
+SUBST_FILES.makefile= makefile
+SUBST_SED.makefile+= -e '/^VERSION/s/.*/VERSION = ${PKGVERSION_NOREV}/'
+SUBST_SED.makefile+= -e 's,share/man,${PKGMANDIR},'
+
+USE_LANGUAGES= # none
+
+do-build:
+ # nothing
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/nvimpager/PLIST b/nvimpager/PLIST
new file mode 100644
index 0000000000..14bbc074a4
--- /dev/null
+++ b/nvimpager/PLIST
@@ -0,0 +1,10 @@
+@comment $NetBSD$
+bin/nvimpager
+man/man1/nvimpager.1
+share/nvimpager/runtime/lua/nvimpager/ansi2highlight.lua
+share/nvimpager/runtime/lua/nvimpager/cat.lua
+share/nvimpager/runtime/lua/nvimpager/init.lua
+share/nvimpager/runtime/lua/nvimpager/options.lua
+share/nvimpager/runtime/lua/nvimpager/pager.lua
+share/nvimpager/runtime/lua/nvimpager/util.lua
+share/zsh/site-functions/_nvimpager
diff --git a/nvimpager/TODO b/nvimpager/TODO
new file mode 100644
index 0000000000..b5b9f1b435
--- /dev/null
+++ b/nvimpager/TODO
@@ -0,0 +1,2 @@
+- Double check if need to adjust anything related to Lua
+- Needs neovim as dependency
diff --git a/nvimpager/distinfo b/nvimpager/distinfo
new file mode 100644
index 0000000000..e3fe3ac54b
--- /dev/null
+++ b/nvimpager/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+BLAKE2s (nvimpager-0.13.0.tar.gz) = 8269de0b306a4baba3e0a09b707da57730c3c3a8336395b0467effbe690410be
+SHA512 (nvimpager-0.13.0.tar.gz) = b6cd995d378dcb3f230b9dac2ae53b461ed48a2a355891414dfd151eda33e9e8b016f922955974fd6893332c6a5468814e8738c1f4eaba03717084f82688a48f
+Size (nvimpager-0.13.0.tar.gz) = 33459 bytes
+SHA1 (patch-makefile) = bedd200e5cd632061766b2faf585d604f3876a04
diff --git a/nvimpager/patches/patch-makefile b/nvimpager/patches/patch-makefile
new file mode 100644
index 0000000000..89325df804
--- /dev/null
+++ b/nvimpager/patches/patch-makefile
@@ -0,0 +1,56 @@
+$NetBSD$
+
+Avoid needs of GNU make and invoking git.
+
+These should be needed only for development.
+
+--- makefile.orig 2024-05-20 12:59:12.000000000 +0000
++++ makefile
+@@ -4,8 +4,8 @@ RUNTIME = $(PREFIX)/share/nvimpager/runt
+ VERSION = $(lastword $(shell ./nvimpager -v))
+ BUSTED = busted
+
+-%.configured: %
+- sed 's#^RUNTIME=.*$$#RUNTIME='"'$(RUNTIME)'"'#;s#version=.*$$#version=$(VERSION)#' < $< > $@
++nvimpager.configured: nvimpager
++ sed 's#^RUNTIME=.*$$#RUNTIME='"'$(RUNTIME)'"'#;s#version=.*$$#version=$(VERSION)#' < nvimpager > $@
+ chmod +x $@
+
+ install-no-man: nvimpager.configured
+@@ -24,9 +24,8 @@ uninstall:
+ $(PREFIX)/share/man/man1/nvimpager.1 \
+ $(PREFIX)/share/zsh/site-functions/_nvimpager
+
+-nvimpager.1: SOURCE_DATE_EPOCH = $(shell git log -1 --no-show-signature --pretty="%ct" 2>/dev/null || echo 1716209952)
+ nvimpager.1: nvimpager.md
+- sed '1s/$$/ "nvimpager $(VERSION)"/' $< | scdoc > $@
++ sed '1s/$$/ "nvimpager $(VERSION)"/' nvimpager.md | scdoc > $@
+
+ # The patterns prefixed with "lua" are used to require our nvimpager code from
+ # the tests with the same module names that neovim would find them.
+@@ -41,25 +40,6 @@ luacov.stats.out: nvimpager lua/nvimpage
+ luacov.report.out: luacov.stats.out
+ luacov lua/nvimpager
+
+-TYPE = minor
+-version: OLD_VERSION = $(patsubst v%,%,$(lastword $(shell git tag --list --sort=version:refname 'v*')))
+-version: NEW_VERSION = $(shell echo $(OLD_VERSION) | awk -F . -v type=$(TYPE) \
+- -e 'type == "major" { print $$1+1 ".0.0" }' \
+- -e 'type == "minor" { print $$1 "." $$2+1 ".0" }' \
+- -e 'type == "patch" { print $$1 "." $$2 "." $$3+1 }')
+-version:
+- [ $(TYPE) = major ] || [ $(TYPE) = minor ] || [ $(TYPE) = patch ]
+- git switch main
+- git diff --quiet HEAD
+- sed -i 's/version=[0-9.]*$$/version=$(NEW_VERSION)/' nvimpager
+- sed -i '/SOURCE_DATE_EPOCH/s/[0-9]\{10,\}/$(shell date +%s)/' $(MAKEFILE_LIST)
+- (printf '%s\n' 'Version $(NEW_VERSION)' '' 'Major changes:' 'Breaking changes:' 'Changes:'; \
+- git log v$(OLD_VERSION)..HEAD) \
+- | sed -E '/^(commit|Merge:|Author:)/d; /^Date/{N;N; s/.*\n.*\n /-/;}' \
+- | git commit --edit --file - nvimpager makefile
+- git tag --message="$$(git show --no-patch --format=format:%s%n%n%b)" \
+- v$(NEW_VERSION)
+-
+ clean:
+ $(RM) nvimpager.configured nvimpager.1 luacov.*
+ .PHONY: clean install test uninstall version
Home |
Main Index |
Thread Index |
Old Index