emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57927: closed ([PATCH] gnu: source-highlight: Fix lesspipe file name


From: GNU bug Tracking System
Subject: bug#57927: closed ([PATCH] gnu: source-highlight: Fix lesspipe file name and use gexps.)
Date: Tue, 27 Sep 2022 09:12:01 +0000

Your message dated Tue, 27 Sep 2022 11:11:42 +0200
with message-id <87k05p89m9.fsf@gnu.org>
and subject line Re: bug#57927: [PATCH] gnu: source-highlight: Fix lesspipe 
file name and use gexps.
has caused the debbugs.gnu.org bug report #57927,
regarding [PATCH] gnu: source-highlight: Fix lesspipe file name and use gexps.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
57927: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57927
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] gnu: source-highlight: Fix lesspipe file name and use gexps. Date: Mon, 19 Sep 2022 02:57:30 -0400
This fixes src-hilite-lesspipe.sh so that lesspipe.sh is called instead of 
lesspipe.

* gnu/packages/pretty-print.scm (source-highlight):
[arguments]: Use gexps, remove trailing #ts.
[phases]: Add phase to make src-highlight-lesspipe.sh work.
---
 gnu/packages/pretty-print.scm | 70 ++++++++++++++++++-----------------
 1 file changed, 36 insertions(+), 34 deletions(-)

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

base-commit: 25adb336bcb0188a92ecbe6b9c1d9d3e3a8b59e4
-- 
2.37.2




--- End Message ---
--- Begin Message --- Subject: Re: bug#57927: [PATCH] gnu: source-highlight: Fix lesspipe file name and use gexps. Date: Tue, 27 Sep 2022 11:11:42 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
> * gnu/packages/pretty-print.scm (source-highlight):
> [arguments]: Use gexps, remove trailing #ts.
> [phases]: Add phase to make src-highlight-lesspipe.sh work.

Applied, thanks!

Mathieu


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]