gnu: libidn: Update to 1.30.
[jackhill/guix/guix.git] / gnu / packages / readline.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
f6d47eb6 2;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
c44899a2 3;;;
233e7676 4;;; This file is part of GNU Guix.
c44899a2 5;;;
233e7676 6;;; GNU Guix is free software; you can redistribute it and/or modify it
c44899a2
LC
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;;;
233e7676 11;;; GNU Guix is distributed in the hope that it will be useful, but
c44899a2
LC
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
233e7676 17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
c44899a2 18
1ffa7090 19(define-module (gnu packages readline)
4a44e743 20 #:use-module (guix licenses)
59a43334 21 #:use-module (gnu packages)
1ffa7090 22 #:use-module (gnu packages ncurses)
c44899a2 23 #:use-module (guix packages)
87f5d366 24 #:use-module (guix download)
c44899a2
LC
25 #:use-module (guix build-system gnu))
26
27(define-public readline
530c1695
LC
28 (let ((post-install-phase
29 '(lambda* (#:key outputs #:allow-other-keys)
30 (let* ((out (assoc-ref outputs "out"))
31 (lib (string-append out "/lib")))
32 ;; Make libraries writable so that `strip' can work.
33 ;; Failing to do that, it bails out with "Permission
34 ;; denied".
35 (for-each (lambda (f) (chmod f #o755))
36 (find-files lib "\\.so"))
37 (for-each (lambda (f) (chmod f #o644))
c0895112 38 (find-files lib "\\.a"))))))
530c1695
LC
39 (package
40 (name "readline")
284c0046 41 (version "6.3")
530c1695
LC
42 (source (origin
43 (method url-fetch)
44 (uri (string-append "mirror://gnu/readline/readline-"
45 version ".tar.gz"))
46 (sha256
47 (base32
284c0046 48 "0hzxr9jxqqx5sxsv9vmlxdnvlr9vi4ih1avjb869hbs6p5qn1fjn"))
8f557fc8 49 (patches (list (search-patch "readline-link-ncurses.patch")))
de80b504 50 (patch-flags '("-p0"))))
530c1695
LC
51 (build-system gnu-build-system)
52 (propagated-inputs `(("ncurses" ,ncurses)))
de80b504 53 (arguments `(#:configure-flags
530c1695
LC
54 (list (string-append "LDFLAGS=-Wl,-rpath -Wl,"
55 (assoc-ref %build-inputs "ncurses")
f6d47eb6
LC
56 "/lib")
57
58 ;; This test does an 'AC_TRY_RUN', which aborts when
59 ;; cross-compiling, so provide the correct answer.
60 ,@(if (%current-target-system)
61 '("bash_cv_wcwidth_broken=no")
62 '()))
4500581a 63
530c1695
LC
64 #:phases (alist-cons-after
65 'install 'post-install
66 ,post-install-phase
56c092ce 67 %standard-phases)))
f50d2669 68 (synopsis "Edit command lines while typing, with history support")
530c1695 69 (description
79c311b8 70 "The GNU readline library allows users to edit command lines as they
a22dc0c4
LC
71are typed in. It can maintain a searchable history of previously entered
72commands, letting you easily recall, edit and re-enter past commands. It
73features both Emacs-like and vi-like keybindings, making its usage
74comfortable for anyone.")
530c1695
LC
75 (license gpl3+)
76 (home-page "http://savannah.gnu.org/projects/readline/"))))
50322c84
LC
77
78(define-public readline-6.2
79 (package (inherit readline)
80 (version "6.2")
81 (source (origin (inherit (package-source readline))
82 (method url-fetch)
83 (uri (string-append "mirror://gnu/readline/readline-"
84 version ".tar.gz"))
85 (sha256
86 (base32
87 "10ckm2bd2rkxhvdmj7nmbsylmihw0abwcsnxf8y27305183rd9kr"))))))