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