| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 |
|
| 22 | (define-module (gnu packages m4)
|
| 23 | #:use-module (guix licenses)
|
| 24 | #:use-module (gnu packages)
|
| 25 | #:use-module (guix packages)
|
| 26 | #:use-module (guix download)
|
| 27 | #:use-module (guix build-system gnu)
|
| 28 | #:use-module (guix utils))
|
| 29 |
|
| 30 | (define-public m4
|
| 31 | (package
|
| 32 | (name "m4")
|
| 33 | (version "1.4.19")
|
| 34 | (source (origin
|
| 35 | (method url-fetch)
|
| 36 | (uri (string-append "mirror://gnu/m4/m4-"
|
| 37 | version ".tar.xz"))
|
| 38 | (sha256
|
| 39 | (base32
|
| 40 | "15mghcksh11saylpm86h1zkz4in0rbi0pk8i6nqxkdikdmfdxbk3"))))
|
| 41 | (build-system gnu-build-system)
|
| 42 | (arguments
|
| 43 | `( |
| 44 | |
| 45 | #:tests? ,(not (%current-target-system))
|
| 46 | ,@(if (system-hurd64?)
|
| 47 | (list #:configure-flags
|
| 48 | `'(,(string-append
|
| 49 | "CFLAGS=-g -O2"
|
| 50 | " -Wno-error=implicit-function-declaration")))
|
| 51 | '())
|
| 52 | #:phases
|
| 53 | (modify-phases %standard-phases
|
| 54 | (add-after 'unpack 'disable-test
|
| 55 | (lambda _
|
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | (substitute* "tests/test-execute.sh"
|
| 63 | (("4 5 6")
|
| 64 | "4 6"))))
|
| 65 | ,@(if (target-hurd?)
|
| 66 | '((add-after 'unpack 'skip-stack-overflow-tests
|
| 67 | (lambda _
|
| 68 | (substitute* '("tests/test-sigsegv-catch-stackoverflow1.c"
|
| 69 | "tests/test-sigsegv-catch-stackoverflow2.c")
|
| 70 | (("(^| )main *\\(.*" all)
|
| 71 | (string-append all "{\n exit (77);//"))))))
|
| 72 | '())
|
| 73 | ,@(if (target-hurd64?)
|
| 74 | '((add-after 'unpack 'patch-sigsegv
|
| 75 | (lambda _
|
| 76 | |
| 77 | (substitute* "lib/sigsegv.in.h"
|
| 78 | (("__GNU__") "__XGNU__")))))
|
| 79 | '())
|
| 80 | (add-after 'unpack 'configure-shell
|
| 81 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 82 | (let ((/bin/sh (search-input-file (or native-inputs inputs)
|
| 83 | "/bin/sh")))
|
| 84 | |
| 85 | (substitute* "lib/config.hin"
|
| 86 | (("\"/bin/sh\"")
|
| 87 | (format #f "\"~a\"" /bin/sh)))))))))
|
| 88 | (synopsis "Macro processor")
|
| 89 | (description
|
| 90 | "GNU M4 is an implementation of the M4 macro language, which features
|
| 91 | some extensions over other implementations, some of which are required by GNU
|
| 92 | Autoconf. It is used as a macro processor, which means it processes text,
|
| 93 | expanding macros as it encounters them. It also has some built-in functions,
|
| 94 | for example to run shell commands or to do arithmetic.")
|
| 95 | (license gpl3+)
|
| 96 | (home-page "https://www.gnu.org/software/m4/")))
|