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 <kei@openmailbox.org>
9 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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 #:autoload (gnu packages zip) (unzip))
43 (define-public asciidoc
49 (uri (string-append "mirror://sourceforge/asciidoc/asciidoc/"
50 version "/asciidoc-" version ".tar.gz"))
53 "1w71nk527lq504njmaf0vzr93pgahkgzzxzglrq6bay8cw2rvnvq"))))
54 (build-system gnu-build-system)
56 `(#:tests? #f ; no 'check' target
58 (modify-phases %standard-phases
59 ;; Some XML-related binaries are required for asciidoc's proper usage.
60 ;; Without these, asciidoc fails when parsing XML documents, either
61 ;; reporting a missing "xmllint" binary or, when passed the
62 ;; "--no-xmllint" option, a missing "xsltproc" binary.
63 ;; The following phase enables asciidoc to find some of them.
64 (add-before 'configure 'set-xml-binary-paths
65 (lambda* (#:key inputs #:allow-other-keys)
66 (let* ((libxml2 (assoc-ref inputs "libxml2"))
67 (xmllint (string-append libxml2 "/bin/xmllint"))
68 (libxslt (assoc-ref inputs "libxslt"))
69 (xsltproc (string-append libxslt "/bin/xsltproc")))
71 (("XMLLINT = 'xmllint'")
72 (string-append "XMLLINT = '" xmllint "'"))
73 (("XSLTPROC = 'xsltproc'")
74 (string-append "XSLTPROC = '" xsltproc "'")))
76 ;; Make asciidoc use the local docbook-xsl package instead of fetching
77 ;; it from the internet at run-time.
78 (add-before 'install 'make-local-docbook-xsl
79 (lambda* (#:key inputs #:allow-other-keys)
80 (substitute* (find-files "docbook-xsl" ".*\\.xsl$")
81 (("xsl:import href=\"http://docbook.sourceforge.net/\
85 (string-append (assoc-ref inputs "docbook-xsl")
86 "/xml/xsl/docbook-xsl-"
87 ,(package-version docbook-xsl)))))
89 ;; Do the same for docbook-xml.
90 (add-before 'install 'make-local-docbook-xml
91 (lambda* (#:key inputs #:allow-other-keys)
92 (substitute* "docbook45.conf"
93 (("http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd")
94 (string-append (assoc-ref inputs "docbook-xml")
95 "/xml/dtd/docbook/docbookx.dtd")))
97 (inputs `(("python" ,python-2)
98 ("docbook-xml" ,docbook-xml)
99 ("docbook-xsl" ,docbook-xsl)
101 ("libxslt" ,libxslt)))
102 (home-page "http://www.methods.co.nz/asciidoc/")
103 (synopsis "Text-based document generation system")
105 "AsciiDoc is a text document format for writing notes, documentation,
106 articles, books, ebooks, slideshows, web pages, man pages and blogs.
107 AsciiDoc files can be translated to many formats including HTML, PDF,
110 AsciiDoc is highly configurable: both the AsciiDoc source file syntax and
111 the backend output markups (which can be almost any type of SGML/XML
112 markup) can be customized and extended by the user.")
115 (define-public doxygen
121 (uri (string-append "http://ftp.stack.nl/pub/users/dimitri/"
122 name "-" version ".src.tar.gz"))
125 "0srzawqn3apzrg8hwycwrawdylmmjrndij4spw6xr1vspn3phrmg"))
126 (patches (search-patches "doxygen-test.patch"))))
127 (build-system cmake-build-system)
131 ("libxml2" ,libxml2) ; provides xmllint for the tests
132 ("python" ,python-2))) ; for creating the documentation
134 `(("bash" ,bash-minimal)))
136 `(#:test-target "tests"
137 #:phases (modify-phases %standard-phases
138 (add-before 'configure 'patch-sh
139 (lambda* (#:key inputs #:allow-other-keys)
140 (substitute* "src/portable.cpp"
143 (assoc-ref inputs "bash") "/bin/sh")))
145 (home-page "http://www.stack.nl/~dimitri/doxygen/")
146 (synopsis "Generate documentation from annotated sources")
147 (description "Doxygen is the de facto standard tool for generating
148 documentation from annotated C++ sources, but it also supports other popular
149 programming languages such as C, Objective-C, C#, PHP, Java, Python,
150 IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL, Tcl,
151 and to some extent D.")
160 (uri (string-append "https://sourceforge.net/projects/docpp/"
161 "files/doc++-" version ".tar.gz"))
164 "0i37zlxl8g352s4hzpdx0657k5x3czh3xcsfr27irc708gb277pn"))
165 (patches (search-patches "doc++-include-directives.patch"
166 "doc++-segfault-fix.patch"))))
167 (build-system gnu-build-system)
170 ("gettext" ,gettext-minimal)))
171 (home-page "http://docpp.sourceforge.net/")
172 (synopsis "Documentation system for C, C++, IDL, and Java")
174 "DOC++ is a documentation system for C, C++, IDL, and Java. It can
175 generate both TeX output for high-quality hardcopies or HTML output for online
176 brwosing. The documentation is extracted directly from the C/C++/IDL source
177 or Java class files.")
180 (define-public scrollkeeper
182 (name "scrollkeeper")
187 (uri (string-append "mirror://sourceforge/scrollkeeper/scrollkeeper/"
188 version "/scrollkeeper-" version ".tar.gz"))
190 (base32 "1bfxwxc1ngh11v36z899sz9qam366r050fhkyb5adv65lb1x62sa"))))
191 (build-system gnu-build-system)
194 (list (string-append "--with-xml-catalog="
195 (assoc-ref %build-inputs "docbook-xml")
196 "/xml/dtd/docbook/catalog.xml"))))
201 ;; The configure script checks for either version 4.2 or 4.1.2.
202 ("docbook-xml" ,docbook-xml-4.2)))
204 `(("intltool" ,intltool)))
205 (home-page "http://scrollkeeper.sourceforge.net/")
206 (synopsis "Open Documentation Cataloging Project")
207 (description "ScrollKeeper is a cataloging system for documentation on open
208 systems. It manages documentation metadata as specified by the Open Source
209 Metadata Framework and provides a simple API to allow help browsers to find,
210 sort, and search the document catalog. It will also be able to communicate
211 with catalog servers on the Net to search for documents which are not on the