gnu packages: Avoid description lines with leading "(".
[jackhill/guix/guix.git] / gnu / packages / pretty-print.scm
CommitLineData
58310341
EB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages pretty-print)
20 #:use-module (guix packages)
21 #:use-module (guix licenses)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages ghostscript)
26 #:use-module (gnu packages groff)
27 #:use-module (gnu packages imagemagick)
28 #:use-module (gnu packages gv)
29 #:use-module (gnu packages boost)
30 #:use-module (gnu packages bison)
31 #:use-module (gnu packages flex)
32 #:use-module (gnu packages gperf)
c198872b 33 #:use-module (gnu packages perl))
58310341
EB
34
35(define-public a2ps
36 (package
37 (name "a2ps")
38 (version "4.14")
39 (source
40 (origin
41 (method url-fetch)
42 (uri (string-append "mirror://gnu/a2ps/a2ps-"
43 version ".tar.gz"))
44 (sha256
45 (base32
46 "195k78m1h03m961qn7jr120z815iyb93gwi159p1p9348lyqvbpk"))))
47 (build-system gnu-build-system)
48 (inputs
49 `(("psutils" ,psutils)
50 ("groff" ,groff)
51 ("gv" ,gv)
52 ("imagemagick" ,imagemagick)))
53 (native-inputs
54 `(("gperf" ,gperf)
c198872b 55 ("perl" ,perl)))
58310341 56 (arguments
d4bf49b1 57 '(#:phases (alist-cons-before
c198872b 58 'build 'patch-scripts
d4bf49b1 59 (lambda _
c198872b
MW
60 (substitute*
61 '("afm/make_fonts_map.sh"
62 "tests/defs"
63 "tests/backup.tst"
64 "tests/styles.tst")
65 (("/bin/rm") (which "rm"))))
58310341 66 (alist-cons-before
c198872b
MW
67 'check 'patch-test-files
68 ;; Alternatively, we could unpatch the shebangs in tstfiles
69 (lambda* (#:key inputs #:allow-other-keys)
70 (let ((perl (assoc-ref inputs "perl")))
71 (substitute* '("tests/ps-ref/includeres.ps"
72 "tests/gps-ref/includeres.ps")
73 (("/usr/local/bin/perl")
74 (string-append perl "/bin/perl"))))
75 ;; Some of the reference postscript contain a 'version 3'
76 ;; string that in inconsistent with the source text in the
77 ;; tstfiles directory. Erroneous search-and-replace?
78 (substitute* '("tests/ps-ref/InsertBlock.ps"
79 "tests/gps-ref/InsertBlock.ps"
80 "tests/ps-ref/bookie.ps"
81 "tests/gps-ref/bookie.ps")
82 (("version 3") "version 2"))
83 (substitute* '("tests/ps-ref/psmandup.ps"
84 "tests/gps-ref/psmandup.ps")
85 (("#! */bin/sh") (string-append
86 "#!" (which "sh")))))
87 %standard-phases))))
58310341
EB
88 (home-page "http://www.gnu.org/software/a2ps")
89 (synopsis "Any file to PostScript, including pretty-printing")
90 (description
91 "GNU a2ps converts almost anything to a PostScript file, ready for
35b9e423 92printing. It accomplishes this by being able to delegate files to external
58310341
EB
93handlers, such as Groff and Gzip. It handles as many steps as is necessary to
94produce a pretty-printed file. It also includes some extra abilities for
95special cases, such as pretty-printing \"--help\" output.")
96 (license gpl3+)))
97
98(define-public trueprint
99 (package
100 (name "trueprint")
101 (version "5.4")
102 (source
103 (origin
104 (method url-fetch)
105 (uri (string-append "mirror://gnu/trueprint/trueprint-"
106 version ".tar.gz"))
107 (sha256
108 (base32
109 "13rkc0fga10xyf56yy9dnq95zndnfadkhxflnp24skszj21y8jqh"))))
110 (build-system gnu-build-system)
58310341
EB
111 (arguments
112 ;; Must define DIFF_CMD for tests to pass
c198872b 113 '(#:configure-flags '("CPPFLAGS=-DDIFF_CMD=\\\"diff\\\"")))
58310341
EB
114 (home-page "http://www.gnu.org/software/trueprint")
115 (synopsis "Pretty-print C sources and other plain text to PostScript")
116 (description
117 "GNU Trueprint translates C source code files as PostScript files.
118In addition to the basic source code output, it can also perform diff-marking,
119indentation counting, function and file indices and more.")
120 (license gpl2)))
121
122(define-public enscript
123 (package
124 (name "enscript")
125 (version "1.6.6")
126 (source
127 (origin
128 (method url-fetch)
129 (uri (string-append "mirror://gnu/enscript/enscript-"
130 version ".tar.gz"))
131 (sha256
132 (base32
133 "1fy0ymvzrrvs889zanxcaxjfcxarm2d3k43c9frmbl1ld7dblmkd"))))
134 (build-system gnu-build-system)
135 (home-page "http://www.gnu.org/software/enscript")
136 (synopsis "Generating PostScript, including pretty-printing")
137 (description
138 "GNU Enscript is a program to convert ASCII text files to PostScript,
574e86f9 139HTML or RTF formats, to be stored in files or sent immediately to a printer.
58310341
EB
140It also includes the capability to perform syntax highlighting for several
141different programming languages.")
142 (license gpl3+)))
143
144(define-public source-highlight
145 (package
146 (name "source-highlight")
a952b10c 147 (version "3.1.8")
58310341
EB
148 (source
149 (origin
150 (method url-fetch)
151 (uri (string-append "mirror://gnu/src-highlite/source-highlight-"
152 version ".tar.gz"))
153 (sha256
154 (base32
f905286b 155 "18xdalxg7yzrxc1njzgw7aryq2jdm7zq2yqz41sc7k6il5z6lcq1"))))
58310341
EB
156 (build-system gnu-build-system)
157 ;; The ctags that comes with emacs does not support the --excmd options,
158 ;; so can't be used
159 (inputs
8a1f6a7e 160 `(("boost" ,boost)))
58310341
EB
161 (native-inputs
162 `(("bison" ,bison)
c198872b 163 ("flex" ,flex)))
58310341
EB
164 (arguments
165 `(#:configure-flags
166 (list (string-append "--with-boost="
167 (assoc-ref %build-inputs "boost")))
168 #:parallel-tests? #f ;There appear to be race conditions
d4bf49b1 169 #:phases (alist-cons-before
c198872b 170 'check 'patch-test-files
d4bf49b1 171 (lambda _
c198872b
MW
172 ;; Unpatch shebangs in test input so that source-highlight
173 ;; is still able to infer input language
174 (substitute* '("tests/test.sh"
175 "tests/test2.sh"
176 "tests/test.tcl")
177 (((string-append "#! *" (which "sh"))) "#!/bin/sh"))
178 ;; Initial patching unrecoverably removes whitespace, so
179 ;; remove it also in the comparison output.
180 (substitute* '("tests/test.sh.html"
181 "tests/test2.sh.html"
182 "tests/test.tcl.html")
183 (("#! */bin/sh") "#!/bin/sh")))
184 %standard-phases)))
58310341
EB
185 (home-page "http://www.gnu.org/software/src-highlite")
186 (synopsis "Produce a document with syntax highlighting from a source file")
187 (description
188 "GNU source-highlight reads in a source code file and produces an output
189file in which the keywords are highlighted in different colors to designate
190their syntactic role. It supports over 150 different languages and it can
191output to 8 different formats, including HTML, LaTeX and ODF. It can also
192output to ANSI color escape sequences, so that highlighted source code can be
193seen in a terminal.")
194 (license gpl3+)))
47833c90
EB
195
196(define-public astyle
197 (package
198 (name "astyle")
199 (version "2.05")
200 (source
201 (origin
202 (method url-fetch)
203 (uri (string-append "mirror://sourceforge/astyle/astyle/astyle%20"
204 version "/astyle_" version "_linux.tar.gz"))
205 (sha256
206 (base32
207 "0f9sh9kq5ajp1yz133h00fr9235p1m698x7n3h7zbrhjiwgynd6s"))))
208 (build-system gnu-build-system)
209 (arguments
210 `(#:tests? #f ;no tests
211 #:make-flags (list (string-append "prefix=" %output)
212 "INSTALL=install"
213 "all")
214 #:phases (alist-replace
215 'configure
216 (lambda _ (chdir "build/gcc"))
217 (alist-cons-after
218 'install 'install-libs
219 (lambda* (#:key outputs #:allow-other-keys)
220 ;; Libraries are not installed by default
221 (let* ((output (assoc-ref outputs "out"))
222 (libdir (string-append output "/lib")))
223 (begin
224 (mkdir-p libdir)
225 (for-each (lambda (l)
226 (copy-file
227 l (string-append libdir "/" (basename l))))
228 (find-files "bin" "lib*")))))
229 %standard-phases))))
230 (home-page "http://astyle.sourceforge.net/")
231 (synopsis "Source code indenter, formatter, and beautifier")
232 (description
233 "Artistic Style is a source code indenter, formatter, and beautifier for
234the C, C++, C++/CLI, Objective‑C, C#, and Java programming languages.")
235 (license lgpl3+)))