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