git: fb06e9576d8b - main - devel/getoptions: NEW Port

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Mon, 06 Dec 2021 01:59:28 UTC
The branch main has been updated by bofh:

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

commit fb06e9576d8b2222a8e23368caf06a75db89b0d7
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2021-12-06 01:58:35 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2021-12-06 01:58:35 +0000

    devel/getoptions: NEW Port
    
    Elegant option parser for shell scripts
    
    An elegant option parser for shell scripts (full support for all POSIX
    shells)
    
    getoptions is a new option parser and generator written in
    POSIX-compliant shell
    script and released in august 2020. It is for those who want to support
    the
    POSIX / GNU style option syntax in your shell scripts. Most easy,
    simple, fast,
    small, extensible and portable. No more any loops and templates needed!
    
    WWW: https://github.com/ko1nksm/getoptions/
---
 devel/Makefile             |  1 +
 devel/getoptions/Makefile  | 45 +++++++++++++++++++++++++++++++++++++++++++++
 devel/getoptions/distinfo  |  3 +++
 devel/getoptions/pkg-descr |  8 ++++++++
 4 files changed, 57 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 105651910846..1a45d5b40161 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -812,6 +812,7 @@
     SUBDIR += generate
     SUBDIR += gengetopt
     SUBDIR += genie
+    SUBDIR += getoptions
     SUBDIR += gettext
     SUBDIR += gettext-lint
     SUBDIR += gettext-msghack
diff --git a/devel/getoptions/Makefile b/devel/getoptions/Makefile
new file mode 100644
index 000000000000..f073950b1f7d
--- /dev/null
+++ b/devel/getoptions/Makefile
@@ -0,0 +1,45 @@
+PORTNAME=	getoptions
+PORTVERSION=	3.3.0
+DISTVERSIONPREFIX=	v
+CATEGORIES=	devel
+
+MAINTAINER=	bofh@FreeBSD.org
+COMMENT=	Elegant option parser for shell scripts
+
+LICENSE=	CC0-1.0
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	ko1nksm
+
+PORTDOCS=	*
+PORTEXAMPLES=	*
+
+TESTS_EXAMPLES=	advanced.sh basic.sh bench.sh example.sh \
+	parser_definition.sh prehook.sh subcmd.sh
+
+PLIST_FILES=	bin/getoptions \
+				bin/gengetoptions
+
+OPTIONS_DEFINE=	DOCS EXAMPLES
+
+MAKE_ARGS=	PREFIX=${STAGEDIR}${PREFIX}
+
+NO_ARCH=	yes
+
+do-build:
+	cd ${WRKSRC} && ${MAKE} build
+
+post-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC} && ${INSTALL_DATA} README.md CHANGELOG.md \
+		docs/References.md docs/Workarounds.md \
+		${STAGEDIR}${DOCSDIR}
+
+post-install-EXAMPLES-on:
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+.for e in ${TESTS_EXAMPLES}
+	${INSTALL_DATA} ${WRKSRC}/examples/${e} ${STAGEDIR}${EXAMPLESDIR}
+.endfor
+
+.include <bsd.port.mk>
diff --git a/devel/getoptions/distinfo b/devel/getoptions/distinfo
new file mode 100644
index 000000000000..f65869310e09
--- /dev/null
+++ b/devel/getoptions/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1638753808
+SHA256 (ko1nksm-getoptions-v3.3.0_GH0.tar.gz) = b767c6886d3b3f1258463aca500f9f06ed58f1bc6b11eb6e3e33de66847d4123
+SIZE (ko1nksm-getoptions-v3.3.0_GH0.tar.gz) = 30111
diff --git a/devel/getoptions/pkg-descr b/devel/getoptions/pkg-descr
new file mode 100644
index 000000000000..7802cef2c2de
--- /dev/null
+++ b/devel/getoptions/pkg-descr
@@ -0,0 +1,8 @@
+An elegant option parser for shell scripts (full support for all POSIX shells)
+
+getoptions is a new option parser and generator written in POSIX-compliant shell
+script and released in august 2020. It is for those who want to support the
+POSIX / GNU style option syntax in your shell scripts. Most easy, simple, fast,
+small, extensible and portable. No more any loops and templates needed!
+
+WWW: https://github.com/ko1nksm/getoptions/