Browse Source

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 <eero.aaltonen@vaisala.com>
Reviewed-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Tested-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Aaltonen Eero 2 years ago
parent
commit
43f96ced67

+ 3 - 0
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 <eero.aaltonen@vaisala.com>
+F:	package/docopt-cpp/
+
 N:	Eloi Bail <eloi.bail@savoirfairelinux.com>
 F:	package/bayer2rgb-neon/
 F:	package/gstreamer1/gst1-plugins-bayer2rgb-neon/

+ 1 - 0
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"

+ 21 - 0
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

+ 6 - 0
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

+ 13 - 0
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))