All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/docopt.cpp: new package
@ 2022-10-19 14:32 Eero Aaltonen via buildroot
  2022-10-19 14:55 ` Angelo Compagnucci
  2022-10-31 12:54 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Eero Aaltonen via buildroot @ 2022-10-19 14:32 UTC (permalink / raw)
  To: buildroot; +Cc: Eero Aaltonen

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

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/docopt.cpp: new package
  2022-10-19 14:32 [Buildroot] [PATCH 1/1] package/docopt.cpp: new package Eero Aaltonen via buildroot
@ 2022-10-19 14:55 ` Angelo Compagnucci
  2022-10-31 12:54 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Angelo Compagnucci @ 2022-10-19 14:55 UTC (permalink / raw)
  To: Eero Aaltonen; +Cc: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 4600 bytes --]

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
>


-- 

Angelo Compagnucci

Software Engineer

angelo@amarulasolutions.com
__________________________________
Amarula Solutions SRL

Via le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 (0)42 243 5310
info@amarulasolutions.com

www.amarulasolutions.com
[`as] https://www.amarulasolutions.com|

[-- Attachment #1.2: Type: text/html, Size: 10737 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/docopt.cpp: new package
  2022-10-19 14:32 [Buildroot] [PATCH 1/1] package/docopt.cpp: new package Eero Aaltonen via buildroot
  2022-10-19 14:55 ` Angelo Compagnucci
@ 2022-10-31 12:54 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-10-31 12:54 UTC (permalink / raw)
  To: Eero Aaltonen via buildroot; +Cc: Eero Aaltonen, Angelo Compagnucci

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
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-31 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-19 14:32 [Buildroot] [PATCH 1/1] package/docopt.cpp: new package Eero Aaltonen via buildroot
2022-10-19 14:55 ` Angelo Compagnucci
2022-10-31 12:54 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.