[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#58261] [PATCH v2 05/13] gnu: Add optionparser.
From: |
David Elsing |
Subject: |
[bug#58261] [PATCH v2 05/13] gnu: Add optionparser. |
Date: |
Fri, 7 Oct 2022 15:21:42 +0000 |
* gnu/packages/cpp.scm (optionparser): New variable.
---
gnu/packages/cpp.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index e99fdcecd8..d1c580a1fc 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2092,3 +2092,50 @@ (define-public tinydir
(description "@code{tinydir} is a header-only C library to portably read
files and directories.")
(license license:bsd-2)))
+
+(define-public optionparser
+ (package
+ (name "optionparser")
+ (version "1.7")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://sourceforge/optionparser/"
+ "optionparser-" version ".tar.gz"))
+ (sha256
+ (base32
+ "04gfxrdzwacaynb8scsz6rr7nh64n6yk6w9dh2qdhrxw4caqr0dk"))))
+ (outputs '("out" "doc"))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'chdir
+ (lambda _ (chdir "src")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (begin
+ (invoke "./example_arg")
+ (invoke "./testparse")
+ (invoke "./testprintusage")
+ (invoke "./testodr")
+ (invoke "./example")))))
+ (replace 'install
+ (lambda _
+ (install-file "optionparser.h" (string-append #$output
"/include"))))
+ (add-after 'install 'install-doc
+ (lambda _
+ (copy-recursively
+ "../html"
+ (string-append #$output:doc
"/share/doc/optionparser/html")))))))
+ (native-inputs (list doxygen))
+ (home-page "https://optionparser.sourceforge.net/")
+ (synopsis "Header-only C++ library to parse command line options")
+ (description "This library can be used to handle the command line
+arguments of a C++ program. It supports the short and long option formats of
+getopt(), getopt_long() and getopt_long_only(), but has a more convenient
+interface.")
+ (license license:expat)))
--
2.37.0
- [bug#58261] [PATCH v3 14/15] gnu: Add ringdecomposerlib., (continued)
- [bug#58261] [PATCH v3 14/15] gnu: Add ringdecomposerlib., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 09/15] gnu: Add freesasa., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 12/15] gnu: Add yaehmop., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 13/15] gnu: Add avalon-toolkit., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 15/15] gnu: Add rdkit., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 08/15] gnu: Add gemmi., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 11/15] gnu: Add coordgenlibs., David Elsing, 2022/10/13
- [bug#58261] [PATCH v3 10/15] gnu: Add maeparser., David Elsing, 2022/10/13
- [bug#58261] [PATCH v2 01/13] gnu: Add fast-float., David Elsing, 2022/10/07
- [bug#58261] [PATCH v2 05/13] gnu: Add optionparser.,
David Elsing <=
- [bug#58261] [PATCH v2 08/13] gnu: Add maeparser., David Elsing, 2022/10/07
- [bug#58261] [PATCH v2 09/13] gnu: Add coordgenlibs., David Elsing, 2022/10/07
- [bug#58261] [PATCH v2 11/13] gnu: Add avalontoolkit., David Elsing, 2022/10/07
- [bug#58261] [PATCH v2 13/13] gnu: Add rdkit., David Elsing, 2022/10/07