1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com>
8 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
9 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages texinfo)
27 #:use-module (gnu packages autotools)
28 #:use-module (guix licenses)
29 #:use-module (guix packages)
30 #:use-module (guix utils)
31 #:use-module (guix download)
32 #:use-module (guix utils)
33 #:use-module (guix git-download)
34 #:use-module (guix build-system gnu)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages gettext)
39 #:use-module (gnu packages ncurses)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages readline))
43 (define-public texinfo
49 (uri (string-append "mirror://gnu/texinfo/texinfo-"
53 "1aicn1v3czqii08wc91jw089n1x3gfchkf808q2as59dak0h714q"))))
54 (build-system gnu-build-system)
56 ;; When cross-compiling, the package is configured twice: once with the
57 ;; native compiler and once with the cross-compiler. During the configure
58 ;; with the native compiler, the environment is reset. This leads to
59 ;; multiple environment variables missing. Do not reset the environment
61 (if (%current-target-system)
63 (modify-phases %standard-phases
64 (add-before 'configure 'fix-cross-configure
66 (substitute* "configure"
71 (inputs `(("ncurses" ,ncurses)))
72 ;; When cross-compiling, texinfo will build some of its own binaries with
73 ;; the native compiler. This means ncurses is needed both in both inputs
75 (native-inputs `(("perl" ,perl)
76 ("ncurses" ,ncurses)))
79 ;; This is the variable used by the standalone Info reader.
80 (list (search-path-specification
82 (files '("share/info")))))
84 (home-page "https://www.gnu.org/software/texinfo/")
85 (synopsis "The GNU documentation format")
87 "Texinfo is the official documentation format of the GNU project. It
88 uses a single source file using explicit commands to produce a final document
89 in any of several supported output formats, such as HTML or PDF. This
90 package includes both the tools necessary to produce Info documents from
91 their source and the command-line Info reader. The emphasis of the language
92 is on expressing the content semantically, avoiding physical markup commands.")
95 (define-public texinfo-5
96 (package (inherit texinfo)
100 (uri (string-append "mirror://gnu/texinfo/texinfo-"
102 (patches (search-patches "texinfo-5-perl-compat.patch"))
105 "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal"))))))
107 (define-public texinfo-4
108 (package (inherit texinfo)
113 "mirror://gnu/texinfo/texinfo-"
118 "1rf9ckpqwixj65bw469i634897xwlgkm5i9g2hv3avl6mv7b0a3d"))))
119 (inputs `(("ncurses" ,ncurses)
122 `(("automake" ,automake)
123 ,@(package-native-inputs texinfo)))
125 (substitute-keyword-arguments (package-arguments texinfo)
127 `(modify-phases ,phases
128 (add-after 'unpack 'fix-configure
129 (lambda* (#:key inputs native-inputs #:allow-other-keys)
130 ;; Replace outdated config.sub and config.guess.
131 (with-directory-excursion "build-aux"
134 (install-file (string-append
136 (or native-inputs inputs) "automake")
138 ,(version-major+minor
139 (package-version automake))
141 '("config.sub" "config.guess")))
143 ;; Build native version of tools before running 'build phase.
144 ,@(if (%current-target-system)
145 `((add-before 'build 'make-native-gnu-lib
146 (lambda* (#:key inputs #:allow-other-keys)
147 (invoke "make" "-C" "tools/gnulib/lib")
151 (define-public info-reader
152 ;; The idea of this package is to have the standalone Info reader without
153 ;; the dependency on Perl that 'makeinfo' drags.
158 `(,@(substitute-keyword-arguments (package-arguments texinfo)
160 `(modify-phases ,phases
161 (add-after 'install 'keep-only-info-reader
162 (lambda* (#:key outputs #:allow-other-keys)
163 ;; Remove everything but 'bin/info' and associated
166 (scandir "." (lambda (file)
167 (not (member file '("." ".."))))))
169 (let ((out (assoc-ref outputs "out")))
170 (with-directory-excursion out
171 (for-each delete-file-recursively
172 (fold delete (files) '("bin" "share"))))
173 (with-directory-excursion (string-append out "/bin")
174 (for-each delete-file (delete "info" (files))))
175 (with-directory-excursion (string-append out "/share")
176 (for-each delete-file-recursively
178 '("info" "locale"))))
180 #:disallowed-references ,(assoc-ref (package-inputs texinfo)
182 #:modules ((ice-9 ftw) (srfi srfi-1)
183 ,@%gnu-build-system-modules)))
184 (synopsis "Standalone Info documentation reader")))
186 (define-public texi2html
192 (uri (string-append "mirror://savannah/" name "/" name "-"
196 "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8"))
198 (search-patches "texi2html-document-encoding.patch"
199 "texi2html-i18n.patch"))
201 ;; This file is modified by the patch above, but reset its
202 ;; timestamp so we don't trigger the rule to update PO files,
203 ;; which would require Gettext.
204 ;; See <http://bugs.gnu.org/18247>.
206 (utime "texi2html.pl" 0 0 0 0)
208 (build-system gnu-build-system)
209 (inputs `(("perl" ,perl)))
211 ;; Tests fail because of warnings on stderr from Perl 5.22. Adjusting
212 ;; texi2html.pl to avoid the warnings seems non-trivial, so we simply
213 ;; disable the tests.
215 (home-page "https://www.nongnu.org/texi2html/")
216 (synopsis "Convert Texinfo to HTML")
218 "Texi2HTML is a Perl script which converts Texinfo source files to HTML
219 output. It now supports many advanced features, such as internationalization
220 and extremely configurable output formats.
222 Development of Texi2HTML moved to the GNU Texinfo repository in 2010, since it
223 was meant to replace the makeinfo implementation in GNU Texinfo. The route
224 forward for authors is, in most cases, to alter manuals and build processes as
225 necessary to use the new features of the makeinfo/texi2any implementation of
226 GNU Texinfo. The Texi2HTML maintainers (one of whom is the principal author
227 of the GNU Texinfo implementation) do not intend to make further releases of
229 ;; Files in /lib under lgpl2.1+ and x11
232 (define-public texi2html-1.82
239 (uri (string-append "mirror://savannah/texi2html/"
240 "texi2html-" version ".tar.bz2"))
242 (base32 "1wdli2szkgm3l0vx8rf6lylw0b0m47dlz9iy004n928nqkzix76n"))))))
251 (url "https://github.com/baszoetekouw/pinfo.git")
252 (commit (string-append "v" version))))
253 (file-name (git-file-name name version))
256 "173d2p22irwiabvr4z6qvr6zpr6ysfkhmadjlyhyiwd7z62larvy"))))
257 (build-system gnu-build-system)
260 (modify-phases %standard-phases
261 (add-after 'unpack 'remove-Werror
263 (substitute* "configure.ac"
266 (add-after 'unpack 'embed-reference-to-clear
267 (lambda* (#:key inputs #:allow-other-keys)
268 (substitute* '("src/manual.c"
272 (string-append "\"" (which "clear") "\"")))
275 `(("ncurses" ,ncurses)
276 ("readline" ,readline)))
278 `(("autoconf" ,autoconf)
279 ("automake" ,automake)
280 ("gettext" ,gettext-minimal)
282 ("texinfo" ,texinfo)))
283 (home-page "https://github.com/baszoetekouw/pinfo")
284 (synopsis "Lynx-style Info file and man page reader")
286 "Pinfo is an Info file viewer. Pinfo is similar in use to the Lynx web
287 browser. You just move across info nodes, and select links, follow them, etc.
288 It supports many colors. Pinfo also supports viewing of manual pages -- they
289 are colorized like in the midnight commander's viewer, and additionally they
290 are hypertextualized.")