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