Revert "gnu: source-highlight: Fix lesspipe file name and use gexps."

This reverts commit 74f07348e9.
It is a core-updates change.
This commit is contained in:
Tobias Geerinckx-Rice 2022-09-25 02:00:00 +02:00
parent 74f07348e9
commit 79b8e52e64
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -32,7 +32,6 @@
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix build-system cmake) #:use-module (guix build-system cmake)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix gexp)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages bison) #:use-module (gnu packages bison)
@ -277,41 +276,40 @@ to @code{IOStreams}.")
(list boost)) (list boost))
(native-inputs (native-inputs
(list bison flex)) (list bison flex))
(arguments (arguments
(list #:configure-flags `(#:configure-flags
#~(list (string-append "--with-boost=" (assoc-ref %build-inputs "boost"))) (list (string-append "--with-boost="
#:parallel-tests? #f ;There appear to be race conditions (assoc-ref %build-inputs "boost")))
#:phases #:parallel-tests? #f ;There appear to be race conditions
#~(modify-phases %standard-phases #:phases
(add-before 'build 'rename-lesspipe-to-lesspipe.sh.in (modify-phases %standard-phases
(lambda _ ,@(if (%current-target-system)
(substitute* "src/src-hilite-lesspipe.sh.in" ;; 'doc/Makefile.am' tries to run stuff even when
(("lesspipe") "lesspipe.sh")))) ;; cross-compiling. Explicitly skip it.
#$@(if (%current-target-system) ;; XXX: Inline this on next rebuild cycle.
;; 'doc/Makefile.am' tries to run stuff even when `((add-before 'build 'skip-doc-directory
;; cross-compiling. Explicitly skip it. (lambda _
;; XXX: Inline this on next rebuild cycle. (substitute* "Makefile"
#~((add-before 'build 'skip-doc-directory (("^SUBDIRS = (.*) doc(.*)$" _ before after)
(lambda _ (string-append "SUBDIRS = " before
(substitute* "Makefile" " " after "\n")))
(("^SUBDIRS = (.*) doc(.*)$" _ before after) #t)))
(string-append "SUBDIRS = " before '())
" " after "\n")))))) (add-before 'check 'patch-test-files
'()) (lambda _
(add-before 'check 'patch-test-files ;; Unpatch shebangs in test input so that source-highlight
(lambda _ ;; is still able to infer input language
;; Unpatch shebangs in test input so that source-highlight (substitute* '("tests/test.sh"
;; is still able to infer input language "tests/test2.sh"
(substitute* '("tests/test.sh" "tests/test.tcl")
"tests/test2.sh" (((string-append "#! *" (which "sh"))) "#!/bin/sh"))
"tests/test.tcl") ;; Initial patching unrecoverably removes whitespace, so
(((string-append "#! *" (which "sh"))) "#!/bin/sh")) ;; remove it also in the comparison output.
;; Initial patching unrecoverably removes whitespace, so (substitute* '("tests/test.sh.html"
;; remove it also in the comparison output. "tests/test2.sh.html"
(substitute* '("tests/test.sh.html" "tests/test.tcl.html")
"tests/test2.sh.html" (("#! */bin/sh") "#!/bin/sh"))
"tests/test.tcl.html") #t)))))
(("#! */bin/sh") "#!/bin/sh")))))))
(home-page "https://www.gnu.org/software/src-highlite/") (home-page "https://www.gnu.org/software/src-highlite/")
(synopsis "Produce a document with syntax highlighting from a source file") (synopsis "Produce a document with syntax highlighting from a source file")
(description (description