gnu: libretro-lowresnx: Update to 1.2.
[jackhill/guix/guix.git] / gnu / packages / m4.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
f6154eb5 2;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org>
05d86d70 3;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
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 m4)
4a44e743 21 #:use-module (guix licenses)
59a43334 22 #:use-module (gnu packages)
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 m4
28 (package
29 (name "m4")
0c1b29db 30 (version "1.4.18")
c44899a2 31 (source (origin
87f5d366 32 (method url-fetch)
0db342a5 33 (uri (string-append "mirror://gnu/m4/m4-"
0c1b29db 34 version ".tar.xz"))
95895d53 35 (patches (search-patches "m4-gnulib-libio.patch"))
c44899a2
LC
36 (sha256
37 (base32
0c1b29db 38 "01sfjd5a4waqw83bibvmn522g69qfqvwig9i2qlgy154l1nfihgj"))))
c44899a2 39 (build-system gnu-build-system)
21c203a5 40 (arguments
f6154eb5
LC
41 `(;; Explicitly disable tests when cross-compiling, otherwise 'make check'
42 ;; proceeds and fails, unsurprisingly.
43 #:tests? ,(not (%current-target-system))
44
05d86d70
TGR
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))))))
f50d2669 58 (synopsis "Macro processor")
c44899a2 59 (description
a22dc0c4 60 "GNU M4 is an implementation of the M4 macro language, which features
79c311b8
LC
61some extensions over other implementations, some of which are required by GNU
62Autoconf. It is used as a macro processor, which means it processes text,
63expanding macros as it encounters them. It also has some built-in functions,
64for example to run shell commands or to do arithmetic.")
4a44e743 65 (license gpl3+)
6fd52309 66 (home-page "https://www.gnu.org/software/m4/")))