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