gnu: libtasn1: Remove obsolete patch.
[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 <kei@openmailbox.org>
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 #:autoload (gnu packages zip) (unzip))
42
43 (define-public asciidoc
44 (package
45 (name "asciidoc")
46 (version "8.6.9")
47 (source (origin
48 (method url-fetch)
49 (uri (string-append "mirror://sourceforge/asciidoc/asciidoc/"
50 version "/asciidoc-" version ".tar.gz"))
51 (sha256
52 (base32
53 "1w71nk527lq504njmaf0vzr93pgahkgzzxzglrq6bay8cw2rvnvq"))))
54 (build-system gnu-build-system)
55 (arguments
56 `(#:tests? #f ; no 'check' target
57 #:phases
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")))
70 (substitute* "a2x.py"
71 (("XMLLINT = 'xmllint'")
72 (string-append "XMLLINT = '" xmllint "'"))
73 (("XSLTPROC = 'xsltproc'")
74 (string-append "XSLTPROC = '" xsltproc "'")))
75 #t)))
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/\
82 release/xsl/current")
83 (string-append
84 "xsl:import href=\""
85 (string-append (assoc-ref inputs "docbook-xsl")
86 "/xml/xsl/docbook-xsl-"
87 ,(package-version docbook-xsl)))))
88 #t))
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")))
96 #t)))))
97 (inputs `(("python" ,python-2)
98 ("docbook-xml" ,docbook-xml)
99 ("docbook-xsl" ,docbook-xsl)
100 ("libxml2" ,libxml2)
101 ("libxslt" ,libxslt)))
102 (home-page "http://www.methods.co.nz/asciidoc/")
103 (synopsis "Text-based document generation system")
104 (description
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,
108 EPUB, man page.
109
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.")
113 (license gpl2+)))
114
115 (define-public doxygen
116 (package
117 (name "doxygen")
118 (version "1.8.13")
119 (source (origin
120 (method url-fetch)
121 (uri (string-append "http://ftp.stack.nl/pub/users/dimitri/"
122 name "-" version ".src.tar.gz"))
123 (sha256
124 (base32
125 "0srzawqn3apzrg8hwycwrawdylmmjrndij4spw6xr1vspn3phrmg"))
126 (patches (search-patches "doxygen-test.patch"))))
127 (build-system cmake-build-system)
128 (native-inputs
129 `(("bison" ,bison)
130 ("flex" ,flex)
131 ("libxml2" ,libxml2) ; provides xmllint for the tests
132 ("python" ,python-2))) ; for creating the documentation
133 (inputs
134 `(("bash" ,bash-minimal)))
135 (arguments
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"
141 (("/bin/sh")
142 (string-append
143 (assoc-ref inputs "bash") "/bin/sh")))
144 #t)))))
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.")
152 (license gpl3+)))
153
154 (define-public doc++
155 (package
156 (name "doc++")
157 (version "3.4.10")
158 (source (origin
159 (method url-fetch)
160 (uri (string-append "https://sourceforge.net/projects/docpp/"
161 "files/doc++-" version ".tar.gz"))
162 (sha256
163 (base32
164 "0i37zlxl8g352s4hzpdx0657k5x3czh3xcsfr27irc708gb277pn"))
165 (patches (search-patches "doc++-include-directives.patch"
166 "doc++-segfault-fix.patch"))))
167 (build-system gnu-build-system)
168 (native-inputs
169 `(("flex" ,flex)
170 ("gettext" ,gettext-minimal)))
171 (home-page "http://docpp.sourceforge.net/")
172 (synopsis "Documentation system for C, C++, IDL, and Java")
173 (description
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.")
178 (license gpl2+)))
179
180 (define-public scrollkeeper
181 (package
182 (name "scrollkeeper")
183 (version "0.3.14")
184 (source
185 (origin
186 (method url-fetch)
187 (uri (string-append "mirror://sourceforge/scrollkeeper/scrollkeeper/"
188 version "/scrollkeeper-" version ".tar.gz"))
189 (sha256
190 (base32 "1bfxwxc1ngh11v36z899sz9qam366r050fhkyb5adv65lb1x62sa"))))
191 (build-system gnu-build-system)
192 (arguments
193 `(#:configure-flags
194 (list (string-append "--with-xml-catalog="
195 (assoc-ref %build-inputs "docbook-xml")
196 "/xml/dtd/docbook/catalog.xml"))))
197 (inputs
198 `(("perl" ,perl)
199 ("libxml2" ,libxml2)
200 ("libxslt" ,libxslt)
201 ;; The configure script checks for either version 4.2 or 4.1.2.
202 ("docbook-xml" ,docbook-xml-4.2)))
203 (native-inputs
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
212 local system.")
213 (license lgpl2.1+)))