me
/
guix
Archived
1
0
Fork 0

gnu: highlight: Update to 4.11.

* 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.

Reviewed-by: Dale Mellor <guix-devel-0brg6a@rdmp.org>
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>

Change-Id: I0c402fcea5708c4882b52309b3e072301f0a5614
master
chris 2024-04-30 10:39:28 +01:00 committed by Nicolas Goaziou
parent 7ed5a336bd
commit d6a39f3e89
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D
1 changed files with 83 additions and 82 deletions

View File

@ -11,6 +11,7 @@
;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com> ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com> ;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
;;; Copyright © 2024 chris <chris@bumblehead.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -352,30 +353,33 @@ seen in a terminal.")
(define-public highlight (define-public highlight
(package (package
(name "highlight") (name "highlight")
(version "4.8") (version "4.11")
(outputs (list "out" "gui")) (outputs (list "out" "gui"))
(source (origin (source
(method url-fetch) (origin
(uri (string-append "http://www.andre-simon.de/zip/highlight-" (method git-fetch)
version ".tar.bz2")) (uri (git-reference
(url "https://gitlab.com/saalen/highlight")
(commit version)))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32 "0xb9jm7249qnbain4l94nakgxsmia4w4x246dagr669fkmffcdmg"))
"1iggdw4c8pfz1z1c51fyd6x79y1mnc82b6lfkg3vbb44739m5cjs"))
(patches (search-patches "highlight-gui-data-dir.patch")))) (patches (search-patches "highlight-gui-data-dir.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
(list #:tests? #f ;no tests (list
#:make-flags #~(let ((confdir (string-append %output #:tests? #f ;no tests
#:make-flags #~(let ((confdir (string-append #$output
"/share/highlight/config/"))) "/share/highlight/config/")))
(list (string-append "PREFIX=" %output) (list (string-append "PREFIX=" #$output)
(string-append "HL_CONFIG_DIR=" confdir) (string-append "HL_CONFIG_DIR=" confdir)
(string-append "conf_dir=" confdir))) (string-append "conf_dir=" confdir)))
#:phases #~(modify-phases %standard-phases #:phases #~(modify-phases %standard-phases
(delete 'configure) ;no configure script (delete 'configure) ;no configure script
(add-after 'unpack 'fix-search-for-lua (add-after 'unpack 'fix-search-for-lua
(lambda _ (lambda _
(let ((ver #$(version-major+minor (package-version (let ((ver #$(version-major+minor
lua)))) (package-version (this-package-input "lua")))))
(substitute* "src/makefile" (substitute* "src/makefile"
(("(LUA_PKG_NAME=).*" _ assignment) (("(LUA_PKG_NAME=).*" _ assignment)
(string-append assignment "lua-" ver "\n"))) (string-append assignment "lua-" ver "\n")))
@ -388,14 +392,11 @@ seen in a terminal.")
(add-after 'build 'build-gui (add-after 'build 'build-gui
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(data (string-append out (data (string-append out "/share/highlight/"))
"/share/highlight/"))
(conf (string-append out "/etc/highlight/")) (conf (string-append out "/etc/highlight/"))
(doc (string-append out (doc (string-append out "/share/doc/highlight/"))
"/share/doc/highlight/"))
(gui (assoc-ref outputs "gui")) (gui (assoc-ref outputs "gui"))
(gui-data (string-append gui (gui-data (string-append gui "/share/highlight/")))
"/share/highlight/")))
;; modified version of gui task in makefile ;; modified version of gui task in makefile
(invoke "make" (invoke "make"
"-C" "-C"
@ -415,12 +416,12 @@ seen in a terminal.")
(add-after 'install 'install-perl-bindings (add-after 'install 'install-perl-bindings
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(data (string-append out (data (string-append out "/share/highlight/"))
"/share/highlight/"))
(conf (string-append out "/etc/highlight/")) (conf (string-append out "/etc/highlight/"))
(perldir (string-append out (perldir (string-append out
"/lib/perl5/site_perl/" "/lib/perl5/site_perl/"
#$(package-version perl))) #$(package-version
(this-package-input "perl"))))
(autodir (string-append perldir (autodir (string-append perldir
"/auto/highlight"))) "/auto/highlight")))
(with-directory-excursion "extras/swig" (with-directory-excursion "extras/swig"
@ -438,7 +439,7 @@ seen in a terminal.")
(string-append "PREFIX=" gui)))))))) (string-append "PREFIX=" gui))))))))
(inputs (list lua boost perl qtbase-5)) (inputs (list lua boost perl qtbase-5))
(native-inputs (list pkg-config swig)) (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") (synopsis "Convert code to documents with syntax highlighting")
(description (description
"Highlight converts source code to HTML, XHTML, RTF, LaTeX, "Highlight converts source code to HTML, XHTML, RTF, LaTeX,