[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/15: gnu: Add optionparser.
From: |
guix-commits |
Subject: |
06/15: gnu: Add optionparser. |
Date: |
Sat, 15 Oct 2022 06:06:30 -0400 (EDT) |
lilyp pushed a commit to branch master
in repository guix.
commit fd4342728db7969106d2b1eecce0ba369e2e01a3
Author: David Elsing <david.elsing@posteo.net>
AuthorDate: Thu Oct 13 21:04:15 2022 +0000
gnu: Add optionparser.
* gnu/packages/cpp.scm (optionparser): New variable.
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
gnu/packages/cpp.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 9a3eeee195..7cf7269f7f 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2101,3 +2101,50 @@ different floating point sizes and complex
transformations.")
(description "@code{sajson} is an in-place JSON parser with support for
parsing with only a single memory allocation.")
(license license:expat))))
+
+(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 package provides a header-only C++ library to parse
+command line options. It supports the short and long option formats of
+getopt(), getopt_long() and getopt_long_only().")
+ (license license:expat)))
- 09/15: gnu: Add freesasa., (continued)
- 09/15: gnu: Add freesasa., guix-commits, 2022/10/15
- 05/15: gnu: Add tinydir., guix-commits, 2022/10/15
- 11/15: gnu: Add coordgenlibs., guix-commits, 2022/10/15
- 12/15: gnu: Add yaehmop., guix-commits, 2022/10/15
- 15/15: gnu: Add rdkit., guix-commits, 2022/10/15
- 03/15: gnu: Add sajson., guix-commits, 2022/10/15
- 08/15: gnu: Add gemmi., guix-commits, 2022/10/15
- 10/15: gnu: Add maeparser., guix-commits, 2022/10/15
- 13/15: gnu: Add avalon-toolkit., guix-commits, 2022/10/15
- 14/15: gnu: Add ringdecomposerlib., guix-commits, 2022/10/15
- 06/15: gnu: Add optionparser.,
guix-commits <=