X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/0c0431f9ce32a64ca663a2c5fc6656cbb86dc245..a8360892d734b6c7418dd600b838faf2b2eda30c:/gnu/packages/pretty-print.scm diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index ad429854a2..12ec1f7889 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -1,9 +1,12 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016 Efraim Flashner +;;; Copyright © 2016, 2019, 2020 Efraim Flashner ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2017 Ludovic Courtès -;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice +;;; Copyright © 2019 Meiyo Peng +;;; Copyright © 2020 Paul Garlick +;;; Copyright © 2020 Vincent Legoll ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,23 +26,25 @@ (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 imagemagick) #: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 @@ -62,15 +67,16 @@ #t)) (patches (search-patches "a2ps-CVE-2001-1593.patch" - "a2ps-CVE-2014-0466.patch")))) + "a2ps-CVE-2014-0466.patch" + "a2ps-CVE-2015-8107.patch")))) (build-system gnu-build-system) (inputs `(("psutils" ,psutils) - ("groff" ,groff) ("gv" ,gv) ("imagemagick" ,imagemagick))) (native-inputs `(("gperf" ,gperf) + ("groff" ,groff) ("perl" ,perl))) (arguments '(#:phases @@ -162,23 +168,20 @@ different programming languages.") (define-public fmt (package (name "fmt") - (version "4.1.0") - (source (origin - (method url-fetch) - (uri (string-append - "https://github.com/fmtlib/fmt/releases/download/" - version "/fmt-" version ".zip")) - (sha256 - (base32 - "1swyqw3dn2vx5sw2yh5vk0vrvrkp7fv07cj4272yxl5rrq1byjcx")))) + (version "7.0.3") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/fmtlib/fmt/releases/download/" + version "/fmt-" version ".zip")) + (sha256 + (base32 "0kgajl3qsrdyj0csqsz8b8h84kasdy0pnh16byl0y1vlsaddzkyy")))) (build-system cmake-build-system) + (arguments + '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"))) (native-inputs `(("unzip" ,unzip))) - (arguments - `(#:configure-flags - (list (string-append "-DCMAKE_INSTALL_LIBDIR=" - (assoc-ref %outputs "out") "/lib")))) - (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++. @@ -187,10 +190,23 @@ to @code{IOStreams}.") ;; The library is bsd-2, but documentation and tests include other licenses. (license (list bsd-2 bsd-3 psfl)))) +(define-public fmt-6 + (package + (inherit fmt) + (name "fmt") + (version "6.2.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/fmtlib/fmt/releases/download/" + version "/fmt-" version ".zip")) + (sha256 + (base32 "06l8g59frbsbwj15kg6x2bbn6p8yidh6wzsigdhbdjncvm1agzll")))))) + (define-public source-highlight (package (name "source-highlight") - (version "3.1.8") + (version "3.1.9") (source (origin (method url-fetch) @@ -198,7 +214,7 @@ to @code{IOStreams}.") version ".tar.gz")) (sha256 (base32 - "18xdalxg7yzrxc1njzgw7aryq2jdm7zq2yqz41sc7k6il5z6lcq1")))) + "148w47k3zswbxvhg83z38ifi85f9dqcpg7icvvw1cm6bg21x4zrs")))) (build-system gnu-build-system) ;; The ctags that comes with emacs does not support the --excmd options, ;; so can't be used @@ -244,15 +260,14 @@ seen in a terminal.") (define-public highlight (package (name "highlight") - (version "3.42") + (version "3.58") (source (origin (method url-fetch) (uri (string-append "http://www.andre-simon.de/zip/highlight-" version ".tar.bz2")) (sha256 - (base32 - "07iihzy8ckzdrxqd6bzbij4hy4mmlixibjnjviqfihd0hh1q30m5")))) + (base32 "1y25vc3nysdih4y9z6yqn1k3i6lgkbyqkmdaib2xyfpqw4djb06z")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests @@ -267,15 +282,33 @@ seen in a terminal.") (add-after 'unpack 'fix-search-for-lua (lambda _ (substitute* "src/makefile" - (("(pkg-config.*)lua" _ prefix) - (string-append prefix "lua-" ,(version-major+minor - (package-version lua))))) - #t))))) + (("(LUA_PKG_NAME=).*" _ assignment) + (string-append assignment "lua-" ,(version-major+minor + (package-version lua)) + "\n"))) + (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,