Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / popt.scm
CommitLineData
df77a462
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages popt)
20 #:use-module (guix packages)
21 #:use-module (guix download)
22 #:use-module (guix build-system gnu)
23 #:use-module (guix licenses))
24
25(define-public popt
26 (package
27 (name "popt")
28 (version "1.16")
29 (source (origin
30 (method url-fetch)
31 (uri (string-append "http://rpm5.org/files/popt/popt-"
32 version ".tar.gz"))
33 (sha256
34 (base32
35 "1j2c61nn2n351nhj4d25mnf3vpiddcykq005w2h6kw79dwlysa77"))))
36 (build-system gnu-build-system)
37 (arguments
38 '(#:phases (alist-cons-before
39 'configure 'patch-test
40 (lambda _
41 (substitute* "test-poptrc.in"
42 (("/bin/echo") (which "echo")))
43 (substitute* "testit.sh" ; don't expect old libtool names
44 (("lt-test1") "test1")))
45 %standard-phases)))
46 (home-page #f)
47 (synopsis "Command line option parsing library")
48 (description
49 "This is the popt(3) command line option parsing library. While it is
50similar to getopt(3), it contains a number of enhancements, including:
51
52 - popt is fully reentrant;
53
54 - popt can parse arbitrary argv[] style arrays while getopt(3) makes this
55 quite difficult;
56
57 - popt allows users to alias command line arguments;
58
59 - popt provides convience functions for parsing strings into argv[] style
60 arrays.")
61 (license x11)))