gnu: linux-libre 5.10: Update to 5.10.31.
[jackhill/guix/guix.git] / gnu / packages / pretty-print.scm
index fc98478..4662a1e 100644 (file)
@@ -1,10 +1,13 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
+;;; Copyright © 2020 Paul Garlick <pgarlick@tourbillion-technology.com>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 (define-module (gnu packages pretty-print)
   #:use-module (guix packages)
   #:use-module (guix licenses)
+  #:use-module (guix git-download)
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix utils)
   #:use-module (gnu packages)
-  #:use-module (gnu packages ghostscript)
-  #:use-module (gnu packages groff)
-  #:use-module (gnu packages imagemagick)
-  #:use-module (gnu packages gv)
-  #:use-module (gnu packages boost)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages groff)
+  #:use-module (gnu packages gv)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages compression))
+  #:use-module (gnu packages swig))
 
 (define-public a2ps
   (package
     (build-system gnu-build-system)
     (inputs
      `(("psutils" ,psutils)
-       ("groff" ,groff)
-       ("gv" ,gv)
-       ("imagemagick" ,imagemagick)))
+       ("gv" ,gv)))
     (native-inputs
      `(("gperf" ,gperf)
+       ("groff" ,groff)
        ("perl" ,perl)))
     (arguments
      '(#:phases
@@ -164,21 +167,20 @@ different programming languages.")
 (define-public fmt
   (package
     (name "fmt")
-    (version "6.0.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "https://github.com/fmtlib/fmt/releases/download/"
-                    version "/fmt-" version ".zip"))
-              (sha256
-               (base32
-                "0h148anbaqgch6n69pxsvs1c9wmykgd052wmzgdia7qpz8w6p8dl"))))
+    (version "7.1.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/fmtlib/fmt/releases/download/"
+                           version "/fmt-" version ".zip"))
+       (sha256
+        (base32 "17sc10hfg087z0s774lnn05wwy3bfzmcv7j448p92pr0s02cb62x"))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
     (native-inputs
      `(("unzip" ,unzip)))
-    (home-page "http://fmtlib.net/")
+    (home-page "https://fmt.dev")
     (synopsis "Small and fast C++ formatting library")
     (description
      "@code{fmt} (formerly @code{cppformat}) is a formatting library for C++.
@@ -214,6 +216,18 @@ to @code{IOStreams}.")
        #:parallel-tests? #f             ;There appear to be race conditions
        #:phases
        (modify-phases %standard-phases
+         ,@(if (%current-target-system)
+               ;; 'doc/Makefile.am' tries to run stuff even when
+               ;; cross-compiling.  Explicitly skip it.
+               ;; XXX: Inline this on next rebuild cycle.
+               `((add-before 'build 'skip-doc-directory
+                   (lambda _
+                     (substitute* "Makefile"
+                       (("^SUBDIRS = (.*) doc(.*)$" _ before after)
+                        (string-append "SUBDIRS = " before
+                                       " " after "\n")))
+                     #t)))
+               '())
          (add-before 'check 'patch-test-files
            (lambda _
              ;; Unpatch shebangs in test input so that source-highlight
@@ -244,14 +258,14 @@ seen in a terminal.")
 (define-public highlight
   (package
     (name "highlight")
-    (version "3.54")
+    (version "3.62")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "http://www.andre-simon.de/zip/highlight-"
                            version ".tar.bz2"))
        (sha256
-        (base32 "1l6nxk3vwd7rkxpq9aqisjyps89r008wzn3abh4566q6jigahl4a"))))
+        (base32 "088di7qxd6b2r22qljllhnly0r9a0lfnwnfqswjn23s09awjbl6p"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                      ; no tests
@@ -270,12 +284,29 @@ seen in a terminal.")
                 (string-append assignment "lua-" ,(version-major+minor
                                                    (package-version lua))
                                "\n")))
-             #t)))))
+             (substitute* "extras/swig/makefile"
+               (("lua") (string-append "lua-" ,(version-major+minor
+                                                (package-version lua)))))
+             #t))
+         (add-after 'install 'install-perl-bindings
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((perldir (string-append (assoc-ref outputs "out")
+                                            "/lib/perl5/site_perl/"
+                                            ,(package-version perl)))
+                    (autodir (string-append perldir "/auto/highlight")))
+               (with-directory-excursion "extras/swig"
+                 (invoke "make" "perl")
+                 (invoke "perl" "-I" "." "testmod.pl")
+                 (install-file "highlight.pm" perldir)
+                 (install-file "highlight.so" autodir))
+               #t))))))
     (inputs
      `(("lua" ,lua)
-       ("boost" ,boost)))
+       ("boost" ,boost)
+       ("perl" ,perl)))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)
+       ("swig" ,swig)))
     (home-page "http://www.andre-simon.de/doku/highlight/en/highlight.php")
     (synopsis "Convert code to documents with syntax highlighting")
     (description "Highlight converts source code to HTML, XHTML, RTF, LaTeX,