From 43f96ced67c9a1f84d3f0edf5cd632178eb176b8 Mon Sep 17 00:00:00 2001 From: Aaltonen Eero Date: Wed, 19 Oct 2022 17:32:19 +0300 Subject: [PATCH] package/docopt-cpp: new package Add docopt.cpp library that can be used to create intuitive command line interfaces with very little code by describing the valid calls using the (POSIX.1-2017) command line utility argument syntax. Signed-off-by: Eero Aaltonen Reviewed-by: Angelo Compagnucci Tested-by: Angelo Compagnucci Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 3 +++ package/Config.in | 1 + package/docopt-cpp/Config.in | 21 +++++++++++++++++++++ package/docopt-cpp/docopt-cpp.hash | 6 ++++++ package/docopt-cpp/docopt-cpp.mk | 13 +++++++++++++ 5 files changed, 44 insertions(+) create mode 100644 package/docopt-cpp/Config.in create mode 100644 package/docopt-cpp/docopt-cpp.hash create mode 100644 package/docopt-cpp/docopt-cpp.mk diff --git a/DEVELOPERS b/DEVELOPERS index 3ab4d65d67..06ee5d8056 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -781,6 +781,9 @@ F: board/acmesystems/acqua-a5/ F: configs/acmesystems_acqua_a5_256mb_defconfig F: configs/acmesystems_acqua_a5_512mb_defconfig +N: Eero Aaltonen +F: package/docopt-cpp/ + N: Eloi Bail F: package/bayer2rgb-neon/ F: package/gstreamer1/gst1-plugins-bayer2rgb-neon/ diff --git a/package/Config.in b/package/Config.in index 450a73d4ca..238d7813f0 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2119,6 +2119,7 @@ endmenu menu "Text and terminal handling" source "package/augeas/Config.in" + source "package/docopt-cpp/Config.in" source "package/enchant/Config.in" source "package/fmt/Config.in" source "package/fstrcmp/Config.in" diff --git a/package/docopt-cpp/Config.in b/package/docopt-cpp/Config.in new file mode 100644 index 0000000000..ac85442732 --- /dev/null +++ b/package/docopt-cpp/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_DOCOPT_CPP + bool "docopt-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 + help + docopt is a library that lets you define a command line + interface with the utility argument syntax that has been + used by command line utilities for decades (POSIX.1-2017). + From the description, docopt automatically generates a parser + for the command line arguments. + + docopt Command-line interface description language + http://docopt.org/ + + docopt.cpp is a C++ port of docopt. + + https://github.com/docopt/docopt.cpp + +comment "docopt-cpp needs a toolchain w/ C++, gcc >= 4.7" + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 diff --git a/package/docopt-cpp/docopt-cpp.hash b/package/docopt-cpp/docopt-cpp.hash new file mode 100644 index 0000000000..c535914753 --- /dev/null +++ b/package/docopt-cpp/docopt-cpp.hash @@ -0,0 +1,6 @@ +# Locally computed: +sha256 28af5a0c482c6d508d22b14d588a3b0bd9ff97135f99c2814a5aa3cbff1d6632 docopt-cpp-0.6.3.tar.gz + +# Hash for license files: +sha256 c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566 LICENSE-Boost-1.0 +sha256 b2959a980bc25f5d5e020d7a31777b7184aace6eb160acc80619f85edf646f19 LICENSE-MIT diff --git a/package/docopt-cpp/docopt-cpp.mk b/package/docopt-cpp/docopt-cpp.mk new file mode 100644 index 0000000000..d90b82820f --- /dev/null +++ b/package/docopt-cpp/docopt-cpp.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# docopt.cpp +# +################################################################################ + +DOCOPT_CPP_VERSION = 0.6.3 +DOCOPT_CPP_SITE = $(call github,docopt,docopt.cpp,v$(DOCOPT_CPP_VERSION)) +DOCOPT_CPP_INSTALL_STAGING = YES +DOCOPT_CPP_LICENSE = BSL-1.0 or MIT +DOCOPT_CPP_LICENSE_FILES = LICENSE-Boost-1.0 LICENSE-MIT + +$(eval $(cmake-package))