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
This commit is contained in:
宋文武 2024-06-18 19:12:31 +08:00 committed by Ludovic Courtès
parent f79b1fdaed
commit 33d92fd4c7
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -183,6 +183,7 @@ (define-public cppawk
(add-after 'unpack 'fix-paths (add-after 'unpack 'fix-paths
(lambda _ (lambda _
(substitute* "bin/cppawk" (substitute* "bin/cppawk"
(("/bin/sh") (which "sh"))
(("/bin/bash") (which "bash")) (("/bin/bash") (which "bash"))
(("dirname") (which "dirname")) (("dirname") (which "dirname"))
(("mktemp") (which "mktemp")) (("mktemp") (which "mktemp"))
@ -190,13 +191,20 @@ (define-public cppawk
(("printf ") (string-append (which "printf") " ")) (("printf ") (string-append (which "printf") " "))
(("rm -f") (string-append (which "rm") " -f")) (("rm -f") (string-append (which "rm") " -f"))
(("prepro=cpp") (string-append "prepro=" (which "cpp"))) (("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 (add-after 'fix-paths 'fix-awk-paths
(lambda _ (lambda _
(substitute* "bin/cppawk" (substitute* "bin/cppawk"
(("awk=gawk") (string-append "awk=" (which "gawk"))) (("awk=gawk") (string-append "awk=" (which "gawk")))
(("awk '") (string-append (which "gawk") " '"))))) (("awk '") (string-append (which "gawk") " '")))))
(add-after 'build 'check (add-after 'fix-awk-paths 'check
(lambda _ (lambda _
(invoke "./runtests")))))) (invoke "./runtests"))))))
(native-inputs (native-inputs