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>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages texinfo)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix utils)
27 #:use-module (guix download)
28 #:use-module (guix git-download)
29 #:use-module (guix build-system gnu)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages gettext)
34 #:use-module (gnu packages ncurses)
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages readline))
38 (define-public texinfo
44 (uri (string-append "mirror://gnu/texinfo/texinfo-"
48 "0rixv4c301djr0d0cnsxs8c1wjndi6bf9vi5axz6mwjkv80cmfcv"))))
49 (build-system gnu-build-system)
50 (inputs `(("ncurses" ,ncurses)
54 ;; This is the variable used by the standalone Info reader.
55 (list (search-path-specification
57 (files '("share/info")))))
59 (home-page "https://www.gnu.org/software/texinfo/")
60 (synopsis "The GNU documentation format")
62 "Texinfo is the official documentation format of the GNU project. It
63 uses a single source file using explicit commands to produce a final document
64 in any of several supported output formats, such as HTML or PDF. This
65 package includes both the tools necessary to produce Info documents from
66 their source and the command-line Info reader. The emphasis of the language
67 is on expressing the content semantically, avoiding physical markup commands.")
70 (define-public texinfo-6.7
76 (uri (string-append "mirror://gnu/texinfo/texinfo-"
80 "1aicn1v3czqii08wc91jw089n1x3gfchkf808q2as59dak0h714q"))))))
82 (define-public texinfo-5
83 (package (inherit texinfo)
87 (uri (string-append "mirror://gnu/texinfo/texinfo-"
89 (patches (search-patches "texinfo-5-perl-compat.patch"))
92 "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal"))))
95 (define-public texinfo-4
96 (package (inherit texinfo)
101 "mirror://gnu/texinfo/texinfo-"
106 "1rf9ckpqwixj65bw469i634897xwlgkm5i9g2hv3avl6mv7b0a3d"))))
108 (inputs `(("ncurses" ,ncurses) ("xz" ,xz)))))
110 (define-public info-reader
111 ;; The idea of this package is to have the standalone Info reader without
112 ;; the dependency on Perl that 'makeinfo' drags.
117 `(#:disallowed-references ,(assoc-ref (package-inputs texinfo)
120 #:modules ((ice-9 ftw) (srfi srfi-1)
121 ,@%gnu-build-system-modules)
123 #:phases (modify-phases %standard-phases
124 (add-after 'install 'keep-only-info-reader
125 (lambda* (#:key outputs #:allow-other-keys)
126 ;; Remove everything but 'bin/info' and associated
129 (scandir "." (lambda (file)
130 (not (member file '("." ".."))))))
132 (let ((out (assoc-ref outputs "out")))
133 (with-directory-excursion out
134 (for-each delete-file-recursively
135 (fold delete (files) '("bin" "share"))))
136 (with-directory-excursion (string-append out "/bin")
137 (for-each delete-file (delete "info" (files))))
138 (with-directory-excursion (string-append out "/share")
139 (for-each delete-file-recursively
141 '("info" "locale"))))
143 (synopsis "Standalone Info documentation reader")))
145 (define-public texi2html
151 (uri (string-append "mirror://savannah/" name "/" name "-"
155 "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8"))
157 (search-patches "texi2html-document-encoding.patch"
158 "texi2html-i18n.patch"))
160 ;; This file is modified by the patch above, but reset its
161 ;; timestamp so we don't trigger the rule to update PO files,
162 ;; which would require Gettext.
163 ;; See <http://bugs.gnu.org/18247>.
165 (utime "texi2html.pl" 0 0 0 0)
167 (build-system gnu-build-system)
168 (inputs `(("perl" ,perl)))
170 ;; Tests fail because of warnings on stderr from Perl 5.22. Adjusting
171 ;; texi2html.pl to avoid the warnings seems non-trivial, so we simply
172 ;; disable the tests.
174 (home-page "https://www.nongnu.org/texi2html/")
175 (synopsis "Convert Texinfo to HTML")
177 "Texi2HTML is a Perl script which converts Texinfo source files to HTML
178 output. It now supports many advanced features, such as internationalization
179 and extremely configurable output formats.
181 Development of Texi2HTML moved to the GNU Texinfo repository in 2010, since it
182 was meant to replace the makeinfo implementation in GNU Texinfo. The route
183 forward for authors is, in most cases, to alter manuals and build processes as
184 necessary to use the new features of the makeinfo/texi2any implementation of
185 GNU Texinfo. The Texi2HTML maintainers (one of whom is the principal author
186 of the GNU Texinfo implementation) do not intend to make further releases of
188 ;; Files in /lib under lgpl2.1+ and x11
198 (url "https://github.com/baszoetekouw/pinfo.git")
199 (commit (string-append "v" version))))
200 (file-name (git-file-name name version))
203 "173d2p22irwiabvr4z6qvr6zpr6ysfkhmadjlyhyiwd7z62larvy"))))
204 (build-system gnu-build-system)
207 (modify-phases %standard-phases
208 (add-after 'unpack 'remove-Werror
210 (substitute* "configure.ac"
213 (add-after 'unpack 'embed-reference-to-clear
214 (lambda* (#:key inputs #:allow-other-keys)
215 (substitute* '("src/manual.c"
219 (string-append "\"" (which "clear") "\"")))
222 `(("ncurses" ,ncurses)
223 ("readline" ,readline)))
225 `(("autoconf" ,autoconf)
226 ("automake" ,automake)
227 ("gettext" ,gnu-gettext)
229 ("texinfo" ,texinfo)))
230 (home-page "https://github.com/baszoetekouw/pinfo")
231 (synopsis "Lynx-style Info file and man page reader")
233 "Pinfo is an Info file viewer. Pinfo is similar in use to the Lynx web
234 browser. You just move across info nodes, and select links, follow them, etc.
235 It supports many colors. Pinfo also supports viewing of manual pages -- they
236 are colorized like in the midnight commander's viewer, and additionally they
237 are hypertextualized.")