Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
9e771e3b | 2 | ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> |
2c14c6d7 | 3 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> |
c44899a2 | 4 | ;;; |
233e7676 | 5 | ;;; This file is part of GNU Guix. |
c44899a2 | 6 | ;;; |
233e7676 | 7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
c44899a2 LC |
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 | ;;; | |
233e7676 | 12 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
c44899a2 LC |
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 | |
233e7676 | 18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
c44899a2 | 19 | |
1ffa7090 | 20 | (define-module (gnu packages gawk) |
4a44e743 | 21 | #:use-module (guix licenses) |
63c0c19a | 22 | #:use-module (gnu packages bash) |
1ffa7090 | 23 | #:use-module (gnu packages libsigsegv) |
c44899a2 | 24 | #:use-module (guix packages) |
87f5d366 | 25 | #:use-module (guix download) |
c44899a2 LC |
26 | #:use-module (guix build-system gnu)) |
27 | ||
28 | (define-public gawk | |
29 | (package | |
30 | (name "gawk") | |
a6ac9ca6 | 31 | (version "4.1.1") |
c44899a2 | 32 | (source (origin |
87f5d366 | 33 | (method url-fetch) |
0db342a5 | 34 | (uri (string-append "mirror://gnu/gawk/gawk-" version |
cecb712c | 35 | ".tar.xz")) |
c44899a2 | 36 | (sha256 |
a6ac9ca6 | 37 | (base32 "1nz83vpss8xv7m475sv4qhhj40g74nvcw0y9kwq9ds8wzfmcdm7g")))) |
c44899a2 | 38 | (build-system gnu-build-system) |
c2031363 | 39 | (arguments |
21c203a5 | 40 | `(#:parallel-tests? #f ; test suite fails in parallel |
c2031363 | 41 | |
21c203a5 LC |
42 | #:phases (alist-cons-before |
43 | 'configure 'set-shell-file-name | |
44 | (lambda* (#:key inputs #:allow-other-keys) | |
45 | ;; Refer to the right shell. | |
63c0c19a LC |
46 | (let ((bash (assoc-ref inputs "bash"))) |
47 | (substitute* "io.c" | |
48 | (("/bin/sh") | |
1e4310f1 LC |
49 | (string-append bash "/bin/bash"))) |
50 | ||
51 | ;; When cross-compiling, remove dependencies on the | |
52 | ;; `check-for-shared-lib-support' target, which tries to | |
53 | ;; run the cross-built `gawk'. | |
54 | ,@(if (%current-target-system) | |
55 | '((substitute* "extension/Makefile.in" | |
56 | (("^.*: check-for-shared-lib-support" match) | |
57 | (string-append "### " match)))) | |
6646747c MW |
58 | '()) |
59 | ||
60 | ;; XXX FIXME prerelease libtool fails on MIPS in the | |
61 | ;; absence of /usr/bin/file. | |
62 | ,@(if (equal? "mips64el-linux" (or (%current-target-system) | |
63 | (%current-system))) | |
64 | '((substitute* "extension/configure" | |
65 | (("/usr/bin/file") (which "file")))) | |
1e4310f1 | 66 | '()))) |
56c092ce | 67 | %standard-phases))) |
63c0c19a LC |
68 | (inputs `(("libsigsegv" ,libsigsegv) |
69 | ||
63c0c19a LC |
70 | ,@(if (%current-target-system) |
71 | `(("bash" ,bash)) | |
72 | '()))) | |
fa5731ba | 73 | |
c44899a2 | 74 | (home-page "http://www.gnu.org/software/gawk/") |
9e771e3b | 75 | (synopsis "Text scanning and processing language") |
c44899a2 | 76 | (description |
79c311b8 LC |
77 | "Gawk is the GNU implementation of Awk, a specialized programming |
78 | language for the easy manipulation of formatted text, such as tables of data. | |
c5779c93 | 79 | Gawk features many extensions beyond the traditional implementation, |
79c311b8 | 80 | including network access, sorting, and large libraries.") |
4a44e743 | 81 | (license gpl3+))) |