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 ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages documentation)
29 #:use-module (guix licenses)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system cmake)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages bash)
39 #:use-module (gnu packages python)
40 #:use-module (gnu packages bison)
41 #:use-module (gnu packages docbook)
42 #:use-module (gnu packages flex)
43 #:use-module (gnu packages graphviz)
44 #:use-module (gnu packages gettext)
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages perl)
47 #:use-module (gnu packages xml))
49 (define-public asciidoc
55 (uri (string-append "https://github.com/asciidoc/asciidoc/"
56 "archive/" version ".tar.gz"))
57 (file-name (string-append name "-" version ".tar.gz"))
60 "10xrl1iwyvs8aqm0vzkvs3dnsn93wyk942kk4ppyl6w9imbzhlly"))))
61 (build-system gnu-build-system)
63 `(#:tests? #f ; no 'check' target
65 (modify-phases %standard-phases
69 ;; Some XML-related binaries are required for asciidoc's proper usage.
70 ;; Without these, asciidoc fails when parsing XML documents, either
71 ;; reporting a missing "xmllint" binary or, when passed the
72 ;; "--no-xmllint" option, a missing "xsltproc" binary.
73 ;; The following phase enables asciidoc to find some of them.
74 (add-before 'configure 'set-xml-binary-paths
75 (lambda* (#:key inputs #:allow-other-keys)
76 (let* ((libxml2 (assoc-ref inputs "libxml2"))
77 (xmllint (string-append libxml2 "/bin/xmllint"))
78 (libxslt (assoc-ref inputs "libxslt"))
79 (xsltproc (string-append libxslt "/bin/xsltproc")))
81 (("XMLLINT = 'xmllint'")
82 (string-append "XMLLINT = '" xmllint "'"))
83 (("XSLTPROC = 'xsltproc'")
84 (string-append "XSLTPROC = '" xsltproc "'")))
86 ;; Make asciidoc use the local docbook-xsl package instead of fetching
87 ;; it from the internet at run-time.
88 (add-before 'install 'make-local-docbook-xsl
89 (lambda* (#:key inputs #:allow-other-keys)
90 (substitute* (find-files "docbook-xsl" ".*\\.xsl$")
91 (("xsl:import href=\"http://docbook.sourceforge.net/\
95 (string-append (assoc-ref inputs "docbook-xsl")
96 "/xml/xsl/docbook-xsl-"
97 ,(package-version docbook-xsl)))))
99 ;; Do the same for docbook-xml.
100 (add-before 'install 'make-local-docbook-xml
101 (lambda* (#:key inputs #:allow-other-keys)
102 (substitute* "docbook45.conf"
103 (("http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd")
104 (string-append (assoc-ref inputs "docbook-xml")
105 "/xml/dtd/docbook/docbookx.dtd")))
108 `(("autoconf" ,autoconf)))
109 (inputs `(("python" ,python-2)
110 ("docbook-xml" ,docbook-xml)
111 ("docbook-xsl" ,docbook-xsl)
113 ("libxslt" ,libxslt)))
114 (home-page "http://asciidoc.org/")
115 (synopsis "Text-based document generation system")
117 "AsciiDoc is a text document format for writing notes, documentation,
118 articles, books, ebooks, slideshows, web pages, man pages and blogs.
119 AsciiDoc files can be translated to many formats including HTML, PDF,
122 AsciiDoc is highly configurable: both the AsciiDoc source file syntax and
123 the backend output markups (which can be almost any type of SGML/XML
124 markup) can be customized and extended by the user.")
127 (define-public asciidoc-py3
128 (package (inherit asciidoc)
129 (name "asciidoc-py3")
134 (url "https://github.com/asciidoc/asciidoc-py3/")
136 (file-name (git-file-name name version))
139 "1v815dgab62970m9cr2crwbh4kvlzk6pv3hk4bzv6gfa4lbwfkfl"))))
140 (build-system gnu-build-system)
142 `(("autoconf" ,autoconf)))
145 ("docbook-xml" ,docbook-xml)
146 ("docbook-xsl" ,docbook-xsl)
148 ("libxslt" ,libxslt)))))
150 (define-public doxygen
154 (home-page "http://www.doxygen.nl/")
157 (uri (list (string-append home-page "files/doxygen-"
158 version ".src.tar.gz")
159 (string-append "mirror://sourceforge/doxygen/rel-"
160 version "/doxygen-" version
164 "16dmv0gm1x8rvbm82fmjvi213q8fxqxinm75pcf595flya59ific"))
165 (patches (search-patches "doxygen-test.patch"
166 "doxygen-1.8.17-runtests.patch"))))
167 (build-system cmake-build-system)
171 ("libxml2" ,libxml2) ;provides xmllint for the tests
172 ("python" ,python))) ;for creating the documentation
174 `(("bash" ,bash-minimal)))
176 ;; Force cmake to use iconv header from cross-libc instead of the one
178 `(,@(if (%current-target-system)
180 (list (string-append "-DICONV_INCLUDE_DIR="
181 (assoc-ref %build-inputs "cross-libc")
184 #:test-target "tests"
185 #:phases (modify-phases %standard-phases
186 (add-before 'configure 'patch-sh
187 (lambda* (#:key inputs #:allow-other-keys)
188 (substitute* "src/portable.cpp"
191 (assoc-ref inputs "bash") "/bin/sh")))
193 (synopsis "Generate documentation from annotated sources")
194 (description "Doxygen is the de facto standard tool for generating
195 documentation from annotated C++ sources, but it also supports other popular
196 programming languages such as C, Objective-C, C#, PHP, Java, Python,
197 IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl,
198 and to some extent D.")
207 (uri (string-append "https://sourceforge.net/projects/docpp/"
208 "files/doc++-" version ".tar.gz"))
211 "0i37zlxl8g352s4hzpdx0657k5x3czh3xcsfr27irc708gb277pn"))
212 (patches (search-patches "doc++-include-directives.patch"
213 "doc++-segfault-fix.patch"))))
214 (build-system gnu-build-system)
217 ("gettext" ,gettext-minimal)))
218 (home-page "http://docpp.sourceforge.net/")
219 (synopsis "Documentation system for C, C++, IDL, and Java")
221 "DOC++ is a documentation system for C, C++, IDL, and Java. It can
222 generate both TeX output for high-quality hardcopies or HTML output for online
223 brwosing. The documentation is extracted directly from the C/C++/IDL source
224 or Java class files.")
227 (define-public scrollkeeper
229 (name "scrollkeeper")
234 (uri (string-append "mirror://sourceforge/scrollkeeper/scrollkeeper/"
235 version "/scrollkeeper-" version ".tar.gz"))
237 (base32 "1bfxwxc1ngh11v36z899sz9qam366r050fhkyb5adv65lb1x62sa"))))
238 (build-system gnu-build-system)
241 (list (string-append "--with-xml-catalog="
242 (assoc-ref %build-inputs "docbook-xml")
243 "/xml/dtd/docbook/catalog.xml"))))
248 ;; The configure script checks for either version 4.2 or 4.1.2.
249 ("docbook-xml" ,docbook-xml-4.2)))
251 `(("intltool" ,intltool)))
252 (home-page "http://scrollkeeper.sourceforge.net/")
253 (synopsis "Open Documentation Cataloging Project")
254 (description "ScrollKeeper is a cataloging system for documentation on open
255 systems. It manages documentation metadata as specified by the Open Source
256 Metadata Framework and provides a simple API to allow help browsers to find,
257 sort, and search the document catalog. It will also be able to communicate
258 with catalog servers on the Net to search for documents which are not on the