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