Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
1fda01ef | 2 | ;;; Copyright © 2012, 2013, 2015, 2016, 2017 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> |
fb32b169 | 5 | ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> |
db32c281 | 6 | ;;; |
233e7676 | 7 | ;;; This file is part of GNU Guix. |
db32c281 | 8 | ;;; |
233e7676 | 9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
db32c281 LC |
10 | ;;; under the terms of the GNU General Public License as published by |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
233e7676 | 14 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
db32c281 LC |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
db32c281 | 21 | |
1ffa7090 | 22 | (define-module (gnu packages texinfo) |
4a44e743 | 23 | #:use-module (guix licenses) |
db32c281 LC |
24 | #:use-module (guix packages) |
25 | #:use-module (guix download) | |
26 | #:use-module (guix build-system gnu) | |
c5d83768 | 27 | #:use-module (gnu packages) |
1ffa7090 | 28 | #:use-module (gnu packages compression) |
74601e45 MB |
29 | #:use-module (gnu packages ncurses) |
30 | #:use-module (gnu packages perl)) | |
db32c281 LC |
31 | |
32 | (define-public texinfo | |
33 | (package | |
34 | (name "texinfo") | |
b603d02a | 35 | (version "6.5") |
a24b75d8 | 36 | (source (origin |
f7b55b04 MW |
37 | (method url-fetch) |
38 | (uri (string-append "mirror://gnu/texinfo/texinfo-" | |
39 | version ".tar.xz")) | |
40 | (sha256 | |
41 | (base32 | |
b603d02a | 42 | "0qjzvbvnv9003xdrcpi3jp7y68j4hq2ciw9frh2hghh698zlnxvp")))) |
db32c281 | 43 | (build-system gnu-build-system) |
f6d7be1e | 44 | (inputs `(("ncurses" ,ncurses) |
3d6b71e8 | 45 | ("perl" ,perl))) |
1668dfcd LC |
46 | |
47 | (native-search-paths | |
48 | ;; This is the variable used by the standalone Info reader. | |
49 | (list (search-path-specification | |
50 | (variable "INFOPATH") | |
51 | (files '("share/info"))))) | |
52 | ||
6fd52309 | 53 | (home-page "https://www.gnu.org/software/texinfo/") |
f50d2669 | 54 | (synopsis "The GNU documentation format") |
db32c281 | 55 | (description |
a22dc0c4 | 56 | "Texinfo is the official documentation format of the GNU project. It |
79c311b8 LC |
57 | uses a single source file using explicit commands to produce a final document |
58 | in any of several supported output formats, such as HTML or PDF. This | |
59 | package includes both the tools necessary to produce Info documents from | |
60 | their source and the command-line Info reader. The emphasis of the language | |
61 | is on expressing the content semantically, avoiding physical markup commands.") | |
4a44e743 | 62 | (license gpl3+))) |
bbafef3f | 63 | |
f7b55b04 MW |
64 | (define-public texinfo-5 |
65 | (package (inherit texinfo) | |
66 | (version "5.2") | |
ce1e4bd5 LC |
67 | (source (origin |
68 | (method url-fetch) | |
69 | (uri (string-append "mirror://gnu/texinfo/texinfo-" | |
70 | version ".tar.xz")) | |
71 | (sha256 | |
72 | (base32 | |
47ed8e04 MW |
73 | "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal")))) |
74 | (native-inputs '()))) | |
ce1e4bd5 | 75 | |
bbafef3f MW |
76 | (define-public texinfo-4 |
77 | (package (inherit texinfo) | |
78 | (version "4.13a") | |
79 | (source (origin | |
80 | (method url-fetch) | |
81 | (uri (string-append | |
82 | "mirror://gnu/texinfo/texinfo-" | |
83 | version | |
84 | ".tar.lzma")) | |
85 | (sha256 | |
86 | (base32 | |
87 | "1rf9ckpqwixj65bw469i634897xwlgkm5i9g2hv3avl6mv7b0a3d")))) | |
47ed8e04 | 88 | (native-inputs '()) |
bbafef3f | 89 | (inputs `(("ncurses" ,ncurses) ("xz" ,xz))))) |
c5d83768 | 90 | |
7feebd33 LC |
91 | (define-public info-reader |
92 | ;; The idea of this package is to have the standalone Info reader without | |
93 | ;; the dependency on Perl that 'makeinfo' drags. | |
94 | (package | |
8f03b70b | 95 | (inherit texinfo) |
7feebd33 LC |
96 | (name "info-reader") |
97 | (arguments | |
8f03b70b | 98 | `(#:disallowed-references ,(assoc-ref (package-inputs texinfo) |
7feebd33 LC |
99 | "perl") |
100 | ||
101 | #:modules ((ice-9 ftw) (srfi srfi-1) | |
102 | ,@%gnu-build-system-modules) | |
103 | ||
104 | #:phases (modify-phases %standard-phases | |
105 | (add-after 'install 'keep-only-info-reader | |
106 | (lambda* (#:key outputs #:allow-other-keys) | |
107 | ;; Remove everything but 'bin/info' and associated | |
108 | ;; files. | |
109 | (define (files) | |
110 | (scandir "." (lambda (file) | |
111 | (not (member file '("." "..")))))) | |
112 | ||
113 | (let ((out (assoc-ref outputs "out"))) | |
114 | (with-directory-excursion out | |
115 | (for-each delete-file-recursively | |
116 | (fold delete (files) '("bin" "share")))) | |
117 | (with-directory-excursion (string-append out "/bin") | |
118 | (for-each delete-file (delete "info" (files)))) | |
119 | (with-directory-excursion (string-append out "/share") | |
120 | (for-each delete-file-recursively | |
121 | (fold delete (files) | |
122 | '("info" "locale")))) | |
123 | #t)))))) | |
124 | (synopsis "Standalone Info documentation reader"))) | |
125 | ||
c5d83768 EB |
126 | (define-public texi2html |
127 | (package | |
128 | (name "texi2html") | |
129 | (version "5.0") | |
130 | (source (origin | |
131 | (method url-fetch) | |
132 | (uri (string-append "mirror://savannah/" name "/" name "-" | |
133 | version ".tar.bz2")) | |
134 | (sha256 | |
135 | (base32 | |
136 | "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8")) | |
d759cf67 | 137 | (patches |
fc1adab1 AK |
138 | (search-patches "texi2html-document-encoding.patch" |
139 | "texi2html-i18n.patch")) | |
d759cf67 LC |
140 | (snippet |
141 | ;; This file is modified by the patch above, but reset its | |
142 | ;; timestamp so we don't trigger the rule to update PO files, | |
143 | ;; which would require Gettext. | |
144 | ;; See <http://bugs.gnu.org/18247>. | |
145 | '(utime "texi2html.pl" 0 0 0 0)))) | |
c5d83768 | 146 | (build-system gnu-build-system) |
c5d83768 | 147 | (inputs `(("perl" ,perl))) |
1022da10 EB |
148 | (arguments |
149 | ;; Tests fail because of warnings on stderr from Perl 5.22. Adjusting | |
150 | ;; texi2html.pl to avoid the warnings seems non-trivial, so we simply | |
151 | ;; disable the tests. | |
152 | '(#:tests? #f)) | |
340978d7 | 153 | (home-page "https://www.nongnu.org/texi2html/") |
c5d83768 EB |
154 | (synopsis "Convert Texinfo to HTML") |
155 | (description | |
156 | "Texi2HTML is a Perl script which converts Texinfo source files to HTML | |
157 | output. It now supports many advanced features, such as internationalization | |
158 | and extremely configurable output formats. | |
159 | ||
160 | Development of Texi2HTML moved to the GNU Texinfo repository in 2010, since it | |
161 | was meant to replace the makeinfo implementation in GNU Texinfo. The route | |
162 | forward for authors is, in most cases, to alter manuals and build processes as | |
163 | necessary to use the new features of the makeinfo/texi2any implementation of | |
164 | GNU Texinfo. The Texi2HTML maintainers (one of whom is the principal author | |
165 | of the GNU Texinfo implementation) do not intend to make further releases of | |
166 | Texi2HTML.") | |
167 | ;; Files in /lib under lgpl2.1+ and x11 | |
168 | (license gpl2+))) |