Commit | Line | Data |
---|---|---|
436d4d1f | 1 | ;;; GNU Guix --- Functional package management for GNU |
189be331 | 2 | ;;; Copyright © 2014, 2018 Ludovic Courtès <ludo@gnu.org> |
7c853c02 | 3 | ;;; Copyright © 2014, 2016 Andreas Enge <andreas@enge.fr> |
b4e655e5 | 4 | ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org> |
fa8af53e | 5 | ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> |
603308ee | 6 | ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be> |
3c8ba11a | 7 | ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net> |
738d0cd6 | 8 | ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> |
ccfe4aa1 | 9 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
21b0ed1f | 10 | ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> |
013a0bc0 | 11 | ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net> |
436d4d1f AE |
12 | ;;; |
13 | ;;; This file is part of GNU Guix. | |
14 | ;;; | |
15 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
16 | ;;; under the terms of the GNU General Public License as published by | |
17 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
18 | ;;; your option) any later version. | |
19 | ;;; | |
20 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
21 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
22 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
23 | ;;; GNU General Public License for more details. | |
24 | ;;; | |
25 | ;;; You should have received a copy of the GNU General Public License | |
26 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
27 | ||
0573a923 EB |
28 | (define-module (gnu packages documentation) |
29 | #:use-module (guix licenses) | |
436d4d1f AE |
30 | #:use-module (guix packages) |
31 | #:use-module (guix download) | |
013a0bc0 | 32 | #:use-module (guix git-download) |
0573a923 | 33 | #:use-module (guix build-system gnu) |
7c853c02 | 34 | #:use-module (guix build-system cmake) |
436d4d1f | 35 | #:use-module (gnu packages) |
ccfe4aa1 | 36 | #:use-module (gnu packages autotools) |
21b0ed1f | 37 | #:use-module (gnu packages base) |
603308ee | 38 | #:use-module (gnu packages bash) |
0573a923 | 39 | #:use-module (gnu packages python) |
436d4d1f | 40 | #:use-module (gnu packages bison) |
fa8af53e | 41 | #:use-module (gnu packages docbook) |
436d4d1f | 42 | #:use-module (gnu packages flex) |
9e57c1b5 | 43 | #:use-module (gnu packages graphviz) |
b4e655e5 | 44 | #:use-module (gnu packages gettext) |
fa8af53e | 45 | #:use-module (gnu packages glib) |
436d4d1f | 46 | #:use-module (gnu packages perl) |
148585c2 | 47 | #:use-module (gnu packages xml)) |
0573a923 EB |
48 | |
49 | (define-public asciidoc | |
50 | (package | |
51 | (name "asciidoc") | |
ccfe4aa1 | 52 | (version "8.6.10") |
0573a923 EB |
53 | (source (origin |
54 | (method url-fetch) | |
ccfe4aa1 TGR |
55 | (uri (string-append "https://github.com/asciidoc/asciidoc/" |
56 | "archive/" version ".tar.gz")) | |
57 | (file-name (string-append name "-" version ".tar.gz")) | |
0573a923 EB |
58 | (sha256 |
59 | (base32 | |
ccfe4aa1 | 60 | "10xrl1iwyvs8aqm0vzkvs3dnsn93wyk942kk4ppyl6w9imbzhlly")))) |
0573a923 | 61 | (build-system gnu-build-system) |
dd10ba63 TČ |
62 | (arguments |
63 | `(#:tests? #f ; no 'check' target | |
64 | #:phases | |
65 | (modify-phases %standard-phases | |
8a442e5d MW |
66 | (replace 'bootstrap |
67 | (lambda _ | |
68 | (invoke "autoconf"))) | |
9099a457 KK |
69 | ;; Some XML-related binaries are required for asciidoc's proper usage. |
70 | ;; Without these, asciidoc fails when parsing XML documents, either | |
71 | ;; reporting a missing "xmllint" binary or, when passed the | |
72 | ;; "--no-xmllint" option, a missing "xsltproc" binary. | |
73 | ;; The following phase enables asciidoc to find some of them. | |
74 | (add-before 'configure 'set-xml-binary-paths | |
75 | (lambda* (#:key inputs #:allow-other-keys) | |
76 | (let* ((libxml2 (assoc-ref inputs "libxml2")) | |
77 | (xmllint (string-append libxml2 "/bin/xmllint")) | |
78 | (libxslt (assoc-ref inputs "libxslt")) | |
79 | (xsltproc (string-append libxslt "/bin/xsltproc"))) | |
80 | (substitute* "a2x.py" | |
81 | (("XMLLINT = 'xmllint'") | |
82 | (string-append "XMLLINT = '" xmllint "'")) | |
83 | (("XSLTPROC = 'xsltproc'") | |
84 | (string-append "XSLTPROC = '" xsltproc "'"))) | |
85 | #t))) | |
dd10ba63 TČ |
86 | ;; Make asciidoc use the local docbook-xsl package instead of fetching |
87 | ;; it from the internet at run-time. | |
88 | (add-before 'install 'make-local-docbook-xsl | |
89 | (lambda* (#:key inputs #:allow-other-keys) | |
90 | (substitute* (find-files "docbook-xsl" ".*\\.xsl$") | |
91 | (("xsl:import href=\"http://docbook.sourceforge.net/\ | |
92 | release/xsl/current") | |
93 | (string-append | |
94 | "xsl:import href=\"" | |
95 | (string-append (assoc-ref inputs "docbook-xsl") | |
96 | "/xml/xsl/docbook-xsl-" | |
97 | ,(package-version docbook-xsl))))) | |
3078821d KK |
98 | #t)) |
99 | ;; Do the same for docbook-xml. | |
100 | (add-before 'install 'make-local-docbook-xml | |
101 | (lambda* (#:key inputs #:allow-other-keys) | |
102 | (substitute* "docbook45.conf" | |
103 | (("http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd") | |
104 | (string-append (assoc-ref inputs "docbook-xml") | |
105 | "/xml/dtd/docbook/docbookx.dtd"))) | |
dd10ba63 | 106 | #t))))) |
ccfe4aa1 TGR |
107 | (native-inputs |
108 | `(("autoconf" ,autoconf))) | |
dd10ba63 | 109 | (inputs `(("python" ,python-2) |
3078821d | 110 | ("docbook-xml" ,docbook-xml) |
9099a457 KK |
111 | ("docbook-xsl" ,docbook-xsl) |
112 | ("libxml2" ,libxml2) | |
113 | ("libxslt" ,libxslt))) | |
42d11593 | 114 | (home-page "https://asciidoc.org/") |
0573a923 EB |
115 | (synopsis "Text-based document generation system") |
116 | (description | |
117 | "AsciiDoc is a text document format for writing notes, documentation, | |
118 | articles, books, ebooks, slideshows, web pages, man pages and blogs. | |
119 | AsciiDoc files can be translated to many formats including HTML, PDF, | |
120 | EPUB, man page. | |
121 | ||
122 | AsciiDoc is highly configurable: both the AsciiDoc source file syntax and | |
123 | the backend output markups (which can be almost any type of SGML/XML | |
124 | markup) can be customized and extended by the user.") | |
125 | (license gpl2+))) | |
436d4d1f | 126 | |
013a0bc0 RW |
127 | (define-public asciidoc-py3 |
128 | (package (inherit asciidoc) | |
129 | (name "asciidoc-py3") | |
130 | (version "9.0.0rc1") | |
131 | (source (origin | |
132 | (method git-fetch) | |
133 | (uri (git-reference | |
134 | (url "https://github.com/asciidoc/asciidoc-py3/") | |
135 | (commit version))) | |
136 | (file-name (git-file-name name version)) | |
137 | (sha256 | |
138 | (base32 | |
139 | "1v815dgab62970m9cr2crwbh4kvlzk6pv3hk4bzv6gfa4lbwfkfl")))) | |
140 | (build-system gnu-build-system) | |
141 | (native-inputs | |
142 | `(("autoconf" ,autoconf))) | |
143 | (inputs | |
144 | `(("python" ,python) | |
145 | ("docbook-xml" ,docbook-xml) | |
146 | ("docbook-xsl" ,docbook-xsl) | |
147 | ("libxml2" ,libxml2) | |
148 | ("libxslt" ,libxslt))))) | |
149 | ||
436d4d1f AE |
150 | (define-public doxygen |
151 | (package | |
152 | (name "doxygen") | |
b34c1258 | 153 | (version "1.8.17") |
58c6a93d | 154 | (home-page "http://www.doxygen.nl/") |
436d4d1f AE |
155 | (source (origin |
156 | (method url-fetch) | |
58c6a93d MB |
157 | (uri (list (string-append home-page "files/doxygen-" |
158 | version ".src.tar.gz") | |
159 | (string-append "mirror://sourceforge/doxygen/rel-" | |
160 | version "/doxygen-" version | |
161 | ".src.tar.gz"))) | |
436d4d1f AE |
162 | (sha256 |
163 | (base32 | |
b34c1258 MB |
164 | "16dmv0gm1x8rvbm82fmjvi213q8fxqxinm75pcf595flya59ific")) |
165 | (patches (search-patches "doxygen-test.patch" | |
166 | "doxygen-1.8.17-runtests.patch")))) | |
7c853c02 | 167 | (build-system cmake-build-system) |
436d4d1f AE |
168 | (native-inputs |
169 | `(("bison" ,bison) | |
ff685049 | 170 | ("flex" ,flex) |
f826ac47 MB |
171 | ("libxml2" ,libxml2) ;provides xmllint for the tests |
172 | ("python" ,python))) ;for creating the documentation | |
603308ee | 173 | (inputs |
fb76ef84 | 174 | `(("bash" ,bash-minimal))) |
436d4d1f | 175 | (arguments |
21b0ed1f MO |
176 | ;; Force cmake to use iconv header from cross-libc instead of the one |
177 | ;; from native libc. | |
178 | `(,@(if (%current-target-system) | |
179 | '(#:configure-flags | |
180 | (list (string-append "-DICONV_INCLUDE_DIR=" | |
181 | (assoc-ref %build-inputs "cross-libc") | |
182 | "/include"))) | |
183 | '()) | |
184 | #:test-target "tests" | |
603308ee TD |
185 | #:phases (modify-phases %standard-phases |
186 | (add-before 'configure 'patch-sh | |
187 | (lambda* (#:key inputs #:allow-other-keys) | |
188 | (substitute* "src/portable.cpp" | |
189 | (("/bin/sh") | |
190 | (string-append | |
191 | (assoc-ref inputs "bash") "/bin/sh"))) | |
192 | #t))))) | |
35b9e423 | 193 | (synopsis "Generate documentation from annotated sources") |
436d4d1f AE |
194 | (description "Doxygen is the de facto standard tool for generating |
195 | documentation from annotated C++ sources, but it also supports other popular | |
196 | programming languages such as C, Objective-C, C#, PHP, Java, Python, | |
197 | IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl, | |
198 | and to some extent D.") | |
199 | (license gpl3+))) | |
b4e655e5 EB |
200 | |
201 | (define-public doc++ | |
202 | (package | |
203 | (name "doc++") | |
204 | (version "3.4.10") | |
205 | (source (origin | |
206 | (method url-fetch) | |
207 | (uri (string-append "https://sourceforge.net/projects/docpp/" | |
208 | "files/doc++-" version ".tar.gz")) | |
209 | (sha256 | |
210 | (base32 | |
211 | "0i37zlxl8g352s4hzpdx0657k5x3czh3xcsfr27irc708gb277pn")) | |
212 | (patches (search-patches "doc++-include-directives.patch" | |
213 | "doc++-segfault-fix.patch")))) | |
214 | (build-system gnu-build-system) | |
215 | (native-inputs | |
216 | `(("flex" ,flex) | |
b94a6ca0 | 217 | ("gettext" ,gettext-minimal))) |
b4e655e5 EB |
218 | (home-page "http://docpp.sourceforge.net/") |
219 | (synopsis "Documentation system for C, C++, IDL, and Java") | |
220 | (description | |
221 | "DOC++ is a documentation system for C, C++, IDL, and Java. It can | |
222 | generate both TeX output for high-quality hardcopies or HTML output for online | |
223 | brwosing. The documentation is extracted directly from the C/C++/IDL source | |
224 | or Java class files.") | |
225 | (license gpl2+))) | |
fa8af53e RJ |
226 | |
227 | (define-public scrollkeeper | |
228 | (package | |
229 | (name "scrollkeeper") | |
230 | (version "0.3.14") | |
231 | (source | |
232 | (origin | |
233 | (method url-fetch) | |
de67e922 LF |
234 | (uri (string-append "mirror://sourceforge/scrollkeeper/scrollkeeper/" |
235 | version "/scrollkeeper-" version ".tar.gz")) | |
fa8af53e RJ |
236 | (sha256 |
237 | (base32 "1bfxwxc1ngh11v36z899sz9qam366r050fhkyb5adv65lb1x62sa")))) | |
238 | (build-system gnu-build-system) | |
239 | (arguments | |
240 | `(#:configure-flags | |
241 | (list (string-append "--with-xml-catalog=" | |
242 | (assoc-ref %build-inputs "docbook-xml") | |
243 | "/xml/dtd/docbook/catalog.xml")))) | |
244 | (inputs | |
245 | `(("perl" ,perl) | |
246 | ("libxml2" ,libxml2) | |
247 | ("libxslt" ,libxslt) | |
248 | ;; The configure script checks for either version 4.2 or 4.1.2. | |
249 | ("docbook-xml" ,docbook-xml-4.2))) | |
250 | (native-inputs | |
251 | `(("intltool" ,intltool))) | |
252 | (home-page "http://scrollkeeper.sourceforge.net/") | |
253 | (synopsis "Open Documentation Cataloging Project") | |
254 | (description "ScrollKeeper is a cataloging system for documentation on open | |
255 | systems. It manages documentation metadata as specified by the Open Source | |
256 | Metadata Framework and provides a simple API to allow help browsers to find, | |
257 | sort, and search the document catalog. It will also be able to communicate | |
258 | with catalog servers on the Net to search for documents which are not on the | |
259 | local system.") | |
260 | (license lgpl2.1+))) |