[Buildroot] [PATCH v2 1/1] package/cpp-argparse: new package

[email protected] Sat, 1 Aug 2026 17:09:23 +0300
Newsgroups net.busybox.buildroot
Message-ID <[email protected]>
From: Konstantin Menyaev <[email protected]>

A Modern C++ header-only library
for parsing command-line arguments.

https: //github.com/p-ranav/argparse

Signed-off-by: Konstantin Menyaev <[email protected]>
---
 package/Config.in                      |  1 +
 package/cpp-argparse/Config.in         | 12 ++++++++++++
 package/cpp-argparse/cpp-argparse.hash |  3 +++
 package/cpp-argparse/cpp-argparse.mk   | 16 ++++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 package/cpp-argparse/Config.in
 create mode 100644 package/cpp-argparse/cpp-argparse.hash
 create mode 100644 package/cpp-argparse/cpp-argparse.mk

diff --git a/package/Config.in b/package/Config.in
index fc1e57d30d..cdf996fe24 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -170,6 +170,7 @@ menu "Development tools"
 	source "package/bustle/Config.in"
 	source "package/check/Config.in"
 	source "package/cmake/Config.in"
+	source "package/cpp-argparse/Config.in"
 	source "package/cppunit/Config.in"
 	source "package/cukinia/Config.in"
 	source "package/cunit/Config.in"
diff --git a/package/cpp-argparse/Config.in b/package/cpp-argparse/Config.in
new file mode 100644
index 0000000000..afb0e224c1
--- /dev/null
+++ b/package/cpp-argparse/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_CPP_ARGPARSE
+	bool "cpp-argparse"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8
+	help
+	  Argument Parser for Modern C++. A header-only library
+	  for parsing command-line arguments.
+
+	  https://github.com/p-ranav/argparse
+
+comment "cpp-argparse needs a toolchain w/ C++, GCC >= 8"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_8
diff --git a/package/cpp-argparse/cpp-argparse.hash b/package/cpp-argparse/cpp-argparse.hash
new file mode 100644
index 0000000000..3a46ded059
--- /dev/null
+++ b/package/cpp-argparse/cpp-argparse.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  9dcb3d8ce0a41b2a48ac8baa54b51a9f1b6a2c52dd374e28cc713bab0568ec98  cpp-argparse-3.2.tar.gz
+sha256  a3a9e0dc669644b703773777503f73abff8dffacc4e697d8535be930766fa771  LICENSE
diff --git a/package/cpp-argparse/cpp-argparse.mk b/package/cpp-argparse/cpp-argparse.mk
new file mode 100644
index 0000000000..53b1cd241b
--- /dev/null
+++ b/package/cpp-argparse/cpp-argparse.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# cpp-argparse
+#
+################################################################################
+
+CPP_ARGPARSE_VERSION = 3.2
+CPP_ARGPARSE_SITE = $(call github,p-ranav,argparse,v$(CPP_ARGPARSE_VERSION))
+CPP_ARGPARSE_LICENSE = MIT
+CPP_ARGPARSE_LICENSE_FILES = LICENSE
+CPP_ARGPARSE_INSTALL_STAGING = YES
+CPP_ARGPARSE_INSTALL_TARGET = NO
+
+CPP_ARGPARSE_CONF_OPTS = -DARGPARSE_BUILD_SAMPLES=OFF -DARGPARSE_BUILD_TESTS=OFF
+
+$(eval $(cmake-package))
-- 
2.55.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot