gnu: cvs-fast-export: Update to 1.56.
[jackhill/guix/guix.git] / gnu / packages / texinfo.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
99fcefb9 2;;; Copyright © 2012, 2013, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
1022da10 3;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org>
f7b55b04 4;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
ca825070 5;;; Copyright © 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
e703f6d8 6;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
c096028a 7;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com>
7b90379d 8;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
f9f3ac4e 9;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
95c14929 10;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
db32c281 11;;;
233e7676 12;;; This file is part of GNU Guix.
db32c281 13;;;
233e7676 14;;; GNU Guix is free software; you can redistribute it and/or modify it
db32c281
LC
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
233e7676 19;;; GNU Guix is distributed in the hope that it will be useful, but
db32c281
LC
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
233e7676 25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
db32c281 26
1ffa7090 27(define-module (gnu packages texinfo)
6fe3e250 28 #:use-module (gnu packages autotools)
4a44e743 29 #:use-module (guix licenses)
db32c281 30 #:use-module (guix packages)
a13116b6 31 #:use-module (guix utils)
db32c281 32 #:use-module (guix download)
6fe3e250 33 #:use-module (guix utils)
e703f6d8 34 #:use-module (guix git-download)
db32c281 35 #:use-module (guix build-system gnu)
c5d83768 36 #:use-module (gnu packages)
e703f6d8 37 #:use-module (gnu packages autotools)
1ffa7090 38 #:use-module (gnu packages compression)
e703f6d8 39 #:use-module (gnu packages gettext)
74601e45 40 #:use-module (gnu packages ncurses)
e703f6d8
RW
41 #:use-module (gnu packages perl)
42 #:use-module (gnu packages readline))
db32c281
LC
43
44(define-public texinfo
45 (package
46 (name "texinfo")
64b39d6e 47 (version "6.7")
a24b75d8 48 (source (origin
f7b55b04
MW
49 (method url-fetch)
50 (uri (string-append "mirror://gnu/texinfo/texinfo-"
51 version ".tar.xz"))
52 (sha256
53 (base32
64b39d6e 54 "1aicn1v3czqii08wc91jw089n1x3gfchkf808q2as59dak0h714q"))))
db32c281 55 (build-system gnu-build-system)
5a2f58d5
MO
56 (arguments
57 ;; When cross-compiling, the package is configured twice: once with the
58 ;; native compiler and once with the cross-compiler. During the configure
59 ;; with the native compiler, the environment is reset. This leads to
60 ;; multiple environment variables missing. Do not reset the environment
61 ;; to prevent that.
62 (if (%current-target-system)
63 '(#:phases
64 (modify-phases %standard-phases
65 (add-before 'configure 'fix-cross-configure
66 (lambda _
67 (substitute* "configure"
68 (("env -i")
69 "env "))
70 #t))))
71 '()))
95c14929
JN
72 (inputs `(("ncurses" ,ncurses)
73 ;; TODO: remove `if' in the next rebuild cycle.
74 ,@(if (%current-target-system)
75 `(("perl" ,perl))
76 '())))
5a2f58d5
MO
77 ;; When cross-compiling, texinfo will build some of its own binaries with
78 ;; the native compiler. This means ncurses is needed both in both inputs
79 ;; and native-inputs.
80 (native-inputs `(("perl" ,perl)
81 ("ncurses" ,ncurses)))
1668dfcd
LC
82
83 (native-search-paths
84 ;; This is the variable used by the standalone Info reader.
85 (list (search-path-specification
86 (variable "INFOPATH")
87 (files '("share/info")))))
88
6fd52309 89 (home-page "https://www.gnu.org/software/texinfo/")
f50d2669 90 (synopsis "The GNU documentation format")
db32c281 91 (description
a22dc0c4 92 "Texinfo is the official documentation format of the GNU project. It
79c311b8
LC
93uses a single source file using explicit commands to produce a final document
94in any of several supported output formats, such as HTML or PDF. This
95package includes both the tools necessary to produce Info documents from
96their source and the command-line Info reader. The emphasis of the language
97is on expressing the content semantically, avoiding physical markup commands.")
4a44e743 98 (license gpl3+)))
bbafef3f 99
f7b55b04
MW
100(define-public texinfo-5
101 (package (inherit texinfo)
102 (version "5.2")
ce1e4bd5
LC
103 (source (origin
104 (method url-fetch)
105 (uri (string-append "mirror://gnu/texinfo/texinfo-"
106 version ".tar.xz"))
a446cf26 107 (patches (search-patches "texinfo-5-perl-compat.patch"))
ce1e4bd5
LC
108 (sha256
109 (base32
c096028a 110 "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal"))))))
ce1e4bd5 111
bbafef3f
MW
112(define-public texinfo-4
113 (package (inherit texinfo)
114 (version "4.13a")
115 (source (origin
116 (method url-fetch)
117 (uri (string-append
118 "mirror://gnu/texinfo/texinfo-"
119 version
120 ".tar.lzma"))
121 (sha256
122 (base32
123 "1rf9ckpqwixj65bw469i634897xwlgkm5i9g2hv3avl6mv7b0a3d"))))
6fe3e250
PML
124 (inputs `(("ncurses" ,ncurses)
125 ("xz" ,xz)))
126 (native-inputs
127 `(("automake" ,automake)
128 ,@(package-native-inputs texinfo)))
129 (arguments
130 (substitute-keyword-arguments (package-arguments texinfo)
131 ((#:phases phases)
132 `(modify-phases ,phases
133 (add-after 'unpack 'fix-configure
134 (lambda* (#:key inputs native-inputs #:allow-other-keys)
135 ;; Replace outdated config.sub and config.guess.
136 (with-directory-excursion "build-aux"
137 (for-each
138 (lambda (file)
139 (install-file (string-append
140 (assoc-ref
141 (or native-inputs inputs) "automake")
142 "/share/automake-"
143 ,(version-major+minor
144 (package-version automake))
145 "/" file) "."))
146 '("config.sub" "config.guess")))
147 #t))
148 ;; Build native version of tools before running 'build phase.
149 ,@(if (%current-target-system)
150 `((add-before 'build 'make-native-gnu-lib
151 (lambda* (#:key inputs #:allow-other-keys)
152 (invoke "make" "-C" "tools/gnulib/lib")
153 #t)))
154 '())))))))
c5d83768 155
7feebd33
LC
156(define-public info-reader
157 ;; The idea of this package is to have the standalone Info reader without
158 ;; the dependency on Perl that 'makeinfo' drags.
1a265842 159 (package/inherit texinfo
7feebd33
LC
160 (name "info-reader")
161 (arguments
7b90379d
MO
162 `(,@(substitute-keyword-arguments (package-arguments texinfo)
163 ((#:phases phases)
164 `(modify-phases ,phases
165 (add-after 'install 'keep-only-info-reader
166 (lambda* (#:key outputs #:allow-other-keys)
167 ;; Remove everything but 'bin/info' and associated
168 ;; files.
169 (define (files)
170 (scandir "." (lambda (file)
171 (not (member file '("." ".."))))))
7feebd33 172
7b90379d
MO
173 (let ((out (assoc-ref outputs "out")))
174 (with-directory-excursion out
175 (for-each delete-file-recursively
176 (fold delete (files) '("bin" "share"))))
177 (with-directory-excursion (string-append out "/bin")
178 (for-each delete-file (delete "info" (files))))
179 (with-directory-excursion (string-append out "/share")
180 (for-each delete-file-recursively
181 (fold delete (files)
182 '("info" "locale"))))
183 #t))))))
184 #:disallowed-references ,(assoc-ref (package-inputs texinfo)
185 "perl")
7feebd33 186 #:modules ((ice-9 ftw) (srfi srfi-1)
7b90379d 187 ,@%gnu-build-system-modules)))
7feebd33
LC
188 (synopsis "Standalone Info documentation reader")))
189
c5d83768
EB
190(define-public texi2html
191 (package
192 (name "texi2html")
193 (version "5.0")
194 (source (origin
195 (method url-fetch)
196 (uri (string-append "mirror://savannah/" name "/" name "-"
197 version ".tar.bz2"))
198 (sha256
199 (base32
200 "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8"))
d759cf67 201 (patches
fc1adab1
AK
202 (search-patches "texi2html-document-encoding.patch"
203 "texi2html-i18n.patch"))
d759cf67
LC
204 (snippet
205 ;; This file is modified by the patch above, but reset its
206 ;; timestamp so we don't trigger the rule to update PO files,
207 ;; which would require Gettext.
208 ;; See <http://bugs.gnu.org/18247>.
6cbee49d
MW
209 '(begin
210 (utime "texi2html.pl" 0 0 0 0)
211 #t))))
c5d83768 212 (build-system gnu-build-system)
c5d83768 213 (inputs `(("perl" ,perl)))
1022da10
EB
214 (arguments
215 ;; Tests fail because of warnings on stderr from Perl 5.22. Adjusting
216 ;; texi2html.pl to avoid the warnings seems non-trivial, so we simply
217 ;; disable the tests.
218 '(#:tests? #f))
340978d7 219 (home-page "https://www.nongnu.org/texi2html/")
c5d83768
EB
220 (synopsis "Convert Texinfo to HTML")
221 (description
222 "Texi2HTML is a Perl script which converts Texinfo source files to HTML
223output. It now supports many advanced features, such as internationalization
224and extremely configurable output formats.
225
226Development of Texi2HTML moved to the GNU Texinfo repository in 2010, since it
227was meant to replace the makeinfo implementation in GNU Texinfo. The route
228forward for authors is, in most cases, to alter manuals and build processes as
229necessary to use the new features of the makeinfo/texi2any implementation of
230GNU Texinfo. The Texi2HTML maintainers (one of whom is the principal author
231of the GNU Texinfo implementation) do not intend to make further releases of
232Texi2HTML.")
233 ;; Files in /lib under lgpl2.1+ and x11
234 (license gpl2+)))
e703f6d8 235
f9f3ac4e
NG
236(define-public texi2html-1.82
237 (package
238 (inherit texi2html)
239 (version "1.82")
240 (source
241 (origin
242 (method url-fetch)
243 (uri (string-append "mirror://savannah/texi2html/"
244 "texi2html-" version ".tar.bz2"))
245 (sha256
246 (base32 "1wdli2szkgm3l0vx8rf6lylw0b0m47dlz9iy004n928nqkzix76n"))))))
247
e703f6d8
RW
248(define-public pinfo
249 (package
250 (name "pinfo")
251 (version "0.6.13")
252 (source (origin
253 (method git-fetch)
254 (uri (git-reference
b0e7b699 255 (url "https://github.com/baszoetekouw/pinfo")
e703f6d8 256 (commit (string-append "v" version))))
ca825070 257 (file-name (git-file-name name version))
e703f6d8
RW
258 (sha256
259 (base32
260 "173d2p22irwiabvr4z6qvr6zpr6ysfkhmadjlyhyiwd7z62larvy"))))
261 (build-system gnu-build-system)
262 (arguments
263 `(#:phases
264 (modify-phases %standard-phases
265 (add-after 'unpack 'remove-Werror
266 (lambda _
267 (substitute* "configure.ac"
268 (("-Werror") ""))
269 #t))
270 (add-after 'unpack 'embed-reference-to-clear
271 (lambda* (#:key inputs #:allow-other-keys)
272 (substitute* '("src/manual.c"
273 "src/mainfunction.c"
274 "src/utils.c")
275 (("\"clear\"")
276 (string-append "\"" (which "clear") "\"")))
277 #t)))))
278 (inputs
279 `(("ncurses" ,ncurses)
280 ("readline" ,readline)))
281 (native-inputs
282 `(("autoconf" ,autoconf)
283 ("automake" ,automake)
f2d97d57 284 ("gettext" ,gettext-minimal)
e703f6d8
RW
285 ("libtool" ,libtool)
286 ("texinfo" ,texinfo)))
287 (home-page "https://github.com/baszoetekouw/pinfo")
288 (synopsis "Lynx-style Info file and man page reader")
289 (description
290 "Pinfo is an Info file viewer. Pinfo is similar in use to the Lynx web
291browser. You just move across info nodes, and select links, follow them, etc.
292It supports many colors. Pinfo also supports viewing of manual pages -- they
4250a963 293are colorized like in the midnight commander's viewer, and additionally they
e703f6d8
RW
294are hypertextualized.")
295 (license gpl2+)))