git: c6c4d3c421fe - main - devel/tinyopt: New port: C++ header-only library for argument parsing
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Nov 2025 10:11:53 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=c6c4d3c421fe0daaf0510c9c665e6516e98c2cea
commit c6c4d3c421fe0daaf0510c9c665e6516e98c2cea
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-11-02 08:50:50 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-11-02 10:11:48 +0000
devel/tinyopt: New port: C++ header-only library for argument parsing
---
devel/Makefile | 1 +
devel/tinyopt/Makefile | 34 ++++++++++++++++++++++++++++++++++
devel/tinyopt/distinfo | 3 +++
devel/tinyopt/pkg-descr | 3 +++
4 files changed, 41 insertions(+)
diff --git a/devel/Makefile b/devel/Makefile
index 0982f2ef8e2e..81ead5b893f5 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -8432,6 +8432,7 @@
SUBDIR += tinycbor
SUBDIR += tinygo
SUBDIR += tinylaf
+ SUBDIR += tinyopt
SUBDIR += tinysparql
SUBDIR += tkcon
SUBDIR += tkcvs
diff --git a/devel/tinyopt/Makefile b/devel/tinyopt/Makefile
new file mode 100644
index 000000000000..09571f3d6393
--- /dev/null
+++ b/devel/tinyopt/Makefile
@@ -0,0 +1,34 @@
+PORTNAME= tinyopt
+DISTVERSIONPREFIX= v
+DISTVERSION= 1.0-8
+DISTVERSIONSUFFIX= -gef7d72c
+CATEGORIES= devel
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= C++ header-only library for argument parsing
+WWW= https://github.com/halfflat/tinyopt
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+TEST_DEPENDS= googletest>0:devel/googletest
+
+USES= gmake localbase
+
+USE_GITHUB= yes
+GH_ACCOUNT= halfflat
+
+PLIST_FILES= bin/${PORTNAME}
+
+NO_BUILD= yes
+NO_ARCH= yes
+
+PLIST_FILES= include/tinyopt/tinyopt.h
+
+do-install:
+ @cd ${WRKSRC}/include && ${COPYTREE_SHARE} ${PORTNAME} ${STAGEDIR}${PREFIX}/include/
+
+do-test: # tests fail to compile because they look for the file gtest-all.cc, see https://github.com/halfflat/tinyopt/issues/21
+ @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} all test
+
+.include <bsd.port.mk>
diff --git a/devel/tinyopt/distinfo b/devel/tinyopt/distinfo
new file mode 100644
index 000000000000..5be70a67ebdc
--- /dev/null
+++ b/devel/tinyopt/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1762072604
+SHA256 (halfflat-tinyopt-v1.0-8-gef7d72c_GH0.tar.gz) = 6fdc16a512398b42c644dda6677c69469fb691489b0b676cd40e01e94693cafb
+SIZE (halfflat-tinyopt-v1.0-8-gef7d72c_GH0.tar.gz) = 29340
diff --git a/devel/tinyopt/pkg-descr b/devel/tinyopt/pkg-descr
new file mode 100644
index 000000000000..21a30cb97b70
--- /dev/null
+++ b/devel/tinyopt/pkg-descr
@@ -0,0 +1,3 @@
+Tinyopt is a small, header-only C++ library for parsing command-line
+arguments. It is designed to be easy to use and integrate into any
+project.