gnu: RHash: Update to 1.3.9.
[jackhill/guix/guix.git] / gnu / packages / documentation.scm
... / ...
CommitLineData
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014, 2018 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;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
9;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
10;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
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
27(define-module (gnu packages documentation)
28 #:use-module (guix licenses)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system cmake)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages bash)
37 #:use-module (gnu packages python)
38 #:use-module (gnu packages bison)
39 #:use-module (gnu packages docbook)
40 #:use-module (gnu packages flex)
41 #:use-module (gnu packages graphviz)
42 #:use-module (gnu packages gettext)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages perl)
45 #:use-module (gnu packages xml))
46
47(define-public asciidoc
48 (package
49 (name "asciidoc")
50 (version "8.6.10")
51 (source (origin
52 (method url-fetch)
53 (uri (string-append "https://github.com/asciidoc/asciidoc/"
54 "archive/" version ".tar.gz"))
55 (file-name (string-append name "-" version ".tar.gz"))
56 (sha256
57 (base32
58 "10xrl1iwyvs8aqm0vzkvs3dnsn93wyk942kk4ppyl6w9imbzhlly"))))
59 (build-system gnu-build-system)
60 (arguments
61 `(#:tests? #f ; no 'check' target
62 #:phases
63 (modify-phases %standard-phases
64 (replace 'bootstrap
65 (lambda _
66 (invoke "autoconf")))
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)))
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)))))
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")))
104 #t)))))
105 (native-inputs
106 `(("autoconf" ,autoconf)))
107 (inputs `(("python" ,python-2)
108 ("docbook-xml" ,docbook-xml)
109 ("docbook-xsl" ,docbook-xsl)
110 ("libxml2" ,libxml2)
111 ("libxslt" ,libxslt)))
112 (home-page "http://asciidoc.org/")
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+)))
124
125(define-public doxygen
126 (package
127 (name "doxygen")
128 (version "1.8.16")
129 (home-page "http://www.doxygen.nl/")
130 (source (origin
131 (method url-fetch)
132 (uri (list (string-append home-page "files/doxygen-"
133 version ".src.tar.gz")
134 (string-append "mirror://sourceforge/doxygen/rel-"
135 version "/doxygen-" version
136 ".src.tar.gz")))
137 (sha256
138 (base32
139 "10iwv8bcz5b5cd85gg8pgn0bmyg04n9hs36xn7ggjjnvynv1z67z"))
140 (patches (search-patches "doxygen-test.patch"))))
141 (build-system cmake-build-system)
142 (native-inputs
143 `(("bison" ,bison)
144 ("flex" ,flex)
145 ("libxml2" ,libxml2) ;provides xmllint for the tests
146 ("python" ,python))) ;for creating the documentation
147 (inputs
148 `(("bash" ,bash-minimal)))
149 (arguments
150 ;; Force cmake to use iconv header from cross-libc instead of the one
151 ;; from native libc.
152 `(,@(if (%current-target-system)
153 '(#:configure-flags
154 (list (string-append "-DICONV_INCLUDE_DIR="
155 (assoc-ref %build-inputs "cross-libc")
156 "/include")))
157 '())
158 #:test-target "tests"
159 #:phases (modify-phases %standard-phases
160 (add-after 'unpack 'remove-git-requirement
161 (lambda _
162 ;; TODO: Remove this for > 1.8.16.
163 (substitute* "cmake/git_watcher.cmake"
164 (("Git QUIET REQUIRED")
165 "Git QUIET"))
166 #t))
167 (add-before 'configure 'patch-sh
168 (lambda* (#:key inputs #:allow-other-keys)
169 (substitute* "src/portable.cpp"
170 (("/bin/sh")
171 (string-append
172 (assoc-ref inputs "bash") "/bin/sh")))
173 #t)))))
174 (synopsis "Generate documentation from annotated sources")
175 (description "Doxygen is the de facto standard tool for generating
176documentation from annotated C++ sources, but it also supports other popular
177programming languages such as C, Objective-C, C#, PHP, Java, Python,
178IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl,
179and to some extent D.")
180 (license gpl3+)))
181
182(define-public doc++
183 (package
184 (name "doc++")
185 (version "3.4.10")
186 (source (origin
187 (method url-fetch)
188 (uri (string-append "https://sourceforge.net/projects/docpp/"
189 "files/doc++-" version ".tar.gz"))
190 (sha256
191 (base32
192 "0i37zlxl8g352s4hzpdx0657k5x3czh3xcsfr27irc708gb277pn"))
193 (patches (search-patches "doc++-include-directives.patch"
194 "doc++-segfault-fix.patch"))))
195 (build-system gnu-build-system)
196 (native-inputs
197 `(("flex" ,flex)
198 ("gettext" ,gettext-minimal)))
199 (home-page "http://docpp.sourceforge.net/")
200 (synopsis "Documentation system for C, C++, IDL, and Java")
201 (description
202 "DOC++ is a documentation system for C, C++, IDL, and Java. It can
203generate both TeX output for high-quality hardcopies or HTML output for online
204brwosing. The documentation is extracted directly from the C/C++/IDL source
205or Java class files.")
206 (license gpl2+)))
207
208(define-public scrollkeeper
209 (package
210 (name "scrollkeeper")
211 (version "0.3.14")
212 (source
213 (origin
214 (method url-fetch)
215 (uri (string-append "mirror://sourceforge/scrollkeeper/scrollkeeper/"
216 version "/scrollkeeper-" version ".tar.gz"))
217 (sha256
218 (base32 "1bfxwxc1ngh11v36z899sz9qam366r050fhkyb5adv65lb1x62sa"))))
219 (build-system gnu-build-system)
220 (arguments
221 `(#:configure-flags
222 (list (string-append "--with-xml-catalog="
223 (assoc-ref %build-inputs "docbook-xml")
224 "/xml/dtd/docbook/catalog.xml"))))
225 (inputs
226 `(("perl" ,perl)
227 ("libxml2" ,libxml2)
228 ("libxslt" ,libxslt)
229 ;; The configure script checks for either version 4.2 or 4.1.2.
230 ("docbook-xml" ,docbook-xml-4.2)))
231 (native-inputs
232 `(("intltool" ,intltool)))
233 (home-page "http://scrollkeeper.sourceforge.net/")
234 (synopsis "Open Documentation Cataloging Project")
235 (description "ScrollKeeper is a cataloging system for documentation on open
236systems. It manages documentation metadata as specified by the Open Source
237Metadata Framework and provides a simple API to allow help browsers to find,
238sort, and search the document catalog. It will also be able to communicate
239with catalog servers on the Net to search for documents which are not on the
240local system.")
241 (license lgpl2.1+)))