gnu: libdvdcss: Update to 1.4.3.
[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, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
6 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
7 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
9 ;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
10 ;;; Copyright © 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
11 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
12 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
13 ;;; Copyright © 2018, 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
14 ;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
15 ;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
16 ;;;
17 ;;; This file is part of GNU Guix.
18 ;;;
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
23 ;;;
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
28 ;;;
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32 (define-module (gnu packages libreoffice)
33 #:use-module (guix build-system glib-or-gtk)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system python)
36 #:use-module (guix build-system trivial)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (guix packages)
41 #:use-module (guix utils)
42 #:use-module (ice-9 match)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages aidc)
45 #:use-module (gnu packages aspell)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bison)
49 #:use-module (gnu packages boost)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages compression)
52 #:use-module (gnu packages cups)
53 #:use-module (gnu packages curl)
54 #:use-module (gnu packages cyrus-sasl)
55 #:use-module (gnu packages databases)
56 #:use-module (gnu packages documentation)
57 #:use-module (gnu packages flex)
58 #:use-module (gnu packages fontutils)
59 #:use-module (gnu packages freedesktop)
60 #:use-module (gnu packages ghostscript)
61 #:use-module (gnu packages gl)
62 #:use-module (gnu packages glib)
63 #:use-module (gnu packages gnome)
64 #:use-module (gnu packages gperf)
65 #:use-module (gnu packages gnupg)
66 #:use-module (gnu packages gstreamer)
67 #:use-module (gnu packages gtk)
68 #:use-module (gnu packages icu4c)
69 #:use-module (gnu packages image)
70 #:use-module (gnu packages java)
71 #:use-module (gnu packages linux)
72 #:use-module (gnu packages logging)
73 #:use-module (gnu packages maths)
74 #:use-module (gnu packages nss)
75 #:use-module (gnu packages openldap)
76 #:use-module (gnu packages pdf)
77 #:use-module (gnu packages perl)
78 #:use-module (gnu packages perl-compression)
79 #:use-module (gnu packages pkg-config)
80 #:use-module (gnu packages python)
81 #:use-module (gnu packages rdf)
82 #:use-module (gnu packages scanner)
83 #:use-module (gnu packages tls)
84 #:use-module (gnu packages version-control)
85 #:use-module (gnu packages xml)
86 #:use-module (gnu packages xorg))
87
88 (define-public ixion
89 (package
90 (name "ixion")
91 (version "0.15.0")
92 (source
93 (origin
94 (method url-fetch)
95 (uri (string-append "http://kohei.us/files/ixion/src/libixion-"
96 version ".tar.xz"))
97 (sha256
98 (base32
99 "1rmrl2zjzi4z0abf2cd54acypkccdhx2065dlyzy6xg83gv0mxmi"))))
100 (build-system gnu-build-system)
101 (native-inputs
102 `(("pkg-config" ,pkg-config)))
103 (inputs
104 `(("mdds" ,mdds)
105 ("python" ,python)
106 ("spdlog" ,spdlog)))
107 (home-page "https://gitlab.com/ixion/ixion")
108 (synopsis "General purpose formula parser and interpreter")
109 (description "Ixion is a library for calculating the results of formula
110 expressions stored in multiple named targets, or \"cells\". The cells can
111 be referenced from each other, and the library takes care of resolving
112 their dependencies automatically upon calculation.")
113 (license license:mpl2.0)))
114
115 (define-public orcus
116 (package
117 (name "orcus")
118 (version "0.15.3")
119 (source
120 (origin
121 (method url-fetch)
122 (uri (string-append "http://kohei.us/files/orcus/src/lib"
123 "orcus-" version ".tar.xz"))
124 (sha256
125 (base32
126 "14gbnqsv5n2fm4sxa17014f440clrzls6p2w2ixk9wipg4950v9s"))))
127 (build-system gnu-build-system)
128 (native-inputs
129 `(("pkg-config" ,pkg-config)))
130 (inputs
131 `(("ixion" ,ixion)
132 ("mdds" ,mdds)
133 ("python" ,python)
134 ("zlib" ,zlib)))
135 (home-page "https://gitlab.com/orcus/orcus")
136 (synopsis "File import filter library for spreadsheet documents")
137 (description "Orcus is a library that provides a collection of standalone
138 file processing filters. It is currently focused on providing filters for
139 spreadsheet documents. The library includes import filters for
140 Microsoft Excel 2007 XML, Microsoft Excel 2003 XML, Open Document Spreadsheet,
141 Plain Text, Gnumeric XML, Generic XML. It also includes low-level parsers for
142 CSV, CSS and XML.")
143 (license license:mpl2.0)))
144
145 (define-public unoconv
146 (package
147 (name "unoconv")
148 (version "0.9.0")
149 (source
150 (origin
151 (method url-fetch)
152 (uri (pypi-uri "unoconv" version))
153 (sha256
154 (base32 "0cb0bvyxib3xrj0jdgizhp6p057lr8kqnd3n921rin37ivcvz3ih"))))
155 (build-system python-build-system)
156 (arguments
157 `(#:phases
158 (modify-phases %standard-phases
159 (add-after 'unpack 'stop-hash-sniffing
160 ;; Fixes <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39647#11>.
161 ;; Submitted upsteam: <https://github.com/unoconv/unoconv/pull/531>.
162 (lambda _
163 (substitute* "unoconv"
164 (("sys.argv\\[0\\]\\.split\\('2'\\)")
165 "os.path.basename(sys.argv[0]).split('2')"))
166 #t))
167 (add-after 'unpack 'patch-find_offices
168 ;; find_offices is a convoluted cross-platform treasure hunt.
169 ;; Keep things simple and return the correct paths immediately.
170 (lambda* (#:key inputs #:allow-other-keys)
171 (let* ((libreoffice (assoc-ref inputs "libreoffice")))
172 (substitute* "unoconv"
173 (("def find_offices\\(\\):" match)
174 (string-append
175 match "\n"
176 " return [Office("
177 "'" libreoffice "/lib/libreoffice', "
178 "'" libreoffice "/lib/libreoffice/program', "
179 "'" libreoffice "/lib/libreoffice/program', "
180 "'" libreoffice "/lib/libreoffice/program/pyuno.so', "
181 "'" libreoffice "/bin/soffice', "
182 "sys.executable, "
183 "None)]\n")))
184 #t))))))
185 (inputs
186 `(("libreoffice" ,libreoffice)))
187 (home-page "http://dag.wiee.rs/home-made/unoconv/")
188 (synopsis "Convert between any document format supported by LibreOffice")
189 (description
190 "Unoconv is a command-line utility to convert documents from any format
191 that LibreOffice can import, to any format it can export. It can be used for
192 batch processing and can apply custom style templates and filters.
193
194 Unoconv converts between over a hundred formats, including Open Document
195 Format (@file{.odt}, @file{.ods}, @file{.odp})), Portable Document Format
196 (@file{.pdf}), HTML and XHTML, RTF, DocBook (@file{.xml}), @file{.doc} and
197 @file{.docx}), @file{.xls} and @file{.xlsx}).
198
199 All required fonts must be installed on the converting system.")
200 (license license:gpl2)))
201
202 (define-public librevenge
203 (package
204 (name "librevenge")
205 (version "0.0.4")
206 (source
207 (origin
208 (method url-fetch)
209 (uri (string-append "mirror://sourceforge/libwpd/librevenge/librevenge-"
210 version "/librevenge-" version ".tar.xz"))
211 (sha256 (base32
212 "1cj76cz4mqcy2mgv9l5xlc95bypyk8zbq0ls9cswqrs2y0lhfgwk"))))
213 (build-system gnu-build-system)
214 (native-inputs
215 `(("cppunit" ,cppunit)
216 ("doxygen" ,doxygen)
217 ("pkg-config" ,pkg-config)))
218 (inputs
219 `(("zlib" ,zlib)))
220 (propagated-inputs ; Referenced by .la files
221 `(("boost" ,boost)))
222 (arguments
223 ;; avoid triggering configure errors by simple inclusion of boost headers
224 `(#:configure-flags '("--disable-werror"
225 ;; Avoid undefined library references
226 "LDFLAGS=-lboost_system")))
227 (home-page "https://sourceforge.net/p/libwpd/wiki/librevenge/")
228 (synopsis "Document importer for office suites")
229 (description "Librevenge is a base library for writing document import
230 filters. It has interfaces for text documents, vector graphics,
231 spreadsheets and presentations.")
232 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
233
234 (define-public libwpd
235 (package
236 (name "libwpd")
237 (version "0.10.3")
238 (source
239 (origin
240 (method url-fetch)
241 (uri (string-append "mirror://sourceforge/libwpd/libwpd/"
242 "libwpd-" version "/libwpd-" version ".tar.xz"))
243 (sha256 (base32
244 "02fx8bngslcj7i5g1gx2kiign4vp09wrmp5wpvix9igxcavb0r94"))))
245 (build-system gnu-build-system)
246 (arguments
247 `(#:configure-flags '("--disable-werror")))
248 (native-inputs
249 `(("doxygen" ,doxygen)
250 ("pkg-config" ,pkg-config)))
251 (propagated-inputs
252 `(("librevenge" ,librevenge))) ; in Requires field of .pkg
253 (inputs
254 `(("zlib" ,zlib)))
255 (home-page "http://libwpd.sourceforge.net/")
256 (synopsis "Library for importing WordPerfect documents")
257 (description "Libwpd is a C++ library designed to help process
258 WordPerfect documents. It is most commonly used to import such documents
259 into other word processors.")
260 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
261
262 (define-public libe-book
263 (package
264 (name "libe-book")
265 (version "0.1.3")
266 (source
267 (origin
268 (method url-fetch)
269 (uri (string-append "mirror://sourceforge/libebook/libe-book-"
270 version "/libe-book-" version ".tar.xz"))
271 (sha256
272 (base32
273 "1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by"))))
274 (build-system gnu-build-system)
275 (native-inputs
276 `(("cppunit" ,cppunit)
277 ("gperf" ,gperf)
278 ("pkg-config" ,pkg-config)))
279 (propagated-inputs ; in Requires or Requires.private field of .pkg
280 `(("icu4c" ,icu4c)
281 ("liblangtag" ,liblangtag)
282 ("librevenge" ,librevenge)
283 ("libxml2" ,libxml2)))
284 (inputs
285 `(("boost" ,boost)))
286 (arguments
287 ;; avoid triggering configure errors by simple inclusion of boost headers
288 `(#:configure-flags '("--disable-werror")))
289 (home-page "http://libebook.sourceforge.net")
290 (synopsis "Library for import of reflowable e-book formats")
291 (description "Libe-book is a library and a set of tools for reading and
292 converting various reflowable e-book formats. Currently supported are:
293 Broad Band eBook, eReader .pdb, FictionBook v. 2 (including zipped files),
294 PalmDoc Ebook, Plucker .pdb, QiOO (mobile format, for java-enabled
295 cellphones), TCR (simple compressed text format), TealDoc, zTXT,
296 ZVR (simple compressed text format).")
297 (license license:mpl2.0)))
298
299 (define-public libepubgen
300 (package
301 (name "libepubgen")
302 (version "0.1.1")
303 (source
304 (origin
305 (method url-fetch)
306 (uri (string-append "mirror://sourceforge/libepubgen/libepubgen-"
307 version "/libepubgen-" version ".tar.xz"))
308 (sha256
309 (base32
310 "1b8mc9zzrqypj1v9zdy3ybc48pw0rfr06cyi7n6grvybjjwq9q03"))))
311 (build-system gnu-build-system)
312 (native-inputs
313 `(("cppunit" ,cppunit)
314 ("pkg-config" ,pkg-config)))
315 (inputs
316 `(("libxml2" ,libxml2)
317 ("boost" ,boost)))
318 (propagated-inputs ; in Requires field of .pkg
319 `(("librevenge" ,librevenge)))
320 (home-page "https://sourceforge.net/projects/libepubgen/")
321 (synopsis "EPUB generator library for librevenge")
322 (description "libepubgen is an EPUB generator for librevenge. It supports
323 librevenge's text document interface and--currently in a very limited
324 way--presentation and vector drawing interfaces.")
325 (license license:mpl2.0)))
326
327 (define-public libwpg
328 (package
329 (name "libwpg")
330 (version "0.3.3")
331 (source
332 (origin
333 (method url-fetch)
334 (uri (string-append "mirror://sourceforge/libwpg/libwpg/"
335 "libwpg-" version "/libwpg-" version ".tar.xz"))
336 (sha256 (base32
337 "074x159immf139szkswv2zapnq75p7xk10dbha2p9193hgwggcwr"))))
338 (build-system gnu-build-system)
339 (native-inputs
340 `(("doxygen" ,doxygen)
341 ("pkg-config" ,pkg-config)))
342 (propagated-inputs
343 `(("libwpd" ,libwpd))) ; in Requires field of .pkg
344 (inputs
345 `(("perl" ,perl)
346 ("zlib" ,zlib)))
347 (home-page "http://libwpg.sourceforge.net/")
348 (synopsis "Library and tools for the WordPerfect Graphics format")
349 (description "The libwpg project provides a library and tools for
350 working with graphics in the WPG (WordPerfect Graphics) format.")
351 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
352
353 (define-public libcmis
354 (package
355 (name "libcmis")
356 (version "0.5.2")
357 (source
358 (origin
359 (method url-fetch)
360 (uri (string-append "https://github.com/tdf/libcmis/releases/download/v"
361 version "/libcmis-" version ".tar.xz"))
362 (sha256
363 (base32
364 "18h0a2gsfxvlv03nlcfvw9bzsflq5sin9agq6za103hr0ab8vcfp"))))
365 (build-system gnu-build-system)
366 (native-inputs
367 `(("cppunit" ,cppunit)
368 ("pkg-config" ,pkg-config)))
369 (propagated-inputs ; in Requires field of .pkg
370 `(("curl" ,curl)
371 ("libxml2" ,libxml2)))
372 (inputs
373 `(("boost" ,boost)
374 ("cyrus-sasl" ,cyrus-sasl)
375 ("openssl" ,openssl)))
376 (arguments
377 `(#:configure-flags
378 (list
379 ;; FIXME: Man pages generation requires docbook-to-man; reenable
380 ;; it once this is available.
381 "--without-man"
382 ;; XXX: A configure test fails with GCC7 when including Boost headers.
383 "--disable-werror"
384 ;; During configure, the boost headers are found, but linking
385 ;; fails without the following flag.
386 (string-append "--with-boost="
387 (assoc-ref %build-inputs "boost")))))
388 (home-page "https://github.com/tdf/libcmis")
389 (synopsis "CMIS client library")
390 (description "LibCMIS is a C++ client library for the CMIS interface. It
391 allows C++ applications to connect to any ECM behaving as a CMIS server such
392 as Alfresco or Nuxeo.")
393 (license
394 (list license:mpl1.1 license:gpl2+ license:lgpl2.1+)))) ; triple license
395
396 (define-public libabw
397 (package
398 (name "libabw")
399 (version "0.1.3")
400 (source
401 (origin
402 (method url-fetch)
403 (uri (string-append "https://dev-www.libreoffice.org/src/libabw/"
404 "libabw-" version ".tar.xz"))
405 (sha256 (base32
406 "1vbfrmnvib3cym0yyyabnd8xpx4f7wp20vnn09s6dln347fajqz7"))))
407 (build-system gnu-build-system)
408 (native-inputs
409 `(("doxygen" ,doxygen)
410 ("gperf" ,gperf)
411 ("perl" ,perl)
412 ("pkg-config" ,pkg-config)))
413 (propagated-inputs ; in Requires or Requires.private field of .pkg
414 `(("librevenge" ,librevenge)
415 ("libxml2" ,libxml2)))
416 (inputs
417 `(("boost" ,boost)))
418 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libabw")
419 (synopsis "Library for parsing the AbiWord format")
420 (description "Libabw is a library that parses the file format of
421 AbiWord documents.")
422 (license license:mpl2.0)))
423
424 (define-public libcdr
425 (package
426 (name "libcdr")
427 (version "0.1.6")
428 (source
429 (origin
430 (method url-fetch)
431 (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
432 name "-" version ".tar.xz"))
433 (sha256 (base32
434 "0qgqlw6i25zfq1gf7f6r5hrhawlrgh92sg238kjpf2839aq01k81"))))
435 (build-system gnu-build-system)
436 (native-inputs
437 `(("cppunit" ,cppunit)
438 ("doxygen" ,doxygen)
439 ("pkg-config" ,pkg-config)))
440 (propagated-inputs ; in Requires or Requires.private field of .pkg
441 `(("icu4c" ,icu4c)
442 ("lcms" ,lcms)
443 ("librevenge" ,librevenge)
444 ("zlib" ,zlib)))
445 (inputs
446 `(("boost" ,boost)))
447 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libcdr")
448 (synopsis "Library for parsing the CorelDRAW format")
449 (description "Libcdr is a library that parses the file format of
450 CorelDRAW documents of all versions.")
451 (license license:mpl2.0)))
452
453 (define-public libetonyek
454 (package
455 (name "libetonyek")
456 (version "0.1.9")
457 (source
458 (origin
459 (method url-fetch)
460 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
461 name "-" version ".tar.xz"))
462 (sha256 (base32
463 "0jhsbdimiyijdqriy0zzkjjgc4wi6fjimhdg4mdybrlwg7l7f5p6"))))
464 (build-system gnu-build-system)
465 (arguments
466 `(#:configure-flags '("--with-mdds=1.5")))
467 (native-inputs
468 `(("cppunit" ,cppunit)
469 ("doxygen" ,doxygen)
470 ("gperf" ,gperf)
471 ("pkg-config" ,pkg-config)))
472 (propagated-inputs ; in Requires or Requires.private field of .pkg
473 `(("liblangtag" ,liblangtag)
474 ("librevenge" ,librevenge)
475 ("libxml2" ,libxml2)
476 ("zlib" ,zlib)))
477 (inputs
478 `(("boost" ,boost)
479 ("glm" ,glm)
480 ("mdds" ,mdds)))
481 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek")
482 (synopsis "Library for parsing the Apple Keynote format")
483 (description "Libetonyek is a library that parses the file format of
484 Apple Keynote documents. It currently supports Keynote versions 2 to 5.")
485 (license license:mpl2.0)))
486
487 (define-public liblangtag
488 (package
489 (name "liblangtag")
490 (version "0.6.3")
491 (source
492 (origin
493 (method url-fetch)
494 (uri (string-append "https://bitbucket.org/tagoh/liblangtag/downloads/"
495 "liblangtag-" version ".tar.bz2"))
496 (sha256
497 (base32 "1g9kwxx60q0hpwvs66ys1cb9qg54hfvbivadwli8sfpc085a44hz"))))
498 (build-system gnu-build-system)
499 (native-inputs
500 `(("libtool" ,libtool)
501 ("pkg-config" ,pkg-config)))
502 (inputs
503 `(("libxml2" ,libxml2)))
504 (home-page "https://bitbucket.org/tagoh/liblangtag")
505 (synopsis "Library to access tags for identifying languages")
506 (description "Liblangtag implements an interface to work with tags
507 for identifying languages as described in RFC 5646. It supports the
508 extensions described in RFC6067 and RFC6497, and Extension T for
509 language/locale identifiers as described in the Unicode CLDR
510 standard 21.0.2.")
511 (license (list license:lgpl3+ license:mpl2.0)))) ; dual license
512
513 (define-public libexttextcat
514 (package
515 (name "libexttextcat")
516 (version "3.4.5")
517 (source
518 (origin
519 (method url-fetch)
520 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
521 name "-" version ".tar.xz"))
522 (sha256 (base32
523 "1j6sjwkyhqvsgyw938bxxfwkzzi1mahk66g5342lv6j89jfvrz8k"))))
524 (build-system gnu-build-system)
525 (home-page "https://www.freedesktop.org/wiki/Software/libexttextcat/")
526 (synopsis "Text Categorization library")
527 (description "Libexttextcat is an N-Gram-Based Text Categorization
528 library primarily intended for language guessing.")
529 (license (license:non-copyleft "file://LICENSE"
530 "See LICENSE in the distribution."))))
531
532 (define-public libfreehand
533 (package
534 (name "libfreehand")
535 (version "0.1.2")
536 (source
537 (origin
538 (method url-fetch)
539 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
540 name "-" version ".tar.xz"))
541 (sha256 (base32
542 "1b1lvqh68rwij1yvmxy02hsmh7i74ma5767mk8mg5nx6chajshhf"))))
543 (build-system gnu-build-system)
544 (arguments
545 '(#:phases (modify-phases %standard-phases
546 (add-before 'build 'adjust-for-ICU-65
547 (lambda _
548 ;; Fix build with ICU 65 and later. Taken from this
549 ;; upstream commit, remove for libfreehand > 0.1.2:
550 ;; https://gerrit.libreoffice.org/#/c/80224/
551 (substitute* "src/lib/libfreehand_utils.cpp"
552 (("U16_NEXT.*" all)
553 (string-append all ";\n")))
554 #t)))))
555 (native-inputs
556 `(("cppunit" ,cppunit)
557 ("doxygen" ,doxygen)
558 ("gperf" ,gperf)
559 ("perl" ,perl)
560 ("pkg-config" ,pkg-config)))
561 (inputs
562 `(("icu4c" ,icu4c)
563 ("lcms" ,lcms)))
564 (propagated-inputs ; in Requires or Requires.private field of .pkg
565 `(("librevenge" ,librevenge)
566 ("zlib" ,zlib)))
567 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libfreehand")
568 (synopsis "Library for parsing the FreeHand format")
569 (description "Libfreehand is a library that parses the file format of
570 Aldus/Macromedia/Adobe FreeHand documents.")
571 (license license:mpl2.0)))
572
573 (define-public libmspub
574 (package
575 (name "libmspub")
576 (version "0.1.4")
577 (source
578 (origin
579 (method url-fetch)
580 (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
581 name "-" version ".tar.xz"))
582 (sha256 (base32
583 "1fhkn013gzg59f4z7rldpbi0nj7lgdqzxanspsqa6axvmahw2dpg"))))
584 (build-system gnu-build-system)
585 (native-inputs
586 `(("doxygen" ,doxygen)
587 ("pkg-config" ,pkg-config)))
588 (propagated-inputs ; in Requires or Requires.private field of .pkg
589 `(("icu4c" ,icu4c)
590 ("librevenge" ,librevenge)
591 ("zlib" ,zlib)))
592 (inputs
593 `(("boost" ,boost)))
594 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libmspub")
595 (synopsis "Library for parsing the Microsoft Publisher format")
596 (description "Libmspub is a library that parses the file format of
597 Microsoft Publisher documents of all versions.")
598 (license license:mpl2.0)))
599
600 (define-public libnumbertext
601 (package
602 (name "libnumbertext")
603 (version "1.0.7")
604 (source
605 (origin
606 (method url-fetch)
607 (uri (string-append "https://github.com/Numbertext/libnumbertext/"
608 "releases/download/" version
609 "/libnumbertext-" version ".tar.xz"))
610 (sha256
611 (base32 "1z31idnmd9iv6ra5dcsn7q70wv32clk2sqc5bbhimqcsp2f29f0p"))))
612 (build-system gnu-build-system)
613 (arguments
614 `(#:configure-flags '("--disable-static")))
615 (home-page "https://github.com/Numbertext/libnumbertext")
616 (synopsis "Language-neutral @code{NUMBERTEXT} and @code{MONEYTEXT} functions")
617 (description
618 "The libnumbertext library provides language-neutral @code{NUMBERTEXT}
619 and @code{MONEYTEXT} functions for LibreOffice Calc, available for C++ and
620 Java.")
621 (license (list license:lgpl3+ license:bsd-3))))
622
623 (define-public libpagemaker
624 (package
625 (name "libpagemaker")
626 (version "0.0.4")
627 (source
628 (origin
629 (method url-fetch)
630 (uri (string-append "https://dev-www.libreoffice.org/src/libpagemaker/"
631 "libpagemaker-" version ".tar.xz"))
632 (sha256 (base32
633 "17ai8ajffr0ixxmmcv3k5vgjlcsix38ldb4fw2arild70pbsrbb6"))))
634 (build-system gnu-build-system)
635 (arguments
636 `(#:configure-flags '("--disable-werror")))
637 (native-inputs
638 `(("doxygen" ,doxygen)
639 ("pkg-config" ,pkg-config)))
640 (propagated-inputs ; in Requires field of .pkg
641 `(("librevenge" ,librevenge)))
642 (inputs
643 `(("boost" ,boost)
644 ("zlib" ,zlib)))
645 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libpagemaker")
646 (synopsis "Library for parsing the PageMaker format")
647 (description "Libpagemaker is a library that parses the file format of
648 Aldus/Adobe PageMaker documents. Currently it only understands documents
649 created by PageMaker version 6.x and 7.")
650 (license license:mpl2.0)))
651
652 (define-public libvisio
653 (package
654 (name "libvisio")
655 (version "0.1.7")
656 (source
657 (origin
658 (method url-fetch)
659 (uri (string-append "http://dev-www.libreoffice.org/src/libvisio/"
660 "libvisio-" version ".tar.xz"))
661 (sha256 (base32
662 "0k7adcbbf27l7n453cca1m6s9yj6qvb5j6bsg2db09ybf3w8vbwg"))))
663 (build-system gnu-build-system)
664 (native-inputs
665 `(("cppunit" ,cppunit)
666 ("doxygen" ,doxygen)
667 ("gperf" ,gperf)
668 ("perl" ,perl)
669 ("pkg-config" ,pkg-config)))
670 (propagated-inputs ; in Requires or Requires.private field of .pkg
671 `(("icu4c" ,icu4c)
672 ("librevenge" ,librevenge)
673 ("libxml2" ,libxml2)))
674 (inputs
675 `(("boost" ,boost)))
676 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libvisio")
677 (synopsis "Library for parsing the Microsoft Visio format")
678 (description "Libvisio is a library that parses the file format of
679 Microsoft Visio documents of all versions.")
680 (license license:mpl2.0)))
681
682 (define-public libodfgen
683 (package
684 (name "libodfgen")
685 (version "0.1.8")
686 (source
687 (origin
688 (method url-fetch)
689 (uri (string-append "mirror://sourceforge/libwpd/libodfgen/"
690 "libodfgen-" version "/libodfgen-" version ".tar.xz"))
691 (sha256 (base32
692 "0986c5gw4vdfz7bcmpdfz07inba5wxsx4f6xvndknqj6zlkh082m"))))
693 (build-system gnu-build-system)
694 (native-inputs
695 `(("doxygen" ,doxygen)
696 ("pkg-config" ,pkg-config)))
697 (propagated-inputs ; in Requires field of .pkg
698 `(("librevenge" ,librevenge)))
699 (inputs
700 `(("boost" ,boost)
701 ("libxml2" ,libxml2)
702 ("zlib" ,zlib)))
703 (arguments
704 ;; Avoid triggering configure errors by simple inclusion of Boost headers.
705 `(#:configure-flags '("--disable-werror")))
706 (home-page "https://sourceforge.net/p/libwpd/wiki/libodfgen/")
707 (synopsis "ODF (Open Document Format) library")
708 (description "Libodfgen is a library for generating documents in the
709 Open Document Format (ODF). It provides generator implementations for all
710 document interfaces supported by librevenge:
711 text documents, vector drawings, presentations and spreadsheets.")
712 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
713
714 (define-public libmwaw
715 (package
716 (name "libmwaw")
717 (version "0.3.18")
718 (source
719 (origin
720 (method url-fetch)
721 (uri (string-append "mirror://sourceforge/libmwaw/libmwaw/libmwaw-"
722 version "/libmwaw-" version ".tar.xz"))
723 (sha256
724 (base32 "03qyxp8hkcc7jcwyq0v0y2diqsvib060pg7y9zk0n07qh0b0apgw"))))
725 (build-system gnu-build-system)
726 (native-inputs
727 `(("doxygen" ,doxygen)
728 ("pkg-config" ,pkg-config)))
729 (propagated-inputs ; in Requires field of .pc file
730 `(("librevenge" ,librevenge)))
731 (inputs
732 `(("boost" ,boost)
733 ("zlib" ,zlib)))
734 (home-page "https://sourceforge.net/p/libmwaw/wiki/Home/")
735 (synopsis "Import library for some old Macintosh text documents")
736 (description "Libmwaw contains some import filters for old Macintosh
737 text documents (MacWrite, ClarisWorks, ... ) and for some graphics and
738 spreadsheet documents.")
739 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
740
741 (define-public libstaroffice
742 (package
743 (name "libstaroffice")
744 (version "0.0.7")
745 (source
746 (origin
747 (method url-fetch)
748 (uri (string-append "https://github.com/fosnola/libstaroffice/releases/download/"
749 version "/libstaroffice-" version ".tar.xz"))
750 (sha256 (base32
751 "1ny8411273k2bq7mnpmcvri3rd46b2j67wfypqkp3y8nhanv0kzr"))))
752 (build-system gnu-build-system)
753 (inputs
754 `(("librevenge" ,librevenge)
755 ("zlib" ,zlib)))
756 (native-inputs
757 `(("pkg-config" ,pkg-config)))
758 (home-page "https://github.com/fosnola/libstaroffice")
759 (synopsis "Provides LibreOffice support for old StarOffice documents")
760 (description "@code{libstaroffice} is an import filter for the document formats
761 from the old StarOffice (.sdc, .sdw, ...).")
762 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
763
764 (define-public libwps
765 (package
766 (name "libwps")
767 (version "0.4.12")
768 (source
769 (origin
770 (method url-fetch)
771 (uri (string-append "mirror://sourceforge/" name "/" name "/"
772 name "-" version "/" name "-" version ".tar.xz"))
773 (sha256 (base32
774 "1nsfacqp5sfkyayw7q0wp68lidksd1wjdix8qmsbf0vdl19gn6p2"))))
775 (build-system gnu-build-system)
776 (native-inputs
777 `(("doxygen" ,doxygen)
778 ("pkg-config" ,pkg-config)))
779 (propagated-inputs ; in Requires field of .pkg
780 `(("librevenge" ,librevenge)))
781 (inputs
782 `(("boost" ,boost)
783 ("zlib" ,zlib)))
784 (home-page "http://libwps.sourceforge.net/")
785 (synopsis "Import library for Microsoft Works text documents")
786 (description "Libwps is a library for importing files in the Microsoft
787 Works word processor file format.")
788 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
789
790 (define-public libzmf
791 (package
792 (name "libzmf")
793 (version "0.0.2")
794 (source
795 (origin
796 (method url-fetch)
797 (uri (string-append "http://dev-www.libreoffice.org/src/libzmf/libzmf-"
798 version ".tar.xz"))
799 (sha256 (base32
800 "08mg5kmkjrmqrd8j5rkzw9vdqlvibhb1ynp6bmfxnzq5rcq1l197"))))
801 (build-system gnu-build-system)
802 (arguments
803 ;; A harmless 'sign-compare' error pops up on i686 so disable '-Werror'.
804 '(#:configure-flags '("--disable-werror")))
805 (inputs
806 `(("boost" ,boost)
807 ("icu4c" ,icu4c)
808 ("libpng" ,libpng)
809 ("librevenge" ,librevenge)
810 ("zlib" ,zlib)))
811 (native-inputs
812 `(("cppunit" ,cppunit)
813 ("doxygen" ,doxygen)
814 ("pkg-config" ,pkg-config)))
815 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libzmf")
816 (synopsis "Parses file format of Zoner Callisto/Draw documents")
817 (description "Libzmf is a library that parses the file format of Zoner
818 Callisto/Draw documents. Currently it only understands documents created by
819 Zoner Draw version 4 and 5.")
820 (license license:mpl2.0)))
821
822 (define-public hunspell
823 (package
824 (name "hunspell")
825 (version "1.7.0")
826 (source
827 (origin
828 (method git-fetch)
829 (uri (git-reference
830 (url "https://github.com/hunspell/hunspell")
831 (commit (string-append "v" version))))
832 (file-name (git-file-name name version))
833 (sha256
834 (base32
835 "0qxlkd012r45ppd21kldbq9k5ac5nmxz290z6m2kch9l56v768k1"))))
836 (build-system gnu-build-system)
837 (native-inputs
838 `(("autoconf" ,autoconf)
839 ("automake" ,automake)
840 ("libtool" ,libtool)))
841 (inputs
842 `(("perl" ,perl)))
843 (native-search-paths (list (search-path-specification
844 (variable "DICPATH")
845 (files '("share/hunspell")))))
846 (home-page "https://hunspell.github.io/")
847 (synopsis "Spell checker")
848 (description "Hunspell is a spell checker and morphological analyzer
849 library and program designed for languages with rich morphology and complex
850 word compounding or character encoding.")
851 ;; Triple license, including "mpl1.1 or later".
852 (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))))
853
854 (define (dicollecte-french-dictionary variant synopsis)
855 ;; Return a French dictionary package from dicollecte.org, for the given
856 ;; VARIANT.
857 (package
858 (name (match variant
859 ("classique" "hunspell-dict-fr")
860 (_ (string-append "hunspell-dict-fr-" variant))))
861 (version "6.2")
862 (source (origin
863 (uri (string-append
864 "http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v"
865 version ".zip"))
866 (method url-fetch)
867 (sha256
868 (base32
869 "139hfrn5p87sl8hqmgkf6sgvnxrk2mm8vd8xsm8sm98qjnwlg0f9"))))
870 (build-system trivial-build-system)
871 (native-inputs `(("unzip" ,unzip)))
872 (arguments
873 `(#:modules ((guix build utils))
874 #:builder (begin
875 (use-modules (guix build utils)
876 (srfi srfi-26))
877
878 (let* ((out (assoc-ref %outputs "out"))
879 (hunspell (string-append out "/share/hunspell"))
880 (myspell (string-append out "/share/myspell"))
881 (doc (string-append out "/share/doc/"
882 ,name))
883 (unzip (assoc-ref %build-inputs "unzip")))
884 (invoke (string-append unzip "/bin/unzip")
885 (assoc-ref %build-inputs "source"))
886 (for-each (cut install-file <> hunspell)
887 (find-files "."
888 ,(string-append variant
889 "\\.(dic|aff)$")))
890 (mkdir-p myspell)
891 (symlink hunspell (string-append myspell "/dicts"))
892 (for-each (cut install-file <> doc)
893 (find-files "." "\\.(txt|org|md)$"))
894 #t))))
895 (synopsis synopsis)
896 (description
897 "This package provides a dictionary for the Hunspell spell-checking
898 library.")
899 (home-page "https://www.dicollecte.org/home.php?prj=fr")
900 (license license:mpl2.0)))
901
902 (define-syntax define-french-dictionary
903 (syntax-rules (synopsis)
904 ((_ name variant (synopsis text))
905 (define-public name
906 (dicollecte-french-dictionary variant text)))))
907
908 (define-french-dictionary hunspell-dict-fr-classique
909 "classique"
910 ;; TRANSLATORS: In French, this is "Français classique".
911 (synopsis "Hunspell dictionary for ``classic'' French (recommended)"))
912
913 (define-french-dictionary hunspell-dict-fr-moderne
914 "moderne"
915 ;; TRANSLATORS: In French, this is "Français moderne".
916 (synopsis "Hunspell dictionary for ``modern'' French"))
917
918 (define-french-dictionary hunspell-dict-fr-réforme-1990
919 "reforme1990"
920 (synopsis "Hunspell dictionary for the post @dfn{1990 réforme} French"))
921
922 (define-french-dictionary hunspell-dict-fr-toutes-variantes
923 "toutesvariantes"
924 (synopsis "Hunspell dictionary for all variants of French"))
925
926 (define-public hunspell-dict-pl
927 (package
928 (name "hunspell-dict-pl")
929 (version "20200327")
930 (source
931 (origin
932 (method url-fetch)
933 ;; Since creators of dictionary host only the latest daily release,
934 ;; we're using version mirrored by Arch Linux, which seems good
935 ;; enough. They're mirroring hunspell-pl releases since 2011.
936 (uri (string-append "https://sources.archlinux.org/other/community/"
937 "hunspell-pl/sjp-myspell-pl-"
938 version ".zip"))
939 (sha256 (base32
940 "14mzf8glxkp2775dcqisb1zv6r8ncm3bvzl46q352rwyl2dg1c59"))))
941
942 (build-system trivial-build-system)
943 (native-inputs `(("unzip" ,unzip)))
944 (arguments
945 `(#:modules ((guix build utils))
946 #:builder (begin
947 (use-modules (guix build utils)
948 (srfi srfi-26))
949
950 (let* ((out (assoc-ref %outputs "out"))
951 (hunspell (string-append out "/share/hunspell"))
952 (myspell (string-append out "/share/myspell"))
953 (doc (string-append out "/share/doc/"
954 ,name))
955 (unzip (string-append (assoc-ref %build-inputs "unzip")
956 "/bin/unzip")))
957 (invoke unzip "-j" "-o" (assoc-ref %build-inputs "source"))
958 (invoke unzip "-j" "-o" "pl_PL.zip")
959 (for-each (cut install-file <> hunspell)
960 (find-files "."
961 ,(string-append "pl_PL"
962 "\\.(dic|aff)$")))
963 (mkdir-p myspell)
964 (symlink hunspell (string-append myspell "/dicts"))
965 (for-each (cut install-file <> doc)
966 (find-files "." "\\.(txt|org|md)$"))
967 #t))))
968 (synopsis "Hunspell dictionary for Polish")
969 (description
970 "This package provides a dictionary for the Hunspell spell-checking
971 library.")
972 (home-page "https://sjp.pl/slownik/ort/")
973 (license
974 (list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))
975
976 (define-public hunspell-dict-de
977 (package
978 (name "hunspell-dict-de")
979 (version "20161207")
980 (source
981 (origin
982 (method url-fetch)
983 (uri (string-append "https://www.j3e.de/ispell/igerman98/dict/"
984 "igerman98-" version ".tar.bz2"))
985 (sha256
986 (base32 "1a3055hp2bc4q4nlg3gmg0147p3a1zlfnc65xiv2v9pyql1nya8p"))))
987 (build-system gnu-build-system)
988 (arguments
989 `(#:make-flags '("hunspell/de_DE.dic")
990 #:phases
991 (modify-phases %standard-phases
992 (delete 'configure)
993 (replace 'install ;no install target
994 (lambda* (#:key outputs #:allow-other-keys)
995 (let* ((out (assoc-ref outputs "out"))
996 (share (string-append out "/share/hunspell/")))
997 (install-file "hunspell/de_DE.aff" share)
998 (install-file "hunspell/de_DE.dic" share)
999 #t))))
1000 #:tests? #f)) ; no tests
1001 (native-inputs
1002 `(("hunspell" ,hunspell)
1003 ("ispell" ,ispell)
1004 ("perl" ,perl)))
1005 (synopsis "Hunspell dictionary for German (de_DE)")
1006 (description "This package provides a dictionary for the Hunspell
1007 spell-checking library.")
1008 (home-page "https://www.j3e.de/ispell/igerman98/")
1009 (license (list license:gpl2 license:gpl3))))
1010
1011 (define-public hyphen
1012 (package
1013 (name "hyphen")
1014 (version "2.8.8")
1015 (source
1016 (origin
1017 (method url-fetch)
1018 (uri (string-append "mirror://sourceforge/hunspell/Hyphen/"
1019 (version-major+minor version) "/"
1020 name "-" version ".tar.gz"))
1021 (sha256 (base32
1022 "01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih"))))
1023 (build-system gnu-build-system)
1024 (inputs
1025 `(("perl" ,perl)))
1026 (home-page "http://hunspell.sourceforge.net/")
1027 (synopsis "Hyphenation library")
1028 (description "Hyphen is a hyphenation library using TeX hyphenation
1029 patterns, which are pre-processed by a perl script.")
1030 ;; Triple license, including "mpl1.1 or later".
1031 (license
1032 (list license:mpl1.1 license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
1033
1034 (define-public mythes
1035 (package
1036 (name "mythes")
1037 (version "1.2.4")
1038 (source
1039 (origin
1040 (method url-fetch)
1041 (uri (string-append "mirror://sourceforge/hunspell/MyThes/" version "/"
1042 name "-" version ".tar.gz"))
1043 (sha256 (base32
1044 "0prh19wy1c74kmzkkavm9qslk99gz8h8wmjvwzjc6lf8v2az708y"))))
1045 (build-system gnu-build-system)
1046 (native-inputs
1047 `(("pkg-config" ,pkg-config)))
1048 (inputs
1049 `(("hunspell" ,hunspell)
1050 ("perl" ,perl)))
1051 (home-page "http://hunspell.sourceforge.net/")
1052 (synopsis "Thesaurus")
1053 (description "MyThes is a simple thesaurus that uses a structured text
1054 data file and an index file with binary search to look up words and phrases
1055 and to return information on pronunciations, meanings and synonyms.")
1056 (license (license:non-copyleft "file://COPYING"
1057 "See COPYING in the distribution."))))
1058
1059 (define-public libqxp
1060 (package
1061 (name "libqxp")
1062 (version "0.0.2")
1063 (source (origin
1064 (method url-fetch)
1065 (uri (string-append "https://dev-www.libreoffice.org/src/libqxp/"
1066 "libqxp-" version ".tar.xz"))
1067 (sha256
1068 (base32
1069 "0p4lb84m05wqd8qr8ni9sp80ivlm83ffn0nxiv4m42hj22qvcdz1"))))
1070 (build-system gnu-build-system)
1071 (inputs
1072 `(("boost" ,boost)
1073 ("icu4c" ,icu4c)
1074 ("zlib" ,zlib)))
1075 (native-inputs
1076 `(("cppunit" ,cppunit)
1077 ("pkg-config" ,pkg-config)))
1078 (propagated-inputs
1079 `(("librevenge" ,librevenge))) ; mentioned in Requires field
1080 (home-page "https://www.libreoffice.org")
1081 (synopsis "Library and tools for the QuarkXPress file format")
1082 (description "libqxp is a library and a set of tools for reading and
1083 converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
1084 (license license:mpl2.0)))
1085
1086 (define-public libreoffice
1087 (package
1088 (name "libreoffice")
1089 (version "6.4.7.2")
1090 (source
1091 (origin
1092 (method url-fetch)
1093 (uri
1094 (string-append
1095 "https://download.documentfoundation.org/libreoffice/src/"
1096 (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
1097 (sha256
1098 (base32 "0i3654rmzs8aazj8j3dmxamilslfrki0y4sksg3n1zygc2ddfk83"))))
1099 (build-system glib-or-gtk-build-system)
1100 (native-inputs
1101 `(("bison" ,bison)
1102 ("cppunit" ,cppunit)
1103 ("flex" ,flex)
1104 ("pkg-config" ,pkg-config)
1105 ("python" ,python-wrapper)
1106 ("which" ,which)
1107 ("ziptime" ,ziptime)))
1108 (inputs
1109 `(("bluez" ,bluez)
1110 ("boost" ,boost)
1111 ("clucene" ,clucene)
1112 ("cups" ,cups)
1113 ("dbus-glib" ,dbus-glib)
1114 ("firebird" ,firebird)
1115 ("fontconfig" ,fontconfig)
1116 ("fontforge" ,fontforge)
1117 ("gconf" ,gconf)
1118 ("glew" ,glew)
1119 ("glm" ,glm)
1120 ("gnupg" ,gnupg)
1121 ("gobject-introspection" ,gobject-introspection)
1122 ("gperf" ,gperf)
1123 ("gpgme" ,gpgme)
1124 ("graphite2" ,graphite2)
1125 ("gst-plugins-base" ,gst-plugins-base)
1126 ("gtk+" ,gtk+)
1127 ("harfbuzz" ,harfbuzz)
1128 ("hunspell" ,hunspell)
1129 ("hyphen" ,hyphen)
1130 ("libabw" ,libabw)
1131 ("libcdr" ,libcdr)
1132 ("libcmis" ,libcmis)
1133 ("libjpeg-turbo" ,libjpeg-turbo)
1134 ("libe-book" ,libe-book)
1135 ("libepubgen" ,libepubgen)
1136 ("libetonyek" ,libetonyek)
1137 ("libexttextcat" ,libexttextcat)
1138 ("libfreehand" ,libfreehand)
1139 ("liblangtag" ,liblangtag)
1140 ;; XXX: Perhaps this should be propagated from xmlsec.
1141 ("libltdl" ,libltdl)
1142 ("libmspub" ,libmspub)
1143 ("libmwaw" ,libmwaw)
1144 ("libnumbertext" ,libnumbertext)
1145 ("libodfgen" ,libodfgen)
1146 ("libpagemaker" ,libpagemaker)
1147 ("libqxp" ,libqxp)
1148 ("libstaroffice" ,libstaroffice)
1149 ("libvisio" ,libvisio)
1150 ("libwpg" ,libwpg)
1151 ("libwps" ,libwps)
1152 ("libxrandr" ,libxrandr)
1153 ("libxrender" ,libxrender)
1154 ("libxslt" ,libxslt)
1155 ("libxt" ,libxt)
1156 ("libzmf" ,libzmf)
1157 ("lpsolve" ,lpsolve)
1158 ("mariadb" ,mariadb "dev")
1159 ("mdds" ,mdds)
1160 ("mythes" ,mythes)
1161 ("neon" ,neon)
1162 ("nspr" ,nspr)
1163 ("nss" ,nss)
1164 ("openldap" ,openldap)
1165 ("openssl" ,openssl)
1166 ("orcus" ,orcus)
1167 ("perl" ,perl)
1168 ("perl-archive-zip" ,perl-archive-zip)
1169 ("poppler" ,poppler)
1170 ("postgresql" ,postgresql)
1171 ("python" ,python)
1172 ("python-lxml" ,python-lxml)
1173 ("qrcodegen-cpp" ,qrcodegen-cpp)
1174 ("redland" ,redland)
1175 ("sane-backends" ,sane-backends)
1176 ("unixodbc" ,unixodbc)
1177 ("unzip" ,unzip)
1178 ("vigra" ,vigra)
1179 ("xdg-utils" ,xdg-utils)
1180 ("xmlsec" ,xmlsec-nss)
1181 ("zip" ,zip)))
1182 (arguments
1183 `(#:tests? #f ; Building the tests already fails.
1184 #:make-flags '("build-nocheck") ; Do not build unit tests, which fails.
1185 #:phases
1186 (modify-phases %standard-phases
1187 (add-before 'configure 'prepare-src
1188 (lambda* (#:key inputs #:allow-other-keys)
1189 (substitute*
1190 (list "sysui/CustomTarget_share.mk"
1191 "solenv/gbuild/gbuild.mk"
1192 "solenv/gbuild/platform/unxgcc.mk")
1193 (("/bin/sh") (which "sh")))
1194
1195 ;; Use store references for strictly necessary commands,
1196 ;; but not for optional tools like ‘gdb’ and ‘valgrind’.
1197 (for-each (lambda (command)
1198 (substitute* "desktop/scripts/soffice.sh"
1199 (((format #f"~a " command))
1200 (format #f "~a " (which command)))))
1201 (list "dirname" "grep" "uname"))
1202
1203 ;; GPGME++ headers are installed in a gpgme++ subdirectory, but
1204 ;; files in "xmlsecurity/source/gpg/" and elsewhere expect to
1205 ;; find them on the include path without a prefix.
1206 (substitute* '("xmlsecurity/Library_xsec_xmlsec.mk"
1207 "comphelper/Library_comphelper.mk")
1208 (("\\$\\$\\(INCLUDE\\)")
1209 (string-append "$$(INCLUDE) -I"
1210 (assoc-ref inputs "gpgme")
1211 "/include/gpgme++")))
1212
1213 ;; /usr/bin/xdg-open doesn't exist on Guix System.
1214 (substitute* '("shell/source/unix/exec/shellexec.cxx"
1215 "shell/source/unix/misc/senddoc.sh")
1216 (("/usr/bin/xdg-open")
1217 (string-append (assoc-ref inputs "xdg-utils")
1218 "/bin/xdg-open")))
1219
1220 #t))
1221 (add-after 'install 'reset-zip-timestamps
1222 (lambda* (#:key outputs #:allow-other-keys)
1223 (let ((out (assoc-ref outputs "out")))
1224 (for-each (lambda (file)
1225 (invoke "ziptime" file))
1226 ;; So many different extensions for .zip files.
1227 (find-files out "\\.(bau|dat|otp|ott|zip)$")))))
1228 (add-after 'install 'bin-and-desktop-install
1229 ;; Create 'soffice' and 'libreoffice' symlinks to the executable
1230 ;; script.
1231 (lambda* (#:key outputs #:allow-other-keys)
1232 (let ((out (assoc-ref outputs "out")))
1233 (define (symlink-output src dst)
1234 (mkdir-p (dirname (string-append out dst)))
1235 (symlink (string-append out src) (string-append out dst)))
1236 (define (install src dst)
1237 (let ((dst (string-append out dst)))
1238 (mkdir-p (dirname dst))
1239 (copy-file src dst)))
1240 (define (install-desktop-file app)
1241 (let ((src (string-append "/lib/libreoffice/share/xdg/"
1242 app ".desktop"))
1243 (dst (string-append "/share/applications/libreoffice-"
1244 app ".desktop")))
1245 (substitute* (string-append out src)
1246 (("Exec=libreoffice[0-9]+\\.[0-9]+ ")
1247 (string-append "Exec=" out "/bin/libreoffice "))
1248 (("Icon=libreoffice.*")
1249 (string-append "Icon=" app "\n"))
1250 (("LibreOffice [0-9]+\\.[0-9]+")
1251 "LibreOffice"))
1252 (symlink-output src dst)))
1253 (define (install-appdata app)
1254 (install-file (string-append
1255 "sysui/desktop/appstream-appdata/"
1256 "libreoffice-" app ".appdata.xml")
1257 (string-append out "/share/appdata")))
1258 (symlink-output "/lib/libreoffice/program/soffice"
1259 "/bin/soffice")
1260 (symlink-output "/lib/libreoffice/program/soffice"
1261 "/bin/libreoffice")
1262 (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.keys"
1263 "/share/mime-info/libreoffice.keys")
1264 (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.mime"
1265 "/share/mime-info/libreoffice.mime")
1266 (install
1267 "workdir/CustomTarget/sysui/share/libreoffice/openoffice.org.xml"
1268 "/share/mime/packages/libreoffice.xml")
1269 (for-each install-desktop-file
1270 '("base" "calc" "draw" "impress" "writer"
1271 "math" "startcenter"))
1272 (for-each install-appdata
1273 '("base" "calc" "draw" "impress" "writer"))
1274 (mkdir-p (string-append out "/share/icons/hicolor"))
1275 (copy-recursively "sysui/desktop/icons/hicolor"
1276 (string-append out "/share/icons/hicolor")))
1277 #t)))
1278 #:configure-flags
1279 (list
1280 "--enable-release-build"
1281 ;; Avoid using all cpu cores by default
1282 (format #f "--with-parallelism=~d" (parallel-job-count))
1283 "--disable-fetch-external" ; disable downloads
1284 "--with-system-libs" ; enable all --with-system-* flags
1285 (string-append "--with-boost-libdir="
1286 (assoc-ref %build-inputs "boost") "/lib")
1287 ;; Avoid undefined symbols required by boost::spirit
1288 "LDFLAGS=-lboost_system"
1289 ;; Avoid a dependency on ucpp.
1290 "--with-idlc-cpp=cpp"
1291 ;; The fonts require an external tarball (crosextrafonts).
1292 ;; They should not be needed when system fonts are available.
1293 "--without-fonts"
1294 ;; With java, the build fails since sac.jar is missing.
1295 "--without-java"
1296 ;; FIXME: Enable once the corresponding inputs are packaged.
1297 "--disable-coinmp"
1298 ;; This could (Debian does this) be a separate output containing only
1299 ;; program/libfirebird_sdbclo.so, if there's a way to point to it.
1300 "--enable-firebird-sdbc"
1301 ;; XXX: PDFium support requires fetching an external tarball and
1302 ;; patching the build scripts to work with GCC5. Try enabling this
1303 ;; when our default compiler is >=GCC 6.
1304 "--disable-pdfium"
1305 "--without-doxygen"
1306 "--enable-build-opensymbol")))
1307 (home-page "https://www.libreoffice.org/")
1308 (synopsis "Office suite")
1309 (description "LibreOffice is a comprehensive office suite. It contains
1310 a number of components: Writer, a word processor; Calc, a spreadsheet
1311 application; Impress, a presentation engine; Draw, a drawing and
1312 flowcharting application; Base, a database and database frontend;
1313 Math for editing mathematics.")
1314 (license license:mpl2.0)))