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: I0c402fcea5708c4882b52309b3e072301f0a5614master
parent
7ed5a336bd
commit
d6a39f3e89
|
@ -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,93 +353,93 @@ 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
|
||||||
(sha256
|
(url "https://gitlab.com/saalen/highlight")
|
||||||
(base32
|
(commit version)))
|
||||||
"1iggdw4c8pfz1z1c51fyd6x79y1mnc82b6lfkg3vbb44739m5cjs"))
|
(file-name (git-file-name name version))
|
||||||
(patches (search-patches "highlight-gui-data-dir.patch"))))
|
(sha256
|
||||||
|
(base32 "0xb9jm7249qnbain4l94nakgxsmia4w4x246dagr669fkmffcdmg"))
|
||||||
|
(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
|
||||||
"/share/highlight/config/")))
|
#:make-flags #~(let ((confdir (string-append #$output
|
||||||
(list (string-append "PREFIX=" %output)
|
"/share/highlight/config/")))
|
||||||
(string-append "HL_CONFIG_DIR=" confdir)
|
(list (string-append "PREFIX=" #$output)
|
||||||
(string-append "conf_dir=" confdir)))
|
(string-append "HL_CONFIG_DIR=" confdir)
|
||||||
#:phases #~(modify-phases %standard-phases
|
(string-append "conf_dir=" confdir)))
|
||||||
(delete 'configure) ;no configure script
|
#:phases #~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'fix-search-for-lua
|
(delete 'configure) ;no configure script
|
||||||
(lambda _
|
(add-after 'unpack 'fix-search-for-lua
|
||||||
(let ((ver #$(version-major+minor (package-version
|
(lambda _
|
||||||
lua))))
|
(let ((ver #$(version-major+minor
|
||||||
(substitute* "src/makefile"
|
(package-version (this-package-input "lua")))))
|
||||||
(("(LUA_PKG_NAME=).*" _ assignment)
|
(substitute* "src/makefile"
|
||||||
(string-append assignment "lua-" ver "\n")))
|
(("(LUA_PKG_NAME=).*" _ assignment)
|
||||||
(substitute* "src/gui-qt/highlight.pro"
|
(string-append assignment "lua-" ver "\n")))
|
||||||
(("(PKGCONFIG \\+= lua)" _ assignment)
|
(substitute* "src/gui-qt/highlight.pro"
|
||||||
(string-append assignment "-" ver)))
|
(("(PKGCONFIG \\+= lua)" _ assignment)
|
||||||
(substitute* "extras/swig/makefile"
|
(string-append assignment "-" ver)))
|
||||||
(("lua")
|
(substitute* "extras/swig/makefile"
|
||||||
(string-append "lua-" ver))))))
|
(("lua")
|
||||||
(add-after 'build 'build-gui
|
(string-append "lua-" ver))))))
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(add-after 'build 'build-gui
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(data (string-append out
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
"/share/highlight/"))
|
(data (string-append out "/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 "/share/highlight/")))
|
||||||
(gui-data (string-append gui
|
;; modified version of gui task in makefile
|
||||||
"/share/highlight/")))
|
(invoke "make"
|
||||||
;; modified version of gui task in makefile
|
"-C"
|
||||||
(invoke "make"
|
"./src"
|
||||||
"-C"
|
"-f"
|
||||||
"./src"
|
"./makefile"
|
||||||
"-f"
|
(string-append "HL_DATA_DIR=" data)
|
||||||
"./makefile"
|
(string-append "HL_CONFIG_DIR=" conf)
|
||||||
(string-append "HL_DATA_DIR=" data)
|
(string-append "HL_DOC_DIR=" doc)
|
||||||
(string-append "HL_CONFIG_DIR=" conf)
|
(string-append "GUI_DATA_DIR=" gui-data)
|
||||||
(string-append "HL_DOC_DIR=" doc)
|
"gui-qt"))))
|
||||||
(string-append "GUI_DATA_DIR=" gui-data)
|
(replace 'install
|
||||||
"gui-qt"))))
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(replace 'install
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(invoke "make" "install"
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(string-append "PREFIX=" out)))))
|
||||||
(invoke "make" "install"
|
(add-after 'install 'install-perl-bindings
|
||||||
(string-append "PREFIX=" out)))))
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(add-after 'install 'install-perl-bindings
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(data (string-append out "/share/highlight/"))
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(conf (string-append out "/etc/highlight/"))
|
||||||
(data (string-append out
|
(perldir (string-append out
|
||||||
"/share/highlight/"))
|
"/lib/perl5/site_perl/"
|
||||||
(conf (string-append out "/etc/highlight/"))
|
#$(package-version
|
||||||
(perldir (string-append out
|
(this-package-input "perl"))))
|
||||||
"/lib/perl5/site_perl/"
|
(autodir (string-append perldir
|
||||||
#$(package-version perl)))
|
"/auto/highlight")))
|
||||||
(autodir (string-append perldir
|
(with-directory-excursion "extras/swig"
|
||||||
"/auto/highlight")))
|
(invoke "make" "perl"
|
||||||
(with-directory-excursion "extras/swig"
|
(string-append "hl_data_dir=" data)
|
||||||
(invoke "make" "perl"
|
(string-append "hl_conf_dir=" conf))
|
||||||
(string-append "hl_data_dir=" data)
|
(invoke "perl" "-I" "." "testmod.pl")
|
||||||
(string-append "hl_conf_dir=" conf))
|
(install-file "highlight.pm" perldir)
|
||||||
(invoke "perl" "-I" "." "testmod.pl")
|
(install-file "highlight.so" autodir)))))
|
||||||
(install-file "highlight.pm" perldir)
|
(add-after 'install 'install-gui
|
||||||
(install-file "highlight.so" autodir)))))
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(add-after 'install 'install-gui
|
(let ((gui (assoc-ref outputs "gui")))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(mkdir-p (string-append gui "/bin"))
|
||||||
(let ((gui (assoc-ref outputs "gui")))
|
(invoke "make" "install-gui"
|
||||||
(mkdir-p (string-append gui "/bin"))
|
(string-append "PREFIX=" gui))))))))
|
||||||
(invoke "make" "install-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,
|
||||||
|
|
Reference in New Issue