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