gnu: cvs-fast-export: Update to 1.56.
[jackhill/guix/guix.git] / gnu / packages / m4.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
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 m4)
21 #:use-module (guix licenses)
22 #:use-module (gnu packages)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu))
26
27 (define-public m4
28 (package
29 (name "m4")
30 (version "1.4.18")
31 (source (origin
32 (method url-fetch)
33 (uri (string-append "mirror://gnu/m4/m4-"
34 version ".tar.xz"))
35 (patches (search-patches "m4-gnulib-libio.patch"))
36 (sha256
37 (base32
38 "01sfjd5a4waqw83bibvmn522g69qfqvwig9i2qlgy154l1nfihgj"))))
39 (build-system gnu-build-system)
40 (arguments
41 `(;; Explicitly disable tests when cross-compiling, otherwise 'make check'
42 ;; proceeds and fails, unsurprisingly.
43 #:tests? ,(not (%current-target-system))
44
45 #:phases
46 (modify-phases %standard-phases
47 (add-before 'check 'pre-check
48 (lambda* (#:key inputs #:allow-other-keys)
49 ;; Fix references to /bin/sh.
50 (let ((bash (assoc-ref inputs "bash")))
51 (for-each patch-shebang
52 (find-files "tests" "\\.sh$"))
53 (substitute* (find-files "tests"
54 "posix_spawn")
55 (("/bin/sh")
56 (format #f "~a/bin/sh" bash)))
57 #t))))))
58 (synopsis "Macro processor")
59 (description
60 "GNU M4 is an implementation of the M4 macro language, which features
61 some extensions over other implementations, some of which are required by GNU
62 Autoconf. It is used as a macro processor, which means it processes text,
63 expanding macros as it encounters them. It also has some built-in functions,
64 for example to run shell commands or to do arithmetic.")
65 (license gpl3+)
66 (home-page "https://www.gnu.org/software/m4/")))