Commit | Line | Data |
---|---|---|
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> |
db32c281 | 7 | ;;; |
233e7676 | 8 | ;;; This file is part of GNU Guix. |
db32c281 | 9 | ;;; |
233e7676 | 10 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
db32c281 LC |
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. | |
14 | ;;; | |
233e7676 | 15 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
db32c281 LC |
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. | |
19 | ;;; | |
20 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 21 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
db32c281 | 22 | |
1ffa7090 | 23 | (define-module (gnu packages texinfo) |
4a44e743 | 24 | #:use-module (guix licenses) |
db32c281 | 25 | #:use-module (guix packages) |
a13116b6 | 26 | #:use-module (guix utils) |
db32c281 | 27 | #:use-module (guix download) |
e703f6d8 | 28 | #:use-module (guix git-download) |
db32c281 | 29 | #:use-module (guix build-system gnu) |
c5d83768 | 30 | #:use-module (gnu packages) |
e703f6d8 | 31 | #:use-module (gnu packages autotools) |
1ffa7090 | 32 | #:use-module (gnu packages compression) |
e703f6d8 | 33 | #:use-module (gnu packages gettext) |
74601e45 | 34 | #:use-module (gnu packages ncurses) |
e703f6d8 RW |
35 | #:use-module (gnu packages perl) |
36 | #:use-module (gnu packages readline)) | |
db32c281 LC |
37 | |
38 | (define-public texinfo | |
39 | (package | |
40 | (name "texinfo") | |
b3e508da | 41 | (version "6.6") |
a24b75d8 | 42 | (source (origin |
f7b55b04 MW |
43 | (method url-fetch) |
44 | (uri (string-append "mirror://gnu/texinfo/texinfo-" | |
45 | version ".tar.xz")) | |
46 | (sha256 | |
47 | (base32 | |
b3e508da | 48 | "0rixv4c301djr0d0cnsxs8c1wjndi6bf9vi5axz6mwjkv80cmfcv")))) |
db32c281 | 49 | (build-system gnu-build-system) |
f6d7be1e | 50 | (inputs `(("ncurses" ,ncurses) |
3d6b71e8 | 51 | ("perl" ,perl))) |
1668dfcd LC |
52 | |
53 | (native-search-paths | |
54 | ;; This is the variable used by the standalone Info reader. | |
55 | (list (search-path-specification | |
56 | (variable "INFOPATH") | |
57 | (files '("share/info"))))) | |
58 | ||
6fd52309 | 59 | (home-page "https://www.gnu.org/software/texinfo/") |
f50d2669 | 60 | (synopsis "The GNU documentation format") |
db32c281 | 61 | (description |
a22dc0c4 | 62 | "Texinfo is the official documentation format of the GNU project. It |
79c311b8 LC |
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.") | |
4a44e743 | 68 | (license gpl3+))) |
bbafef3f | 69 | |
99fcefb9 LC |
70 | (define-public texinfo-6.7 |
71 | (package | |
72 | (inherit texinfo) | |
73 | (version "6.7") | |
74 | (source (origin | |
75 | (method url-fetch) | |
76 | (uri (string-append "mirror://gnu/texinfo/texinfo-" | |
77 | version ".tar.xz")) | |
78 | (sha256 | |
79 | (base32 | |
80 | "1aicn1v3czqii08wc91jw089n1x3gfchkf808q2as59dak0h714q")))))) | |
81 | ||
f7b55b04 MW |
82 | (define-public texinfo-5 |
83 | (package (inherit texinfo) | |
84 | (version "5.2") | |
ce1e4bd5 LC |
85 | (source (origin |
86 | (method url-fetch) | |
87 | (uri (string-append "mirror://gnu/texinfo/texinfo-" | |
88 | version ".tar.xz")) | |
a446cf26 | 89 | (patches (search-patches "texinfo-5-perl-compat.patch")) |
ce1e4bd5 LC |
90 | (sha256 |
91 | (base32 | |
47ed8e04 MW |
92 | "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal")))) |
93 | (native-inputs '()))) | |
ce1e4bd5 | 94 | |
bbafef3f MW |
95 | (define-public texinfo-4 |
96 | (package (inherit texinfo) | |
97 | (version "4.13a") | |
98 | (source (origin | |
99 | (method url-fetch) | |
100 | (uri (string-append | |
101 | "mirror://gnu/texinfo/texinfo-" | |
102 | version | |
103 | ".tar.lzma")) | |
104 | (sha256 | |
105 | (base32 | |
106 | "1rf9ckpqwixj65bw469i634897xwlgkm5i9g2hv3avl6mv7b0a3d")))) | |
47ed8e04 | 107 | (native-inputs '()) |
bbafef3f | 108 | (inputs `(("ncurses" ,ncurses) ("xz" ,xz))))) |
c5d83768 | 109 | |
7feebd33 LC |
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. | |
113 | (package | |
8f03b70b | 114 | (inherit texinfo) |
7feebd33 LC |
115 | (name "info-reader") |
116 | (arguments | |
8c4c5bf8 | 117 | `(#:disallowed-references ,(assoc-ref (package-inputs texinfo) |
614a1e3f | 118 | "perl") |
8c4c5bf8 | 119 | |
7feebd33 | 120 | #:modules ((ice-9 ftw) (srfi srfi-1) |
8c4c5bf8 MO |
121 | ,@%gnu-build-system-modules) |
122 | ||
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 | |
127 | ;; files. | |
128 | (define (files) | |
129 | (scandir "." (lambda (file) | |
130 | (not (member file '("." "..")))))) | |
131 | ||
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 | |
140 | (fold delete (files) | |
141 | '("info" "locale")))) | |
142 | #t)))))) | |
7feebd33 LC |
143 | (synopsis "Standalone Info documentation reader"))) |
144 | ||
c5d83768 EB |
145 | (define-public texi2html |
146 | (package | |
147 | (name "texi2html") | |
148 | (version "5.0") | |
149 | (source (origin | |
150 | (method url-fetch) | |
151 | (uri (string-append "mirror://savannah/" name "/" name "-" | |
152 | version ".tar.bz2")) | |
153 | (sha256 | |
154 | (base32 | |
155 | "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8")) | |
d759cf67 | 156 | (patches |
fc1adab1 AK |
157 | (search-patches "texi2html-document-encoding.patch" |
158 | "texi2html-i18n.patch")) | |
d759cf67 LC |
159 | (snippet |
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>. | |
6cbee49d MW |
164 | '(begin |
165 | (utime "texi2html.pl" 0 0 0 0) | |
166 | #t)))) | |
c5d83768 | 167 | (build-system gnu-build-system) |
c5d83768 | 168 | (inputs `(("perl" ,perl))) |
1022da10 EB |
169 | (arguments |
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. | |
173 | '(#:tests? #f)) | |
340978d7 | 174 | (home-page "https://www.nongnu.org/texi2html/") |
c5d83768 EB |
175 | (synopsis "Convert Texinfo to HTML") |
176 | (description | |
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. | |
180 | ||
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 | |
187 | Texi2HTML.") | |
188 | ;; Files in /lib under lgpl2.1+ and x11 | |
189 | (license gpl2+))) | |
e703f6d8 RW |
190 | |
191 | (define-public pinfo | |
192 | (package | |
193 | (name "pinfo") | |
194 | (version "0.6.13") | |
195 | (source (origin | |
196 | (method git-fetch) | |
197 | (uri (git-reference | |
198 | (url "https://github.com/baszoetekouw/pinfo.git") | |
199 | (commit (string-append "v" version)))) | |
ca825070 | 200 | (file-name (git-file-name name version)) |
e703f6d8 RW |
201 | (sha256 |
202 | (base32 | |
203 | "173d2p22irwiabvr4z6qvr6zpr6ysfkhmadjlyhyiwd7z62larvy")))) | |
204 | (build-system gnu-build-system) | |
205 | (arguments | |
206 | `(#:phases | |
207 | (modify-phases %standard-phases | |
208 | (add-after 'unpack 'remove-Werror | |
209 | (lambda _ | |
210 | (substitute* "configure.ac" | |
211 | (("-Werror") "")) | |
212 | #t)) | |
213 | (add-after 'unpack 'embed-reference-to-clear | |
214 | (lambda* (#:key inputs #:allow-other-keys) | |
215 | (substitute* '("src/manual.c" | |
216 | "src/mainfunction.c" | |
217 | "src/utils.c") | |
218 | (("\"clear\"") | |
219 | (string-append "\"" (which "clear") "\""))) | |
220 | #t))))) | |
221 | (inputs | |
222 | `(("ncurses" ,ncurses) | |
223 | ("readline" ,readline))) | |
224 | (native-inputs | |
225 | `(("autoconf" ,autoconf) | |
226 | ("automake" ,automake) | |
227 | ("gettext" ,gnu-gettext) | |
228 | ("libtool" ,libtool) | |
229 | ("texinfo" ,texinfo))) | |
230 | (home-page "https://github.com/baszoetekouw/pinfo") | |
231 | (synopsis "Lynx-style Info file and man page reader") | |
232 | (description | |
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 | |
4250a963 | 236 | are colorized like in the midnight commander's viewer, and additionally they |
e703f6d8 RW |
237 | are hypertextualized.") |
238 | (license gpl2+))) |