gnu: Add Pfff.
[jackhill/guix/guix.git] / gnu / packages / popt.scm
CommitLineData
df77a462 1;;; GNU Guix --- Functional package management for GNU
07af3e5e 2;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
9495e736 3;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
df77a462
LC
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 licenses))
25
9495e736
RW
26(define-public argtable
27 (package
28 (name "argtable")
29 (version "2.13")
30 (source (origin
31 (method url-fetch)
32 (uri (string-append
33 "mirror://sourceforge/argtable/argtable"
34 (string-join (string-split version #\.) "-")
35 ".tar.gz"))
36 (sha256
37 (base32
38 "1gyxf4bh9jp5gb3l6g5qy90zzcf3vcpk0irgwbv1lc6mrskyhxwg"))))
39 (build-system gnu-build-system)
40 (home-page "http://argtable.sourceforge.net/")
41 (synopsis "Command line option parsing library")
42 (description
43 "Argtable is an ANSI C library for parsing GNU style command line
44options. It enables a program's command line syntax to be defined in the
45source code as an array of argtable structs. The command line is then parsed
46according to that specification and the resulting values are returned in those
47same structs where they are accessible to the main program. Both tagged (-v,
48--verbose, --foo=bar) and untagged arguments are supported, as are multiple
49instances of each argument. Syntax error handling is automatic and the library
50also provides the means for generating a textual description of the command
51line syntax.")
52 (license lgpl2.0+)))
53
df77a462
LC
54(define-public popt
55 (package
56 (name "popt")
57 (version "1.16")
58 (source (origin
59 (method url-fetch)
60 (uri (string-append "http://rpm5.org/files/popt/popt-"
61 version ".tar.gz"))
62 (sha256
63 (base32
64 "1j2c61nn2n351nhj4d25mnf3vpiddcykq005w2h6kw79dwlysa77"))))
65 (build-system gnu-build-system)
66 (arguments
67 '(#:phases (alist-cons-before
68 'configure 'patch-test
69 (lambda _
70 (substitute* "test-poptrc.in"
71 (("/bin/echo") (which "echo")))
72 (substitute* "testit.sh" ; don't expect old libtool names
73 (("lt-test1") "test1")))
74 %standard-phases)))
07af3e5e 75 (home-page "http://rpm5.org/files/popt/")
df77a462
LC
76 (synopsis "Command line option parsing library")
77 (description
78 "This is the popt(3) command line option parsing library. While it is
79similar to getopt(3), it contains a number of enhancements, including:
80
81 - popt is fully reentrant;
82
83 - popt can parse arbitrary argv[] style arrays while getopt(3) makes this
84 quite difficult;
85
86 - popt allows users to alias command line arguments;
87
88 - popt provides convience functions for parsing strings into argv[] style
89 arrays.")
90 (license x11)))