gnu: python-lxml: Move to (gnu packages xml).
[jackhill/guix/guix.git] / gnu / packages / libreoffice.scm
CommitLineData
7b4570b4 1;;; GNU Guix --- Functional package management for GNU
7b4570b4 2;;; Copyright © 2014 John Darrington <jmd@gnu.org>
00eb9fa3 3;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
15ad9eb6 4;;; Copyright © 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
7a203059 5;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
741916f1 6;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8e9a84d9 7;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
3bfa7af4 8;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
aff0cce9 9;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
b1d2e0b4 10;;; Copyright © 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
074ff555 11;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
21b41a79 12;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
aeba7d46 13;;; Copyright © 2018 Jonathan Brielmaier <jonathan.brielmaier@web.de>
afb986e7 14;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
7b4570b4
AE
15;;;
16;;; This file is part of GNU Guix.
17;;;
18;;; GNU Guix is free software; you can redistribute it and/or modify it
19;;; under the terms of the GNU General Public License as published by
20;;; the Free Software Foundation; either version 3 of the License, or (at
21;;; your option) any later version.
22;;;
23;;; GNU Guix is distributed in the hope that it will be useful, but
24;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26;;; GNU General Public License for more details.
27;;;
28;;; You should have received a copy of the GNU General Public License
29;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30
31(define-module (gnu packages libreoffice)
994bccd9 32 #:use-module (guix build-system glib-or-gtk)
16c62e1f 33 #:use-module (guix build-system gnu)
4db733e7 34 #:use-module (guix build-system trivial)
7b4570b4 35 #:use-module (guix download)
15ad9eb6 36 #:use-module (guix git-download)
2a9a9441 37 #:use-module ((guix licenses)
00eb9fa3 38 #:select (gpl2+ lgpl2.1+ lgpl3+ mpl1.1 mpl2.0
aeba7d46 39 non-copyleft x11-style bsd-3))
16c62e1f
AE
40 #:use-module (guix packages)
41 #:use-module (guix utils)
4db733e7 42 #:use-module (ice-9 match)
c91d3fb7 43 #:use-module (gnu packages)
16c62e1f
AE
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages base)
46 #:use-module (gnu packages bison)
7b4570b4 47 #:use-module (gnu packages boost)
10ca4a1d 48 #:use-module (gnu packages check)
cfaf863f 49 #:use-module (gnu packages compression)
16c62e1f 50 #:use-module (gnu packages cups)
3736a110
AE
51 #:use-module (gnu packages curl)
52 #:use-module (gnu packages cyrus-sasl)
16c62e1f 53 #:use-module (gnu packages databases)
99828fa7 54 #:use-module (gnu packages documentation)
16c62e1f
AE
55 #:use-module (gnu packages flex)
56 #:use-module (gnu packages fontutils)
afb986e7 57 #:use-module (gnu packages freedesktop)
9fe8a4ba 58 #:use-module (gnu packages ghostscript)
16c62e1f
AE
59 #:use-module (gnu packages gl)
60 #:use-module (gnu packages glib)
61 #:use-module (gnu packages gnome)
b4e5d8e7 62 #:use-module (gnu packages gperf)
b4c9a317 63 #:use-module (gnu packages gnupg)
16c62e1f
AE
64 #:use-module (gnu packages gstreamer)
65 #:use-module (gnu packages gtk)
b4e5d8e7 66 #:use-module (gnu packages icu4c)
16c62e1f
AE
67 #:use-module (gnu packages image)
68 #:use-module (gnu packages java)
69 #:use-module (gnu packages linux)
70 #:use-module (gnu packages maths)
aff0cce9 71 #:use-module (gnu packages nss)
16c62e1f 72 #:use-module (gnu packages openldap)
16c62e1f 73 #:use-module (gnu packages pdf)
2534fc04 74 #:use-module (gnu packages perl)
21b41a79 75 #:use-module (gnu packages perl-compression)
7b4570b4 76 #:use-module (gnu packages pkg-config)
b4e5d8e7 77 #:use-module (gnu packages python)
16c62e1f
AE
78 #:use-module (gnu packages rdf)
79 #:use-module (gnu packages scanner)
cc2b77df 80 #:use-module (gnu packages tls)
16c62e1f
AE
81 #:use-module (gnu packages version-control)
82 #:use-module (gnu packages xml)
148585c2 83 #:use-module (gnu packages xorg))
7b4570b4
AE
84
85(define-public ixion
86 (package
87 (name "ixion")
5895437c 88 (version "0.14.1")
7b4570b4
AE
89 (source
90 (origin
a3f2425e
RW
91 (method url-fetch)
92 (uri (string-append "http://kohei.us/files/ixion/src/libixion-"
93 version ".tar.xz"))
94 (sha256
95 (base32
5895437c 96 "14gdd6div4l22vnz3jn2qjxgjly98ck6p8c1v7386c41rx7kilba"))))
7b4570b4
AE
97 (build-system gnu-build-system)
98 (native-inputs
99 `(("pkg-config" ,pkg-config)))
a3f2425e
RW
100 (inputs
101 `(("mdds" ,mdds)
102 ("python" ,python)))
7b4570b4
AE
103 (home-page "https://gitlab.com/ixion/ixion")
104 (synopsis "General purpose formula parser and interpreter")
105 (description "Ixion is a library for calculating the results of formula
106expressions stored in multiple named targets, or \"cells\". The cells can
107be referenced from each other, and the library takes care of resolving
108their dependencies automatically upon calculation.")
109 (license mpl2.0)))
cfaf863f
AE
110
111(define-public orcus
112 (package
113 (name "orcus")
b64665d1 114 (version "0.14.1")
cfaf863f
AE
115 (source
116 (origin
e47e1f33
RW
117 (method url-fetch)
118 (uri (string-append "http://kohei.us/files/" name "/src/lib"
119 name "-" version ".tar.xz"))
120 (sha256
121 (base32
b64665d1 122 "1ays13a1x15j81dsrq0d3697v1bbqd3bfz3ajn6kb9d61y2drlgj"))))
cfaf863f
AE
123 (build-system gnu-build-system)
124 (native-inputs
125 `(("pkg-config" ,pkg-config)))
e47e1f33
RW
126 (inputs
127 `(("ixion" ,ixion)
128 ("mdds" ,mdds)
129 ("python" ,python)
130 ("zlib" ,zlib)))
cfaf863f
AE
131 (home-page "https://gitlab.com/orcus/orcus")
132 (synopsis "File import filter library for spreadsheet documents")
133 (description "Orcus is a library that provides a collection of standalone
134file processing filters. It is currently focused on providing filters for
135spreadsheet documents. The library includes import filters for
136Microsoft Excel 2007 XML, Microsoft Excel 2003 XML, Open Document Spreadsheet,
137Plain Text, Gnumeric XML, Generic XML. It also includes low-level parsers for
138CSV, CSS and XML.")
139 (license mpl2.0)))
10ca4a1d
AE
140
141(define-public librevenge
142 (package
143 (name "librevenge")
1c7c2506 144 (version "0.0.4")
10ca4a1d
AE
145 (source
146 (origin
147 (method url-fetch)
148 (uri (string-append "mirror://sourceforge/libwpd/" name "/" name "-"
de67e922 149 version "/" name "-" version ".tar.xz"))
10ca4a1d 150 (sha256 (base32
1c7c2506 151 "1cj76cz4mqcy2mgv9l5xlc95bypyk8zbq0ls9cswqrs2y0lhfgwk"))))
10ca4a1d
AE
152 (build-system gnu-build-system)
153 (native-inputs
c91d3fb7 154 `(("cppunit" ,cppunit)
10ca4a1d
AE
155 ("doxygen" ,doxygen)
156 ("pkg-config" ,pkg-config)))
157 (inputs
158 `(("zlib" ,zlib)))
c91d3fb7
EB
159 (propagated-inputs ; Referenced by .la files
160 `(("boost" ,boost)))
10ca4a1d
AE
161 (arguments
162 ;; avoid triggering configure errors by simple inclusion of boost headers
c91d3fb7
EB
163 `(#:configure-flags '("--disable-werror"
164 ;; Avoid undefined library references
165 "LDFLAGS=-lboost_system")))
3b3b60d0 166 (home-page "https://sourceforge.net/p/libwpd/wiki/librevenge/")
10ca4a1d
AE
167 (synopsis "Document importer for office suites")
168 (description "Librevenge is a base library for writing document import
169filters. It has interfaces for text documents, vector graphics,
170spreadsheets and presentations.")
68267c63 171 (license (list mpl2.0 lgpl2.1+)))) ;dual licensed
fc15db2f
AE
172
173(define-public libwpd
174 (package
175 (name "libwpd")
0b223139 176 (version "0.10.3")
fc15db2f
AE
177 (source
178 (origin
179 (method url-fetch)
b0aefabe
TGR
180 (uri (string-append "mirror://sourceforge/libwpd/libwpd/"
181 "libwpd-" version "/libwpd-" version ".tar.xz"))
fc15db2f 182 (sha256 (base32
0b223139 183 "02fx8bngslcj7i5g1gx2kiign4vp09wrmp5wpvix9igxcavb0r94"))))
fc15db2f 184 (build-system gnu-build-system)
66679ab9
MB
185 (arguments
186 `(#:configure-flags '("--disable-werror")))
fc15db2f
AE
187 (native-inputs
188 `(("doxygen" ,doxygen)
189 ("pkg-config" ,pkg-config)))
b7e71faa
AE
190 (propagated-inputs
191 `(("librevenge" ,librevenge))) ; in Requires field of .pkg
fc15db2f 192 (inputs
b7e71faa 193 `(("zlib" ,zlib)))
fc15db2f
AE
194 (home-page "http://libwpd.sourceforge.net/")
195 (synopsis "Library for importing WordPerfect documents")
196 (description "Libwpd is a C++ library designed to help process
197WordPerfect documents. It is most commonly used to import such documents
198into other word processors.")
68267c63 199 (license (list mpl2.0 lgpl2.1+)))) ;dual licensed
b4e5d8e7 200
b4e5d8e7
AE
201(define-public libe-book
202 (package
203 (name "libe-book")
fe296817 204 (version "0.1.3")
b4e5d8e7
AE
205 (source
206 (origin
207 (method url-fetch)
208 (uri (string-append "mirror://sourceforge/libebook/libe-book-"
209 version "/libe-book-" version ".tar.xz"))
210 (sha256
211 (base32
fe296817 212 "1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by"))))
b4e5d8e7
AE
213 (build-system gnu-build-system)
214 (native-inputs
215 `(("cppunit" ,cppunit)
216 ("gperf" ,gperf)
217 ("pkg-config" ,pkg-config)))
933c390c
AE
218 (propagated-inputs ; in Requires or Requires.private field of .pkg
219 `(("icu4c" ,icu4c)
fe296817 220 ("liblangtag" ,liblangtag)
933c390c
AE
221 ("librevenge" ,librevenge)
222 ("libxml2" ,libxml2)))
223 (inputs
224 `(("boost" ,boost)))
b4e5d8e7
AE
225 (arguments
226 ;; avoid triggering configure errors by simple inclusion of boost headers
227 `(#:configure-flags '("--disable-werror")))
228 (home-page "http://libebook.sourceforge.net")
229 (synopsis "Library for import of reflowable e-book formats")
230 (description "Libe-book is a library and a set of tools for reading and
231converting various reflowable e-book formats. Currently supported are:
232Broad Band eBook, eReader .pdb, FictionBook v. 2 (including zipped files),
233PalmDoc Ebook, Plucker .pdb, QiOO (mobile format, for java-enabled
234cellphones), TCR (simple compressed text format), TealDoc, zTXT,
235ZVR (simple compressed text format).")
236 (license mpl2.0)))
2534fc04 237
38be0f42
RW
238(define-public libepubgen
239 (package
240 (name "libepubgen")
241 (version "0.1.1")
242 (source
243 (origin
244 (method url-fetch)
245 (uri (string-append "mirror://sourceforge/libepubgen/libepubgen-"
246 version "/libepubgen-" version ".tar.xz"))
247 (sha256
248 (base32
249 "1b8mc9zzrqypj1v9zdy3ybc48pw0rfr06cyi7n6grvybjjwq9q03"))))
250 (build-system gnu-build-system)
251 (native-inputs
252 `(("cppunit" ,cppunit)
253 ("pkg-config" ,pkg-config)))
254 (inputs
255 `(("libxml2" ,libxml2)
256 ("boost" ,boost)))
257 (propagated-inputs ; in Requires field of .pkg
258 `(("librevenge" ,librevenge)))
259 (home-page "https://sourceforge.net/projects/libepubgen/")
260 (synopsis "EPUB generator library for librevenge")
261 (description "libepubgen is an EPUB generator for librevenge. It supports
262librevenge's text document interface and--currently in a very limited
263way--presentation and vector drawing interfaces.")
264 (license mpl2.0)))
265
2534fc04
AE
266(define-public libwpg
267 (package
268 (name "libwpg")
20fbb897 269 (version "0.3.3")
2534fc04
AE
270 (source
271 (origin
272 (method url-fetch)
fbed2800
TGR
273 (uri (string-append "mirror://sourceforge/libwpg/libwpg/"
274 "libwpg-" version "/libwpg-" version ".tar.xz"))
2534fc04 275 (sha256 (base32
20fbb897 276 "074x159immf139szkswv2zapnq75p7xk10dbha2p9193hgwggcwr"))))
2534fc04
AE
277 (build-system gnu-build-system)
278 (native-inputs
279 `(("doxygen" ,doxygen)
280 ("pkg-config" ,pkg-config)))
239c853c
AE
281 (propagated-inputs
282 `(("libwpd" ,libwpd))) ; in Requires field of .pkg
2534fc04 283 (inputs
239c853c 284 `(("perl" ,perl)
2534fc04
AE
285 ("zlib" ,zlib)))
286 (home-page "http://libwpg.sourceforge.net/")
287 (synopsis "Library and tools for the WordPerfect Graphics format")
288 (description "The libwpg project provides a library and tools for
289working with graphics in the WPG (WordPerfect Graphics) format.")
68267c63 290 (license (list mpl2.0 lgpl2.1+)))) ;dual licensed
4cd369ed 291
3736a110
AE
292(define-public libcmis
293 (package
294 (name "libcmis")
0c4cee13 295 (version "0.5.2")
3736a110
AE
296 (source
297 (origin
298 (method url-fetch)
7fc72c77 299 (uri (string-append "https://github.com/tdf/libcmis/releases/download/v"
0c4cee13 300 version "/libcmis-" version ".tar.xz"))
7fc72c77
LF
301 (sha256
302 (base32
0c4cee13 303 "18h0a2gsfxvlv03nlcfvw9bzsflq5sin9agq6za103hr0ab8vcfp"))))
3736a110
AE
304 (build-system gnu-build-system)
305 (native-inputs
306 `(("cppunit" ,cppunit)
307 ("pkg-config" ,pkg-config)))
f678913c
AE
308 (propagated-inputs ; in Requires field of .pkg
309 `(("curl" ,curl)
310 ("libxml2" ,libxml2)))
3736a110
AE
311 (inputs
312 `(("boost" ,boost)
3736a110 313 ("cyrus-sasl" ,cyrus-sasl)
3736a110
AE
314 ("openssl" ,openssl)))
315 (arguments
316 `(#:configure-flags
317 (list
318 ;; FIXME: Man pages generation requires docbook-to-man; reenable
319 ;; it once this is available.
320 "--without-man"
66679ab9
MB
321 ;; XXX: A configure test fails with GCC7 when including Boost headers.
322 "--disable-werror"
3736a110
AE
323 ;; During configure, the boost headers are found, but linking
324 ;; fails without the following flag.
325 (string-append "--with-boost="
0c4cee13 326 (assoc-ref %build-inputs "boost")))))
7fc72c77 327 (home-page "https://github.com/tdf/libcmis")
3736a110
AE
328 (synopsis "CMIS client library")
329 (description "LibCMIS is a C++ client library for the CMIS interface. It
330allows C++ applications to connect to any ECM behaving as a CMIS server such
331as Alfresco or Nuxeo.")
332 (license (list mpl1.1 gpl2+ lgpl2.1+)))) ; triple license
333
4cd369ed
AE
334(define-public libabw
335 (package
336 (name "libabw")
558f4a30 337 (version "0.1.3")
4cd369ed
AE
338 (source
339 (origin
340 (method url-fetch)
240d9ef9
TGR
341 (uri (string-append "https://dev-www.libreoffice.org/src/libabw/"
342 "libabw-" version ".tar.xz"))
4cd369ed 343 (sha256 (base32
558f4a30 344 "1vbfrmnvib3cym0yyyabnd8xpx4f7wp20vnn09s6dln347fajqz7"))))
4cd369ed
AE
345 (build-system gnu-build-system)
346 (native-inputs
347 `(("doxygen" ,doxygen)
348 ("gperf" ,gperf)
349 ("perl" ,perl)
350 ("pkg-config" ,pkg-config)))
57080fea
AE
351 (propagated-inputs ; in Requires or Requires.private field of .pkg
352 `(("librevenge" ,librevenge)
4cd369ed 353 ("libxml2" ,libxml2)))
57080fea
AE
354 (inputs
355 `(("boost" ,boost)))
4cd369ed
AE
356 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libabw")
357 (synopsis "Library for parsing the AbiWord format")
358 (description "Libabw is a library that parses the file format of
359AbiWord documents.")
360 (license mpl2.0)))
9fe8a4ba
AE
361
362(define-public libcdr
363 (package
364 (name "libcdr")
b1d2e0b4 365 (version "0.1.5")
9fe8a4ba
AE
366 (source
367 (origin
368 (method url-fetch)
b1d2e0b4 369 (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
9fe8a4ba
AE
370 name "-" version ".tar.xz"))
371 (sha256 (base32
b1d2e0b4 372 "0j1skr11jwvafn0l6p37v3i4lqc8wcn489g8f7c4mqwbk94mrkka"))))
9fe8a4ba
AE
373 (build-system gnu-build-system)
374 (native-inputs
d35db297
MB
375 `(("cppunit" ,cppunit)
376 ("doxygen" ,doxygen)
9fe8a4ba 377 ("pkg-config" ,pkg-config)))
269194c3
AE
378 (propagated-inputs ; in Requires or Requires.private field of .pkg
379 `(("icu4c" ,icu4c)
9fe8a4ba
AE
380 ("lcms" ,lcms)
381 ("librevenge" ,librevenge)
382 ("zlib" ,zlib)))
269194c3
AE
383 (inputs
384 `(("boost" ,boost)))
9fe8a4ba
AE
385 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libcdr")
386 (synopsis "Library for parsing the CorelDRAW format")
387 (description "Libcdr is a library that parses the file format of
388CorelDRAW documents of all versions.")
389 (license mpl2.0)))
3dc67e38
AE
390
391(define-public libetonyek
392 (package
393 (name "libetonyek")
7c3acfcb 394 (version "0.1.9")
3dc67e38
AE
395 (source
396 (origin
397 (method url-fetch)
398 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
399 name "-" version ".tar.xz"))
400 (sha256 (base32
7c3acfcb 401 "0jhsbdimiyijdqriy0zzkjjgc4wi6fjimhdg4mdybrlwg7l7f5p6"))))
3dc67e38 402 (build-system gnu-build-system)
b85b56dd 403 (arguments
7c3acfcb 404 `(#:configure-flags '("--with-mdds=1.4")))
3dc67e38
AE
405 (native-inputs
406 `(("cppunit" ,cppunit)
407 ("doxygen" ,doxygen)
408 ("gperf" ,gperf)
7a9283a6 409 ("pkg-config" ,pkg-config)))
480fe002 410 (propagated-inputs ; in Requires or Requires.private field of .pkg
9c209478
MB
411 `(("liblangtag" ,liblangtag)
412 ("librevenge" ,librevenge)
413 ("libxml2" ,libxml2)
414 ("zlib" ,zlib)))
480fe002 415 (inputs
9c209478
MB
416 `(("boost" ,boost)
417 ("glm" ,glm)
418 ("mdds" ,mdds)))
3dc67e38
AE
419 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek")
420 (synopsis "Library for parsing the Apple Keynote format")
421 (description "Libetonyek is a library that parses the file format of
422Apple Keynote documents. It currently supports Keynote versions 2 to 5.")
423 (license mpl2.0)))
97aee2b6 424
00eb9fa3
EF
425(define-public liblangtag
426 (package
427 (name "liblangtag")
603231c1 428 (version "0.6.2")
00eb9fa3
EF
429 (source
430 (origin
431 (method url-fetch)
432 (uri (string-append "https://bitbucket.org/tagoh/liblangtag/downloads/"
433 name "-" version ".tar.bz2"))
434 (sha256
435 (base32
603231c1 436 "0bnm4hllr8cfrybm8rw7b8n0nlhzhnv73bkg1bxk452g6a82f96n"))))
00eb9fa3
EF
437 (build-system gnu-build-system)
438 (native-inputs
439 `(("libtool" ,libtool)
440 ("pkg-config" ,pkg-config)))
441 (inputs
442 `(("libxml2" ,libxml2)))
69d973cc
TGR
443 ;; As of December 2017, tagoh.bitbucket.org redirects to a hosting advert.
444 (home-page "https://bitbucket.org/tagoh/liblangtag")
00eb9fa3
EF
445 (synopsis "Library to access tags for identifying languages")
446 (description "Liblangtag implements an interface to work with tags
447for identifying languages as described in RFC 5646. It supports the
448extensions described in RFC6067 and RFC6497, and Extension T for
449language/locale identifiers as described in the Unicode CLDR
450standard 21.0.2.")
451 (license (list lgpl3+ mpl2.0)))) ; dual license
452
97aee2b6
AE
453(define-public libexttextcat
454 (package
455 (name "libexttextcat")
ae443ec1 456 (version "3.4.5")
97aee2b6
AE
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
ae443ec1 463 "1j6sjwkyhqvsgyw938bxxfwkzzi1mahk66g5342lv6j89jfvrz8k"))))
97aee2b6 464 (build-system gnu-build-system)
57e7d748 465 (home-page "https://www.freedesktop.org/wiki/Software/libexttextcat/")
97aee2b6
AE
466 (synopsis "Text Categorization library")
467 (description "Libexttextcat is an N-Gram-Based Text Categorization
468library primarily intended for language guessing.")
469 (license (non-copyleft "file://LICENSE"
470 "See LICENSE in the distribution."))))
ef1c4148
AE
471
472(define-public libfreehand
473 (package
474 (name "libfreehand")
e9d8b887 475 (version "0.1.2")
ef1c4148
AE
476 (source
477 (origin
478 (method url-fetch)
479 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
480 name "-" version ".tar.xz"))
481 (sha256 (base32
e9d8b887 482 "1b1lvqh68rwij1yvmxy02hsmh7i74ma5767mk8mg5nx6chajshhf"))))
ef1c4148
AE
483 (build-system gnu-build-system)
484 (native-inputs
e9d8b887
MB
485 `(("cppunit" ,cppunit)
486 ("doxygen" ,doxygen)
ef1c4148
AE
487 ("gperf" ,gperf)
488 ("perl" ,perl)
489 ("pkg-config" ,pkg-config)))
e9d8b887
MB
490 (inputs
491 `(("icu4c" ,icu4c)
492 ("lcms" ,lcms)))
c5b5800b 493 (propagated-inputs ; in Requires or Requires.private field of .pkg
ef1c4148
AE
494 `(("librevenge" ,librevenge)
495 ("zlib" ,zlib)))
496 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libfreehand")
497 (synopsis "Library for parsing the FreeHand format")
498 (description "Libfreehand is a library that parses the file format of
499Aldus/Macromedia/Adobe FreeHand documents.")
500 (license mpl2.0)))
86e278fc
AE
501
502(define-public libmspub
503 (package
504 (name "libmspub")
9ed31fca 505 (version "0.1.4")
86e278fc
AE
506 (source
507 (origin
508 (method url-fetch)
9ed31fca 509 (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
86e278fc
AE
510 name "-" version ".tar.xz"))
511 (sha256 (base32
9ed31fca 512 "1fhkn013gzg59f4z7rldpbi0nj7lgdqzxanspsqa6axvmahw2dpg"))))
86e278fc
AE
513 (build-system gnu-build-system)
514 (native-inputs
515 `(("doxygen" ,doxygen)
516 ("pkg-config" ,pkg-config)))
e39cc723
AE
517 (propagated-inputs ; in Requires or Requires.private field of .pkg
518 `(("icu4c" ,icu4c)
86e278fc
AE
519 ("librevenge" ,librevenge)
520 ("zlib" ,zlib)))
e39cc723
AE
521 (inputs
522 `(("boost" ,boost)))
86e278fc
AE
523 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libmspub")
524 (synopsis "Library for parsing the Microsoft Publisher format")
525 (description "Libmspub is a library that parses the file format of
526Microsoft Publisher documents of all versions.")
527 (license mpl2.0)))
f5d4a138 528
aeba7d46
JB
529(define-public libnumbertext
530 (package
531 (name "libnumbertext")
8e9a84d9 532 (version "1.0.5")
aeba7d46
JB
533 (source
534 (origin
535 (method url-fetch)
8e9a84d9
TGR
536 (uri (string-append "https://github.com/Numbertext/libnumbertext/"
537 "releases/download/" version
538 "/libnumbertext-" version ".tar.xz"))
aeba7d46 539 (sha256
8e9a84d9 540 (base32 "1xzlwhwwhvr76kfdsw5gvfjfdayz803z65h331gv5dpc9imhijg1"))))
aeba7d46
JB
541 (build-system gnu-build-system)
542 (arguments
543 `(#:configure-flags '("--disable-static")))
aeba7d46
JB
544 (home-page "https://github.com/Numbertext/libnumbertext")
545 (synopsis "Language-neutral @code{NUMBERTEXT} and @code{MONEYTEXT} functions")
546 (description
547 "The libnumbertext library provides language-neutral @code{NUMBERTEXT}
548and @code{MONEYTEXT} functions for LibreOffice Calc, available for C++ and
549Java.")
550 (license (list lgpl3+ bsd-3))))
551
f5d4a138
AE
552(define-public libpagemaker
553 (package
554 (name "libpagemaker")
c7cc1fcb 555 (version "0.0.4")
f5d4a138
AE
556 (source
557 (origin
558 (method url-fetch)
cb4c99ce
TGR
559 (uri (string-append "https://dev-www.libreoffice.org/src/libpagemaker/"
560 "libpagemaker-" version ".tar.xz"))
f5d4a138 561 (sha256 (base32
c7cc1fcb 562 "17ai8ajffr0ixxmmcv3k5vgjlcsix38ldb4fw2arild70pbsrbb6"))))
f5d4a138 563 (build-system gnu-build-system)
66679ab9
MB
564 (arguments
565 `(#:configure-flags '("--disable-werror")))
f5d4a138
AE
566 (native-inputs
567 `(("doxygen" ,doxygen)
568 ("pkg-config" ,pkg-config)))
493b6e28 569 (propagated-inputs ; in Requires field of .pkg
86d648ea 570 `(("librevenge" ,librevenge)))
f5d4a138
AE
571 (inputs
572 `(("boost" ,boost)
f5d4a138 573 ("zlib" ,zlib)))
f5d4a138
AE
574 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libpagemaker")
575 (synopsis "Library for parsing the PageMaker format")
576 (description "Libpagemaker is a library that parses the file format of
577Aldus/Adobe PageMaker documents. Currently it only understands documents
578created by PageMaker version 6.x and 7.")
579 (license mpl2.0)))
56203284
AE
580
581(define-public libvisio
582 (package
583 (name "libvisio")
e25973e1 584 (version "0.1.7")
56203284
AE
585 (source
586 (origin
587 (method url-fetch)
9a4f6ceb
TGR
588 (uri (string-append "http://dev-www.libreoffice.org/src/libvisio/"
589 "libvisio-" version ".tar.xz"))
56203284 590 (sha256 (base32
e25973e1 591 "0k7adcbbf27l7n453cca1m6s9yj6qvb5j6bsg2db09ybf3w8vbwg"))))
56203284
AE
592 (build-system gnu-build-system)
593 (native-inputs
594 `(("cppunit" ,cppunit)
595 ("doxygen" ,doxygen)
596 ("gperf" ,gperf)
597 ("perl" ,perl)
598 ("pkg-config" ,pkg-config)))
a3be6b8b
AE
599 (propagated-inputs ; in Requires or Requires.private field of .pkg
600 `(("icu4c" ,icu4c)
56203284
AE
601 ("librevenge" ,librevenge)
602 ("libxml2" ,libxml2)))
a3be6b8b
AE
603 (inputs
604 `(("boost" ,boost)))
56203284
AE
605 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libvisio")
606 (synopsis "Library for parsing the Microsoft Visio format")
607 (description "Libvisio is a library that parses the file format of
608Microsoft Visio documents of all versions.")
609 (license mpl2.0)))
74a63b11
AE
610
611(define-public libodfgen
612 (package
613 (name "libodfgen")
cd4540ee 614 (version "0.1.7")
74a63b11
AE
615 (source
616 (origin
617 (method url-fetch)
9148ed7c
TGR
618 (uri (string-append "mirror://sourceforge/libwpd/libodfgen/"
619 "libodfgen-" version "/libodfgen-" version ".tar.xz"))
74a63b11 620 (sha256 (base32
cd4540ee 621 "0cdq48wlpp8m0qmndybv64r0m4vh0qsqx69cn6ms533cjlgljgij"))))
74a63b11
AE
622 (build-system gnu-build-system)
623 (native-inputs
624 `(("doxygen" ,doxygen)
625 ("pkg-config" ,pkg-config)))
3b5199b3
AE
626 (propagated-inputs ; in Requires field of .pkg
627 `(("librevenge" ,librevenge)))
74a63b11
AE
628 (inputs
629 `(("boost" ,boost)
74a63b11
AE
630 ("zlib" ,zlib)))
631 (arguments
632 ;; avoid triggering configure errors by simple inclusion of boost headers
633 `(#:configure-flags '("--disable-werror")))
3b3b60d0 634 (home-page "https://sourceforge.net/p/libwpd/wiki/libodfgen/")
74a63b11
AE
635 (synopsis "ODF (Open Document Format) library")
636 (description "Libodfgen is a library for generating documents in the
637Open Document Format (ODF). It provides generator implementations for all
638document interfaces supported by librevenge:
639text documents, vector drawings, presentations and spreadsheets.")
640 (license (list mpl2.0 lgpl2.1+)))) ; dual license
1d59b83b
AE
641
642(define-public libmwaw
643 (package
644 (name "libmwaw")
44aaf1e0 645 (version "0.3.15")
1d59b83b
AE
646 (source
647 (origin
648 (method url-fetch)
7b7abb07
TGR
649 (uri (string-append "mirror://sourceforge/libmwaw/libmwaw/libmwaw-"
650 version "/libmwaw-" version ".tar.xz"))
1d59b83b 651 (sha256 (base32
44aaf1e0 652 "1cdhm9yhanyv3w4vr73zhgyynmkhhkp3dyld7m11jd2yy04vnh04"))))
1d59b83b
AE
653 (build-system gnu-build-system)
654 (native-inputs
655 `(("doxygen" ,doxygen)
656 ("pkg-config" ,pkg-config)))
49c941b4 657 (propagated-inputs ; in Requires field of .pkg
b819182d 658 `(("librevenge" ,librevenge)))
1d59b83b
AE
659 (inputs
660 `(("boost" ,boost)
1d59b83b 661 ("zlib" ,zlib)))
3b3b60d0 662 (home-page "https://sourceforge.net/p/libmwaw/wiki/Home/")
1d59b83b
AE
663 (synopsis "Import library for some old Macintosh text documents")
664 (description "Libmwaw contains some import filters for old Macintosh
665text documents (MacWrite, ClarisWorks, ... ) and for some graphics and
666spreadsheet documents.")
49c941b4 667 (license (list mpl2.0 lgpl2.1+)))) ; dual license
22e52dbd
TD
668
669(define-public libstaroffice
670 (package
671 (name "libstaroffice")
c4419598 672 (version "0.0.6")
22e52dbd
TD
673 (source
674 (origin
675 (method url-fetch)
676 (uri (string-append "https://github.com/fosnola/libstaroffice/releases/download/"
677 version "/libstaroffice-" version ".tar.xz"))
678 (sha256 (base32
c4419598 679 "1i0ykl0c94lc1qzb5mbyf9jr7qw8p38ja424whmhgrllh7ny203b"))))
22e52dbd
TD
680 (build-system gnu-build-system)
681 (inputs
682 `(("librevenge" ,librevenge)
683 ("zlib" ,zlib)))
684 (native-inputs
685 `(("pkg-config" ,pkg-config)))
686 (home-page "https://github.com/fosnola/libstaroffice")
687 (synopsis "Provides LibreOffice support for old StarOffice documents")
688 (description "@code{libstaroffice} is an import filter for the document formats
689from the old StarOffice (.sdc, .sdw, ...).")
1d59b83b 690 (license (list mpl2.0 lgpl2.1+)))) ; dual license
82741a8a
AE
691
692(define-public libwps
693 (package
694 (name "libwps")
002d73a0 695 (version "0.4.10")
82741a8a
AE
696 (source
697 (origin
698 (method url-fetch)
699 (uri (string-append "mirror://sourceforge/" name "/" name "/"
de67e922 700 name "-" version "/" name "-" version ".tar.xz"))
82741a8a 701 (sha256 (base32
002d73a0 702 "1ji9zd4wxmas03g8jyx0ih0amrqfazm5874a2v9rd7va50sf088l"))))
82741a8a
AE
703 (build-system gnu-build-system)
704 (native-inputs
705 `(("doxygen" ,doxygen)
706 ("pkg-config" ,pkg-config)))
002d73a0 707 (propagated-inputs ; in Requires field of .pkg
baa941e6 708 `(("librevenge" ,librevenge)))
82741a8a
AE
709 (inputs
710 `(("boost" ,boost)
82741a8a 711 ("zlib" ,zlib)))
82741a8a
AE
712 (home-page "http://libwps.sourceforge.net/")
713 (synopsis "Import library for Microsoft Works text documents")
714 (description "Libwps is a library for importing files in the Microsoft
715Works word processor file format.")
002d73a0 716 (license (list mpl2.0 lgpl2.1+)))) ; dual license
2a9a9441 717
741916f1
TD
718(define-public libzmf
719 (package
720 (name "libzmf")
7cb3e9d3 721 (version "0.0.2")
741916f1
TD
722 (source
723 (origin
724 (method url-fetch)
725 (uri (string-append "http://dev-www.libreoffice.org/src/libzmf/libzmf-"
726 version ".tar.xz"))
727 (sha256 (base32
7cb3e9d3 728 "08mg5kmkjrmqrd8j5rkzw9vdqlvibhb1ynp6bmfxnzq5rcq1l197"))))
741916f1 729 (build-system gnu-build-system)
244a0d5a
LC
730 (arguments
731 ;; A harmless 'sign-compare' error pops up on i686 so disable '-Werror'.
732 '(#:configure-flags '("--disable-werror")))
741916f1
TD
733 (inputs
734 `(("boost" ,boost)
735 ("icu4c" ,icu4c)
736 ("libpng" ,libpng)
737 ("librevenge" ,librevenge)
738 ("zlib" ,zlib)))
739 (native-inputs
740 `(("cppunit" ,cppunit)
741 ("doxygen" ,doxygen)
742 ("pkg-config" ,pkg-config)))
743 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libzmf")
744 (synopsis "Parses file format of Zoner Callisto/Draw documents")
745 (description "Libzmf is a library that parses the file format of Zoner
746Callisto/Draw documents. Currently it only understands documents created by
747Zoner Draw version 4 and 5.")
748 (license mpl2.0)))
749
2a9a9441
AE
750(define-public hunspell
751 (package
752 (name "hunspell")
15ad9eb6 753 (version "1.7.0")
2a9a9441 754 (source
15ad9eb6
EF
755 (origin
756 (method git-fetch)
757 (uri (git-reference
758 (url "https://github.com/hunspell/hunspell")
759 (commit (string-append "v" version))))
760 (file-name (git-file-name name version))
761 (sha256
762 (base32
763 "0qxlkd012r45ppd21kldbq9k5ac5nmxz290z6m2kch9l56v768k1"))))
2a9a9441 764 (build-system gnu-build-system)
a40af5d0
TGR
765 (native-inputs
766 `(("autoconf" ,autoconf)
767 ("automake" ,automake)
768 ("libtool" ,libtool)))
17c2294c
TGR
769 (inputs
770 `(("perl" ,perl)))
31daf893
LC
771 (native-search-paths (list (search-path-specification
772 (variable "DICPATH")
773 (files '("share/hunspell")))))
fc3560ff 774 (home-page "https://hunspell.github.io/")
2a9a9441
AE
775 (synopsis "Spell checker")
776 (description "Hunspell is a spell checker and morphological analyzer
777library and program designed for languages with rich morphology and complex
778word compounding or character encoding.")
17c2294c 779 ;; Triple license, including "mpl1.1 or later".
2a9a9441 780 (license (list mpl1.1 gpl2+ lgpl2.1+))))
1c625dd3 781
4db733e7
LC
782(define (dicollecte-french-dictionary variant synopsis)
783 ;; Return a French dictionary package from dicollecte.org, for the given
784 ;; VARIANT.
785 (package
786 (name (match variant
787 ("classique" "hunspell-dict-fr")
788 (_ (string-append "hunspell-dict-fr-" variant))))
d4b8fa5d 789 (version "6.2")
4db733e7
LC
790 (source (origin
791 (uri (string-append
792 "http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v"
793 version ".zip"))
794 (method url-fetch)
795 (sha256
796 (base32
d4b8fa5d 797 "139hfrn5p87sl8hqmgkf6sgvnxrk2mm8vd8xsm8sm98qjnwlg0f9"))))
4db733e7
LC
798 (build-system trivial-build-system)
799 (native-inputs `(("unzip" ,unzip)))
800 (arguments
801 `(#:modules ((guix build utils))
802 #:builder (begin
803 (use-modules (guix build utils)
804 (srfi srfi-26))
805
806 (let* ((out (assoc-ref %outputs "out"))
807 (hunspell (string-append out "/share/hunspell"))
808 (myspell (string-append out "/share/myspell"))
809 (doc (string-append out "/share/doc/"
810 ,name))
811 (unzip (assoc-ref %build-inputs "unzip")))
e3cfef22
MW
812 (invoke (string-append unzip "/bin/unzip")
813 (assoc-ref %build-inputs "source"))
4db733e7
LC
814 (for-each (cut install-file <> hunspell)
815 (find-files "."
816 ,(string-append variant
817 "\\.(dic|aff)$")))
818 (mkdir-p myspell)
819 (symlink hunspell (string-append myspell "/dicts"))
820 (for-each (cut install-file <> doc)
821 (find-files "." "\\.(txt|org|md)$"))
822 #t))))
823 (synopsis synopsis)
824 (description
825 "This package provides a dictionary for the Hunspell spell-checking
826library.")
827 (home-page "https://www.dicollecte.org/home.php?prj=fr")
828 (license mpl2.0)))
829
830(define-syntax define-french-dictionary
831 (syntax-rules (synopsis)
832 ((_ name variant (synopsis text))
833 (define-public name
834 (dicollecte-french-dictionary variant text)))))
835
836(define-french-dictionary hunspell-dict-fr-classique
837 "classique"
838 ;; TRANSLATORS: In French, this is "Français classique".
839 (synopsis "Hunspell dictionary for ``classic'' French (recommended)"))
840
841(define-french-dictionary hunspell-dict-fr-moderne
842 "moderne"
843 ;; TRANSLATORS: In French, this is "Français moderne".
844 (synopsis "Hunspell dictionary for ``modern'' French"))
845
846(define-french-dictionary hunspell-dict-fr-réforme-1990
847 "reforme1990"
848 (synopsis "Hunspell dictionary for the post @dfn{1990 réforme} French"))
849
850(define-french-dictionary hunspell-dict-fr-toutes-variantes
851 "toutesvariantes"
852 (synopsis "Hunspell dictionary for all variants of French"))
853
1c625dd3
AE
854(define-public hyphen
855 (package
856 (name "hyphen")
857 (version "2.8.8")
858 (source
859 (origin
860 (method url-fetch)
de67e922
LF
861 (uri (string-append "mirror://sourceforge/hunspell/Hyphen/"
862 (version-major+minor version) "/"
1c625dd3
AE
863 name "-" version ".tar.gz"))
864 (sha256 (base32
865 "01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih"))))
866 (build-system gnu-build-system)
867 (inputs
868 `(("perl" ,perl)))
869 (home-page "http://hunspell.sourceforge.net/")
870 (synopsis "Hyphenation library")
871 (description "Hyphen is a hyphenation library using TeX hyphenation
872patterns, which are pre-processed by a perl script.")
873 ;; triple license, including "mpl1.1 or later"
874 (license (list mpl1.1 mpl2.0 gpl2+ lgpl2.1+))))
2320ea1a
AE
875
876(define-public mythes
877 (package
878 (name "mythes")
879 (version "1.2.4")
880 (source
881 (origin
882 (method url-fetch)
de67e922 883 (uri (string-append "mirror://sourceforge/hunspell/MyThes/" version "/"
2320ea1a
AE
884 name "-" version ".tar.gz"))
885 (sha256 (base32
886 "0prh19wy1c74kmzkkavm9qslk99gz8h8wmjvwzjc6lf8v2az708y"))))
887 (build-system gnu-build-system)
888 (native-inputs
889 `(("pkg-config" ,pkg-config)))
890 (inputs
891 `(("hunspell" ,hunspell)
892 ("perl" ,perl)))
893 (home-page "http://hunspell.sourceforge.net/")
894 (synopsis "Thesaurus")
895 (description "MyThes is a simple thesaurus that uses a structured text
896data file and an index file with binary search to look up words and phrases
e881752c 897and to return information on pronunciations, meanings and synonyms.")
2320ea1a
AE
898 (license (non-copyleft "file://COPYING"
899 "See COPYING in the distribution."))))
16c62e1f 900
4e4dcd47
RW
901(define-public libqxp
902 (package
903 (name "libqxp")
4290b265 904 (version "0.0.2")
4e4dcd47
RW
905 (source (origin
906 (method url-fetch)
907 (uri (string-append "https://dev-www.libreoffice.org/src/libqxp/"
908 "libqxp-" version ".tar.xz"))
909 (sha256
910 (base32
4290b265 911 "0p4lb84m05wqd8qr8ni9sp80ivlm83ffn0nxiv4m42hj22qvcdz1"))))
4e4dcd47
RW
912 (build-system gnu-build-system)
913 (inputs
914 `(("boost" ,boost)
915 ("icu4c" ,icu4c)
916 ("zlib" ,zlib)))
917 (native-inputs
918 `(("cppunit" ,cppunit)
919 ("pkg-config" ,pkg-config)))
920 (propagated-inputs
921 `(("librevenge" ,librevenge))) ; mentioned in Requires field
922 (home-page "https://www.libreoffice.org")
923 (synopsis "Library and tools for the QuarkXPress file format")
924 (description "libqxp is a library and a set of tools for reading and
925converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
926 (license mpl2.0)))
927
16c62e1f
AE
928(define-public libreoffice
929 (package
930 (name "libreoffice")
d0ef3a00 931 (version "6.3.4.2")
16c62e1f
AE
932 (source
933 (origin
52b0a352
JB
934 (method url-fetch)
935 (uri
16c62e1f 936 (string-append
52b0a352
JB
937 "https://download.documentfoundation.org/libreoffice/src/"
938 (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
939 (sha256
940 (base32
d0ef3a00 941 "1774vmf3lr5x24ikpn1z5vqcdwrhiwfkjy7sx09jqkvpm6d5awnb"))
e0efda95
EF
942 (patches (search-patches "libreoffice-icu.patch"
943 "libreoffice-glm.patch"))
143fc1a5
MB
944 (modules '((guix build utils)))
945 (snippet
946 '(begin
947 (for-each (lambda (file)
948 ;; Adjust to renamed function in Poppler 0.72.
949 (substitute* file (("getCString") "c_str")))
950 (find-files "sdext/source/pdfimport/xpdfwrapper"))
951 #t))))
994bccd9 952 (build-system glib-or-gtk-build-system)
16c62e1f 953 (native-inputs
b4c9a317 954 `(("bison" ,bison)
7f81f8bc 955 ("cppunit" ,cppunit)
16c62e1f
AE
956 ("flex" ,flex)
957 ("pkg-config" ,pkg-config)
5bf83422 958 ("python" ,python-wrapper)
16c62e1f
AE
959 ("which" ,which)))
960 (inputs
961 `(("bluez" ,bluez)
962 ("boost" ,boost)
963 ("clucene" ,clucene)
964 ("cups" ,cups)
965 ("dbus-glib" ,dbus-glib)
966 ("fontconfig" ,fontconfig)
e0efda95 967 ("fontforge" ,fontforge)
16c62e1f
AE
968 ("gconf" ,gconf)
969 ("glew" ,glew)
970 ("glm" ,glm)
4e64eca4
EF
971 ("gnupg" ,gnupg)
972 ("gobject-introspection" ,gobject-introspection)
16c62e1f 973 ("gperf" ,gperf)
b4c9a317 974 ("gpgme" ,gpgme)
16c62e1f
AE
975 ("graphite2" ,graphite2)
976 ("gst-plugins-base" ,gst-plugins-base)
074ff555 977 ("gtk+" ,gtk+)
16c62e1f
AE
978 ("harfbuzz" ,harfbuzz)
979 ("hunspell" ,hunspell)
980 ("hyphen" ,hyphen)
981 ("libabw" ,libabw)
982 ("libcdr" ,libcdr)
983 ("libcmis" ,libcmis)
b4c9a317 984 ("libjpeg-turbo" ,libjpeg-turbo)
16c62e1f 985 ("libe-book" ,libe-book)
54179e24 986 ("libepubgen" ,libepubgen)
16c62e1f
AE
987 ("libetonyek" ,libetonyek)
988 ("libexttextcat" ,libexttextcat)
989 ("libfreehand" ,libfreehand)
17e56dac 990 ("liblangtag" ,liblangtag)
b4c9a317
MB
991 ;; XXX: Perhaps this should be propagated from xmlsec.
992 ("libltdl" ,libltdl)
16c62e1f
AE
993 ("libmspub" ,libmspub)
994 ("libmwaw" ,libmwaw)
52b0a352 995 ("libnumbertext" ,libnumbertext)
16c62e1f
AE
996 ("libodfgen" ,libodfgen)
997 ("libpagemaker" ,libpagemaker)
54179e24 998 ("libqxp" ,libqxp)
b1a8fd2d 999 ("libstaroffice" ,libstaroffice)
16c62e1f
AE
1000 ("libvisio" ,libvisio)
1001 ("libwpg" ,libwpg)
1002 ("libwps" ,libwps)
1003 ("libxrandr" ,libxrandr)
1004 ("libxrender" ,libxrender)
1005 ("libxslt" ,libxslt)
1006 ("libxt" ,libxt)
b1a8fd2d 1007 ("libzmf" ,libzmf)
16c62e1f 1008 ("lpsolve" ,lpsolve)
2c9d3416 1009 ("mariadb" ,mariadb "dev")
16c62e1f
AE
1010 ("mdds" ,mdds)
1011 ("mythes" ,mythes)
1012 ("neon" ,neon)
1013 ("nspr" ,nspr)
1014 ("nss" ,nss)
1015 ("openldap" ,openldap)
1016 ("openssl" ,openssl)
1017 ("orcus" ,orcus)
1018 ("perl" ,perl)
b6f024ad 1019 ("perl-archive-zip" ,perl-archive-zip)
16c62e1f
AE
1020 ("poppler" ,poppler)
1021 ("postgresql" ,postgresql)
1022 ("python" ,python)
52b0a352 1023 ("python-lxml" ,python-lxml)
16c62e1f 1024 ("redland" ,redland)
4c928743 1025 ("sane-backends" ,sane-backends)
16c62e1f
AE
1026 ("unixodbc" ,unixodbc)
1027 ("unzip" ,unzip)
1028 ("vigra" ,vigra)
afb986e7 1029 ("xdg-utils" ,xdg-utils)
b4c9a317 1030 ("xmlsec" ,xmlsec-nss)
16c62e1f
AE
1031 ("zip" ,zip)))
1032 (arguments
ebc81631 1033 `(#:tests? #f ; Building the tests already fails.
16c62e1f
AE
1034 #:make-flags '("build-nocheck") ; Do not build unit tests, which fails.
1035 #:phases
1036 (modify-phases %standard-phases
1037 (add-before 'configure 'prepare-src
1038 (lambda* (#:key inputs #:allow-other-keys)
54179e24 1039 (substitute*
16c62e1f
AE
1040 (list "sysui/CustomTarget_share.mk"
1041 "solenv/gbuild/gbuild.mk"
b1a8fd2d 1042 "solenv/gbuild/platform/unxgcc.mk")
54179e24
RW
1043 (("/bin/sh") (which "sh")))
1044
1045 ;; GPGME++ headers are installed in a gpgme++ subdirectory, but
1046 ;; files in "xmlsecurity/source/gpg/" and elsewhere expect to
1047 ;; find them on the include path without a prefix.
1048 (substitute* '("xmlsecurity/Library_xsec_xmlsec.mk"
1049 "comphelper/Library_comphelper.mk")
1050 (("\\$\\$\\(INCLUDE\\)")
1051 (string-append "$$(INCLUDE) -I"
1052 (assoc-ref inputs "gpgme")
1053 "/include/gpgme++")))
1054
afb986e7
CM
1055 ;; /usr/bin/xdg-open doesn't exist on Guix System.
1056 (substitute* '("shell/source/unix/exec/shellexec.cxx"
1057 "shell/source/unix/misc/senddoc.sh")
1058 (("/usr/bin/xdg-open")
1059 (string-append (assoc-ref inputs "xdg-utils")
1060 "/bin/xdg-open")))
1061
54179e24 1062 #t))
3bfa7af4 1063 (add-after 'install 'bin-and-desktop-install
cb72d343
AK
1064 ;; Create 'soffice' and 'libreoffice' symlinks to the executable
1065 ;; script.
16c62e1f 1066 (lambda* (#:key outputs #:allow-other-keys)
3bfa7af4
AW
1067 (let ((out (assoc-ref outputs "out")))
1068 (define (symlink-output src dst)
1069 (mkdir-p (dirname (string-append out dst)))
1070 (symlink (string-append out src) (string-append out dst)))
1071 (define (install src dst)
1072 (let ((dst (string-append out dst)))
1073 (mkdir-p (dirname dst))
1074 (copy-file src dst)))
1075 (define (install-desktop-file app)
1076 (let ((src (string-append "/lib/libreoffice/share/xdg/"
1077 app ".desktop"))
1078 (dst (string-append "/share/applications/libreoffice-"
1079 app ".desktop")))
1080 (substitute* (string-append out src)
1081 (("Exec=libreoffice[0-9]+\\.[0-9]+ ")
1082 (string-append "Exec=" out "/bin/libreoffice "))
17e56dac
TD
1083 (("Icon=libreoffice.*")
1084 (string-append "Icon=" app "\n"))
3bfa7af4
AW
1085 (("LibreOffice [0-9]+\\.[0-9]+")
1086 "LibreOffice"))
17e56dac
TD
1087 (symlink-output src dst)))
1088 (define (install-appdata app)
1089 (install-file (string-append
3bfa7af4
AW
1090 "sysui/desktop/appstream-appdata/"
1091 "libreoffice-" app ".appdata.xml")
17e56dac 1092 (string-append out "/share/appdata")))
3bfa7af4
AW
1093 (symlink-output "/lib/libreoffice/program/soffice"
1094 "/bin/soffice")
1095 (symlink-output "/lib/libreoffice/program/soffice"
1096 "/bin/libreoffice")
1097 (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.keys"
1098 "/share/mime-info/libreoffice.keys")
1099 (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.mime"
1100 "/share/mime-info/libreoffice.mime")
1101 (install
1102 "workdir/CustomTarget/sysui/share/libreoffice/openoffice.org.xml"
1103 "/share/mime/packages/libreoffice.xml")
1104 (for-each install-desktop-file
17e56dac
TD
1105 '("base" "calc" "draw" "impress" "writer"
1106 "math" "startcenter"))
1107 (for-each install-appdata
3bfa7af4 1108 '("base" "calc" "draw" "impress" "writer"))
17e56dac 1109 (mkdir-p (string-append out "/share/icons/hicolor"))
3bfa7af4 1110 (copy-recursively "sysui/desktop/icons/hicolor"
17e56dac 1111 (string-append out "/share/icons/hicolor")))
16c62e1f
AE
1112 #t)))
1113 #:configure-flags
1114 (list
1115 "--enable-release-build"
cddc044c
EB
1116 ;; Avoid using all cpu cores by default
1117 (format #f "--with-parallelism=~d" (parallel-job-count))
16c62e1f
AE
1118 "--disable-fetch-external" ; disable downloads
1119 "--with-system-libs" ; enable all --with-system-* flags
1120 (string-append "--with-boost-libdir="
1121 (assoc-ref %build-inputs "boost") "/lib")
c91d3fb7
EB
1122 ;; Avoid undefined symbols required by boost::spirit
1123 "LDFLAGS=-lboost_system"
16c62e1f
AE
1124 ;; Avoid a dependency on ucpp.
1125 "--with-idlc-cpp=cpp"
1126 ;; The fonts require an external tarball (crosextrafonts).
1127 ;; They should not be needed when system fonts are available.
1128 "--without-fonts"
1129 ;; With java, the build fails since sac.jar is missing.
1130 "--without-java"
1131 ;; FIXME: Enable once the corresponding inputs are packaged.
16c62e1f
AE
1132 "--disable-coinmp"
1133 "--disable-firebird-sdbc" ; embedded firebird
b4c9a317
MB
1134 ;; XXX: PDFium support requires fetching an external tarball and
1135 ;; patching the build scripts to work with GCC5. Try enabling this
1136 ;; when our default compiler is >=GCC 6.
1137 "--disable-pdfium"
42ca84be 1138 "--disable-gtk" ; disable use of GTK+ 2
e0efda95
EF
1139 "--without-doxygen"
1140 "--enable-build-opensymbol")))
16c62e1f
AE
1141 (home-page "https://www.libreoffice.org/")
1142 (synopsis "Office suite")
1143 (description "LibreOffice is a comprehensive office suite. It contains
1144a number of components: Writer, a word processor; Calc, a spreadsheet
1145application; Impress, a presentation engine; Draw, a drawing and
1146flowcharting application; Base, a database and database frontend;
1147Math for editing mathematics.")
1148 (license mpl2.0)))