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