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