Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
f6154eb5 | 2 | ;;; Copyright © 2012, 2013, 2015 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 m4) |
4a44e743 | 20 | #:use-module (guix licenses) |
59a43334 | 21 | #:use-module (gnu packages) |
c44899a2 | 22 | #:use-module (guix packages) |
87f5d366 | 23 | #:use-module (guix download) |
c44899a2 LC |
24 | #:use-module (guix build-system gnu)) |
25 | ||
26 | (define-public m4 | |
27 | (package | |
28 | (name "m4") | |
1fa49a2c | 29 | (version "1.4.17") |
c44899a2 | 30 | (source (origin |
87f5d366 | 31 | (method url-fetch) |
0db342a5 | 32 | (uri (string-append "mirror://gnu/m4/m4-" |
c44899a2 LC |
33 | version ".tar.bz2")) |
34 | (sha256 | |
35 | (base32 | |
6ac8aa3d | 36 | "0w0da1chh12mczxa5lnwzjk9czi3dq6gnnndbpa6w4rj76b1yklf")))) |
c44899a2 | 37 | (build-system gnu-build-system) |
21c203a5 | 38 | (arguments |
f6154eb5 LC |
39 | `(;; Explicitly disable tests when cross-compiling, otherwise 'make check' |
40 | ;; proceeds and fails, unsurprisingly. | |
41 | #:tests? ,(not (%current-target-system)) | |
42 | ||
21c203a5 LC |
43 | #:phases (alist-cons-before |
44 | 'check 'pre-check | |
45 | (lambda* (#:key inputs #:allow-other-keys) | |
46 | ;; Fix references to /bin/sh. | |
47 | (let ((bash (assoc-ref inputs "bash"))) | |
48 | (for-each patch-shebang | |
49 | (find-files "tests" "\\.sh$")) | |
50 | (substitute* (find-files "tests" | |
51 | "posix_spawn") | |
52 | (("/bin/sh") | |
53 | (format #f "~a/bin/bash" bash))))) | |
54 | %standard-phases))) | |
f50d2669 | 55 | (synopsis "Macro processor") |
c44899a2 | 56 | (description |
a22dc0c4 | 57 | "GNU M4 is an implementation of the M4 macro language, which features |
79c311b8 LC |
58 | some extensions over other implementations, some of which are required by GNU |
59 | Autoconf. It is used as a macro processor, which means it processes text, | |
60 | expanding macros as it encounters them. It also has some built-in functions, | |
61 | for example to run shell commands or to do arithmetic.") | |
4a44e743 | 62 | (license gpl3+) |
c44899a2 | 63 | (home-page "http://www.gnu.org/software/m4/"))) |