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