gnu: Add Pfff.
[jackhill/guix/guix.git] / gnu / packages / libreoffice.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages libreoffice)
21 #:use-module (guix build-system gnu)
22 #:use-module (guix download)
23 #:use-module ((guix licenses)
24 #:select (gpl2+ lgpl2.1+ mpl1.1 mpl2.0
25 non-copyleft x11-style))
26 #:use-module (guix packages)
27 #:use-module (guix utils)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages bison)
31 #:use-module (gnu packages boost)
32 #:use-module (gnu packages check)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages cups)
35 #:use-module (gnu packages curl)
36 #:use-module (gnu packages cyrus-sasl)
37 #:use-module (gnu packages databases)
38 #:use-module (gnu packages doxygen)
39 #:use-module (gnu packages flex)
40 #:use-module (gnu packages fontutils)
41 #:use-module (gnu packages ghostscript)
42 #:use-module (gnu packages gl)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages gnome)
45 #:use-module (gnu packages gperf)
46 #:use-module (gnu packages gnuzilla)
47 #:use-module (gnu packages gstreamer)
48 #:use-module (gnu packages gtk)
49 #:use-module (gnu packages icu4c)
50 #:use-module (gnu packages image)
51 #:use-module (gnu packages java)
52 #:use-module (gnu packages linux)
53 #:use-module (gnu packages maths)
54 #:use-module (gnu packages openldap)
55 #:use-module (gnu packages pdf)
56 #:use-module (gnu packages perl)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages python)
59 #:use-module (gnu packages rdf)
60 #:use-module (gnu packages scanner)
61 #:use-module (gnu packages tls)
62 #:use-module (gnu packages version-control)
63 #:use-module (gnu packages xml)
64 #:use-module (gnu packages xorg)
65 #:use-module (gnu packages zip))
66
67 (define-public ixion
68 (package
69 (name "ixion")
70 (version "0.9.1")
71 (source
72 (origin
73 (method url-fetch)
74 (uri (string-append "http://kohei.us/files/ixion/src/libixion-"
75 version ".tar.xz"))
76 (sha256 (base32
77 "18g3nk29ljiqbyi0ml49j2x3f3xrqckdm9i66sw5fxnj7hb5rqvp"))))
78 (build-system gnu-build-system)
79 (native-inputs
80 `(("pkg-config" ,pkg-config)))
81 (inputs
82 `(("mdds" ,mdds)
83 ("python" ,python-2))) ; looks for python.pc, not python3.pc
84 (home-page "https://gitlab.com/ixion/ixion")
85 (synopsis "General purpose formula parser and interpreter")
86 (description "Ixion is a library for calculating the results of formula
87 expressions stored in multiple named targets, or \"cells\". The cells can
88 be referenced from each other, and the library takes care of resolving
89 their dependencies automatically upon calculation.")
90 (license mpl2.0)))
91
92 (define-public orcus
93 (package
94 (name "orcus")
95 (version "0.7.1")
96 (source
97 (origin
98 (method url-fetch)
99 (uri (string-append "http://kohei.us/files/" name "/src/lib"
100 name "-" version ".tar.xz"))
101 (sha256 (base32
102 "0hva4qalg3dk6n1118ncr5fy8cqnj2f7fwldw7aa04124rj6p104"))))
103 (build-system gnu-build-system)
104 (native-inputs
105 `(("pkg-config" ,pkg-config)))
106 (inputs
107 `(("ixion" ,ixion)
108 ("mdds" ,mdds)
109 ("zlib" ,zlib)))
110 (home-page "https://gitlab.com/orcus/orcus")
111 (synopsis "File import filter library for spreadsheet documents")
112 (description "Orcus is a library that provides a collection of standalone
113 file processing filters. It is currently focused on providing filters for
114 spreadsheet documents. The library includes import filters for
115 Microsoft Excel 2007 XML, Microsoft Excel 2003 XML, Open Document Spreadsheet,
116 Plain Text, Gnumeric XML, Generic XML. It also includes low-level parsers for
117 CSV, CSS and XML.")
118 (license mpl2.0)))
119
120 (define-public librevenge
121 (package
122 (name "librevenge")
123 (version "0.0.2")
124 (source
125 (origin
126 (method url-fetch)
127 (uri (string-append "mirror://sourceforge/libwpd/" name "/" name "-"
128 version ".tar.xz"))
129 (sha256 (base32
130 "03ygxyb0vfjv8raif5q62sl33b54wkr5rzgadb8slijm6k281wpn"))))
131 (build-system gnu-build-system)
132 (native-inputs
133 `(("boost" ,boost)
134 ("cppunit" ,cppunit)
135 ("doxygen" ,doxygen)
136 ("pkg-config" ,pkg-config)))
137 (inputs
138 `(("zlib" ,zlib)))
139 (arguments
140 ;; avoid triggering configure errors by simple inclusion of boost headers
141 `(#:configure-flags '("--disable-werror")))
142 (home-page "http://sourceforge.net/p/libwpd/wiki/librevenge/")
143 (synopsis "Document importer for office suites")
144 (description "Librevenge is a base library for writing document import
145 filters. It has interfaces for text documents, vector graphics,
146 spreadsheets and presentations.")
147 (license (list mpl2.0 lgpl2.1+)))) ;dual licensed
148
149 (define-public libwpd
150 (package
151 (name "libwpd")
152 (version "0.10.0")
153 (source
154 (origin
155 (method url-fetch)
156 (uri (string-append "mirror://sourceforge/libwpd/" name "/" name "-"
157 version ".tar.xz"))
158 (sha256 (base32
159 "0b6krzr6kxzm89g6bapn805kdayq70hn16n5b5wfs2lwrf0ag2wx"))))
160 (build-system gnu-build-system)
161 (native-inputs
162 `(("doxygen" ,doxygen)
163 ("pkg-config" ,pkg-config)))
164 (propagated-inputs
165 `(("librevenge" ,librevenge))) ; in Requires field of .pkg
166 (inputs
167 `(("zlib" ,zlib)))
168 (home-page "http://libwpd.sourceforge.net/")
169 (synopsis "Library for importing WordPerfect documents")
170 (description "Libwpd is a C++ library designed to help process
171 WordPerfect documents. It is most commonly used to import such documents
172 into other word processors.")
173 (license (list mpl2.0 lgpl2.1+)))) ;dual licensed
174
175 (define-public libe-book
176 (package
177 (name "libe-book")
178 (version "0.1.2")
179 (source
180 (origin
181 (method url-fetch)
182 (uri (string-append "mirror://sourceforge/libebook/libe-book-"
183 version "/libe-book-" version ".tar.xz"))
184 (sha256
185 (base32
186 "1v48pd32r2pfysr3a3igc4ivcf6vvb26jq4pdkcnq75p70alp2bz"))))
187 (build-system gnu-build-system)
188 (native-inputs
189 `(("cppunit" ,cppunit)
190 ("gperf" ,gperf)
191 ("pkg-config" ,pkg-config)))
192 (propagated-inputs ; in Requires or Requires.private field of .pkg
193 `(("icu4c" ,icu4c)
194 ("librevenge" ,librevenge)
195 ("libxml2" ,libxml2)))
196 (inputs
197 `(("boost" ,boost)))
198 (arguments
199 ;; avoid triggering configure errors by simple inclusion of boost headers
200 `(#:configure-flags '("--disable-werror")))
201 (home-page "http://libebook.sourceforge.net")
202 (synopsis "Library for import of reflowable e-book formats")
203 (description "Libe-book is a library and a set of tools for reading and
204 converting various reflowable e-book formats. Currently supported are:
205 Broad Band eBook, eReader .pdb, FictionBook v. 2 (including zipped files),
206 PalmDoc Ebook, Plucker .pdb, QiOO (mobile format, for java-enabled
207 cellphones), TCR (simple compressed text format), TealDoc, zTXT,
208 ZVR (simple compressed text format).")
209 (license mpl2.0)))
210
211 (define-public libwpg
212 (package
213 (name "libwpg")
214 (version "0.3.0")
215 (source
216 (origin
217 (method url-fetch)
218 (uri (string-append "mirror://sourceforge/libwpg/" name "/" name "-"
219 version ".tar.xz"))
220 (sha256 (base32
221 "097jx8a638fwwfrzf6v29r1yhc34rq9526py7wf0ck2z4fcr2w3g"))))
222 (build-system gnu-build-system)
223 (native-inputs
224 `(("doxygen" ,doxygen)
225 ("pkg-config" ,pkg-config)))
226 (propagated-inputs
227 `(("libwpd" ,libwpd))) ; in Requires field of .pkg
228 (inputs
229 `(("perl" ,perl)
230 ("zlib" ,zlib)))
231 (home-page "http://libwpg.sourceforge.net/")
232 (synopsis "Library and tools for the WordPerfect Graphics format")
233 (description "The libwpg project provides a library and tools for
234 working with graphics in the WPG (WordPerfect Graphics) format.")
235 (license (list mpl2.0 lgpl2.1+)))) ;dual licensed
236
237 (define-public libcmis
238 (package
239 (name "libcmis")
240 (version "0.5.0")
241 (source
242 (origin
243 (method url-fetch)
244 (uri (string-append "mirror://sourceforge/" name "/" name "-"
245 version ".tar.gz"))
246 (sha256 (base32
247 "1dprvk4fibylv24l7gr49gfqbkfgmxynvgssvdcycgpf7n8h4zm8"))))
248 (build-system gnu-build-system)
249 (native-inputs
250 `(("cppunit" ,cppunit)
251 ("pkg-config" ,pkg-config)))
252 (propagated-inputs ; in Requires field of .pkg
253 `(("curl" ,curl)
254 ("libxml2" ,libxml2)))
255 (inputs
256 `(("boost" ,boost)
257 ("cyrus-sasl" ,cyrus-sasl)
258 ("openssl" ,openssl)))
259 (arguments
260 `(#:configure-flags
261 (list
262 ;; FIXME: Man pages generation requires docbook-to-man; reenable
263 ;; it once this is available.
264 "--without-man"
265 ;; avoid triggering configure errors by simple inclusion of
266 ;; boost headers
267 "--disable-werror"
268 ;; During configure, the boost headers are found, but linking
269 ;; fails without the following flag.
270 (string-append "--with-boost="
271 (assoc-ref %build-inputs "boost")))))
272 (home-page "http://sourceforge.net/projects/libcmis/")
273 (synopsis "CMIS client library")
274 (description "LibCMIS is a C++ client library for the CMIS interface. It
275 allows C++ applications to connect to any ECM behaving as a CMIS server such
276 as Alfresco or Nuxeo.")
277 (license (list mpl1.1 gpl2+ lgpl2.1+)))) ; triple license
278
279 (define-public libabw
280 (package
281 (name "libabw")
282 (version "0.1.1")
283 (source
284 (origin
285 (method url-fetch)
286 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
287 name "-" version ".tar.xz"))
288 (sha256 (base32
289 "0zi1zj4fpxgpglbbb5n1kg3dmhqq5rpf46lli89r5daavp19iing"))))
290 (build-system gnu-build-system)
291 (native-inputs
292 `(("doxygen" ,doxygen)
293 ("gperf" ,gperf)
294 ("perl" ,perl)
295 ("pkg-config" ,pkg-config)))
296 (propagated-inputs ; in Requires or Requires.private field of .pkg
297 `(("librevenge" ,librevenge)
298 ("libxml2" ,libxml2)))
299 (inputs
300 `(("boost" ,boost)))
301 (arguments
302 ;; avoid triggering configure errors by simple inclusion of boost headers
303 `(#:configure-flags '("--disable-werror")))
304 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libabw")
305 (synopsis "Library for parsing the AbiWord format")
306 (description "Libabw is a library that parses the file format of
307 AbiWord documents.")
308 (license mpl2.0)))
309
310 (define-public libcdr
311 (package
312 (name "libcdr")
313 (version "0.1.1")
314 (source
315 (origin
316 (method url-fetch)
317 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
318 name "-" version ".tar.xz"))
319 (sha256 (base32
320 "07yzb1yr5kzv0binzj5swz3zzay2gw3xb0fbkc2zwdssgrkf19nh"))))
321 (build-system gnu-build-system)
322 (native-inputs
323 `(("doxygen" ,doxygen)
324 ("pkg-config" ,pkg-config)))
325 (propagated-inputs ; in Requires or Requires.private field of .pkg
326 `(("icu4c" ,icu4c)
327 ("lcms" ,lcms)
328 ("librevenge" ,librevenge)
329 ("zlib" ,zlib)))
330 (inputs
331 `(("boost" ,boost)))
332 (arguments
333 ;; avoid triggering a build failure due to warnings
334 `(#:configure-flags '("--disable-werror")))
335 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libcdr")
336 (synopsis "Library for parsing the CorelDRAW format")
337 (description "Libcdr is a library that parses the file format of
338 CorelDRAW documents of all versions.")
339 (license mpl2.0)))
340
341 (define-public libetonyek
342 (package
343 (name "libetonyek")
344 (version "0.1.3")
345 (source
346 (origin
347 (method url-fetch)
348 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
349 name "-" version ".tar.xz"))
350 (sha256 (base32
351 "0mghaqzj0qqza8z1gzprw62702adlww4kgdzynj5qpxxc9m2f4py"))))
352 (build-system gnu-build-system)
353 (native-inputs
354 `(("cppunit" ,cppunit)
355 ("doxygen" ,doxygen)
356 ("glm" ,glm)
357 ("gperf" ,gperf)
358 ("mdds" ,mdds)
359 ("pkg-config" ,pkg-config)))
360 (propagated-inputs ; in Requires or Requires.private field of .pkg
361 `(("librevenge" ,librevenge)
362 ("libxml2" ,libxml2)))
363 (inputs
364 `(("boost" ,boost)))
365 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek")
366 (synopsis "Library for parsing the Apple Keynote format")
367 (description "Libetonyek is a library that parses the file format of
368 Apple Keynote documents. It currently supports Keynote versions 2 to 5.")
369 (license mpl2.0)))
370
371 (define-public libexttextcat
372 (package
373 (name "libexttextcat")
374 (version "3.4.4")
375 (source
376 (origin
377 (method url-fetch)
378 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
379 name "-" version ".tar.xz"))
380 (sha256 (base32
381 "14v2hkygnmf1zgahfm1fha47cr67iikrz2ymiqi28d2jydn0hk7j"))))
382 (build-system gnu-build-system)
383 (home-page "http://www.freedesktop.org/wiki/Software/libexttextcat/")
384 (synopsis "Text Categorization library")
385 (description "Libexttextcat is an N-Gram-Based Text Categorization
386 library primarily intended for language guessing.")
387 (license (non-copyleft "file://LICENSE"
388 "See LICENSE in the distribution."))))
389
390 (define-public libfreehand
391 (package
392 (name "libfreehand")
393 (version "0.1.0")
394 (source
395 (origin
396 (method url-fetch)
397 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
398 name "-" version ".tar.xz"))
399 (sha256 (base32
400 "01j7mxi4lmf72w1mv2r098p8l0csdd94w2gq0ncp93djn34al6ai"))))
401 (build-system gnu-build-system)
402 (native-inputs
403 `(("doxygen" ,doxygen)
404 ("gperf" ,gperf)
405 ("perl" ,perl)
406 ("pkg-config" ,pkg-config)))
407 (propagated-inputs ; in Requires or Requires.private field of .pkg
408 `(("librevenge" ,librevenge)
409 ("zlib" ,zlib)))
410 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libfreehand")
411 (synopsis "Library for parsing the FreeHand format")
412 (description "Libfreehand is a library that parses the file format of
413 Aldus/Macromedia/Adobe FreeHand documents.")
414 (license mpl2.0)))
415
416 (define-public libmspub
417 (package
418 (name "libmspub")
419 (version "0.1.2")
420 (source
421 (origin
422 (method url-fetch)
423 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
424 name "-" version ".tar.xz"))
425 (sha256 (base32
426 "03sn6lxpr49sdq6j8q7fw7yjybyfahhs03z80388mh105pwapfmh"))))
427 (build-system gnu-build-system)
428 (native-inputs
429 `(("doxygen" ,doxygen)
430 ("pkg-config" ,pkg-config)))
431 (propagated-inputs ; in Requires or Requires.private field of .pkg
432 `(("icu4c" ,icu4c)
433 ("librevenge" ,librevenge)
434 ("zlib" ,zlib)))
435 (inputs
436 `(("boost" ,boost)))
437 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libmspub")
438 (synopsis "Library for parsing the Microsoft Publisher format")
439 (description "Libmspub is a library that parses the file format of
440 Microsoft Publisher documents of all versions.")
441 (license mpl2.0)))
442
443 (define-public libpagemaker
444 (package
445 (name "libpagemaker")
446 (version "0.0.2")
447 (source
448 (origin
449 (method url-fetch)
450 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
451 name "-" version ".tar.xz"))
452 (sha256 (base32
453 "05zgj5ngg9z4b7dnrfs59nm0macm99lzyxv4mg53jcvp0mkgigfd"))))
454 (build-system gnu-build-system)
455 (native-inputs
456 `(("doxygen" ,doxygen)
457 ("pkg-config" ,pkg-config)))
458 (propagated-inputs ; in Requires field of .pkg
459 `(("librevenge" ,librevenge)))
460 (inputs
461 `(("boost" ,boost)
462 ("zlib" ,zlib)))
463 (arguments
464 ;; avoid triggering a build failure due to warnings
465 `(#:configure-flags '("--disable-werror")))
466 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libpagemaker")
467 (synopsis "Library for parsing the PageMaker format")
468 (description "Libpagemaker is a library that parses the file format of
469 Aldus/Adobe PageMaker documents. Currently it only understands documents
470 created by PageMaker version 6.x and 7.")
471 (license mpl2.0)))
472
473 (define-public libvisio
474 (package
475 (name "libvisio")
476 ;; FIXME: The newer version 0.1.1 fails its tests.
477 (version "0.1.0")
478 (source
479 (origin
480 (method url-fetch)
481 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
482 name "-" version ".tar.xz"))
483 (sha256 (base32
484 "0vvd2wyp4rw6s9xnj1dc9vgdpfvm45gnb5b9hhzif0fdnx4iskqf"))))
485 (build-system gnu-build-system)
486 (native-inputs
487 `(("cppunit" ,cppunit)
488 ("doxygen" ,doxygen)
489 ("gperf" ,gperf)
490 ("perl" ,perl)
491 ("pkg-config" ,pkg-config)))
492 (propagated-inputs ; in Requires or Requires.private field of .pkg
493 `(("icu4c" ,icu4c)
494 ("librevenge" ,librevenge)
495 ("libxml2" ,libxml2)))
496 (inputs
497 `(("boost" ,boost)))
498 ;; FIXME: Not needed any more for newer version 0.1.1.
499 (arguments
500 ;; avoid triggering a build failure due to warnings
501 `(#:configure-flags '("--disable-werror")))
502 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libvisio")
503 (synopsis "Library for parsing the Microsoft Visio format")
504 (description "Libvisio is a library that parses the file format of
505 Microsoft Visio documents of all versions.")
506 (license mpl2.0)))
507
508 (define-public libodfgen
509 (package
510 (name "libodfgen")
511 (version "0.1.3")
512 (source
513 (origin
514 (method url-fetch)
515 (uri (string-append "http://dev-www.libreoffice.org/src/"
516 name "-" version ".tar.bz2"))
517 (sha256 (base32
518 "074qsav86ixwi9zm1f77g9vxdf1ihm6n930vxjg8q3lwzd8g7lb6"))))
519 (build-system gnu-build-system)
520 (native-inputs
521 `(("doxygen" ,doxygen)
522 ("pkg-config" ,pkg-config)))
523 (propagated-inputs ; in Requires field of .pkg
524 `(("librevenge" ,librevenge)))
525 (inputs
526 `(("boost" ,boost)
527 ("zlib" ,zlib)))
528 (arguments
529 ;; avoid triggering configure errors by simple inclusion of boost headers
530 `(#:configure-flags '("--disable-werror")))
531 (home-page "http://sourceforge.net/p/libwpd/wiki/libodfgen/")
532 (synopsis "ODF (Open Document Format) library")
533 (description "Libodfgen is a library for generating documents in the
534 Open Document Format (ODF). It provides generator implementations for all
535 document interfaces supported by librevenge:
536 text documents, vector drawings, presentations and spreadsheets.")
537 (license (list mpl2.0 lgpl2.1+)))) ; dual license
538
539 (define-public libmwaw
540 (package
541 (name "libmwaw")
542 (version "0.3.5")
543 (source
544 (origin
545 (method url-fetch)
546 (uri (string-append "mirror://sourceforge/" name "/" name "/"
547 name "-" version ".tar.xz"))
548 (sha256 (base32
549 "1vx9h419fcfcs0yj071hsg9d2qvkacgca6052m8hv3h743cdmzil"))))
550 (build-system gnu-build-system)
551 (native-inputs
552 `(("doxygen" ,doxygen)
553 ("pkg-config" ,pkg-config)))
554 (propagated-inputs ; in Requires field of .pkg
555 `(("librevenge" ,librevenge)))
556 (inputs
557 `(("boost" ,boost)
558 ("zlib" ,zlib)))
559 (arguments
560 ;; avoid triggering configure errors by simple inclusion of boost headers
561 `(#:configure-flags '("--disable-werror")))
562 (home-page "http://sourceforge.net/p/libmwaw/wiki/Home/")
563 (synopsis "Import library for some old Macintosh text documents")
564 (description "Libmwaw contains some import filters for old Macintosh
565 text documents (MacWrite, ClarisWorks, ... ) and for some graphics and
566 spreadsheet documents.")
567 (license (list mpl2.0 lgpl2.1+)))) ; dual license
568
569 (define-public libwps
570 (package
571 (name "libwps")
572 (version "0.4.0")
573 (source
574 (origin
575 (method url-fetch)
576 (uri (string-append "mirror://sourceforge/" name "/" name "/"
577 name "-" version ".tar.xz"))
578 (sha256 (base32
579 "0nlrdk7di015l0sk0ivjdqs86zdcvf73p9z9s9ry5glyhrknzxjk"))))
580 (build-system gnu-build-system)
581 (native-inputs
582 `(("doxygen" ,doxygen)
583 ("pkg-config" ,pkg-config)))
584 (propagated-inputs ; in Requires field of .pkg
585 `(("librevenge" ,librevenge)))
586 (inputs
587 `(("boost" ,boost)
588 ("zlib" ,zlib)))
589 (arguments
590 ;; avoid triggering configure errors by simple inclusion of boost headers
591 `(#:configure-flags '("--disable-werror")))
592 (home-page "http://libwps.sourceforge.net/")
593 (synopsis "Import library for Microsoft Works text documents")
594 (description "Libwps is a library for importing files in the Microsoft
595 Works word processor file format.")
596 (license (list mpl2.0 lgpl2.1+)))) ; dual license
597
598 (define-public hunspell
599 (package
600 (name "hunspell")
601 (version "1.3.3")
602 (source
603 (origin
604 (method url-fetch)
605 (uri (string-append "mirror://sourceforge/" name "/"
606 name "-" version ".tar.gz"))
607 (sha256 (base32
608 "0v14ff9s37vkh45diaddndcrj0hmn67arh8xh8k79q9c1vgc1cm7"))))
609 (build-system gnu-build-system)
610 (home-page "http://hunspell.sourceforge.net/")
611 (synopsis "Spell checker")
612 (description "Hunspell is a spell checker and morphological analyzer
613 library and program designed for languages with rich morphology and complex
614 word compounding or character encoding.")
615 ;; triple license, including "mpl1.1 or later"
616 (license (list mpl1.1 gpl2+ lgpl2.1+))))
617
618 (define-public hyphen
619 (package
620 (name "hyphen")
621 (version "2.8.8")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (string-append "mirror://sourceforge/hunspell/"
626 name "-" version ".tar.gz"))
627 (sha256 (base32
628 "01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih"))))
629 (build-system gnu-build-system)
630 (inputs
631 `(("perl" ,perl)))
632 (home-page "http://hunspell.sourceforge.net/")
633 (synopsis "Hyphenation library")
634 (description "Hyphen is a hyphenation library using TeX hyphenation
635 patterns, which are pre-processed by a perl script.")
636 ;; triple license, including "mpl1.1 or later"
637 (license (list mpl1.1 mpl2.0 gpl2+ lgpl2.1+))))
638
639 (define-public mythes
640 (package
641 (name "mythes")
642 (version "1.2.4")
643 (source
644 (origin
645 (method url-fetch)
646 (uri (string-append "mirror://sourceforge/hunspell/"
647 name "-" version ".tar.gz"))
648 (sha256 (base32
649 "0prh19wy1c74kmzkkavm9qslk99gz8h8wmjvwzjc6lf8v2az708y"))))
650 (build-system gnu-build-system)
651 (native-inputs
652 `(("pkg-config" ,pkg-config)))
653 (inputs
654 `(("hunspell" ,hunspell)
655 ("perl" ,perl)))
656 (home-page "http://hunspell.sourceforge.net/")
657 (synopsis "Thesaurus")
658 (description "MyThes is a simple thesaurus that uses a structured text
659 data file and an index file with binary search to look up words and phrases
660 and to return information on pronunciations, meanings and synonyms.")
661 (license (non-copyleft "file://COPYING"
662 "See COPYING in the distribution."))))
663
664 ;; LibreOffice requires an xmlsec source tarball; it does not even check
665 ;; for the presence of an externally compiled library.
666 (define xmlsec-src-libreoffice
667 (origin
668 (method url-fetch)
669 (uri
670 (string-append
671 "http://dev-www.libreoffice.org/src/"
672 "1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz"))
673 (sha256 (base32
674 "0jnxxygg6z5zi6za94dvxmg1bfar1wh8p5xa2bzbha0qcn2m02ir"))))
675
676 (define-public libreoffice
677 (package
678 (name "libreoffice")
679 (version "5.0.3.2")
680 (source
681 (origin
682 (method url-fetch)
683 (uri
684 (string-append
685 "http://download.documentfoundation.org/libreoffice/src/"
686 (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
687 (sha256 (base32
688 "1gflcsnw7bx02jbb2x5darf56x0qgia03ylaycadk68ikibckybp"))))
689 (build-system gnu-build-system)
690 (native-inputs
691 `(;; autoreconf is run by the LibreOffice build system, since after
692 ;; unpacking the external xmlsec tarball, it applies a series of
693 ;; patches to Makefile.am, configure.in, config.guess and config.sub.
694 ("autoconf" ,autoconf)
695 ("automake" ,automake)
696 ("bison" ,bison)
697 ("cppunit" ,cppunit)
698 ("flex" ,flex)
699 ("pkg-config" ,pkg-config)
700 ("python" ,python)
701 ("which" ,which)))
702 (inputs
703 `(("bluez" ,bluez)
704 ("boost" ,boost)
705 ("clucene" ,clucene)
706 ("cups" ,cups)
707 ("dbus-glib" ,dbus-glib)
708 ("fontconfig" ,fontconfig)
709 ("gconf" ,gconf)
710 ("glew" ,glew)
711 ("glm" ,glm)
712 ("gperf" ,gperf)
713 ("graphite2" ,graphite2)
714 ("gst-plugins-base" ,gst-plugins-base)
715 ("gtk+" ,gtk+-2)
716 ("harfbuzz" ,harfbuzz)
717 ("hunspell" ,hunspell)
718 ("hyphen" ,hyphen)
719 ("libabw" ,libabw)
720 ("libcdr" ,libcdr)
721 ("libcmis" ,libcmis)
722 ("libjpeg" ,libjpeg)
723 ("libe-book" ,libe-book)
724 ("libetonyek" ,libetonyek)
725 ("libexttextcat" ,libexttextcat)
726 ("libfreehand" ,libfreehand)
727 ("libmspub" ,libmspub)
728 ("libmwaw" ,libmwaw)
729 ("libodfgen" ,libodfgen)
730 ("libpagemaker" ,libpagemaker)
731 ("libvisio" ,libvisio)
732 ("libwpg" ,libwpg)
733 ("libwps" ,libwps)
734 ("libxrandr" ,libxrandr)
735 ("libxrender" ,libxrender)
736 ("libxslt" ,libxslt)
737 ("libxt" ,libxt)
738 ("lpsolve" ,lpsolve)
739 ("mdds" ,mdds)
740 ("mythes" ,mythes)
741 ("neon" ,neon)
742 ("nspr" ,nspr)
743 ("nss" ,nss)
744 ("openldap" ,openldap)
745 ("openssl" ,openssl)
746 ("orcus" ,orcus)
747 ("perl" ,perl)
748 ("perl-zip" ,perl-zip)
749 ("poppler" ,poppler)
750 ("postgresql" ,postgresql)
751 ("python" ,python)
752 ("redland" ,redland)
753 ("sane-backends" ,sane-backends)
754 ("unixodbc" ,unixodbc)
755 ("unzip" ,unzip)
756 ("vigra" ,vigra)
757 ("xmlsec-src" ,xmlsec-src-libreoffice)
758 ("zip" ,zip)))
759 (arguments
760 `(#:parallel-build? #f ; Otherwise the build fails.
761 #:tests? #f ; Building the tests already fails.
762 #:make-flags '("build-nocheck") ; Do not build unit tests, which fails.
763 #:phases
764 (modify-phases %standard-phases
765 (add-before 'configure 'prepare-src
766 (lambda* (#:key inputs #:allow-other-keys)
767 (let ((xmlsec (assoc-ref inputs "xmlsec-src")))
768 (substitute*
769 (list "sysui/CustomTarget_share.mk"
770 "solenv/gbuild/gbuild.mk"
771 "solenv/gbuild/platform/unxgcc.mk"
772 "external/libxmlsec/xmlsec1-oldlibtool.patch")
773 (("/bin/sh") (which "bash")))
774 (mkdir "external/tarballs")
775 (symlink
776 xmlsec
777 (string-append "external/tarballs/"
778 "1f24ab1d39f4a51faf22244c94a6203f-"
779 "xmlsec1-1.2.14.tar.gz"))
780 ;; The following is required for building xmlsec from the
781 ;; unpatched external tarball; since "configure" starts with
782 ;; "/bin/sh", it needs to be executed by a command invoking
783 ;; the shell.
784 (setenv "SHELL" (which "bash"))
785 (setenv "CONFIG_SHELL" (which "bash"))
786 (substitute* "external/libxmlsec/ExternalProject_xmlsec.mk"
787 (("./configure") "$(CONFIG_SHELL) ./configure" ))
788 #t)))
789 (add-after 'install 'bin-install
790 ;; Create a symlink bin/soffice to the executable script.
791 (lambda* (#:key outputs #:allow-other-keys)
792 (let* ((out (assoc-ref outputs "out"))
793 (bin (string-append out "/bin")))
794 (mkdir bin)
795 (symlink
796 (string-append out "/lib/libreoffice/program/soffice")
797 (string-append bin "/soffice")))
798 #t)))
799 #:configure-flags
800 (list
801 "--enable-release-build"
802 "--enable-verbose"
803 "--without-parallelism" ; otherwise the build fails
804 "--disable-fetch-external" ; disable downloads
805 "--with-system-libs" ; enable all --with-system-* flags
806 (string-append "--with-boost-libdir="
807 (assoc-ref %build-inputs "boost") "/lib")
808 ;; Avoid a dependency on ucpp.
809 "--with-idlc-cpp=cpp"
810 ;; The fonts require an external tarball (crosextrafonts).
811 ;; They should not be needed when system fonts are available.
812 "--without-fonts"
813 ;; With java, the build fails since sac.jar is missing.
814 "--without-java"
815 ;; FIXME: Enable once the corresponding inputs are packaged.
816 "--without-system-npapi-headers"
817 "--disable-coinmp"
818 "--disable-firebird-sdbc" ; embedded firebird
819 "--disable-gltf"
820 "--disable-liblangtag")))
821 (home-page "https://www.libreoffice.org/")
822 (synopsis "Office suite")
823 (description "LibreOffice is a comprehensive office suite. It contains
824 a number of components: Writer, a word processor; Calc, a spreadsheet
825 application; Impress, a presentation engine; Draw, a drawing and
826 flowcharting application; Base, a database and database frontend;
827 Math for editing mathematics.")
828 (license mpl2.0)))