You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

66 lines
2.7 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013 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. (define-module (gnu packages m4)
  19. #:use-module (guix licenses)
  20. #:use-module (gnu packages)
  21. #:use-module (guix packages)
  22. #:use-module (guix download)
  23. #:use-module (guix build-system gnu))
  24. (define-public m4
  25. (package
  26. (name "m4")
  27. (version "1.4.17")
  28. (source (origin
  29. (method url-fetch)
  30. (uri (string-append "mirror://gnu/m4/m4-"
  31. version ".tar.bz2"))
  32. (sha256
  33. (base32
  34. "0w0da1chh12mczxa5lnwzjk9czi3dq6gnnndbpa6w4rj76b1yklf"))
  35. (patches (list (search-patch "m4-readlink-EINVAL.patch")))))
  36. (build-system gnu-build-system)
  37. (arguments
  38. ;; XXX: Disable tests on those platforms with know issues.
  39. `(#:tests? ,(not (member (%current-system)
  40. '("x86_64-darwin"
  41. "i686-cygwin"
  42. "i686-sunos")))
  43. #:phases (alist-cons-before
  44. 'check 'pre-check
  45. (lambda* (#:key inputs #:allow-other-keys)
  46. ;; Fix references to /bin/sh.
  47. (let ((bash (assoc-ref inputs "bash")))
  48. (for-each patch-shebang
  49. (find-files "tests" "\\.sh$"))
  50. (substitute* (find-files "tests"
  51. "posix_spawn")
  52. (("/bin/sh")
  53. (format #f "~a/bin/bash" bash)))))
  54. %standard-phases)))
  55. (synopsis "Macro processor")
  56. (description
  57. "GNU M4 is an implementation of the M4 macro language, which features
  58. some extensions over other implementations. It is used as a macro processor,
  59. which means it processes text, expanding macros as it encounters them. It
  60. also has some built-in functionns, for example to run shell commands or to do
  61. arithmetic.")
  62. (license gpl3+)
  63. (home-page "http://www.gnu.org/software/m4/")))