git: ecc74ffa42ac - main - shells/carapace: add port: Multi-shell multi-command argument completer

From: Hiroki Tagato <tagattie_at_FreeBSD.org>
Date: Mon, 26 Feb 2024 08:39:42 UTC
The branch main has been updated by tagattie:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ecc74ffa42ac7858205e8b78cc9fd62e4b351ab5

commit ecc74ffa42ac7858205e8b78cc9fd62e4b351ab5
Author:     Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2024-02-26 08:37:57 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2024-02-26 08:39:29 +0000

    shells/carapace: add port: Multi-shell multi-command argument completer
    
    Carapace provides argument completion for multiple CLI commands, and
    works across multiple POSIX and non-POSIX shells.
    
    WWW: https://carapace.sh/
---
 shells/Makefile           |  1 +
 shells/carapace/Makefile  | 32 ++++++++++++++++++++++++++++++++
 shells/carapace/distinfo  |  5 +++++
 shells/carapace/pkg-descr |  2 ++
 4 files changed, 40 insertions(+)

diff --git a/shells/Makefile b/shells/Makefile
index 1415e3554b8c..bc75f22e17e8 100644
--- a/shells/Makefile
+++ b/shells/Makefile
@@ -11,6 +11,7 @@
     SUBDIR += bashc
     SUBDIR += bicon
     SUBDIR += bosh
+    SUBDIR += carapace
     SUBDIR += ch
     SUBDIR += dash
     SUBDIR += elvish
diff --git a/shells/carapace/Makefile b/shells/carapace/Makefile
new file mode 100644
index 000000000000..c6982e27f224
--- /dev/null
+++ b/shells/carapace/Makefile
@@ -0,0 +1,32 @@
+PORTNAME=	carapace
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.30.2
+CATEGORIES=	shells
+
+MAINTAINER=	tagattie@FreeBSD.org
+COMMENT=	Multi-shell multi-command argument completer
+WWW=		https://carapace.sh/
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		go:modules,1.21
+
+GO_MODULE=	github.com/rsteube/carapace-bin
+GO_TARGET=	./cmd/carapace
+GO_BUILDFLAGS=	-ldflags "-s -w -X main.version=${DISTVERSION}"
+
+PLIST_FILES=	bin/carapace
+PORTDOCS=	README.md
+
+OPTIONS_DEFINE=	DOCS
+
+pre-build:
+	cd ${GO_WRKSRC} && \
+		${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} generate ./cmd/...
+
+post-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/shells/carapace/distinfo b/shells/carapace/distinfo
new file mode 100644
index 000000000000..980f793af9ef
--- /dev/null
+++ b/shells/carapace/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1708860055
+SHA256 (go/shells_carapace/carapace-v0.30.2/v0.30.2.mod) = 9bebd26f556d49995475fa9b15a98915b5bc06b7da8798567374c4c2d303dff9
+SIZE (go/shells_carapace/carapace-v0.30.2/v0.30.2.mod) = 799
+SHA256 (go/shells_carapace/carapace-v0.30.2/v0.30.2.zip) = 3544d6e3d665ef53ad5cb92a65f1f952f5f3b869af75716b730247ce7e256f52
+SIZE (go/shells_carapace/carapace-v0.30.2/v0.30.2.zip) = 16679116
diff --git a/shells/carapace/pkg-descr b/shells/carapace/pkg-descr
new file mode 100644
index 000000000000..7f8b534bc446
--- /dev/null
+++ b/shells/carapace/pkg-descr
@@ -0,0 +1,2 @@
+Carapace provides argument completion for multiple CLI commands, and
+works across multiple POSIX and non-POSIX shells.