Message ID | 20221019143219.329504-1-eero.aaltonen@vaisala.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] package/docopt.cpp: new package | expand |
On Wed, Oct 19, 2022 at 4:33 PM Eero Aaltonen via buildroot < buildroot@buildroot.org> wrote: > 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> --- > Good to me. Testing: * check-package * legal-info * compiling from source for an architecture > DEVELOPERS | 3 +++ > package/Config.in | 1 + > package/docopt.cpp/Config.in | 15 +++++++++++++++ > package/docopt.cpp/docopt.cpp.hash | 6 ++++++ > package/docopt.cpp/docopt.cpp.mk | 13 +++++++++++++ > 5 files changed, 38 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 c0e6f8bbef..8972bab2d1 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -777,6 +777,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/ > diff --git a/package/Config.in b/package/Config.in > index e3a34d6e97..77f86328ce 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -2113,6 +2113,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..655a656398 > --- /dev/null > +++ b/package/docopt.cpp/Config.in > @@ -0,0 +1,15 @@ > +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 C++ port https://github.com/docopt/docopt.cpp > diff --git a/package/docopt.cpp/docopt.cpp.hash > b/package/docopt.cpp/docopt.cpp.hash > new file mode 100644 > index 0000000000..f8a7f8d97b > --- /dev/null > +++ b/package/docopt.cpp/docopt.cpp.hash > @@ -0,0 +1,6 @@ > +# Locally computed: > +sha256 28af5a0c482c6d508d22b14d588a3b0bd9ff97135f99c2814a5aa3cbff1d6632 > v0.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..647071243a > --- /dev/null > +++ b/package/docopt.cpp/docopt.cpp.mk > @@ -0,0 +1,13 @@ > > +################################################################################ > +# > +# docopt.cpp > +# > > +################################################################################ > + > +DOCOPT_CPP_VERSION = 0.6.3 > +DOCOPT_CPP_SOURCE = v$(DOCOPT_CPP_VERSION).tar.gz > +DOCOPT_CPP_SITE = https://github.com/docopt/docopt.cpp/archive/refs/tags > +DOCOPT_CPP_INSTALL_STAGING = YES > +DOCOPT_CPP_LICENSE_FILES = LICENSE-Boost-1.0 LICENSE-MIT > + > +$(eval $(cmake-package)) > -- > 2.25.1 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot >
Hello Eero, On Wed, 19 Oct 2022 17:32:19 +0300 Eero Aaltonen via buildroot <buildroot@buildroot.org> wrote: > 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> Thanks a lot for your patch! I'm adding in Cc Angelo, who helped by reviewing/testing your patch. I have applied your patch, but after doing a number of changes, which are described below. Angelo: look below as well, to see the few things that you missed as part of your review, as it will definitely help in doing more detailed reviews in the future! > DEVELOPERS | 3 +++ > package/Config.in | 1 + > package/docopt.cpp/Config.in | 15 +++++++++++++++ > package/docopt.cpp/docopt.cpp.hash | 6 ++++++ > package/docopt.cpp/docopt.cpp.mk | 13 +++++++++++++ > 5 files changed, 38 insertions(+) I renamed to package/docopt-cpp/. I don't think we have other packages with a "." in their name, and I didn't want to create a new situation. > diff --git a/package/docopt.cpp/Config.in b/package/docopt.cpp/Config.in > new file mode 100644 > index 0000000000..655a656398 > --- /dev/null > +++ b/package/docopt.cpp/Config.in > @@ -0,0 +1,15 @@ > +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 C++ port https://github.com/docopt/docopt.cpp The last line of the help text should only contain the upstream URL of the project, so I reformatted a bit to match this requirement. Also, you had forgotten a Config.in comment to document the C++ and gcc 4.7+ dependencies, so I have added: +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.mk b/package/docopt.cpp/docopt.cpp.mk > new file mode 100644 > index 0000000000..647071243a > --- /dev/null > +++ b/package/docopt.cpp/docopt.cpp.mk > @@ -0,0 +1,13 @@ > +################################################################################ > +# > +# docopt.cpp > +# > +################################################################################ > + > +DOCOPT_CPP_VERSION = 0.6.3 > +DOCOPT_CPP_SOURCE = v$(DOCOPT_CPP_VERSION).tar.gz > +DOCOPT_CPP_SITE = https://github.com/docopt/docopt.cpp/archive/refs/tags You should have use the github macro here: +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_FILES = LICENSE-Boost-1.0 LICENSE-MIT The LICENSE variable was missing, so I've added it: +DOCOPT_CPP_LICENSE = BSL-1.0 or MIT Again, applied with all those changes. See: https://gitlab.com/buildroot.org/buildroot/-/commit/43f96ced67c9a1f84d3f0edf5cd632178eb176b8 Thanks! Thomas
diff --git a/DEVELOPERS b/DEVELOPERS index c0e6f8bbef..8972bab2d1 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -777,6 +777,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/ diff --git a/package/Config.in b/package/Config.in index e3a34d6e97..77f86328ce 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2113,6 +2113,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..655a656398 --- /dev/null +++ b/package/docopt.cpp/Config.in @@ -0,0 +1,15 @@ +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 C++ port https://github.com/docopt/docopt.cpp diff --git a/package/docopt.cpp/docopt.cpp.hash b/package/docopt.cpp/docopt.cpp.hash new file mode 100644 index 0000000000..f8a7f8d97b --- /dev/null +++ b/package/docopt.cpp/docopt.cpp.hash @@ -0,0 +1,6 @@ +# Locally computed: +sha256 28af5a0c482c6d508d22b14d588a3b0bd9ff97135f99c2814a5aa3cbff1d6632 v0.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..647071243a --- /dev/null +++ b/package/docopt.cpp/docopt.cpp.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# docopt.cpp +# +################################################################################ + +DOCOPT_CPP_VERSION = 0.6.3 +DOCOPT_CPP_SOURCE = v$(DOCOPT_CPP_VERSION).tar.gz +DOCOPT_CPP_SITE = https://github.com/docopt/docopt.cpp/archive/refs/tags +DOCOPT_CPP_INSTALL_STAGING = YES +DOCOPT_CPP_LICENSE_FILES = LICENSE-Boost-1.0 LICENSE-MIT + +$(eval $(cmake-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> --- DEVELOPERS | 3 +++ package/Config.in | 1 + package/docopt.cpp/Config.in | 15 +++++++++++++++ package/docopt.cpp/docopt.cpp.hash | 6 ++++++ package/docopt.cpp/docopt.cpp.mk | 13 +++++++++++++ 5 files changed, 38 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