unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: gemmaro <gemmaro.dev@gmail.com>
To: 64983@debbugs.gnu.org
Cc: gemmaro <gemmaro.dev@gmail.com>
Subject: [bug#64983] [PATCH 3/3] gnu: Add highlight-gui.
Date: Tue,  1 Aug 2023 08:45:47 +0900	[thread overview]
Message-ID: <ad23d33d93d0a7fde0e3974a2b20379f9fb464cc.1690846546.git.gemmaro.dev@gmail.com> (raw)
In-Reply-To: <cover.1690846546.git.gemmaro.dev@gmail.com>

* 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





  parent reply	other threads:[~2023-07-31 23:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31 23:43 [bug#64983] [PATCH 0/3] gnu: highlight: Update to 4.7 and add GUI package gemmaro
2023-07-31 23:45 ` [bug#64983] [PATCH 1/3] gnu: highlight: Update to 4.7 gemmaro
2023-07-31 23:45 ` [bug#64983] [PATCH 2/3] gnu: highlight: Use new package style gemmaro
2023-07-31 23:45 ` gemmaro [this message]
2023-08-04  0:42   ` [bug#64983] [PATCH 3/3] gnu: Add highlight-gui gemmaro
2023-08-07 14:05 ` [bug#64983] [PATCH v2 0/4] gnu: highlight: Add gui output gemmaro
2023-08-07 14:05   ` [bug#64983] [PATCH v2 1/4] gnu: highlight: Update to 4.7 gemmaro
2023-08-07 14:05   ` [bug#64983] [PATCH v2 2/4] gnu: highlight: Use new package style gemmaro
2023-08-07 14:05   ` [bug#64983] [PATCH v2 3/4] gnu: highlight: Add gui output gemmaro
2023-08-07 14:05   ` [bug#64983] [PATCH v2 4/4] gnu: highlight: Fix paths for Perl bindings gemmaro
2023-08-14 22:26   ` bug#64983: [PATCH 0/3] gnu: highlight: Update to 4.7 and add GUI package Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad23d33d93d0a7fde0e3974a2b20379f9fb464cc.1690846546.git.gemmaro.dev@gmail.com \
    --to=gemmaro.dev@gmail.com \
    --cc=64983@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).