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