GNU bug report logs - #70047
[PATCH] gnu: highlight: Update to 4.11.

Previous Next

Package: guix-patches;

Reported by: chris <chris <at> bumblehead.com>

Date: Thu, 28 Mar 2024 09:27:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70047 in the body.
You can then email your comments to 70047 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#70047; Package guix-patches. (Thu, 28 Mar 2024 09:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to chris <chris <at> bumblehead.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 28 Mar 2024 09:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: chris <chris <at> bumblehead.com>
To: guix-patches <at> gnu.org
Cc: chris <chris <at> bumblehead.com>
Subject: [PATCH] gnu: highlight: Update to 4.11.
Date: Thu, 28 Mar 2024 02:24:39 -0700
*  (highlight): Update to 4.11.

`guix lint highlight` moved the "arguments" nesting, otherwise few changes.
The source is changed to gitlab and the php not-found homepage url is changed
to an available html url

Change-Id: I0c402fcea5708c4882b52309b3e072301f0a5614
---
 gnu/packages/pretty-print.scm | 163 +++++++++++++++++-----------------
 1 file changed, 81 insertions(+), 82 deletions(-)

diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index b95f56729a..13668712d1 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2022 Zhu Zihao  <all_but_last <at> 163.com>
 ;;; Copyright © 2022, 2023 Maxim Cournoyer  <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
+;;; Copyright © 2024 chris <chris <at> bumblehead.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -352,93 +353,91 @@ (define-public source-highlight
 (define-public highlight
   (package
     (name "highlight")
-    (version "4.8")
+    (version "4.11")
     (outputs (list "out" "gui"))
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://www.andre-simon.de/zip/highlight-"
-                                  version ".tar.bz2"))
-              (sha256
-               (base32
-                "1iggdw4c8pfz1z1c51fyd6x79y1mnc82b6lfkg3vbb44739m5cjs"))
-              (patches (search-patches "highlight-gui-data-dir.patch"))))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/saalen/highlight")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0xb9jm7249qnbain4l94nakgxsmia4w4x246dagr669fkmffcdmg"))
+       (patches (search-patches "highlight-gui-data-dir.patch"))))
     (build-system gnu-build-system)
     (arguments
-     (list #:tests? #f ;no tests
-           #:make-flags #~(let ((confdir (string-append %output
-                                          "/share/highlight/config/")))
-                            (list (string-append "PREFIX=" %output)
-                                  (string-append "HL_CONFIG_DIR=" confdir)
-                                  (string-append "conf_dir=" confdir)))
-           #:phases #~(modify-phases %standard-phases
-                        (delete 'configure) ;no configure script
-                        (add-after 'unpack 'fix-search-for-lua
-                          (lambda _
-                            (let ((ver #$(version-major+minor (package-version
-                                                               lua))))
-                              (substitute* "src/makefile"
-                                (("(LUA_PKG_NAME=).*" _ assignment)
-                                 (string-append assignment "lua-" ver "\n")))
-                              (substitute* "src/gui-qt/highlight.pro"
-                                (("(PKGCONFIG \\+= lua)" _ assignment)
-                                 (string-append assignment "-" ver)))
-                              (substitute* "extras/swig/makefile"
-                                (("lua")
-                                 (string-append "lua-" ver))))))
-                        (add-after 'build 'build-gui
-                          (lambda* (#:key inputs outputs #:allow-other-keys)
-                            (let* ((out (assoc-ref outputs "out"))
-                                   (data (string-append out
-                                                        "/share/highlight/"))
-                                   (conf (string-append out "/etc/highlight/"))
-                                   (doc (string-append out
-                                         "/share/doc/highlight/"))
-                                   (gui (assoc-ref outputs "gui"))
-                                   (gui-data (string-append gui
-                                              "/share/highlight/")))
-                              ;; modified version of gui task in makefile
-                              (invoke "make"
-                                      "-C"
-                                      "./src"
-                                      "-f"
-                                      "./makefile"
-                                      (string-append "HL_DATA_DIR=" data)
-                                      (string-append "HL_CONFIG_DIR=" conf)
-                                      (string-append "HL_DOC_DIR=" doc)
-                                      (string-append "GUI_DATA_DIR=" gui-data)
-                                      "gui-qt"))))
-                        (replace 'install
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let ((out (assoc-ref outputs "out")))
-                              (invoke "make" "install"
-                                      (string-append "PREFIX=" out)))))
-                        (add-after 'install 'install-perl-bindings
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let* ((out (assoc-ref outputs "out"))
-                                   (data (string-append out
-                                                        "/share/highlight/"))
-                                   (conf (string-append out "/etc/highlight/"))
-                                   (perldir (string-append out
-                                             "/lib/perl5/site_perl/"
-                                             #$(package-version perl)))
-                                   (autodir (string-append perldir
-                                                           "/auto/highlight")))
-                              (with-directory-excursion "extras/swig"
-                                (invoke "make" "perl"
-                                        (string-append "hl_data_dir=" data)
-                                        (string-append "hl_conf_dir=" conf))
-                                (invoke "perl" "-I" "." "testmod.pl")
-                                (install-file "highlight.pm" perldir)
-                                (install-file "highlight.so" autodir)))))
-                        (add-after 'install 'install-gui
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let ((gui (assoc-ref outputs "gui")))
-                              (mkdir-p (string-append gui "/bin"))
-                              (invoke "make" "install-gui"
-                                      (string-append "PREFIX=" gui))))))))
+     (list
+      #:tests? #f ;no tests
+      #:make-flags #~(let ((confdir (string-append %output
+                                                   "/share/highlight/config/")))
+                       (list (string-append "PREFIX=" %output)
+                             (string-append "HL_CONFIG_DIR=" confdir)
+                             (string-append "conf_dir=" confdir)))
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'configure) ;no configure script
+                   (add-after 'unpack 'fix-search-for-lua
+                     (lambda _
+                       (let ((ver #$(version-major+minor (package-version lua))))
+                         (substitute* "src/makefile"
+                           (("(LUA_PKG_NAME=).*" _ assignment)
+                            (string-append assignment "lua-" ver "\n")))
+                         (substitute* "src/gui-qt/highlight.pro"
+                           (("(PKGCONFIG \\+= lua)" _ assignment)
+                            (string-append assignment "-" ver)))
+                         (substitute* "extras/swig/makefile"
+                           (("lua")
+                            (string-append "lua-" ver))))))
+                   (add-after 'build 'build-gui
+                     (lambda* (#:key inputs outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (data (string-append out "/share/highlight/"))
+                              (conf (string-append out "/etc/highlight/"))
+                              (doc (string-append out "/share/doc/highlight/"))
+                              (gui (assoc-ref outputs "gui"))
+                              (gui-data (string-append gui "/share/highlight/")))
+                         ;; modified version of gui task in makefile
+                         (invoke "make"
+                                 "-C"
+                                 "./src"
+                                 "-f"
+                                 "./makefile"
+                                 (string-append "HL_DATA_DIR=" data)
+                                 (string-append "HL_CONFIG_DIR=" conf)
+                                 (string-append "HL_DOC_DIR=" doc)
+                                 (string-append "GUI_DATA_DIR=" gui-data)
+                                 "gui-qt"))))
+                   (replace 'install
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (invoke "make" "install"
+                                 (string-append "PREFIX=" out)))))
+                   (add-after 'install 'install-perl-bindings
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (data (string-append out "/share/highlight/"))
+                              (conf (string-append out "/etc/highlight/"))
+                              (perldir (string-append out
+                                                      "/lib/perl5/site_perl/"
+                                                      #$(package-version perl)))
+                              (autodir (string-append perldir
+                                                      "/auto/highlight")))
+                         (with-directory-excursion "extras/swig"
+                           (invoke "make" "perl"
+                                   (string-append "hl_data_dir=" data)
+                                   (string-append "hl_conf_dir=" conf))
+                           (invoke "perl" "-I" "." "testmod.pl")
+                           (install-file "highlight.pm" perldir)
+                           (install-file "highlight.so" autodir)))))
+                   (add-after 'install 'install-gui
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((gui (assoc-ref outputs "gui")))
+                         (mkdir-p (string-append gui "/bin"))
+                         (invoke "make" "install-gui"
+                                 (string-append "PREFIX=" gui))))))))
     (inputs (list lua boost perl qtbase-5))
     (native-inputs (list pkg-config swig))
-    (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php")
+    (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.html")
     (synopsis "Convert code to documents with syntax highlighting")
     (description
      "Highlight converts source code to HTML, XHTML, RTF, LaTeX,

base-commit: c2c1098585b10f42bed7647f2130a2727c0488f8
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#70047; Package guix-patches. (Sat, 30 Mar 2024 00:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 70047 <at> debbugs.gnu.org (full text, mbox):

From: chris <chris <at> bumblehead.com>
To: 70047 <at> debbugs.gnu.org
Cc: chris <at> bumblehead.com
Subject: why use git-fetch
Date: Fri, 29 Mar 2024 17:11:20 -0700
It may be useful to explain why url-fetch is replaced with git-fetch here. highlight <at> 4.11 was released over a week ago and is only available from the gitlab location and not the website,

https://gitlab.com/saalen/highlight/-/releases
http://www.andre-simon.de/zip/download.html

With other indicators, it seems the website exists now in a sort-of maintenance-mode. The website has bugs: for example, some pages aren't scrollable to some content can only be accessed by zooming out multiple steps. The gitlab project front page documentation seems more up-to-date and more usable as well.




Information forwarded to guix-patches <at> gnu.org:
bug#70047; Package guix-patches. (Sat, 30 Mar 2024 16:54:01 GMT) Full text and rfc822 format available.

Message #11 received at 70047 <at> debbugs.gnu.org (full text, mbox):

From: Z572 <zhengjunjie <at> iscas.ac.cn>
To: chris <chris <at> bumblehead.com>
Cc: 70047 <at> debbugs.gnu.org
Subject: Re: [bug#70047] [PATCH] gnu: highlight: Update to 4.11.
Date: Sun, 31 Mar 2024 00:24:48 +0800
[Message part 1 (text/plain, inline)]
chris <chris <at> bumblehead.com> writes:

> *  (highlight): Update to 4.11.

please add more info for commit message

* gnu/packages/pretty-print.scm (highlight): Update to 4.11.
[source]: Switch to git-fetch
[home-page]: Switch to html page.

>
> `guix lint highlight` moved the "arguments" nesting, otherwise few changes.
> The source is changed to gitlab and the php not-found homepage url is changed
> to an available html url
>
> Change-Id: I0c402fcea5708c4882b52309b3e072301f0a5614
> ---
>  gnu/packages/pretty-print.scm | 163 +++++++++++++++++-----------------
>  1 file changed, 81 insertions(+), 82 deletions(-)
>
> diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
> index b95f56729a..13668712d1 100644
> --- a/gnu/packages/pretty-print.scm
> +++ b/gnu/packages/pretty-print.scm
> @@ -11,6 +11,7 @@
>  ;;; Copyright © 2022 Zhu Zihao  <all_but_last <at> 163.com>
>  ;;; Copyright © 2022, 2023 Maxim Cournoyer  <maxim.cournoyer <at> gmail.com>
>  ;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
> +;;; Copyright © 2024 chris <chris <at> bumblehead.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -352,93 +353,91 @@ (define-public source-highlight
>  (define-public highlight
>    (package
>      (name "highlight")
> -    (version "4.8")
> +    (version "4.11")
>      (outputs (list "out" "gui"))
> -    (source (origin
> -              (method url-fetch)
> -              (uri (string-append "http://www.andre-simon.de/zip/highlight-"
> -                                  version ".tar.bz2"))
> -              (sha256
> -               (base32
> -                "1iggdw4c8pfz1z1c51fyd6x79y1mnc82b6lfkg3vbb44739m5cjs"))
> -              (patches (search-patches "highlight-gui-data-dir.patch"))))
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://gitlab.com/saalen/highlight")

In fact http://www.andre-simon.de/zip/highlight-4.11.tar.bz2 can download,
but I also think git-fetch is better.

> +             (commit version)))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "0xb9jm7249qnbain4l94nakgxsmia4w4x246dagr669fkmffcdmg"))
> +       (patches (search-patches "highlight-gui-data-dir.patch"))))
>      (build-system gnu-build-system)
>      (arguments
> -     (list #:tests? #f ;no tests
> -           #:make-flags #~(let ((confdir (string-append %output
> -                                          "/share/highlight/config/")))
> -                            (list (string-append "PREFIX=" %output)
> -                                  (string-append "HL_CONFIG_DIR=" confdir)
> -                                  (string-append "conf_dir=" confdir)))
> -           #:phases #~(modify-phases %standard-phases
> -                        (delete 'configure) ;no configure script
> -                        (add-after 'unpack 'fix-search-for-lua
> -                          (lambda _
> -                            (let ((ver #$(version-major+minor (package-version
> -                                                               lua))))
> -                              (substitute* "src/makefile"
> -                                (("(LUA_PKG_NAME=).*" _ assignment)
> -                                 (string-append assignment "lua-" ver "\n")))
> -                              (substitute* "src/gui-qt/highlight.pro"
> -                                (("(PKGCONFIG \\+= lua)" _ assignment)
> -                                 (string-append assignment "-" ver)))
> -                              (substitute* "extras/swig/makefile"
> -                                (("lua")
> -                                 (string-append "lua-" ver))))))
> -                        (add-after 'build 'build-gui
> -                          (lambda* (#:key inputs outputs #:allow-other-keys)
> -                            (let* ((out (assoc-ref outputs "out"))
> -                                   (data (string-append out
> -                                                        "/share/highlight/"))
> -                                   (conf (string-append out "/etc/highlight/"))
> -                                   (doc (string-append out
> -                                         "/share/doc/highlight/"))
> -                                   (gui (assoc-ref outputs "gui"))
> -                                   (gui-data (string-append gui
> -                                              "/share/highlight/")))
> -                              ;; modified version of gui task in makefile
> -                              (invoke "make"
> -                                      "-C"
> -                                      "./src"
> -                                      "-f"
> -                                      "./makefile"
> -                                      (string-append "HL_DATA_DIR=" data)
> -                                      (string-append "HL_CONFIG_DIR=" conf)
> -                                      (string-append "HL_DOC_DIR=" doc)
> -                                      (string-append "GUI_DATA_DIR=" gui-data)
> -                                      "gui-qt"))))
> -                        (replace 'install
> -                          (lambda* (#:key outputs #:allow-other-keys)
> -                            (let ((out (assoc-ref outputs "out")))
> -                              (invoke "make" "install"
> -                                      (string-append "PREFIX=" out)))))
> -                        (add-after 'install 'install-perl-bindings
> -                          (lambda* (#:key outputs #:allow-other-keys)
> -                            (let* ((out (assoc-ref outputs "out"))
> -                                   (data (string-append out
> -                                                        "/share/highlight/"))
> -                                   (conf (string-append out "/etc/highlight/"))
> -                                   (perldir (string-append out
> -                                             "/lib/perl5/site_perl/"
> -                                             #$(package-version perl)))
> -                                   (autodir (string-append perldir
> -                                                           "/auto/highlight")))
> -                              (with-directory-excursion "extras/swig"
> -                                (invoke "make" "perl"
> -                                        (string-append "hl_data_dir=" data)
> -                                        (string-append "hl_conf_dir=" conf))
> -                                (invoke "perl" "-I" "." "testmod.pl")
> -                                (install-file "highlight.pm" perldir)
> -                                (install-file "highlight.so" autodir)))))
> -                        (add-after 'install 'install-gui
> -                          (lambda* (#:key outputs #:allow-other-keys)
> -                            (let ((gui (assoc-ref outputs "gui")))
> -                              (mkdir-p (string-append gui "/bin"))
> -                              (invoke "make" "install-gui"
> -                                      (string-append "PREFIX=" gui))))))))
> +     (list
> +      #:tests? #f ;no tests
> +      #:make-flags #~(let ((confdir (string-append %output
> +                                                   "/share/highlight/config/")))
> +                       (list (string-append "PREFIX=" %output)

An optional suggestion, please replace "%output" with "#$output"

> +                             (string-append "HL_CONFIG_DIR=" confdir)
> +                             (string-append "conf_dir=" confdir)))
> +      #:phases #~(modify-phases %standard-phases
> +                   (delete 'configure) ;no configure script
> +                   (add-after 'unpack 'fix-search-for-lua
> +                     (lambda _
> +                       (let ((ver #$(version-major+minor (package-version lua))))

can you use `(this-package-input "lua")' replace `lua' ? It allow user
replace with a different version lua

> +                         (substitute* "src/makefile"
> +                           (("(LUA_PKG_NAME=).*" _ assignment)
> +                            (string-append assignment "lua-" ver "\n")))
> +                         (substitute* "src/gui-qt/highlight.pro"
> +                           (("(PKGCONFIG \\+= lua)" _ assignment)
> +                            (string-append assignment "-" ver)))
> +                         (substitute* "extras/swig/makefile"
> +                           (("lua")
> +                            (string-append "lua-" ver))))))
> +                   (add-after 'build 'build-gui
> +                     (lambda* (#:key inputs outputs #:allow-other-keys)
> +                       (let* ((out (assoc-ref outputs "out"))
> +                              (data (string-append out "/share/highlight/"))
> +                              (conf (string-append out "/etc/highlight/"))
> +                              (doc (string-append out "/share/doc/highlight/"))
> +                              (gui (assoc-ref outputs "gui"))
> +                              (gui-data (string-append gui "/share/highlight/")))
> +                         ;; modified version of gui task in makefile
> +                         (invoke "make"
> +                                 "-C"
> +                                 "./src"
> +                                 "-f"
> +                                 "./makefile"
> +                                 (string-append "HL_DATA_DIR=" data)
> +                                 (string-append "HL_CONFIG_DIR=" conf)
> +                                 (string-append "HL_DOC_DIR=" doc)
> +                                 (string-append "GUI_DATA_DIR=" gui-data)
> +                                 "gui-qt"))))
> +                   (replace 'install
> +                     (lambda* (#:key outputs #:allow-other-keys)
> +                       (let ((out (assoc-ref outputs "out")))
> +                         (invoke "make" "install"
> +                                 (string-append "PREFIX=" out)))))
> +                   (add-after 'install 'install-perl-bindings
> +                     (lambda* (#:key outputs #:allow-other-keys)
> +                       (let* ((out (assoc-ref outputs "out"))
> +                              (data (string-append out "/share/highlight/"))
> +                              (conf (string-append out "/etc/highlight/"))
> +                              (perldir (string-append out
> +                                                      "/lib/perl5/site_perl/"
> +                                                      #$(package-version perl)))

can you use `(this-package-input "perl")' replace `perl' ? It allow user
replace with a different version perl

> +                              (autodir (string-append perldir
> +                                                      "/auto/highlight")))
> +                         (with-directory-excursion "extras/swig"
> +                           (invoke "make" "perl"
> +                                   (string-append "hl_data_dir=" data)
> +                                   (string-append "hl_conf_dir=" conf))
> +                           (invoke "perl" "-I" "." "testmod.pl")
> +                           (install-file "highlight.pm" perldir)
> +                           (install-file "highlight.so" autodir)))))
> +                   (add-after 'install 'install-gui
> +                     (lambda* (#:key outputs #:allow-other-keys)
> +                       (let ((gui (assoc-ref outputs "gui")))
> +                         (mkdir-p (string-append gui "/bin"))
> +                         (invoke "make" "install-gui"
> +                                 (string-append "PREFIX=" gui))))))))
>      (inputs (list lua boost perl qtbase-5))
>      (native-inputs (list pkg-config swig))
> -    (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php")
> +    (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.html")
>      (synopsis "Convert code to documents with syntax highlighting")
>      (description
>       "Highlight converts source code to HTML, XHTML, RTF, LaTeX,
>
> base-commit: c2c1098585b10f42bed7647f2130a2727c0488f8
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#70047; Package guix-patches. (Sat, 30 Mar 2024 19:58:01 GMT) Full text and rfc822 format available.

Message #14 received at 70047 <at> debbugs.gnu.org (full text, mbox):

From: chris <chris <at> bumblehead.com>
To: Z572 <zhengjunjie <at> iscas.ac.cn>
Cc: 70047 <at> debbugs.gnu.org
Subject: Re: [bug#70047] [PATCH] gnu: highlight: Update to 4.11.
Date: Sat, 30 Mar 2024 12:55:47 -0700
On  3月31日 日, Z572 wrote:
> 
> chris <chris <at> bumblehead.com> writes:
> 
> > *  (highlight): Update to 4.11.
> 
> please add more info for commit message

My novice git workflow usage may produce mistakes in the way updates are added here, however, I'll try to amend the previous commit and commit message with the suggested changes and send again. Any input or advice are welcome.




Information forwarded to guix-patches <at> gnu.org:
bug#70047; Package guix-patches. (Sat, 30 Mar 2024 20:51:01 GMT) Full text and rfc822 format available.

Message #17 received at 70047 <at> debbugs.gnu.org (full text, mbox):

From: chris <chris <at> bumblehead.com>
To: 70047 <at> debbugs.gnu.org
Cc: chris <chris <at> bumblehead.com>
Subject: [PATCH] gnu: highlight: Update to 4.11.
Date: Sat, 30 Mar 2024 13:48:23 -0700
*  (highlight): Update to 4.11.

Other changes include the following,
 * linting is applied to the package definition. This moves the "arguments"
   nesting and adds some noise to the diff,
 * the package source is changed from url-fetch andre-simon.de/zip/download.html
   to git-fetch gitlab.com/saalen/highlight/-/releases,
 * the homepage url is changed; the previous url serves a not found error,
 * per review, "#$output" replaces "%output",
 * per review, `(this-package-input "lua")` replaces `lua`
   to support different user-specified version lua
 * per review, `(this-package-input "perl")` replaces `perl`
   to support different user-specified version perl

Change-Id: I0c402fcea5708c4882b52309b3e072301f0a5614
---
 gnu/packages/pretty-print.scm | 165 +++++++++++++++++-----------------
 1 file changed, 83 insertions(+), 82 deletions(-)

diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index b95f56729a..fa46061303 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2022 Zhu Zihao  <all_but_last <at> 163.com>
 ;;; Copyright © 2022, 2023 Maxim Cournoyer  <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
+;;; Copyright © 2024 chris <chris <at> bumblehead.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -352,93 +353,93 @@ (define-public source-highlight
 (define-public highlight
   (package
     (name "highlight")
-    (version "4.8")
+    (version "4.11")
     (outputs (list "out" "gui"))
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://www.andre-simon.de/zip/highlight-"
-                                  version ".tar.bz2"))
-              (sha256
-               (base32
-                "1iggdw4c8pfz1z1c51fyd6x79y1mnc82b6lfkg3vbb44739m5cjs"))
-              (patches (search-patches "highlight-gui-data-dir.patch"))))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/saalen/highlight")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0xb9jm7249qnbain4l94nakgxsmia4w4x246dagr669fkmffcdmg"))
+       (patches (search-patches "highlight-gui-data-dir.patch"))))
     (build-system gnu-build-system)
     (arguments
-     (list #:tests? #f ;no tests
-           #:make-flags #~(let ((confdir (string-append %output
-                                          "/share/highlight/config/")))
-                            (list (string-append "PREFIX=" %output)
-                                  (string-append "HL_CONFIG_DIR=" confdir)
-                                  (string-append "conf_dir=" confdir)))
-           #:phases #~(modify-phases %standard-phases
-                        (delete 'configure) ;no configure script
-                        (add-after 'unpack 'fix-search-for-lua
-                          (lambda _
-                            (let ((ver #$(version-major+minor (package-version
-                                                               lua))))
-                              (substitute* "src/makefile"
-                                (("(LUA_PKG_NAME=).*" _ assignment)
-                                 (string-append assignment "lua-" ver "\n")))
-                              (substitute* "src/gui-qt/highlight.pro"
-                                (("(PKGCONFIG \\+= lua)" _ assignment)
-                                 (string-append assignment "-" ver)))
-                              (substitute* "extras/swig/makefile"
-                                (("lua")
-                                 (string-append "lua-" ver))))))
-                        (add-after 'build 'build-gui
-                          (lambda* (#:key inputs outputs #:allow-other-keys)
-                            (let* ((out (assoc-ref outputs "out"))
-                                   (data (string-append out
-                                                        "/share/highlight/"))
-                                   (conf (string-append out "/etc/highlight/"))
-                                   (doc (string-append out
-                                         "/share/doc/highlight/"))
-                                   (gui (assoc-ref outputs "gui"))
-                                   (gui-data (string-append gui
-                                              "/share/highlight/")))
-                              ;; modified version of gui task in makefile
-                              (invoke "make"
-                                      "-C"
-                                      "./src"
-                                      "-f"
-                                      "./makefile"
-                                      (string-append "HL_DATA_DIR=" data)
-                                      (string-append "HL_CONFIG_DIR=" conf)
-                                      (string-append "HL_DOC_DIR=" doc)
-                                      (string-append "GUI_DATA_DIR=" gui-data)
-                                      "gui-qt"))))
-                        (replace 'install
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let ((out (assoc-ref outputs "out")))
-                              (invoke "make" "install"
-                                      (string-append "PREFIX=" out)))))
-                        (add-after 'install 'install-perl-bindings
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let* ((out (assoc-ref outputs "out"))
-                                   (data (string-append out
-                                                        "/share/highlight/"))
-                                   (conf (string-append out "/etc/highlight/"))
-                                   (perldir (string-append out
-                                             "/lib/perl5/site_perl/"
-                                             #$(package-version perl)))
-                                   (autodir (string-append perldir
-                                                           "/auto/highlight")))
-                              (with-directory-excursion "extras/swig"
-                                (invoke "make" "perl"
-                                        (string-append "hl_data_dir=" data)
-                                        (string-append "hl_conf_dir=" conf))
-                                (invoke "perl" "-I" "." "testmod.pl")
-                                (install-file "highlight.pm" perldir)
-                                (install-file "highlight.so" autodir)))))
-                        (add-after 'install 'install-gui
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let ((gui (assoc-ref outputs "gui")))
-                              (mkdir-p (string-append gui "/bin"))
-                              (invoke "make" "install-gui"
-                                      (string-append "PREFIX=" gui))))))))
+     (list
+      #:tests? #f ;no tests
+      #:make-flags #~(let ((confdir (string-append #$output
+                                                   "/share/highlight/config/")))
+                       (list (string-append "PREFIX=" #$output)
+                             (string-append "HL_CONFIG_DIR=" confdir)
+                             (string-append "conf_dir=" confdir)))
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'configure) ;no configure script
+                   (add-after 'unpack 'fix-search-for-lua
+                     (lambda _
+                       (let ((ver #$(version-major+minor
+                                     (package-version (this-package-input "lua")))))
+                         (substitute* "src/makefile"
+                           (("(LUA_PKG_NAME=).*" _ assignment)
+                            (string-append assignment "lua-" ver "\n")))
+                         (substitute* "src/gui-qt/highlight.pro"
+                           (("(PKGCONFIG \\+= lua)" _ assignment)
+                            (string-append assignment "-" ver)))
+                         (substitute* "extras/swig/makefile"
+                           (("lua")
+                            (string-append "lua-" ver))))))
+                   (add-after 'build 'build-gui
+                     (lambda* (#:key inputs outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (data (string-append out "/share/highlight/"))
+                              (conf (string-append out "/etc/highlight/"))
+                              (doc (string-append out "/share/doc/highlight/"))
+                              (gui (assoc-ref outputs "gui"))
+                              (gui-data (string-append gui "/share/highlight/")))
+                         ;; modified version of gui task in makefile
+                         (invoke "make"
+                                 "-C"
+                                 "./src"
+                                 "-f"
+                                 "./makefile"
+                                 (string-append "HL_DATA_DIR=" data)
+                                 (string-append "HL_CONFIG_DIR=" conf)
+                                 (string-append "HL_DOC_DIR=" doc)
+                                 (string-append "GUI_DATA_DIR=" gui-data)
+                                 "gui-qt"))))
+                   (replace 'install
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (invoke "make" "install"
+                                 (string-append "PREFIX=" out)))))
+                   (add-after 'install 'install-perl-bindings
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (data (string-append out "/share/highlight/"))
+                              (conf (string-append out "/etc/highlight/"))
+                              (perldir (string-append out
+                                                      "/lib/perl5/site_perl/"
+                                                      #$(package-version
+                                                         (this-package-input "perl"))))
+                              (autodir (string-append perldir
+                                                      "/auto/highlight")))
+                         (with-directory-excursion "extras/swig"
+                           (invoke "make" "perl"
+                                   (string-append "hl_data_dir=" data)
+                                   (string-append "hl_conf_dir=" conf))
+                           (invoke "perl" "-I" "." "testmod.pl")
+                           (install-file "highlight.pm" perldir)
+                           (install-file "highlight.so" autodir)))))
+                   (add-after 'install 'install-gui
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((gui (assoc-ref outputs "gui")))
+                         (mkdir-p (string-append gui "/bin"))
+                         (invoke "make" "install-gui"
+                                 (string-append "PREFIX=" gui))))))))
     (inputs (list lua boost perl qtbase-5))
     (native-inputs (list pkg-config swig))
-    (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php")
+    (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.html")
     (synopsis "Convert code to documents with syntax highlighting")
     (description
      "Highlight converts source code to HTML, XHTML, RTF, LaTeX,

base-commit: c2c1098585b10f42bed7647f2130a2727c0488f8
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#70047; Package guix-patches. (Sat, 30 Mar 2024 21:28:01 GMT) Full text and rfc822 format available.

Message #20 received at 70047 <at> debbugs.gnu.org (full text, mbox):

From: chris <chris <at> bumblehead.com>
To: Z572 <zhengjunjie <at> iscas.ac.cn>
Cc: 70047 <at> debbugs.gnu.org
Subject: Re: [bug#70047] [PATCH] gnu: highlight: Update to 4.11.
Date: Sat, 30 Mar 2024 14:26:07 -0700
On  3月31日 日, Z572 wrote:
> 
> please add more info for commit message
> 

Z572, the commit is patched with your suggested changes. If you believe a different message is needed, feel free to send a specific git commit message you think is best and I will amend the commit with that :) thank you




Information forwarded to guix-patches <at> gnu.org:
bug#70047; Package guix-patches. (Sun, 31 Mar 2024 04:58:01 GMT) Full text and rfc822 format available.

Message #23 received at 70047 <at> debbugs.gnu.org (full text, mbox):

From: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>
To: chris <chris <at> bumblehead.com>
Cc: 70047 <at> debbugs.gnu.org
Subject: Re: [bug#70047] [PATCH] gnu: highlight: Update to 4.11.
Date: Sun, 31 Mar 2024 12:28:21 +0800
[Message part 1 (text/plain, inline)]
chris <chris <at> bumblehead.com> writes:

> On  3月31日 日, Z572 wrote:
>> 
>> please add more info for commit message
>> 
>
> Z572, the commit is patched with your suggested changes. If you
> believe a different message is needed, feel free to send a specific
> git commit message you think is best and I will amend the commit with
> that :) thank you

Refer to other commits(you can use like 'git log
--grep=this-package-input' to see it), and see
https://www.gnu.org/prep/standards/html_node/Change-Logs.html

It should look something like this.

* gnu/packages/pretty-print.scm (highlight): Update to 4.11.
[source]: Switch to git-fetch.
[home-page]: Switch to html page.
[arguments]<#:make-flags>: Use #$output replace %output.
<#:phases>: Use ‘this-package-input‘ to find lua and perl.

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#70047; Package guix-patches. (Sun, 31 Mar 2024 06:01:02 GMT) Full text and rfc822 format available.

Message #26 received at 70047 <at> debbugs.gnu.org (full text, mbox):

From: chris <chris <at> bumblehead.com>
To: 70047 <at> debbugs.gnu.org
Cc: chris <chris <at> bumblehead.com>
Subject: [PATCH] gnu: highlight: Update to 4.11.
Date: Sat, 30 Mar 2024 22:58:47 -0700
* gnu/packages/pretty-print.scm (highlight): Update to 4.11.
[source]: Switch to git-fetch.
[home-page]: Switch to html page.
[arguments]<#:make-flags>: Use #$output replace %output.
<#:phases>: Use ‘this-package-input‘ to find lua and perl.

Change-Id: I0c402fcea5708c4882b52309b3e072301f0a5614
---
 gnu/packages/pretty-print.scm | 165 +++++++++++++++++-----------------
 1 file changed, 83 insertions(+), 82 deletions(-)

diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index b95f56729a..fa46061303 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2022 Zhu Zihao  <all_but_last <at> 163.com>
 ;;; Copyright © 2022, 2023 Maxim Cournoyer  <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
+;;; Copyright © 2024 chris <chris <at> bumblehead.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -352,93 +353,93 @@ (define-public source-highlight
 (define-public highlight
   (package
     (name "highlight")
-    (version "4.8")
+    (version "4.11")
     (outputs (list "out" "gui"))
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://www.andre-simon.de/zip/highlight-"
-                                  version ".tar.bz2"))
-              (sha256
-               (base32
-                "1iggdw4c8pfz1z1c51fyd6x79y1mnc82b6lfkg3vbb44739m5cjs"))
-              (patches (search-patches "highlight-gui-data-dir.patch"))))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/saalen/highlight")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0xb9jm7249qnbain4l94nakgxsmia4w4x246dagr669fkmffcdmg"))
+       (patches (search-patches "highlight-gui-data-dir.patch"))))
     (build-system gnu-build-system)
     (arguments
-     (list #:tests? #f ;no tests
-           #:make-flags #~(let ((confdir (string-append %output
-                                          "/share/highlight/config/")))
-                            (list (string-append "PREFIX=" %output)
-                                  (string-append "HL_CONFIG_DIR=" confdir)
-                                  (string-append "conf_dir=" confdir)))
-           #:phases #~(modify-phases %standard-phases
-                        (delete 'configure) ;no configure script
-                        (add-after 'unpack 'fix-search-for-lua
-                          (lambda _
-                            (let ((ver #$(version-major+minor (package-version
-                                                               lua))))
-                              (substitute* "src/makefile"
-                                (("(LUA_PKG_NAME=).*" _ assignment)
-                                 (string-append assignment "lua-" ver "\n")))
-                              (substitute* "src/gui-qt/highlight.pro"
-                                (("(PKGCONFIG \\+= lua)" _ assignment)
-                                 (string-append assignment "-" ver)))
-                              (substitute* "extras/swig/makefile"
-                                (("lua")
-                                 (string-append "lua-" ver))))))
-                        (add-after 'build 'build-gui
-                          (lambda* (#:key inputs outputs #:allow-other-keys)
-                            (let* ((out (assoc-ref outputs "out"))
-                                   (data (string-append out
-                                                        "/share/highlight/"))
-                                   (conf (string-append out "/etc/highlight/"))
-                                   (doc (string-append out
-                                         "/share/doc/highlight/"))
-                                   (gui (assoc-ref outputs "gui"))
-                                   (gui-data (string-append gui
-                                              "/share/highlight/")))
-                              ;; modified version of gui task in makefile
-                              (invoke "make"
-                                      "-C"
-                                      "./src"
-                                      "-f"
-                                      "./makefile"
-                                      (string-append "HL_DATA_DIR=" data)
-                                      (string-append "HL_CONFIG_DIR=" conf)
-                                      (string-append "HL_DOC_DIR=" doc)
-                                      (string-append "GUI_DATA_DIR=" gui-data)
-                                      "gui-qt"))))
-                        (replace 'install
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let ((out (assoc-ref outputs "out")))
-                              (invoke "make" "install"
-                                      (string-append "PREFIX=" out)))))
-                        (add-after 'install 'install-perl-bindings
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let* ((out (assoc-ref outputs "out"))
-                                   (data (string-append out
-                                                        "/share/highlight/"))
-                                   (conf (string-append out "/etc/highlight/"))
-                                   (perldir (string-append out
-                                             "/lib/perl5/site_perl/"
-                                             #$(package-version perl)))
-                                   (autodir (string-append perldir
-                                                           "/auto/highlight")))
-                              (with-directory-excursion "extras/swig"
-                                (invoke "make" "perl"
-                                        (string-append "hl_data_dir=" data)
-                                        (string-append "hl_conf_dir=" conf))
-                                (invoke "perl" "-I" "." "testmod.pl")
-                                (install-file "highlight.pm" perldir)
-                                (install-file "highlight.so" autodir)))))
-                        (add-after 'install 'install-gui
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let ((gui (assoc-ref outputs "gui")))
-                              (mkdir-p (string-append gui "/bin"))
-                              (invoke "make" "install-gui"
-                                      (string-append "PREFIX=" gui))))))))
+     (list
+      #:tests? #f ;no tests
+      #:make-flags #~(let ((confdir (string-append #$output
+                                                   "/share/highlight/config/")))
+                       (list (string-append "PREFIX=" #$output)
+                             (string-append "HL_CONFIG_DIR=" confdir)
+                             (string-append "conf_dir=" confdir)))
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'configure) ;no configure script
+                   (add-after 'unpack 'fix-search-for-lua
+                     (lambda _
+                       (let ((ver #$(version-major+minor
+                                     (package-version (this-package-input "lua")))))
+                         (substitute* "src/makefile"
+                           (("(LUA_PKG_NAME=).*" _ assignment)
+                            (string-append assignment "lua-" ver "\n")))
+                         (substitute* "src/gui-qt/highlight.pro"
+                           (("(PKGCONFIG \\+= lua)" _ assignment)
+                            (string-append assignment "-" ver)))
+                         (substitute* "extras/swig/makefile"
+                           (("lua")
+                            (string-append "lua-" ver))))))
+                   (add-after 'build 'build-gui
+                     (lambda* (#:key inputs outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (data (string-append out "/share/highlight/"))
+                              (conf (string-append out "/etc/highlight/"))
+                              (doc (string-append out "/share/doc/highlight/"))
+                              (gui (assoc-ref outputs "gui"))
+                              (gui-data (string-append gui "/share/highlight/")))
+                         ;; modified version of gui task in makefile
+                         (invoke "make"
+                                 "-C"
+                                 "./src"
+                                 "-f"
+                                 "./makefile"
+                                 (string-append "HL_DATA_DIR=" data)
+                                 (string-append "HL_CONFIG_DIR=" conf)
+                                 (string-append "HL_DOC_DIR=" doc)
+                                 (string-append "GUI_DATA_DIR=" gui-data)
+                                 "gui-qt"))))
+                   (replace 'install
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (invoke "make" "install"
+                                 (string-append "PREFIX=" out)))))
+                   (add-after 'install 'install-perl-bindings
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (data (string-append out "/share/highlight/"))
+                              (conf (string-append out "/etc/highlight/"))
+                              (perldir (string-append out
+                                                      "/lib/perl5/site_perl/"
+                                                      #$(package-version
+                                                         (this-package-input "perl"))))
+                              (autodir (string-append perldir
+                                                      "/auto/highlight")))
+                         (with-directory-excursion "extras/swig"
+                           (invoke "make" "perl"
+                                   (string-append "hl_data_dir=" data)
+                                   (string-append "hl_conf_dir=" conf))
+                           (invoke "perl" "-I" "." "testmod.pl")
+                           (install-file "highlight.pm" perldir)
+                           (install-file "highlight.so" autodir)))))
+                   (add-after 'install 'install-gui
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((gui (assoc-ref outputs "gui")))
+                         (mkdir-p (string-append gui "/bin"))
+                         (invoke "make" "install-gui"
+                                 (string-append "PREFIX=" gui))))))))
     (inputs (list lua boost perl qtbase-5))
     (native-inputs (list pkg-config swig))
-    (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php")
+    (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.html")
     (synopsis "Convert code to documents with syntax highlighting")
     (description
      "Highlight converts source code to HTML, XHTML, RTF, LaTeX,

base-commit: c2c1098585b10f42bed7647f2130a2727c0488f8
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#70047; Package guix-patches. (Tue, 30 Apr 2024 09:41:02 GMT) Full text and rfc822 format available.

Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dale Mellor <guix-devel-0brg6a <at> rdmp.org>
To: 70047 <at> debbugs.gnu.org
Cc: Dale Mellor <guix-devel-0brg6a <at> rdmp.org>, chris <chris <at> bumblehead.com>,
 guix-patches <at> gnu.org
Subject: [PATCH v2] gnu: highlight: Update to 4.11.
Date: Tue, 30 Apr 2024 10:39:28 +0100
From: chris <chris <at> bumblehead.com>

* gnu/packages/pretty-print.scm (highlight): Update to 4.11.
[source]: Switch to git-fetch.
[home-page]: Switch to html page.
[arguments]<#:make-flags>: Use #$output replace %output.
<#:phases>: Use ‘this-package-input‘ to find lua and perl.

Review:
  * guix build --check, guix build --source-check, guix lint all clean.
  * Changes look good.
  * It works for me on Guix system.
  * It does not work on foreign distribution (neither did the old version).

Reviewed-by: Dale Mellor <guix-devel-0brg6a <at> rdmp.org>
Change-Id: I0c402fcea5708c4882b52309b3e072301f0a5614
---
 gnu/packages/pretty-print.scm | 165 +++++++++++++++++-----------------
 1 file changed, 83 insertions(+), 82 deletions(-)

diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index 7eae40a220..220761fc07 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2022 Zhu Zihao  <all_but_last <at> 163.com>
 ;;; Copyright © 2022, 2023 Maxim Cournoyer  <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2023 gemmaro <gemmaro.dev <at> gmail.com>
+;;; Copyright © 2024 chris <chris <at> bumblehead.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -352,93 +353,93 @@ (define-public source-highlight
 (define-public highlight
   (package
     (name "highlight")
-    (version "4.8")
+    (version "4.11")
     (outputs (list "out" "gui"))
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://www.andre-simon.de/zip/highlight-"
-                                  version ".tar.bz2"))
-              (sha256
-               (base32
-                "1iggdw4c8pfz1z1c51fyd6x79y1mnc82b6lfkg3vbb44739m5cjs"))
-              (patches (search-patches "highlight-gui-data-dir.patch"))))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/saalen/highlight")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0xb9jm7249qnbain4l94nakgxsmia4w4x246dagr669fkmffcdmg"))
+       (patches (search-patches "highlight-gui-data-dir.patch"))))
     (build-system gnu-build-system)
     (arguments
-     (list #:tests? #f ;no tests
-           #:make-flags #~(let ((confdir (string-append %output
-                                          "/share/highlight/config/")))
-                            (list (string-append "PREFIX=" %output)
-                                  (string-append "HL_CONFIG_DIR=" confdir)
-                                  (string-append "conf_dir=" confdir)))
-           #:phases #~(modify-phases %standard-phases
-                        (delete 'configure) ;no configure script
-                        (add-after 'unpack 'fix-search-for-lua
-                          (lambda _
-                            (let ((ver #$(version-major+minor (package-version
-                                                               lua))))
-                              (substitute* "src/makefile"
-                                (("(LUA_PKG_NAME=).*" _ assignment)
-                                 (string-append assignment "lua-" ver "\n")))
-                              (substitute* "src/gui-qt/highlight.pro"
-                                (("(PKGCONFIG \\+= lua)" _ assignment)
-                                 (string-append assignment "-" ver)))
-                              (substitute* "extras/swig/makefile"
-                                (("lua")
-                                 (string-append "lua-" ver))))))
-                        (add-after 'build 'build-gui
-                          (lambda* (#:key inputs outputs #:allow-other-keys)
-                            (let* ((out (assoc-ref outputs "out"))
-                                   (data (string-append out
-                                                        "/share/highlight/"))
-                                   (conf (string-append out "/etc/highlight/"))
-                                   (doc (string-append out
-                                         "/share/doc/highlight/"))
-                                   (gui (assoc-ref outputs "gui"))
-                                   (gui-data (string-append gui
-                                              "/share/highlight/")))
-                              ;; modified version of gui task in makefile
-                              (invoke "make"
-                                      "-C"
-                                      "./src"
-                                      "-f"
-                                      "./makefile"
-                                      (string-append "HL_DATA_DIR=" data)
-                                      (string-append "HL_CONFIG_DIR=" conf)
-                                      (string-append "HL_DOC_DIR=" doc)
-                                      (string-append "GUI_DATA_DIR=" gui-data)
-                                      "gui-qt"))))
-                        (replace 'install
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let ((out (assoc-ref outputs "out")))
-                              (invoke "make" "install"
-                                      (string-append "PREFIX=" out)))))
-                        (add-after 'install 'install-perl-bindings
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let* ((out (assoc-ref outputs "out"))
-                                   (data (string-append out
-                                                        "/share/highlight/"))
-                                   (conf (string-append out "/etc/highlight/"))
-                                   (perldir (string-append out
-                                             "/lib/perl5/site_perl/"
-                                             #$(package-version perl)))
-                                   (autodir (string-append perldir
-                                                           "/auto/highlight")))
-                              (with-directory-excursion "extras/swig"
-                                (invoke "make" "perl"
-                                        (string-append "hl_data_dir=" data)
-                                        (string-append "hl_conf_dir=" conf))
-                                (invoke "perl" "-I" "." "testmod.pl")
-                                (install-file "highlight.pm" perldir)
-                                (install-file "highlight.so" autodir)))))
-                        (add-after 'install 'install-gui
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let ((gui (assoc-ref outputs "gui")))
-                              (mkdir-p (string-append gui "/bin"))
-                              (invoke "make" "install-gui"
-                                      (string-append "PREFIX=" gui))))))))
+     (list
+      #:tests? #f ;no tests
+      #:make-flags #~(let ((confdir (string-append #$output
+                                                   "/share/highlight/config/")))
+                       (list (string-append "PREFIX=" #$output)
+                             (string-append "HL_CONFIG_DIR=" confdir)
+                             (string-append "conf_dir=" confdir)))
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'configure) ;no configure script
+                   (add-after 'unpack 'fix-search-for-lua
+                     (lambda _
+                       (let ((ver #$(version-major+minor
+                                     (package-version (this-package-input "lua")))))
+                         (substitute* "src/makefile"
+                           (("(LUA_PKG_NAME=).*" _ assignment)
+                            (string-append assignment "lua-" ver "\n")))
+                         (substitute* "src/gui-qt/highlight.pro"
+                           (("(PKGCONFIG \\+= lua)" _ assignment)
+                            (string-append assignment "-" ver)))
+                         (substitute* "extras/swig/makefile"
+                           (("lua")
+                            (string-append "lua-" ver))))))
+                   (add-after 'build 'build-gui
+                     (lambda* (#:key inputs outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (data (string-append out "/share/highlight/"))
+                              (conf (string-append out "/etc/highlight/"))
+                              (doc (string-append out "/share/doc/highlight/"))
+                              (gui (assoc-ref outputs "gui"))
+                              (gui-data (string-append gui "/share/highlight/")))
+                         ;; modified version of gui task in makefile
+                         (invoke "make"
+                                 "-C"
+                                 "./src"
+                                 "-f"
+                                 "./makefile"
+                                 (string-append "HL_DATA_DIR=" data)
+                                 (string-append "HL_CONFIG_DIR=" conf)
+                                 (string-append "HL_DOC_DIR=" doc)
+                                 (string-append "GUI_DATA_DIR=" gui-data)
+                                 "gui-qt"))))
+                   (replace 'install
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (invoke "make" "install"
+                                 (string-append "PREFIX=" out)))))
+                   (add-after 'install 'install-perl-bindings
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (data (string-append out "/share/highlight/"))
+                              (conf (string-append out "/etc/highlight/"))
+                              (perldir (string-append out
+                                                      "/lib/perl5/site_perl/"
+                                                      #$(package-version
+                                                         (this-package-input "perl"))))
+                              (autodir (string-append perldir
+                                                      "/auto/highlight")))
+                         (with-directory-excursion "extras/swig"
+                           (invoke "make" "perl"
+                                   (string-append "hl_data_dir=" data)
+                                   (string-append "hl_conf_dir=" conf))
+                           (invoke "perl" "-I" "." "testmod.pl")
+                           (install-file "highlight.pm" perldir)
+                           (install-file "highlight.so" autodir)))))
+                   (add-after 'install 'install-gui
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((gui (assoc-ref outputs "gui")))
+                         (mkdir-p (string-append gui "/bin"))
+                         (invoke "make" "install-gui"
+                                 (string-append "PREFIX=" gui))))))))
     (inputs (list lua boost perl qtbase-5))
     (native-inputs (list pkg-config swig))
-    (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php")
+    (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.html")
     (synopsis "Convert code to documents with syntax highlighting")
     (description
      "Highlight converts source code to HTML, XHTML, RTF, LaTeX,
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#70047; Package guix-patches. (Tue, 30 Apr 2024 09:41:02 GMT) Full text and rfc822 format available.

Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Mon, 06 May 2024 12:02:01 GMT) Full text and rfc822 format available.

Notification sent to chris <chris <at> bumblehead.com>:
bug acknowledged by developer. (Mon, 06 May 2024 12:02:02 GMT) Full text and rfc822 format available.

Message #37 received at 70047-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Dale Mellor <guix-devel-0brg6a <at> rdmp.org>
Cc: chris <at> bumblehead.com, 70047-done <at> debbugs.gnu.org
Subject: Re: [bug#70047] [PATCH v2] gnu: highlight: Update to 4.11.
Date: Mon, 06 May 2024 14:00:30 +0200
Hello,

Dale Mellor <guix-devel-0brg6a <at> rdmp.org> writes:

> From: chris <chris <at> bumblehead.com>
>
> * gnu/packages/pretty-print.scm (highlight): Update to 4.11.
> [source]: Switch to git-fetch.
> [home-page]: Switch to html page.
> [arguments]<#:make-flags>: Use #$output replace %output.
> <#:phases>: Use ‘this-package-input‘ to find lua and perl.

Applied. Thank you.

Regards,
-- 
Nicolas Goaziou






bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 04 Jun 2024 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 20 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.