GNU bug report logs -
#64983
[PATCH 0/3] gnu: highlight: Update to 4.7 and add GUI package.
Previous Next
Reported by: gemmaro <gemmaro.dev <at> gmail.com>
Date: Mon, 31 Jul 2023 23:45:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* gnu/packages/pretty-print.scm (highlight-gui): New variable.
---
gnu/packages/pretty-print.scm | 45 +++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index 1b2cf4becf..1ec4df50a9 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -52,6 +52,7 @@ (define-module (gnu packages pretty-print)
#:use-module (gnu packages lua)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages qt)
#:use-module (gnu packages swig))
(define-public a2ps
@@ -404,3 +405,47 @@ (define-public highlight
TeX, SVG, BBCode and terminal escape sequences with colored syntax
highlighting. Language definitions and color themes are customizable.")
(license gpl3+)))
+
+(define-public highlight-gui
+ (package
+ (inherit highlight)
+ (name "highlight-gui")
+ (build-system gnu-build-system)
+ (arguments
+ (substitute-keyword-arguments (package-arguments highlight)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((highlight:out (assoc-ref inputs "highlight"))
+ (data (string-append highlight:out "/share/highlight/"))
+ (conf (string-append highlight:out "/etc/highlight/"))
+ (doc (string-append highlight:out
+ "/share/doc/highlight/")))
+ (substitute* "makefile"
+ (("HL_DATA_DIR=.* HL_CONFIG_DIR=.* HL_DOC_DIR=.* gui-qt")
+ (string-append "HL_DATA_DIR=\""
+ data
+ "\" HL_CONFIG_DIR=\""
+ conf
+ "\" HL_DOC_DIR=\""
+ doc
+ "\" gui-qt"))))))
+ (add-after 'fix-search-for-lua 'fix-search-for-lua/GUI
+ (lambda _
+ (substitute* "src/gui-qt/highlight.pro"
+ (("PKGCONFIG \\+= lua")
+ (string-append "PKGCONFIG += lua-"
+ #$(version-major+minor (package-version lua)))))))
+ (replace 'build
+ (lambda _
+ (invoke "make" "gui")))
+ (delete 'install-perl-bindings)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (mkdir-p (string-append out "/bin"))
+ (invoke "make" "install-gui"))))))))
+ (native-inputs (list pkg-config))
+ (inputs (list highlight lua boost qtbase-5))
+ (synopsis "Graphical user interface for highlight")))
--
2.41.0
This bug report was last modified 1 year and 338 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.