Update license headers.
[jackhill/guix/guix.git] / distro / packages / m4.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
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
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (distro packages m4)
20 #:use-module (guix licenses)
21 #:use-module (distro)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix utils)
25 #:use-module (guix build-system gnu))
26
27 (define-public m4
28 (package
29 (name "m4")
30 (version "1.4.16")
31 (source (origin
32 (method url-fetch)
33 (uri (string-append "mirror://gnu/m4/m4-"
34 version ".tar.bz2"))
35 (sha256
36 (base32
37 "035r7ma272j2cwni2961jp22k6bn3n9xwn3b3qbcn2yrvlghql22"))))
38 (build-system gnu-build-system)
39 (arguments (case-lambda
40 ((system)
41 ;; XXX: Disable tests on those platforms with know issues.
42 `(#:tests? ,(not (member system
43 '("x86_64-darwin"
44 "i686-cygwin"
45 "i686-sunos")))
46 #:patches (list (assoc-ref %build-inputs "patch/s_isdir")
47 (assoc-ref %build-inputs
48 "patch/readlink-EINVAL")
49 (assoc-ref %build-inputs "patch/gets"))))
50 ((system cross-system)
51 `(#:patches (list (assoc-ref %build-inputs "patch/s_isdir")
52 (assoc-ref %build-inputs
53 "patch/readlink-EINVAL")
54 (assoc-ref %build-inputs "patch/gets"))))))
55 (inputs `(("patch/s_isdir" ,(search-patch "m4-s_isdir.patch"))
56 ("patch/readlink-EINVAL"
57 ,(search-patch "m4-readlink-EINVAL.patch"))
58 ("patch/gets" ,(search-patch "m4-gets-undeclared.patch"))))
59 (synopsis "GNU M4, a macro processor")
60 (description
61 "GNU M4 is an implementation of the traditional Unix macro processor. It
62 is mostly SVR4 compatible although it has some extensions (for example,
63 handling more than 9 positional parameters to macros). GNU M4 also has
64 built-in functions for including files, running shell commands, doing
65 arithmetic, etc.
66
67 GNU M4 is a macro processor in the sense that it copies its input to the
68 output expanding macros as it goes. Macros are either builtin or
69 user-defined and can take any number of arguments. Besides just doing macro
70 expansion, m4 has builtin functions for including named files, running UNIX
71 commands, doing integer arithmetic, manipulating text in various ways,
72 recursion etc... m4 can be used either as a front-end to a compiler or as a
73 macro processor in its own right.")
74 (license gpl3+)
75 (home-page "http://www.gnu.org/software/m4/")))