summary refs log tree commit diff
path: root/distro/base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-07-11 15:42:40 +0200
committerLudovic Courtès <ludo@gnu.org>2012-07-11 15:42:40 +0200
commit4ac3df42904e432133fd76cbc190434fe11efada (patch)
tree5f04cdd48c9daf9c3d9762a49634ee0a7eef3b40 /distro/base.scm
parent6365068393254e1131ab80eb0d68a759e7fd2256 (diff)
downloadguix-4ac3df42904e432133fd76cbc190434fe11efada.tar.gz
distro: Add GNU M4.
* distro/base.scm (m4): New variable.

* distro/m4-readlink-EINVAL.patch, distro/m4-s_isdir.patch: New files.
* Makefile.am (nobase_dist_guilemodule_DATA): Add them.
Diffstat (limited to 'distro/base.scm')
-rw-r--r--distro/base.scm48
1 files changed, 48 insertions, 0 deletions
diff --git a/distro/base.scm b/distro/base.scm
index 8492f1029a..86f9811ed4 100644
--- a/distro/base.scm
+++ b/distro/base.scm
@@ -108,6 +108,54 @@ code.")
    (home-page "http://www.gnu.org/software/hello/")
    (license "GPLv3+")))
 
+(define-public m4
+  (package
+   (name "m4")
+   (version "1.4.16")
+   (source (origin
+            (method http-fetch)
+            (uri (string-append "http://ftp.gnu.org/gnu/m4/m4-"
+                                version ".tar.bz2"))
+            (sha256
+             (base32
+              "035r7ma272j2cwni2961jp22k6bn3n9xwn3b3qbcn2yrvlghql22"))))
+   (build-system gnu-build-system)
+   (arguments (case-lambda
+                ((system)
+                 ;; XXX: Disable tests on those platforms with know issues.
+                 `(#:tests? ,(not (member system
+                                          '("x86_64-darwin"
+                                            "i686-cygwin"
+                                            "i686-sunos")))
+                   #:patches (list (assoc-ref %build-inputs "patch/s_isdir")
+                                   (assoc-ref %build-inputs
+                                              "patch/readlink-EINVAL"))))
+                ((system cross-system)
+                 `(#:patches (list (assoc-ref %build-inputs "patch/s_isdir")
+                                   (assoc-ref %build-inputs
+                                              "patch/readlink-EINVAL"))))))
+   (inputs `(("patch/s_isdir"
+              ,(search-path %load-path "distro/m4-s_isdir.patch"))
+             ("patch/readlink-EINVAL"
+              ,(search-path %load-path "distro/m4-readlink-EINVAL.patch"))))
+   (description "GNU M4, a macro processor")
+   (long-description
+    "GNU M4 is an implementation of the traditional Unix macro processor.  It
+is mostly SVR4 compatible although it has some extensions (for example,
+handling more than 9 positional parameters to macros).  GNU M4 also has
+built-in functions for including files, running shell commands, doing
+arithmetic, etc.
+
+GNU M4 is a macro processor in the sense that it copies its input to the
+output expanding macros as it goes.  Macros are either builtin or
+user-defined and can take any number of arguments.  Besides just doing macro
+expansion, m4 has builtin functions for including named files, running UNIX
+commands, doing integer arithmetic, manipulating text in various ways,
+recursion etc...  m4 can be used either as a front-end to a compiler or as a
+macro processor in its own right.")
+   (license "GPLv3+")
+   (home-page "http://www.gnu.org/software/m4/")))
+
 (define-public guile-1.8
   (package
    (name "guile")