From e15e7b226cabaeac171e20f2a45249cce4c2c12b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 25 Jun 2022 20:57:24 +0200 Subject: gnu: m4: Update to 1.4.19. * gnu/packages/m4.scm (m4): Update to 1.4.19. [source](patches): Remove. [arguments]: Add phase 'disable-test. Adjust shell configuration phase. * gnu/packages/patches/m4-gnulib-libio.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/packages/m4.scm | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'gnu/packages/m4.scm') diff --git a/gnu/packages/m4.scm b/gnu/packages/m4.scm index 090f5578e3..9d3dbe41f2 100644 --- a/gnu/packages/m4.scm +++ b/gnu/packages/m4.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2015 Ludovic Courtès ;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2022 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,34 +28,39 @@ (define-module (gnu packages m4) (define-public m4 (package (name "m4") - (version "1.4.18") + (version "1.4.19") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/m4/m4-" version ".tar.xz")) - (patches (search-patches "m4-gnulib-libio.patch")) (sha256 (base32 - "01sfjd5a4waqw83bibvmn522g69qfqvwig9i2qlgy154l1nfihgj")))) + "15mghcksh11saylpm86h1zkz4in0rbi0pk8i6nqxkdikdmfdxbk3")))) (build-system gnu-build-system) (arguments `(;; Explicitly disable tests when cross-compiling, otherwise 'make check' ;; proceeds and fails, unsurprisingly. #:tests? ,(not (%current-target-system)) - #:phases (modify-phases %standard-phases - (add-before 'check 'pre-check + (add-after 'unpack 'disable-test + (lambda _ + ;; Test 5 raises SIGINT from a child and immediately returns + ;; code 71, and tests whether the child was killed by a signal. + ;; Since there is no signal handler for SIGINT in the build + ;; container, the parent sees the return code, and fails. + ;; XXX: For some reason adding signal handlers in Guile before + ;; running tests has no effect. + (substitute* "tests/test-execute.sh" + (("4 5 6") + "4 6")))) + (add-after 'unpack 'configure-shell (lambda* (#:key inputs #:allow-other-keys) - ;; Fix references to /bin/sh. - (let ((bash (assoc-ref inputs "bash"))) - (for-each patch-shebang - (find-files "tests" "\\.sh$")) - (substitute* (find-files "tests" - "posix_spawn") - (("/bin/sh") - (format #f "~a/bin/sh" bash))) - #t)))))) + (let ((/bin/sh (search-input-file inputs "/bin/sh"))) + ;; Adjust hard-coded /bin/sh for tests. + (substitute* "lib/config.hin" + (("\"/bin/sh\"") + (format #f "\"~a\"" /bin/sh))))))))) (synopsis "Macro processor") (description "GNU M4 is an implementation of the M4 macro language, which features -- cgit v1.2.3