diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2026-08-31 12:30:06 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2026-08-31 15:31:40 +0900 |
| commit | daefbb47995296ac55908a039fb0554e8cfe2523 (patch) | |
| tree | 50188bb4c1bfb691a0c3b93d09b2b0dcb3b1f61b /gnu/packages | |
| parent | 2ce24c197102433f78c4cb2b47929ca507259fab (diff) | |
gnu: highlight: Update to v4.21 and drop qtbase-5 dependency.
* gnu/packages/pretty-print.scm (highlight): Update to v4.21.
[outputs]: Remove gui.
[#:disallowed-references]: New.
[#:phases] {fix-search-for-lua}: Update.
{build-gui}: Remove.
{install}: Use #$output, and invoke make in parallel.
{install-gui}: Remove.
[native-inputs]: Replace swig-4.0 with swig-4.4.
[inputs]: Remove qtbase-5.
[home-page]: Update URL.
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/pretty-print.scm | 117 |
1 files changed, 43 insertions, 74 deletions
diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 3146976505c..abc71771020 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> | 9 | ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> |
| 10 | ;;; Copyright © 2021 Greg Hogan <code@greghogan.com> | 10 | ;;; Copyright © 2021 Greg Hogan <code@greghogan.com> |
| 11 | ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com> | 11 | ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com> |
| 12 | ;;; Copyright © 2022-2023, 2025 Maxim Cournoyer <maxim@guixotic.coop> | 12 | ;;; Copyright © 2022-2023, 2025-2026 Maxim Cournoyer <maxim@guixotic.coop> |
| 13 | ;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com> | 13 | ;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com> |
| 14 | ;;; Copyright © 2024 chris <chris@bumblehead.com> | 14 | ;;; Copyright © 2024 chris <chris@bumblehead.com> |
| 15 | ;;; Copyright © 2025 Artyom V. Poptsov <poptsov.artyom@gmail.com> | 15 | ;;; Copyright © 2025 Artyom V. Poptsov <poptsov.artyom@gmail.com> |
| @@ -387,93 +387,62 @@ seen in a terminal.") | |||
| 387 | (define-public highlight | 387 | (define-public highlight |
| 388 | (package | 388 | (package |
| 389 | (name "highlight") | 389 | (name "highlight") |
| 390 | (version "4.11") | 390 | (version "v4.21") |
| 391 | (outputs (list "out" "gui")) | ||
| 392 | (source | 391 | (source |
| 393 | (origin | 392 | (origin |
| 394 | (method git-fetch) | 393 | (method git-fetch) |
| 395 | (uri (git-reference | 394 | (uri (git-reference |
| 396 | (url "https://gitlab.com/saalen/highlight") | 395 | (url "https://gitlab.com/saalen/highlight") |
| 397 | (commit version))) | 396 | (commit version))) |
| 398 | (file-name (git-file-name name version)) | 397 | (file-name (git-file-name name version)) |
| 399 | (sha256 | 398 | (sha256 |
| 400 | (base32 "0xb9jm7249qnbain4l94nakgxsmia4w4x246dagr669fkmffcdmg")) | 399 | (base32 "0r3s41qzr5g0libvj99p6wgclkqg03lzxnry4hi7l7z0dwfb3m61")))) |
| 401 | (patches (search-patches "highlight-gui-data-dir.patch")))) | ||
| 402 | (build-system gnu-build-system) | 400 | (build-system gnu-build-system) |
| 403 | (arguments | 401 | (arguments |
| 404 | (list | 402 | (list |
| 405 | #:tests? #f ;no tests | 403 | #:disallowed-references (list qtbase-5 qtbase) |
| 404 | #:tests? #f ;no tests | ||
| 406 | #:make-flags #~(let ((confdir (string-append #$output | 405 | #:make-flags #~(let ((confdir (string-append #$output |
| 407 | "/share/highlight/config/"))) | 406 | "/share/highlight/config/"))) |
| 408 | (list (string-append "PREFIX=" #$output) | 407 | (list (string-append "PREFIX=" #$output) |
| 409 | (string-append "HL_CONFIG_DIR=" confdir) | 408 | (string-append "HL_CONFIG_DIR=" confdir) |
| 410 | (string-append "conf_dir=" confdir))) | 409 | (string-append "conf_dir=" confdir))) |
| 411 | #:phases #~(modify-phases %standard-phases | 410 | #:phases |
| 412 | (delete 'configure) ;no configure script | 411 | #~(modify-phases %standard-phases |
| 413 | (add-after 'unpack 'fix-search-for-lua | 412 | (delete 'configure) ;no configure script |
| 414 | (lambda _ | 413 | (add-after 'unpack 'fix-search-for-lua |
| 415 | (let ((ver #$(version-major+minor | 414 | (lambda _ |
| 416 | (package-version (this-package-input "lua"))))) | 415 | (let ((ver #$(version-major+minor |
| 417 | (substitute* "src/makefile" | 416 | (package-version (this-package-input "lua"))))) |
| 418 | (("(LUA_PKG_NAME=).*" _ assignment) | 417 | (substitute* "src/makefile" |
| 419 | (string-append assignment "lua-" ver "\n"))) | 418 | (("(LUA_PKG_NAME ?:?= ?).*" _ assignment) |
| 420 | (substitute* "src/gui-qt/highlight.pro" | 419 | (string-append assignment "lua-" ver "\n"))) |
| 421 | (("(PKGCONFIG \\+= lua)" _ assignment) | 420 | (substitute* "extras/swig/makefile" |
| 422 | (string-append assignment "-" ver))) | 421 | (("lua") |
| 423 | (substitute* "extras/swig/makefile" | 422 | (string-append "lua-" ver)))))) |
| 424 | (("lua") | 423 | (add-after 'install 'install-perl-bindings |
| 425 | (string-append "lua-" ver)))))) | 424 | (lambda* (#:key parallel-build? #:allow-other-keys) |
| 426 | (add-after 'build 'build-gui | 425 | (let* ((data (string-append #$output "/share/highlight/")) |
| 427 | (lambda* (#:key inputs outputs #:allow-other-keys) | 426 | (conf (string-append #$output "/etc/highlight/")) |
| 428 | (let* ((out (assoc-ref outputs "out")) | 427 | (perldir (string-append #$output |
| 429 | (data (string-append out "/share/highlight/")) | 428 | "/lib/perl5/site_perl/" |
| 430 | (conf (string-append out "/etc/highlight/")) | 429 | #$(package-version |
| 431 | (doc (string-append out "/share/doc/highlight/")) | 430 | (this-package-input "perl")))) |
| 432 | (gui (assoc-ref outputs "gui")) | 431 | (autodir (string-append perldir |
| 433 | (gui-data (string-append gui "/share/highlight/"))) | 432 | "/auto/highlight"))) |
| 434 | ;; modified version of gui task in makefile | 433 | (with-directory-excursion "extras/swig" |
| 435 | (invoke "make" | 434 | (invoke "make" "perl" "-j" |
| 436 | "-C" | 435 | (if parallel-build? |
| 437 | "./src" | 436 | (number->string (parallel-job-count)) |
| 438 | "-f" | 437 | "1") |
| 439 | "./makefile" | 438 | (string-append "hl_data_dir=" data) |
| 440 | (string-append "HL_DATA_DIR=" data) | 439 | (string-append "hl_conf_dir=" conf)) |
| 441 | (string-append "HL_CONFIG_DIR=" conf) | 440 | (invoke "perl" "-I" "." "testmod.pl") |
| 442 | (string-append "HL_DOC_DIR=" doc) | 441 | (install-file "highlight.pm" perldir) |
| 443 | (string-append "GUI_DATA_DIR=" gui-data) | 442 | (install-file "highlight.so" autodir)))))))) |
| 444 | "gui-qt")))) | 443 | (native-inputs (list pkg-config swig-4.4)) |
| 445 | (replace 'install | 444 | (inputs (list lua boost perl)) |
| 446 | (lambda* (#:key outputs #:allow-other-keys) | 445 | (home-page "https://gitlab.com/saalen/highlight") |
| 447 | (let ((out (assoc-ref outputs "out"))) | ||
| 448 | (invoke "make" "install" | ||
| 449 | (string-append "PREFIX=" out))))) | ||
| 450 | (add-after 'install 'install-perl-bindings | ||
| 451 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 452 | (let* ((out (assoc-ref outputs "out")) | ||
| 453 | (data (string-append out "/share/highlight/")) | ||
| 454 | (conf (string-append out "/etc/highlight/")) | ||
| 455 | (perldir (string-append out | ||
| 456 | "/lib/perl5/site_perl/" | ||
| 457 | #$(package-version | ||
| 458 | (this-package-input "perl")))) | ||
| 459 | (autodir (string-append perldir | ||
| 460 | "/auto/highlight"))) | ||
| 461 | (with-directory-excursion "extras/swig" | ||
| 462 | (invoke "make" "perl" | ||
| 463 | (string-append "hl_data_dir=" data) | ||
| 464 | (string-append "hl_conf_dir=" conf)) | ||
| 465 | (invoke "perl" "-I" "." "testmod.pl") | ||
| 466 | (install-file "highlight.pm" perldir) | ||
| 467 | (install-file "highlight.so" autodir))))) | ||
| 468 | (add-after 'install 'install-gui | ||
| 469 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 470 | (let ((gui (assoc-ref outputs "gui"))) | ||
| 471 | (mkdir-p (string-append gui "/bin")) | ||
| 472 | (invoke "make" "install-gui" | ||
| 473 | (string-append "PREFIX=" gui)))))))) | ||
| 474 | (inputs (list lua boost perl qtbase-5)) | ||
| 475 | (native-inputs (list pkg-config swig-4.0)) | ||
| 476 | (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.html") | ||
| 477 | (synopsis "Convert code to documents with syntax highlighting") | 446 | (synopsis "Convert code to documents with syntax highlighting") |
| 478 | (description | 447 | (description |
| 479 | "Highlight converts source code to HTML, XHTML, RTF, LaTeX, | 448 | "Highlight converts source code to HTML, XHTML, RTF, LaTeX, |
