gnu: byobu: Update to 5.127.
[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"))
c44899a2
LC
35 (sha256
36 (base32
0c1b29db 37 "01sfjd5a4waqw83bibvmn522g69qfqvwig9i2qlgy154l1nfihgj"))))
c44899a2 38 (build-system gnu-build-system)
21c203a5 39 (arguments
f6154eb5
LC
40 `(;; Explicitly disable tests when cross-compiling, otherwise 'make check'
41 ;; proceeds and fails, unsurprisingly.
42 #:tests? ,(not (%current-target-system))
43
05d86d70
TGR
44 #:phases
45 (modify-phases %standard-phases
46 (add-before 'check 'pre-check
47 (lambda* (#:key inputs #:allow-other-keys)
48 ;; Fix references to /bin/sh.
49 (let ((bash (assoc-ref inputs "bash")))
50 (for-each patch-shebang
51 (find-files "tests" "\\.sh$"))
52 (substitute* (find-files "tests"
53 "posix_spawn")
54 (("/bin/sh")
55 (format #f "~a/bin/sh" bash)))
56 #t))))))
f50d2669 57 (synopsis "Macro processor")
c44899a2 58 (description
a22dc0c4 59 "GNU M4 is an implementation of the M4 macro language, which features
79c311b8
LC
60some extensions over other implementations, some of which are required by GNU
61Autoconf. It is used as a macro processor, which means it processes text,
62expanding macros as it encounters them. It also has some built-in functions,
63for example to run shell commands or to do arithmetic.")
4a44e743 64 (license gpl3+)
6fd52309 65 (home-page "https://www.gnu.org/software/m4/")))