gnu: txr: Call ./configure manually instead of patching.

* gnu/packages/lisp.scm (txr)[source]: Remove patch.
[arguments]: Add ‘--prefix’ to #:configure-flags.
Use a custom ‘configure’ phase.
* gnu/packages/patches/txr-shell.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
This commit is contained in:
Tobias Geerinckx-Rice 2020-04-14 18:38:23 +02:00
parent c3f88d4f34
commit 92e52d25ad
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79
3 changed files with 19 additions and 70 deletions

View file

@ -853,22 +853,31 @@ enough to play the original mainframe Zork all the way through.")
(url "http://www.kylheku.com/git/txr/")
(commit (string-append "txr-" version))))
(file-name (git-file-name name version))
(patches (search-patches "txr-shell.patch"))
(sha256
(base32
"0c9qsj4xwc24c9g02mr5n97m4d87d4n0pcc2c2n58l2vg5dnzba0"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("cc=gcc")
'(#:configure-flags
(list "cc=gcc"
(string-append "--prefix=" (assoc-ref %outputs "out")))
#:test-target "tests"
#:phases (modify-phases %standard-phases
(add-after 'configure 'fix-tests
(lambda _
(substitute* "tests/017/realpath.tl"
(("/usr/bin") "/"))
(substitute* "tests/017/realpath.expected"
(("/usr/bin") "/"))
#t)))))
#:phases
(modify-phases %standard-phases
(replace 'configure
;; ./configure is a hand-written script that can't handle standard
;; autotools arguments like CONFIG_SHELL.
(lambda* (#:key configure-flags #:allow-other-keys)
(setenv "txr_shell" (which "bash"))
(apply invoke "./configure" configure-flags)
#t))
(add-after 'configure 'fix-tests
(lambda _
(substitute* "tests/017/realpath.tl"
(("/usr/bin") "/"))
(substitute* "tests/017/realpath.expected"
(("/usr/bin") "/"))
#t)))))
(native-inputs
`(("bison" ,bison)
("flex" ,flex)))