unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Dale Mellor <guix-devel-0brg6a@rdmp.org>
To: 70047@debbugs.gnu.org
Cc: guix-devel-0brg6a@rdmp.org, chris@bumblehead.com
Subject: [bug#70047] [PATCH v2] gnu: highlight: Update to 4.11.
Date: Tue, 30 Apr 2024 10:39:28 +0100	[thread overview]
Message-ID: <20240430093928.1239052-1-guix-devel-0brg6a@rdmp.org> (raw)
In-Reply-To: <2e0f9a03e955cc28f5b67e7edcc8680eed5bc587.1711617879.git.chris@bumblehead.com>

From: chris <chris@bumblehead.com>

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

Review:
  * guix build --check, guix build --source-check, guix lint all clean.
  * Changes look good.
  * It works for me on Guix system.
  * It does not work on foreign distribution (neither did the old version).

Reviewed-by: Dale Mellor <guix-devel-0brg6a@rdmp.org>
Change-Id: I0c402fcea5708c4882b52309b3e072301f0a5614
---
 gnu/packages/pretty-print.scm | 165 +++++++++++++++++-----------------
 1 file changed, 83 insertions(+), 82 deletions(-)

diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm
index 7eae40a220..220761fc07 100644
--- a/gnu/packages/pretty-print.scm
+++ b/gnu/packages/pretty-print.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2022 Zhu Zihao  <all_but_last@163.com>
 ;;; Copyright © 2022, 2023 Maxim Cournoyer  <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
+;;; Copyright © 2024 chris <chris@bumblehead.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -352,93 +353,93 @@ (define-public source-highlight
 (define-public highlight
   (package
     (name "highlight")
-    (version "4.8")
+    (version "4.11")
     (outputs (list "out" "gui"))
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "http://www.andre-simon.de/zip/highlight-"
-                                  version ".tar.bz2"))
-              (sha256
-               (base32
-                "1iggdw4c8pfz1z1c51fyd6x79y1mnc82b6lfkg3vbb44739m5cjs"))
-              (patches (search-patches "highlight-gui-data-dir.patch"))))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/saalen/highlight")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0xb9jm7249qnbain4l94nakgxsmia4w4x246dagr669fkmffcdmg"))
+       (patches (search-patches "highlight-gui-data-dir.patch"))))
     (build-system gnu-build-system)
     (arguments
-     (list #:tests? #f ;no tests
-           #:make-flags #~(let ((confdir (string-append %output
-                                          "/share/highlight/config/")))
-                            (list (string-append "PREFIX=" %output)
-                                  (string-append "HL_CONFIG_DIR=" confdir)
-                                  (string-append "conf_dir=" confdir)))
-           #:phases #~(modify-phases %standard-phases
-                        (delete 'configure) ;no configure script
-                        (add-after 'unpack 'fix-search-for-lua
-                          (lambda _
-                            (let ((ver #$(version-major+minor (package-version
-                                                               lua))))
-                              (substitute* "src/makefile"
-                                (("(LUA_PKG_NAME=).*" _ assignment)
-                                 (string-append assignment "lua-" ver "\n")))
-                              (substitute* "src/gui-qt/highlight.pro"
-                                (("(PKGCONFIG \\+= lua)" _ assignment)
-                                 (string-append assignment "-" ver)))
-                              (substitute* "extras/swig/makefile"
-                                (("lua")
-                                 (string-append "lua-" ver))))))
-                        (add-after 'build 'build-gui
-                          (lambda* (#:key inputs outputs #:allow-other-keys)
-                            (let* ((out (assoc-ref outputs "out"))
-                                   (data (string-append out
-                                                        "/share/highlight/"))
-                                   (conf (string-append out "/etc/highlight/"))
-                                   (doc (string-append out
-                                         "/share/doc/highlight/"))
-                                   (gui (assoc-ref outputs "gui"))
-                                   (gui-data (string-append gui
-                                              "/share/highlight/")))
-                              ;; modified version of gui task in makefile
-                              (invoke "make"
-                                      "-C"
-                                      "./src"
-                                      "-f"
-                                      "./makefile"
-                                      (string-append "HL_DATA_DIR=" data)
-                                      (string-append "HL_CONFIG_DIR=" conf)
-                                      (string-append "HL_DOC_DIR=" doc)
-                                      (string-append "GUI_DATA_DIR=" gui-data)
-                                      "gui-qt"))))
-                        (replace 'install
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let ((out (assoc-ref outputs "out")))
-                              (invoke "make" "install"
-                                      (string-append "PREFIX=" out)))))
-                        (add-after 'install 'install-perl-bindings
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let* ((out (assoc-ref outputs "out"))
-                                   (data (string-append out
-                                                        "/share/highlight/"))
-                                   (conf (string-append out "/etc/highlight/"))
-                                   (perldir (string-append out
-                                             "/lib/perl5/site_perl/"
-                                             #$(package-version perl)))
-                                   (autodir (string-append perldir
-                                                           "/auto/highlight")))
-                              (with-directory-excursion "extras/swig"
-                                (invoke "make" "perl"
-                                        (string-append "hl_data_dir=" data)
-                                        (string-append "hl_conf_dir=" conf))
-                                (invoke "perl" "-I" "." "testmod.pl")
-                                (install-file "highlight.pm" perldir)
-                                (install-file "highlight.so" autodir)))))
-                        (add-after 'install 'install-gui
-                          (lambda* (#:key outputs #:allow-other-keys)
-                            (let ((gui (assoc-ref outputs "gui")))
-                              (mkdir-p (string-append gui "/bin"))
-                              (invoke "make" "install-gui"
-                                      (string-append "PREFIX=" gui))))))))
+     (list
+      #:tests? #f ;no tests
+      #:make-flags #~(let ((confdir (string-append #$output
+                                                   "/share/highlight/config/")))
+                       (list (string-append "PREFIX=" #$output)
+                             (string-append "HL_CONFIG_DIR=" confdir)
+                             (string-append "conf_dir=" confdir)))
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'configure) ;no configure script
+                   (add-after 'unpack 'fix-search-for-lua
+                     (lambda _
+                       (let ((ver #$(version-major+minor
+                                     (package-version (this-package-input "lua")))))
+                         (substitute* "src/makefile"
+                           (("(LUA_PKG_NAME=).*" _ assignment)
+                            (string-append assignment "lua-" ver "\n")))
+                         (substitute* "src/gui-qt/highlight.pro"
+                           (("(PKGCONFIG \\+= lua)" _ assignment)
+                            (string-append assignment "-" ver)))
+                         (substitute* "extras/swig/makefile"
+                           (("lua")
+                            (string-append "lua-" ver))))))
+                   (add-after 'build 'build-gui
+                     (lambda* (#:key inputs outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (data (string-append out "/share/highlight/"))
+                              (conf (string-append out "/etc/highlight/"))
+                              (doc (string-append out "/share/doc/highlight/"))
+                              (gui (assoc-ref outputs "gui"))
+                              (gui-data (string-append gui "/share/highlight/")))
+                         ;; modified version of gui task in makefile
+                         (invoke "make"
+                                 "-C"
+                                 "./src"
+                                 "-f"
+                                 "./makefile"
+                                 (string-append "HL_DATA_DIR=" data)
+                                 (string-append "HL_CONFIG_DIR=" conf)
+                                 (string-append "HL_DOC_DIR=" doc)
+                                 (string-append "GUI_DATA_DIR=" gui-data)
+                                 "gui-qt"))))
+                   (replace 'install
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (invoke "make" "install"
+                                 (string-append "PREFIX=" out)))))
+                   (add-after 'install 'install-perl-bindings
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (data (string-append out "/share/highlight/"))
+                              (conf (string-append out "/etc/highlight/"))
+                              (perldir (string-append out
+                                                      "/lib/perl5/site_perl/"
+                                                      #$(package-version
+                                                         (this-package-input "perl"))))
+                              (autodir (string-append perldir
+                                                      "/auto/highlight")))
+                         (with-directory-excursion "extras/swig"
+                           (invoke "make" "perl"
+                                   (string-append "hl_data_dir=" data)
+                                   (string-append "hl_conf_dir=" conf))
+                           (invoke "perl" "-I" "." "testmod.pl")
+                           (install-file "highlight.pm" perldir)
+                           (install-file "highlight.so" autodir)))))
+                   (add-after 'install 'install-gui
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((gui (assoc-ref outputs "gui")))
+                         (mkdir-p (string-append gui "/bin"))
+                         (invoke "make" "install-gui"
+                                 (string-append "PREFIX=" gui))))))))
     (inputs (list lua boost perl qtbase-5))
     (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")
     (description
      "Highlight converts source code to HTML, XHTML, RTF, LaTeX,
-- 
2.41.0





  parent reply	other threads:[~2024-04-30  9:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28  9:24 [bug#70047] [PATCH] gnu: highlight: Update to 4.11 chris
2024-03-30  0:11 ` [bug#70047] why use git-fetch chris
2024-03-30 16:24 ` [bug#70047] [PATCH] gnu: highlight: Update to 4.11 Z572
2024-03-30 19:55   ` chris
2024-03-30 21:26   ` chris
2024-03-31  4:28     ` Zheng Junjie
2024-03-30 20:48 ` chris
2024-03-31  5:58 ` chris
2024-04-30  9:39 ` Dale Mellor [this message]
2024-05-06 12:00   ` bug#70047: [PATCH v2] " Nicolas Goaziou via Guix-patches via

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=20240430093928.1239052-1-guix-devel-0brg6a@rdmp.org \
    --to=guix-devel-0brg6a@rdmp.org \
    --cc=70047@debbugs.gnu.org \
    --cc=chris@bumblehead.com \
    /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).