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