From 33d92fd4c7838d0cade2a1ecb15c7b760854d524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Tue, 18 Jun 2024 19:12:31 +0800 Subject: [PATCH] gnu: cppawk: Fix build. * gnu/packages/gawk.scm (cppawk)[arguments]: Don't refer to nonexistent 'build' phase. Fix "/bin/sh" and "/usr/bin/awk" paths in test fails. Change-Id: Id86a78378558592c41f19f15e4c5e4890f995a6c --- gnu/packages/gawk.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm index aadf3d5180..1497030043 100644 --- a/gnu/packages/gawk.scm +++ b/gnu/packages/gawk.scm @@ -183,6 +183,7 @@ (define-public cppawk (add-after 'unpack 'fix-paths (lambda _ (substitute* "bin/cppawk" + (("/bin/sh") (which "sh")) (("/bin/bash") (which "bash")) (("dirname") (which "dirname")) (("mktemp") (which "mktemp")) @@ -190,13 +191,20 @@ (define-public cppawk (("printf ") (string-append (which "printf") " ")) (("rm -f") (string-append (which "rm") " -f")) (("prepro=cpp") (string-append "prepro=" (which "cpp"))) - (("sed -e") (string-append (which "sed") " -e"))))) + (("sed -e") (string-append (which "sed") " -e"))) + (substitute* '("runtests" + "testdir/testawk" + "testdir/testcpp" + "testdir/testdel") + (("/bin/sh") (which "sh"))) + (substitute* "testsuite.awk" + (("/usr/bin/awk") (which "awk"))))) (add-after 'fix-paths 'fix-awk-paths (lambda _ (substitute* "bin/cppawk" (("awk=gawk") (string-append "awk=" (which "gawk"))) (("awk '") (string-append (which "gawk") " '"))))) - (add-after 'build 'check + (add-after 'fix-awk-paths 'check (lambda _ (invoke "./runtests")))))) (native-inputs