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