Commit | Line | Data |
---|---|---|
df77a462 | 1 | ;;; GNU Guix --- Functional package management for GNU |
4b4e1b4b | 2 | ;;; Copyright © 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org> |
ba6a996e | 3 | ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net> |
7f5c74d1 | 4 | ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
df77a462 LC |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
9 | ;;; under the terms of the GNU General Public License as published by | |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
13 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
20 | ||
21 | (define-module (gnu packages popt) | |
22 | #:use-module (guix packages) | |
23 | #:use-module (guix download) | |
400457af | 24 | #:use-module (guix git-download) |
df77a462 | 25 | #:use-module (guix build-system gnu) |
4b4e1b4b | 26 | #:use-module (guix build-system cmake) |
df77a462 LC |
27 | #:use-module (guix licenses)) |
28 | ||
9495e736 RW |
29 | (define-public argtable |
30 | (package | |
31 | (name "argtable") | |
32 | (version "2.13") | |
33 | (source (origin | |
34 | (method url-fetch) | |
35 | (uri (string-append | |
de67e922 LF |
36 | "mirror://sourceforge/argtable/argtable/" |
37 | "argtable-" version "/argtable" | |
9495e736 RW |
38 | (string-join (string-split version #\.) "-") |
39 | ".tar.gz")) | |
40 | (sha256 | |
41 | (base32 | |
42 | "1gyxf4bh9jp5gb3l6g5qy90zzcf3vcpk0irgwbv1lc6mrskyhxwg")))) | |
43 | (build-system gnu-build-system) | |
44 | (home-page "http://argtable.sourceforge.net/") | |
45 | (synopsis "Command line option parsing library") | |
46 | (description | |
47 | "Argtable is an ANSI C library for parsing GNU style command line | |
48 | options. It enables a program's command line syntax to be defined in the | |
49 | source code as an array of argtable structs. The command line is then parsed | |
50 | according to that specification and the resulting values are returned in those | |
51 | same structs where they are accessible to the main program. Both tagged (-v, | |
52 | --verbose, --foo=bar) and untagged arguments are supported, as are multiple | |
53 | instances of each argument. Syntax error handling is automatic and the library | |
54 | also provides the means for generating a textual description of the command | |
55 | line syntax.") | |
56 | (license lgpl2.0+))) | |
57 | ||
df77a462 LC |
58 | (define-public popt |
59 | (package | |
60 | (name "popt") | |
61 | (version "1.16") | |
62 | (source (origin | |
63 | (method url-fetch) | |
64 | (uri (string-append "http://rpm5.org/files/popt/popt-" | |
65 | version ".tar.gz")) | |
66 | (sha256 | |
67 | (base32 | |
68 | "1j2c61nn2n351nhj4d25mnf3vpiddcykq005w2h6kw79dwlysa77")))) | |
69 | (build-system gnu-build-system) | |
70 | (arguments | |
dc1d3cde KK |
71 | '(#:phases |
72 | (modify-phases %standard-phases | |
73 | (add-before 'configure 'patch-test | |
74 | (lambda _ | |
75 | (substitute* "test-poptrc.in" | |
76 | (("/bin/echo") (which "echo"))) | |
77 | (substitute* "testit.sh" ; don't expect old libtool names | |
78 | (("lt-test1") "test1")) | |
79 | #t))))) | |
07af3e5e | 80 | (home-page "http://rpm5.org/files/popt/") |
df77a462 LC |
81 | (synopsis "Command line option parsing library") |
82 | (description | |
83 | "This is the popt(3) command line option parsing library. While it is | |
84 | similar to getopt(3), it contains a number of enhancements, including: | |
85 | ||
86 | - popt is fully reentrant; | |
87 | ||
88 | - popt can parse arbitrary argv[] style arrays while getopt(3) makes this | |
89 | quite difficult; | |
90 | ||
91 | - popt allows users to alias command line arguments; | |
92 | ||
93 | - popt provides convience functions for parsing strings into argv[] style | |
94 | arrays.") | |
95 | (license x11))) | |
4b4e1b4b LC |
96 | |
97 | (define-public gflags | |
98 | (package | |
99 | (name "gflags") | |
7f5c74d1 | 100 | (version "2.2.2") |
400457af TGR |
101 | (source |
102 | (origin | |
103 | (method git-fetch) | |
104 | (uri (git-reference | |
105 | (url "https://github.com/gflags/gflags.git") | |
106 | (commit (string-append "v" version)))) | |
107 | (sha256 | |
108 | (base32 "147i3md3nxkjlrccqg4mq1kyzc7yrhvqv5902iibc7znkvzdvlp0")) | |
109 | (file-name (git-file-name name version)))) | |
4b4e1b4b LC |
110 | (build-system cmake-build-system) |
111 | (arguments | |
112 | '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" | |
113 | "-DBUILD_TESTING=ON"))) | |
114 | (home-page "https://gflags.github.io/gflags/") | |
115 | (synopsis "C++ library for command-line argument parsing") | |
116 | (description | |
117 | "Gflags is a C++ library to parse command-line flags. It differs from | |
118 | other such libraries in that command-line flag definitions can be scattered | |
119 | around the source code, and not just listed in one place such as @code{main}. | |
120 | This means that a single source-code file will define and use flags that are | |
121 | meaningful to that file. Any application that links in that file will get the | |
122 | flags, and the gflags library will automatically handle that flag | |
123 | appropriately.") | |
124 | (license bsd-3))) | |
ba6a996e RW |
125 | |
126 | (define-public gengetopt | |
127 | (package | |
128 | (name "gengetopt") | |
129 | (version "2.22.6") | |
130 | (source | |
131 | (origin | |
132 | (method url-fetch) | |
133 | (uri (string-append "mirror://gnu/gengetopt/gengetopt-" | |
134 | version ".tar.gz")) | |
135 | (sha256 | |
136 | (base32 | |
137 | "1xq1kcfs6hri101ss4dhym0jn96z4v6jdvx288mfywadc245mc1h")))) | |
138 | (build-system gnu-build-system) | |
139 | (arguments | |
7d1986c4 MB |
140 | `(#:parallel-build? #f ; not supported |
141 | #:parallel-tests? #f)) ; likewise | |
ba6a996e RW |
142 | (synopsis "Create parsers for command line options") |
143 | (description | |
144 | "GNU Gengetopt is a program to generate a C/C++ function for parsing | |
145 | command-line options using the getopt_long function found in GNU | |
146 | libc, removing some of the tedium of this task for large programs | |
147 | that accept many options. The options parsed by the generated | |
148 | function may be in both short (e.g., \"-h\") and long (\"--help\") | |
149 | formats, as specified by the GNU coding standards. Additionally, the | |
150 | output of the standard options \"--help\" and \"--version\" is generated | |
151 | automatically.") | |
6fd52309 | 152 | (home-page "https://www.gnu.org/software/gengetopt/gengetopt.html") |
ba6a996e | 153 | (license gpl3+))) |