[PATCH] gnu: highlight: Update to 4.11.

  • Done
  • quality assurance status badge
Details
4 participants
  • chris
  • Dale Mellor
  • Nicolas Goaziou
  • Z572
Owner
unassigned
Submitted by
chris
Severity
normal
C
(address . guix-patches@gnu.org)(name . chris)(address . chris@bumblehead.com)
2e0f9a03e955cc28f5b67e7edcc8680eed5bc587.1711617879.git.chris@bumblehead.com
* (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(-)

Toggle diff (190 lines)
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@163.com>
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
+;;; Copyright © 2024 chris <chris@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
C
why use git-fetch
(address . 70047@debbugs.gnu.org)(address . chris@bumblehead.com)
ZgdYqIl521SM9-8d@guix-xps
It may be useful to explain why url-fetch is replaced with git-fetch here. highlight@4.11 was released over a week ago and is only available from the gitlab location and not the website,


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.
Z
Re: [bug#70047] [PATCH] gnu: highlight: Update to 4.11.
(name . chris)(address . chris@bumblehead.com)(address . 70047@debbugs.gnu.org)
87wmpj8xxz.fsf@iscas.ac.cn
chris <chris@bumblehead.com> writes:

Toggle quote (2 lines)
> * (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.

Toggle quote (43 lines)
>
> `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@163.com>
> ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
> ;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
> +;;; Copyright © 2024 chris <chris@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")

but I also think git-fetch is better.

Toggle quote (85 lines)
> + (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"

Toggle quote (8 lines)
> + (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

Toggle quote (42 lines)
> + (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

Toggle quote (24 lines)
> + (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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmYIQygACgkQO1qpk+Gi
3/ANsQ//QUA42RqHUaaveJOhdSAwvOp9cDUQERCY3uV3MXveIvAOGs/VfjXgQWUX
O8qxR6X21AOJK/eCLQFzu7DuhfoJJMMELJruED3e6p4a2qmHIpsCcrMq2Ce6gNky
YcQOsFjq04ggGTfRc0B4a5vI7fLti780GpBWliTUSw6TpCY9czZWYggwhAVV5RsO
kQfzJYEyWUM0gf0degr1jt1aYi3SqK7Usez3ZWlHRS3N12b8/qs4mbZSdR1Ny+Yl
LJzw8e2LeKPH2QIt3aT8DI6g8B99ZRA4u7KAOfQcqd59N6MzoHtA5zlSB6hgIfCm
9Wc47k0ZABN5CCl7yxINgy1Wc6XS7mpywuIhEckL2XcCFfuqWy7GuT0NBItW2sfi
OrxB8MH7WVg+KuTmE5qFwn5SoTZD4k/JM2aLv7pA+CPzSLfO0O8/82hxOsRGqY4M
IyGJ6kIvNs4ABcssaNJiJ/q1xzVbSEm945eVfZt6uqh7MQ8AUFHp1RS40VUpJ0qt
xFku5OxeZaBBaiSJ891B4SvpsNsuhVFxlhDK6Df2tXRWJ7NUdIQCMrcHyDNYcjj3
yl9bezmHTqR+dI4nmgw/SZwWnpdwP7EFUnV9zst2gl3V7ccDcfBBHMtowcNuHdjX
Hedm4bOmty1QG/UN/Dvy3Ih/GZIKql9d6Chn65aQoGe4qn7N5jg=
=NSmc
-----END PGP SIGNATURE-----

C
(name . Z572)(address . zhengjunjie@iscas.ac.cn)(address . 70047@debbugs.gnu.org)
ZghuQy1kiXuGb5Qk@guix-xps
On 3?31? ?, Z572 wrote:
Toggle quote (7 lines)
>
> chris <chris@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.
C
[PATCH] gnu: highlight: Update to 4.11.
(address . 70047@debbugs.gnu.org)(name . chris)(address . chris@bumblehead.com)
8dd88efaf01a7d83823ae7d9723142bc15821a7d.1711831703.git.chris@bumblehead.com
* (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(-)

Toggle diff (192 lines)
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@163.com>
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
+;;; Copyright © 2024 chris <chris@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
C
(name . Z572)(address . zhengjunjie@iscas.ac.cn)(address . 70047@debbugs.gnu.org)
ZgiDb_d6QrjZLpUF@guix-xps
On 3?31? ?, Z572 wrote:
Toggle quote (4 lines)
>
> 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
Z
Z
Zheng Junjie wrote on 31 Mar 06:28 +0200
(name . chris)(address . chris@bumblehead.com)(address . 70047@debbugs.gnu.org)
87jzljhubz.fsf@iscas.ac.cn
chris <chris@bumblehead.com> writes:

Toggle quote (10 lines)
> 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

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.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfr6klGDOXiwIdX/bO1qpk+Gi3/AFAmYI7TAACgkQO1qpk+Gi
3/Di/hAAhsOCbuwfqIBok9EADVotguyK8jtoxhTzssBsd0DdDvZlK1Ais4zMKKa+
bfLEodf5z6XD7Hd9B4RXPIaV5br+HFDFhmvmDl+FyYHNMGz7nAKRYWKHvFXQouPu
hx4STEqbvZfowgLLNCoBrHmBNY1mivZlPc3+ukhMS8PYpaDJqdhzoW+cn5HGoPSf
I9WqmbG31z9RMDCVapTe8qbbQbkx/UVNYOZxa1fdlVTuRhX2qjchdO9wDtm6Kfri
REIj+6V9ePChsPrP5BzrRjiQSHB4oUUv0/nM5fPoPELXSvtsaeKcSOYV1WtcUSJp
5jzvX7eKjdE0v5kyXkgNVc/t5XUKD62W8svRhqBG5CFp57ccUN8yUezk5E+AFGWo
HVb/uYfqDNjl4J31mqGKYr43SN3U11g7C0NZUuO9ogfZuaUmC8JEpYds4jGhNhuW
Le5mPk07e/CBq+m/55OHdODu7NpIEUClK8G35EZ320bkxuMnoskFpLpW7Y9GYkMX
2KpI1YYviwK+I6hEUgfrasW9V/Gcq7rOrlFHMkcRBFhyADFpqVZWomWNRAyqepS4
4j7Z2UA/bzWv8OVJcilstAzZDajJIQtdOLC1LvmSgFduIC9oKzuiTneNFBSyf3Th
uO7IFgZj/PZLRpIOOuBGdHwlcBsjxxYJRACmyntVT6MA8+opCrs=
=4xgn
-----END PGP SIGNATURE-----

C
[PATCH] gnu: highlight: Update to 4.11.
(address . 70047@debbugs.gnu.org)(name . chris)(address . chris@bumblehead.com)
9d2674a6a3dab989ee78bd41e75c2c24c0eff83c.1711864727.git.chris@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.

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

Toggle diff (192 lines)
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@163.com>
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
+;;; Copyright © 2024 chris <chris@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
D
D
Dale Mellor wrote on 30 Apr 11:39 +0200
[PATCH v2] gnu: highlight: Update to 4.11.
(address . 70047@debbugs.gnu.org)
20240430093928.1239052-1-guix-devel-0brg6a@rdmp.org
From: chris <chris@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@rdmp.org>
Change-Id: I0c402fcea5708c4882b52309b3e072301f0a5614
---
gnu/packages/pretty-print.scm | 165 +++++++++++++++++-----------------
1 file changed, 83 insertions(+), 82 deletions(-)

Toggle diff (190 lines)
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@163.com>
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
+;;; Copyright © 2024 chris <chris@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
N
N
Nicolas Goaziou wrote on 6 May 14:00 +0200
(name . Dale Mellor)(address . guix-devel-0brg6a@rdmp.org)
875xvrywtd.fsf@nicolasgoaziou.fr
Hello,

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

Toggle quote (8 lines)
> From: chris <chris@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
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 70047@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70047
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch