1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
3 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2016, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
6 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
7 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
9 ;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
10 ;;; Copyright © 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
11 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
12 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
13 ;;; Copyright © 2018, 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
14 ;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
15 ;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages libreoffice)
33 #:use-module (guix build-system glib-or-gtk)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system python)
36 #:use-module (guix build-system trivial)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (guix packages)
41 #:use-module (guix utils)
42 #:use-module (ice-9 match)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages aidc)
45 #:use-module (gnu packages aspell)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bison)
49 #:use-module (gnu packages boost)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages compression)
52 #:use-module (gnu packages cups)
53 #:use-module (gnu packages curl)
54 #:use-module (gnu packages cyrus-sasl)
55 #:use-module (gnu packages databases)
56 #:use-module (gnu packages documentation)
57 #:use-module (gnu packages flex)
58 #:use-module (gnu packages fontutils)
59 #:use-module (gnu packages freedesktop)
60 #:use-module (gnu packages ghostscript)
61 #:use-module (gnu packages gl)
62 #:use-module (gnu packages glib)
63 #:use-module (gnu packages gnome)
64 #:use-module (gnu packages gperf)
65 #:use-module (gnu packages gnupg)
66 #:use-module (gnu packages gstreamer)
67 #:use-module (gnu packages gtk)
68 #:use-module (gnu packages icu4c)
69 #:use-module (gnu packages image)
70 #:use-module (gnu packages java)
71 #:use-module (gnu packages linux)
72 #:use-module (gnu packages logging)
73 #:use-module (gnu packages maths)
74 #:use-module (gnu packages nss)
75 #:use-module (gnu packages openldap)
76 #:use-module (gnu packages pdf)
77 #:use-module (gnu packages perl)
78 #:use-module (gnu packages perl-compression)
79 #:use-module (gnu packages pkg-config)
80 #:use-module (gnu packages python)
81 #:use-module (gnu packages rdf)
82 #:use-module (gnu packages scanner)
83 #:use-module (gnu packages tls)
84 #:use-module (gnu packages version-control)
85 #:use-module (gnu packages xml)
86 #:use-module (gnu packages xorg))
95 (uri (string-append "http://kohei.us/files/ixion/src/libixion-"
99 "1rmrl2zjzi4z0abf2cd54acypkccdhx2065dlyzy6xg83gv0mxmi"))))
100 (build-system gnu-build-system)
102 `(("pkg-config" ,pkg-config)))
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
110 expressions stored in multiple named targets, or \"cells\". The cells can
111 be referenced from each other, and the library takes care of resolving
112 their dependencies automatically upon calculation.")
113 (license license:mpl2.0)))
122 (uri (string-append "http://kohei.us/files/orcus/src/lib"
123 "orcus-" version ".tar.xz"))
126 "14gbnqsv5n2fm4sxa17014f440clrzls6p2w2ixk9wipg4950v9s"))))
127 (build-system gnu-build-system)
129 `(("pkg-config" ,pkg-config)))
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
138 file processing filters. It is currently focused on providing filters for
139 spreadsheet documents. The library includes import filters for
140 Microsoft Excel 2007 XML, Microsoft Excel 2003 XML, Open Document Spreadsheet,
141 Plain Text, Gnumeric XML, Generic XML. It also includes low-level parsers for
143 (license license:mpl2.0)))
145 (define-public unoconv
152 (uri (pypi-uri "unoconv" version))
154 (base32 "0cb0bvyxib3xrj0jdgizhp6p057lr8kqnd3n921rin37ivcvz3ih"))))
155 (build-system python-build-system)
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>.
163 (substitute* "unoconv"
164 (("sys.argv\\[0\\]\\.split\\('2'\\)")
165 "os.path.basename(sys.argv[0]).split('2')"))
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)
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', "
186 `(("libreoffice" ,libreoffice)))
187 (home-page "http://dag.wiee.rs/home-made/unoconv/")
188 (synopsis "Convert between any document format supported by LibreOffice")
190 "Unoconv is a command-line utility to convert documents from any format
191 that LibreOffice can import, to any format it can export. It can be used for
192 batch processing and can apply custom style templates and filters.
194 Unoconv converts between over a hundred formats, including Open Document
195 Format (@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}).
199 All required fonts must be installed on the converting system.")
200 (license license:gpl2)))
202 (define-public librevenge
209 (uri (string-append "mirror://sourceforge/libwpd/librevenge/librevenge-"
210 version "/librevenge-" version ".tar.xz"))
212 "1cj76cz4mqcy2mgv9l5xlc95bypyk8zbq0ls9cswqrs2y0lhfgwk"))))
213 (build-system gnu-build-system)
215 `(("cppunit" ,cppunit)
217 ("pkg-config" ,pkg-config)))
220 (propagated-inputs ; Referenced by .la files
223 ;; avoid triggering configure errors by simple inclusion of boost headers
224 `(#:configure-flags '("--disable-werror"
225 ;; Avoid undefined library references
226 "LDFLAGS=-lboost_system")))
227 (home-page "https://sourceforge.net/p/libwpd/wiki/librevenge/")
228 (synopsis "Document importer for office suites")
229 (description "Librevenge is a base library for writing document import
230 filters. It has interfaces for text documents, vector graphics,
231 spreadsheets and presentations.")
232 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
234 (define-public libwpd
241 (uri (string-append "mirror://sourceforge/libwpd/libwpd/"
242 "libwpd-" version "/libwpd-" version ".tar.xz"))
244 "02fx8bngslcj7i5g1gx2kiign4vp09wrmp5wpvix9igxcavb0r94"))))
245 (build-system gnu-build-system)
247 `(#:configure-flags '("--disable-werror")))
249 `(("doxygen" ,doxygen)
250 ("pkg-config" ,pkg-config)))
252 `(("librevenge" ,librevenge))) ; in Requires field of .pkg
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
258 WordPerfect documents. It is most commonly used to import such documents
259 into other word processors.")
260 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
262 (define-public libe-book
269 (uri (string-append "mirror://sourceforge/libebook/libe-book-"
270 version "/libe-book-" version ".tar.xz"))
273 "1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by"))))
274 (build-system gnu-build-system)
276 `(("cppunit" ,cppunit)
278 ("pkg-config" ,pkg-config)))
279 (propagated-inputs ; in Requires or Requires.private field of .pkg
281 ("liblangtag" ,liblangtag)
282 ("librevenge" ,librevenge)
283 ("libxml2" ,libxml2)))
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
292 converting various reflowable e-book formats. Currently supported are:
293 Broad Band eBook, eReader .pdb, FictionBook v. 2 (including zipped files),
294 PalmDoc Ebook, Plucker .pdb, QiOO (mobile format, for java-enabled
295 cellphones), TCR (simple compressed text format), TealDoc, zTXT,
296 ZVR (simple compressed text format).")
297 (license license:mpl2.0)))
299 (define-public libepubgen
306 (uri (string-append "mirror://sourceforge/libepubgen/libepubgen-"
307 version "/libepubgen-" version ".tar.xz"))
310 "1b8mc9zzrqypj1v9zdy3ybc48pw0rfr06cyi7n6grvybjjwq9q03"))))
311 (build-system gnu-build-system)
313 `(("cppunit" ,cppunit)
314 ("pkg-config" ,pkg-config)))
316 `(("libxml2" ,libxml2)
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
323 librevenge's text document interface and--currently in a very limited
324 way--presentation and vector drawing interfaces.")
325 (license license:mpl2.0)))
327 (define-public libwpg
334 (uri (string-append "mirror://sourceforge/libwpg/libwpg/"
335 "libwpg-" version "/libwpg-" version ".tar.xz"))
337 "074x159immf139szkswv2zapnq75p7xk10dbha2p9193hgwggcwr"))))
338 (build-system gnu-build-system)
340 `(("doxygen" ,doxygen)
341 ("pkg-config" ,pkg-config)))
343 `(("libwpd" ,libwpd))) ; in Requires field of .pkg
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
350 working with graphics in the WPG (WordPerfect Graphics) format.")
351 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
353 (define-public libcmis
360 (uri (string-append "https://github.com/tdf/libcmis/releases/download/v"
361 version "/libcmis-" version ".tar.xz"))
364 "18h0a2gsfxvlv03nlcfvw9bzsflq5sin9agq6za103hr0ab8vcfp"))))
365 (build-system gnu-build-system)
367 `(("cppunit" ,cppunit)
368 ("pkg-config" ,pkg-config)))
369 (propagated-inputs ; in Requires field of .pkg
371 ("libxml2" ,libxml2)))
374 ("cyrus-sasl" ,cyrus-sasl)
375 ("openssl" ,openssl)))
379 ;; FIXME: Man pages generation requires docbook-to-man; reenable
380 ;; it once this is available.
382 ;; XXX: A configure test fails with GCC7 when including Boost headers.
384 ;; During configure, the boost headers are found, but linking
385 ;; fails without the following flag.
386 (string-append "--with-boost="
387 (assoc-ref %build-inputs "boost")))))
388 (home-page "https://github.com/tdf/libcmis")
389 (synopsis "CMIS client library")
390 (description "LibCMIS is a C++ client library for the CMIS interface. It
391 allows C++ applications to connect to any ECM behaving as a CMIS server such
392 as Alfresco or Nuxeo.")
394 (list license:mpl1.1 license:gpl2+ license:lgpl2.1+)))) ; triple license
396 (define-public libabw
403 (uri (string-append "https://dev-www.libreoffice.org/src/libabw/"
404 "libabw-" version ".tar.xz"))
406 "1vbfrmnvib3cym0yyyabnd8xpx4f7wp20vnn09s6dln347fajqz7"))))
407 (build-system gnu-build-system)
409 `(("doxygen" ,doxygen)
412 ("pkg-config" ,pkg-config)))
413 (propagated-inputs ; in Requires or Requires.private field of .pkg
414 `(("librevenge" ,librevenge)
415 ("libxml2" ,libxml2)))
418 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libabw")
419 (synopsis "Library for parsing the AbiWord format")
420 (description "Libabw is a library that parses the file format of
422 (license license:mpl2.0)))
424 (define-public libcdr
431 (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
432 name "-" version ".tar.xz"))
434 "0qgqlw6i25zfq1gf7f6r5hrhawlrgh92sg238kjpf2839aq01k81"))))
435 (build-system gnu-build-system)
437 `(("cppunit" ,cppunit)
439 ("pkg-config" ,pkg-config)))
440 (propagated-inputs ; in Requires or Requires.private field of .pkg
443 ("librevenge" ,librevenge)
447 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libcdr")
448 (synopsis "Library for parsing the CorelDRAW format")
449 (description "Libcdr is a library that parses the file format of
450 CorelDRAW documents of all versions.")
451 (license license:mpl2.0)))
453 (define-public libetonyek
460 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
461 name "-" version ".tar.xz"))
463 "0jhsbdimiyijdqriy0zzkjjgc4wi6fjimhdg4mdybrlwg7l7f5p6"))))
464 (build-system gnu-build-system)
466 `(#:configure-flags '("--with-mdds=1.5")))
468 `(("cppunit" ,cppunit)
471 ("pkg-config" ,pkg-config)))
472 (propagated-inputs ; in Requires or Requires.private field of .pkg
473 `(("liblangtag" ,liblangtag)
474 ("librevenge" ,librevenge)
481 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek")
482 (synopsis "Library for parsing the Apple Keynote format")
483 (description "Libetonyek is a library that parses the file format of
484 Apple Keynote documents. It currently supports Keynote versions 2 to 5.")
485 (license license:mpl2.0)))
487 (define-public liblangtag
494 (uri (string-append "https://bitbucket.org/tagoh/liblangtag/downloads/"
495 "liblangtag-" version ".tar.bz2"))
497 (base32 "1g9kwxx60q0hpwvs66ys1cb9qg54hfvbivadwli8sfpc085a44hz"))))
498 (build-system gnu-build-system)
500 `(("libtool" ,libtool)
501 ("pkg-config" ,pkg-config)))
503 `(("libxml2" ,libxml2)))
504 (home-page "https://bitbucket.org/tagoh/liblangtag")
505 (synopsis "Library to access tags for identifying languages")
506 (description "Liblangtag implements an interface to work with tags
507 for identifying languages as described in RFC 5646. It supports the
508 extensions described in RFC6067 and RFC6497, and Extension T for
509 language/locale identifiers as described in the Unicode CLDR
511 (license (list license:lgpl3+ license:mpl2.0)))) ; dual license
513 (define-public libexttextcat
515 (name "libexttextcat")
520 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
521 name "-" version ".tar.xz"))
523 "1j6sjwkyhqvsgyw938bxxfwkzzi1mahk66g5342lv6j89jfvrz8k"))))
524 (build-system gnu-build-system)
525 (home-page "https://www.freedesktop.org/wiki/Software/libexttextcat/")
526 (synopsis "Text Categorization library")
527 (description "Libexttextcat is an N-Gram-Based Text Categorization
528 library primarily intended for language guessing.")
529 (license (license:non-copyleft "file://LICENSE"
530 "See LICENSE in the distribution."))))
532 (define-public libfreehand
539 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
540 name "-" version ".tar.xz"))
542 "1b1lvqh68rwij1yvmxy02hsmh7i74ma5767mk8mg5nx6chajshhf"))))
543 (build-system gnu-build-system)
545 '(#:phases (modify-phases %standard-phases
546 (add-before 'build 'adjust-for-ICU-65
548 ;; Fix build with ICU 65 and later. Taken from this
549 ;; upstream commit, remove for libfreehand > 0.1.2:
550 ;; https://gerrit.libreoffice.org/#/c/80224/
551 (substitute* "src/lib/libfreehand_utils.cpp"
553 (string-append all ";\n")))
556 `(("cppunit" ,cppunit)
560 ("pkg-config" ,pkg-config)))
564 (propagated-inputs ; in Requires or Requires.private field of .pkg
565 `(("librevenge" ,librevenge)
567 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libfreehand")
568 (synopsis "Library for parsing the FreeHand format")
569 (description "Libfreehand is a library that parses the file format of
570 Aldus/Macromedia/Adobe FreeHand documents.")
571 (license license:mpl2.0)))
573 (define-public libmspub
580 (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
581 name "-" version ".tar.xz"))
583 "1fhkn013gzg59f4z7rldpbi0nj7lgdqzxanspsqa6axvmahw2dpg"))))
584 (build-system gnu-build-system)
586 `(("doxygen" ,doxygen)
587 ("pkg-config" ,pkg-config)))
588 (propagated-inputs ; in Requires or Requires.private field of .pkg
590 ("librevenge" ,librevenge)
594 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libmspub")
595 (synopsis "Library for parsing the Microsoft Publisher format")
596 (description "Libmspub is a library that parses the file format of
597 Microsoft Publisher documents of all versions.")
598 (license license:mpl2.0)))
600 (define-public libnumbertext
602 (name "libnumbertext")
607 (uri (string-append "https://github.com/Numbertext/libnumbertext/"
608 "releases/download/" version
609 "/libnumbertext-" version ".tar.xz"))
611 (base32 "1z31idnmd9iv6ra5dcsn7q70wv32clk2sqc5bbhimqcsp2f29f0p"))))
612 (build-system gnu-build-system)
614 `(#:configure-flags '("--disable-static")))
615 (home-page "https://github.com/Numbertext/libnumbertext")
616 (synopsis "Language-neutral @code{NUMBERTEXT} and @code{MONEYTEXT} functions")
618 "The libnumbertext library provides language-neutral @code{NUMBERTEXT}
619 and @code{MONEYTEXT} functions for LibreOffice Calc, available for C++ and
621 (license (list license:lgpl3+ license:bsd-3))))
623 (define-public libpagemaker
625 (name "libpagemaker")
630 (uri (string-append "https://dev-www.libreoffice.org/src/libpagemaker/"
631 "libpagemaker-" version ".tar.xz"))
633 "17ai8ajffr0ixxmmcv3k5vgjlcsix38ldb4fw2arild70pbsrbb6"))))
634 (build-system gnu-build-system)
636 `(#:configure-flags '("--disable-werror")))
638 `(("doxygen" ,doxygen)
639 ("pkg-config" ,pkg-config)))
640 (propagated-inputs ; in Requires field of .pkg
641 `(("librevenge" ,librevenge)))
645 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libpagemaker")
646 (synopsis "Library for parsing the PageMaker format")
647 (description "Libpagemaker is a library that parses the file format of
648 Aldus/Adobe PageMaker documents. Currently it only understands documents
649 created by PageMaker version 6.x and 7.")
650 (license license:mpl2.0)))
652 (define-public libvisio
659 (uri (string-append "http://dev-www.libreoffice.org/src/libvisio/"
660 "libvisio-" version ".tar.xz"))
662 "0k7adcbbf27l7n453cca1m6s9yj6qvb5j6bsg2db09ybf3w8vbwg"))))
663 (build-system gnu-build-system)
665 `(("cppunit" ,cppunit)
669 ("pkg-config" ,pkg-config)))
670 (propagated-inputs ; in Requires or Requires.private field of .pkg
672 ("librevenge" ,librevenge)
673 ("libxml2" ,libxml2)))
676 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libvisio")
677 (synopsis "Library for parsing the Microsoft Visio format")
678 (description "Libvisio is a library that parses the file format of
679 Microsoft Visio documents of all versions.")
680 (license license:mpl2.0)))
682 (define-public libodfgen
689 (uri (string-append "mirror://sourceforge/libwpd/libodfgen/"
690 "libodfgen-" version "/libodfgen-" version ".tar.xz"))
692 "0986c5gw4vdfz7bcmpdfz07inba5wxsx4f6xvndknqj6zlkh082m"))))
693 (build-system gnu-build-system)
695 `(("doxygen" ,doxygen)
696 ("pkg-config" ,pkg-config)))
697 (propagated-inputs ; in Requires field of .pkg
698 `(("librevenge" ,librevenge)))
704 ;; Avoid triggering configure errors by simple inclusion of Boost headers.
705 `(#:configure-flags '("--disable-werror")))
706 (home-page "https://sourceforge.net/p/libwpd/wiki/libodfgen/")
707 (synopsis "ODF (Open Document Format) library")
708 (description "Libodfgen is a library for generating documents in the
709 Open Document Format (ODF). It provides generator implementations for all
710 document interfaces supported by librevenge:
711 text documents, vector drawings, presentations and spreadsheets.")
712 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
714 (define-public libmwaw
721 (uri (string-append "mirror://sourceforge/libmwaw/libmwaw/libmwaw-"
722 version "/libmwaw-" version ".tar.xz"))
724 (base32 "03qyxp8hkcc7jcwyq0v0y2diqsvib060pg7y9zk0n07qh0b0apgw"))))
725 (build-system gnu-build-system)
727 `(("doxygen" ,doxygen)
728 ("pkg-config" ,pkg-config)))
729 (propagated-inputs ; in Requires field of .pc file
730 `(("librevenge" ,librevenge)))
734 (home-page "https://sourceforge.net/p/libmwaw/wiki/Home/")
735 (synopsis "Import library for some old Macintosh text documents")
736 (description "Libmwaw contains some import filters for old Macintosh
737 text documents (MacWrite, ClarisWorks, ... ) and for some graphics and
738 spreadsheet documents.")
739 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
741 (define-public libstaroffice
743 (name "libstaroffice")
748 (uri (string-append "https://github.com/fosnola/libstaroffice/releases/download/"
749 version "/libstaroffice-" version ".tar.xz"))
751 "1ny8411273k2bq7mnpmcvri3rd46b2j67wfypqkp3y8nhanv0kzr"))))
752 (build-system gnu-build-system)
754 `(("librevenge" ,librevenge)
757 `(("pkg-config" ,pkg-config)))
758 (home-page "https://github.com/fosnola/libstaroffice")
759 (synopsis "Provides LibreOffice support for old StarOffice documents")
760 (description "@code{libstaroffice} is an import filter for the document formats
761 from the old StarOffice (.sdc, .sdw, ...).")
762 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
764 (define-public libwps
771 (uri (string-append "mirror://sourceforge/" name "/" name "/"
772 name "-" version "/" name "-" version ".tar.xz"))
774 "1nsfacqp5sfkyayw7q0wp68lidksd1wjdix8qmsbf0vdl19gn6p2"))))
775 (build-system gnu-build-system)
777 `(("doxygen" ,doxygen)
778 ("pkg-config" ,pkg-config)))
779 (propagated-inputs ; in Requires field of .pkg
780 `(("librevenge" ,librevenge)))
784 (home-page "http://libwps.sourceforge.net/")
785 (synopsis "Import library for Microsoft Works text documents")
786 (description "Libwps is a library for importing files in the Microsoft
787 Works word processor file format.")
788 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
790 (define-public libzmf
797 (uri (string-append "http://dev-www.libreoffice.org/src/libzmf/libzmf-"
800 "08mg5kmkjrmqrd8j5rkzw9vdqlvibhb1ynp6bmfxnzq5rcq1l197"))))
801 (build-system gnu-build-system)
803 ;; A harmless 'sign-compare' error pops up on i686 so disable '-Werror'.
804 '(#:configure-flags '("--disable-werror")))
809 ("librevenge" ,librevenge)
812 `(("cppunit" ,cppunit)
814 ("pkg-config" ,pkg-config)))
815 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libzmf")
816 (synopsis "Parses file format of Zoner Callisto/Draw documents")
817 (description "Libzmf is a library that parses the file format of Zoner
818 Callisto/Draw documents. Currently it only understands documents created by
819 Zoner Draw version 4 and 5.")
820 (license license:mpl2.0)))
822 (define-public hunspell
830 (url "https://github.com/hunspell/hunspell")
831 (commit (string-append "v" version))))
832 (file-name (git-file-name name version))
835 "0qxlkd012r45ppd21kldbq9k5ac5nmxz290z6m2kch9l56v768k1"))))
836 (build-system gnu-build-system)
838 `(("autoconf" ,autoconf)
839 ("automake" ,automake)
840 ("libtool" ,libtool)))
843 (native-search-paths (list (search-path-specification
845 (files '("share/hunspell")))))
846 (home-page "https://hunspell.github.io/")
847 (synopsis "Spell checker")
848 (description "Hunspell is a spell checker and morphological analyzer
849 library and program designed for languages with rich morphology and complex
850 word compounding or character encoding.")
851 ;; Triple license, including "mpl1.1 or later".
852 (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))))
854 (define (dicollecte-french-dictionary variant synopsis)
855 ;; Return a French dictionary package from dicollecte.org, for the given
859 ("classique" "hunspell-dict-fr")
860 (_ (string-append "hunspell-dict-fr-" variant))))
864 "http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v"
869 "139hfrn5p87sl8hqmgkf6sgvnxrk2mm8vd8xsm8sm98qjnwlg0f9"))))
870 (build-system trivial-build-system)
871 (native-inputs `(("unzip" ,unzip)))
873 `(#:modules ((guix build utils))
875 (use-modules (guix build utils)
878 (let* ((out (assoc-ref %outputs "out"))
879 (hunspell (string-append out "/share/hunspell"))
880 (myspell (string-append out "/share/myspell"))
881 (doc (string-append out "/share/doc/"
883 (unzip (assoc-ref %build-inputs "unzip")))
884 (invoke (string-append unzip "/bin/unzip")
885 (assoc-ref %build-inputs "source"))
886 (for-each (cut install-file <> hunspell)
888 ,(string-append variant
891 (symlink hunspell (string-append myspell "/dicts"))
892 (for-each (cut install-file <> doc)
893 (find-files "." "\\.(txt|org|md)$"))
897 "This package provides a dictionary for the Hunspell spell-checking
899 (home-page "https://www.dicollecte.org/home.php?prj=fr")
900 (license license:mpl2.0)))
902 (define-syntax define-french-dictionary
903 (syntax-rules (synopsis)
904 ((_ name variant (synopsis text))
906 (dicollecte-french-dictionary variant text)))))
908 (define-french-dictionary hunspell-dict-fr-classique
910 ;; TRANSLATORS: In French, this is "Français classique".
911 (synopsis "Hunspell dictionary for ``classic'' French (recommended)"))
913 (define-french-dictionary hunspell-dict-fr-moderne
915 ;; TRANSLATORS: In French, this is "Français moderne".
916 (synopsis "Hunspell dictionary for ``modern'' French"))
918 (define-french-dictionary hunspell-dict-fr-réforme-1990
920 (synopsis "Hunspell dictionary for the post @dfn{1990 réforme} French"))
922 (define-french-dictionary hunspell-dict-fr-toutes-variantes
924 (synopsis "Hunspell dictionary for all variants of French"))
926 (define-public hunspell-dict-pl
928 (name "hunspell-dict-pl")
933 ;; Since creators of dictionary host only the latest daily release,
934 ;; we're using version mirrored by Arch Linux, which seems good
935 ;; enough. They're mirroring hunspell-pl releases since 2011.
936 (uri (string-append "https://sources.archlinux.org/other/community/"
937 "hunspell-pl/sjp-myspell-pl-"
940 "14mzf8glxkp2775dcqisb1zv6r8ncm3bvzl46q352rwyl2dg1c59"))))
942 (build-system trivial-build-system)
943 (native-inputs `(("unzip" ,unzip)))
945 `(#:modules ((guix build utils))
947 (use-modules (guix build utils)
950 (let* ((out (assoc-ref %outputs "out"))
951 (hunspell (string-append out "/share/hunspell"))
952 (myspell (string-append out "/share/myspell"))
953 (doc (string-append out "/share/doc/"
955 (unzip (string-append (assoc-ref %build-inputs "unzip")
957 (invoke unzip "-j" "-o" (assoc-ref %build-inputs "source"))
958 (invoke unzip "-j" "-o" "pl_PL.zip")
959 (for-each (cut install-file <> hunspell)
961 ,(string-append "pl_PL"
964 (symlink hunspell (string-append myspell "/dicts"))
965 (for-each (cut install-file <> doc)
966 (find-files "." "\\.(txt|org|md)$"))
968 (synopsis "Hunspell dictionary for Polish")
970 "This package provides a dictionary for the Hunspell spell-checking
972 (home-page "https://sjp.pl/slownik/ort/")
974 (list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))
976 (define-public hunspell-dict-de
978 (name "hunspell-dict-de")
983 (uri (string-append "https://www.j3e.de/ispell/igerman98/dict/"
984 "igerman98-" version ".tar.bz2"))
986 (base32 "1a3055hp2bc4q4nlg3gmg0147p3a1zlfnc65xiv2v9pyql1nya8p"))))
987 (build-system gnu-build-system)
989 `(#:make-flags '("hunspell/de_DE.dic")
991 (modify-phases %standard-phases
993 (replace 'install ;no install target
994 (lambda* (#:key outputs #:allow-other-keys)
995 (let* ((out (assoc-ref outputs "out"))
996 (share (string-append out "/share/hunspell/")))
997 (install-file "hunspell/de_DE.aff" share)
998 (install-file "hunspell/de_DE.dic" share)
1000 #:tests? #f)) ; no tests
1002 `(("hunspell" ,hunspell)
1005 (synopsis "Hunspell dictionary for German (de_DE)")
1006 (description "This package provides a dictionary for the Hunspell
1007 spell-checking library.")
1008 (home-page "https://www.j3e.de/ispell/igerman98/")
1009 (license (list license:gpl2 license:gpl3))))
1011 (define-public hyphen
1018 (uri (string-append "mirror://sourceforge/hunspell/Hyphen/"
1019 (version-major+minor version) "/"
1020 name "-" version ".tar.gz"))
1022 "01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih"))))
1023 (build-system gnu-build-system)
1026 (home-page "http://hunspell.sourceforge.net/")
1027 (synopsis "Hyphenation library")
1028 (description "Hyphen is a hyphenation library using TeX hyphenation
1029 patterns, which are pre-processed by a perl script.")
1030 ;; Triple license, including "mpl1.1 or later".
1032 (list license:mpl1.1 license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
1034 (define-public mythes
1041 (uri (string-append "mirror://sourceforge/hunspell/MyThes/" version "/"
1042 name "-" version ".tar.gz"))
1044 "0prh19wy1c74kmzkkavm9qslk99gz8h8wmjvwzjc6lf8v2az708y"))))
1045 (build-system gnu-build-system)
1047 `(("pkg-config" ,pkg-config)))
1049 `(("hunspell" ,hunspell)
1051 (home-page "http://hunspell.sourceforge.net/")
1052 (synopsis "Thesaurus")
1053 (description "MyThes is a simple thesaurus that uses a structured text
1054 data file and an index file with binary search to look up words and phrases
1055 and to return information on pronunciations, meanings and synonyms.")
1056 (license (license:non-copyleft "file://COPYING"
1057 "See COPYING in the distribution."))))
1059 (define-public libqxp
1065 (uri (string-append "https://dev-www.libreoffice.org/src/libqxp/"
1066 "libqxp-" version ".tar.xz"))
1069 "0p4lb84m05wqd8qr8ni9sp80ivlm83ffn0nxiv4m42hj22qvcdz1"))))
1070 (build-system gnu-build-system)
1076 `(("cppunit" ,cppunit)
1077 ("pkg-config" ,pkg-config)))
1079 `(("librevenge" ,librevenge))) ; mentioned in Requires field
1080 (home-page "https://www.libreoffice.org")
1081 (synopsis "Library and tools for the QuarkXPress file format")
1082 (description "libqxp is a library and a set of tools for reading and
1083 converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
1084 (license license:mpl2.0)))
1086 (define-public libreoffice
1088 (name "libreoffice")
1095 "https://download.documentfoundation.org/libreoffice/src/"
1096 (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
1098 (base32 "0i3654rmzs8aazj8j3dmxamilslfrki0y4sksg3n1zygc2ddfk83"))))
1099 (build-system glib-or-gtk-build-system)
1102 ("cppunit" ,cppunit)
1104 ("pkg-config" ,pkg-config)
1105 ("python" ,python-wrapper)
1107 ("ziptime" ,ziptime)))
1111 ("clucene" ,clucene)
1113 ("dbus-glib" ,dbus-glib)
1114 ("firebird" ,firebird)
1115 ("fontconfig" ,fontconfig)
1116 ("fontforge" ,fontforge)
1121 ("gobject-introspection" ,gobject-introspection)
1124 ("graphite2" ,graphite2)
1125 ("gst-plugins-base" ,gst-plugins-base)
1127 ("harfbuzz" ,harfbuzz)
1128 ("hunspell" ,hunspell)
1132 ("libcmis" ,libcmis)
1133 ("libjpeg-turbo" ,libjpeg-turbo)
1134 ("libe-book" ,libe-book)
1135 ("libepubgen" ,libepubgen)
1136 ("libetonyek" ,libetonyek)
1137 ("libexttextcat" ,libexttextcat)
1138 ("libfreehand" ,libfreehand)
1139 ("liblangtag" ,liblangtag)
1140 ;; XXX: Perhaps this should be propagated from xmlsec.
1141 ("libltdl" ,libltdl)
1142 ("libmspub" ,libmspub)
1143 ("libmwaw" ,libmwaw)
1144 ("libnumbertext" ,libnumbertext)
1145 ("libodfgen" ,libodfgen)
1146 ("libpagemaker" ,libpagemaker)
1148 ("libstaroffice" ,libstaroffice)
1149 ("libvisio" ,libvisio)
1152 ("libxrandr" ,libxrandr)
1153 ("libxrender" ,libxrender)
1154 ("libxslt" ,libxslt)
1157 ("lpsolve" ,lpsolve)
1158 ("mariadb" ,mariadb "dev")
1164 ("openldap" ,openldap)
1165 ("openssl" ,openssl)
1168 ("perl-archive-zip" ,perl-archive-zip)
1169 ("poppler" ,poppler)
1170 ("postgresql" ,postgresql)
1172 ("python-lxml" ,python-lxml)
1173 ("qrcodegen-cpp" ,qrcodegen-cpp)
1174 ("redland" ,redland)
1175 ("sane-backends" ,sane-backends)
1176 ("unixodbc" ,unixodbc)
1179 ("xdg-utils" ,xdg-utils)
1180 ("xmlsec" ,xmlsec-nss)
1183 `(#:tests? #f ; Building the tests already fails.
1184 #:make-flags '("build-nocheck") ; Do not build unit tests, which fails.
1186 (modify-phases %standard-phases
1187 (add-before 'configure 'prepare-src
1188 (lambda* (#:key inputs #:allow-other-keys)
1190 (list "sysui/CustomTarget_share.mk"
1191 "solenv/gbuild/gbuild.mk"
1192 "solenv/gbuild/platform/unxgcc.mk")
1193 (("/bin/sh") (which "sh")))
1195 ;; Use store references for strictly necessary commands,
1196 ;; but not for optional tools like ‘gdb’ and ‘valgrind’.
1197 (for-each (lambda (command)
1198 (substitute* "desktop/scripts/soffice.sh"
1199 (((format #f"~a " command))
1200 (format #f "~a " (which command)))))
1201 (list "dirname" "grep" "uname"))
1203 ;; GPGME++ headers are installed in a gpgme++ subdirectory, but
1204 ;; files in "xmlsecurity/source/gpg/" and elsewhere expect to
1205 ;; find them on the include path without a prefix.
1206 (substitute* '("xmlsecurity/Library_xsec_xmlsec.mk"
1207 "comphelper/Library_comphelper.mk")
1208 (("\\$\\$\\(INCLUDE\\)")
1209 (string-append "$$(INCLUDE) -I"
1210 (assoc-ref inputs "gpgme")
1211 "/include/gpgme++")))
1213 ;; /usr/bin/xdg-open doesn't exist on Guix System.
1214 (substitute* '("shell/source/unix/exec/shellexec.cxx"
1215 "shell/source/unix/misc/senddoc.sh")
1216 (("/usr/bin/xdg-open")
1217 (string-append (assoc-ref inputs "xdg-utils")
1221 (add-after 'install 'reset-zip-timestamps
1222 (lambda* (#:key outputs #:allow-other-keys)
1223 (let ((out (assoc-ref outputs "out")))
1224 (for-each (lambda (file)
1225 (invoke "ziptime" file))
1226 ;; So many different extensions for .zip files.
1227 (find-files out "\\.(bau|dat|otp|ott|zip)$")))))
1228 (add-after 'install 'bin-and-desktop-install
1229 ;; Create 'soffice' and 'libreoffice' symlinks to the executable
1231 (lambda* (#:key outputs #:allow-other-keys)
1232 (let ((out (assoc-ref outputs "out")))
1233 (define (symlink-output src dst)
1234 (mkdir-p (dirname (string-append out dst)))
1235 (symlink (string-append out src) (string-append out dst)))
1236 (define (install src dst)
1237 (let ((dst (string-append out dst)))
1238 (mkdir-p (dirname dst))
1239 (copy-file src dst)))
1240 (define (install-desktop-file app)
1241 (let ((src (string-append "/lib/libreoffice/share/xdg/"
1243 (dst (string-append "/share/applications/libreoffice-"
1245 (substitute* (string-append out src)
1246 (("Exec=libreoffice[0-9]+\\.[0-9]+ ")
1247 (string-append "Exec=" out "/bin/libreoffice "))
1248 (("Icon=libreoffice.*")
1249 (string-append "Icon=" app "\n"))
1250 (("LibreOffice [0-9]+\\.[0-9]+")
1252 (symlink-output src dst)))
1253 (define (install-appdata app)
1254 (install-file (string-append
1255 "sysui/desktop/appstream-appdata/"
1256 "libreoffice-" app ".appdata.xml")
1257 (string-append out "/share/appdata")))
1258 (symlink-output "/lib/libreoffice/program/soffice"
1260 (symlink-output "/lib/libreoffice/program/soffice"
1262 (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.keys"
1263 "/share/mime-info/libreoffice.keys")
1264 (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.mime"
1265 "/share/mime-info/libreoffice.mime")
1267 "workdir/CustomTarget/sysui/share/libreoffice/openoffice.org.xml"
1268 "/share/mime/packages/libreoffice.xml")
1269 (for-each install-desktop-file
1270 '("base" "calc" "draw" "impress" "writer"
1271 "math" "startcenter"))
1272 (for-each install-appdata
1273 '("base" "calc" "draw" "impress" "writer"))
1274 (mkdir-p (string-append out "/share/icons/hicolor"))
1275 (copy-recursively "sysui/desktop/icons/hicolor"
1276 (string-append out "/share/icons/hicolor")))
1280 "--enable-release-build"
1281 ;; Avoid using all cpu cores by default
1282 (format #f "--with-parallelism=~d" (parallel-job-count))
1283 "--disable-fetch-external" ; disable downloads
1284 "--with-system-libs" ; enable all --with-system-* flags
1285 (string-append "--with-boost-libdir="
1286 (assoc-ref %build-inputs "boost") "/lib")
1287 ;; Avoid undefined symbols required by boost::spirit
1288 "LDFLAGS=-lboost_system"
1289 ;; Avoid a dependency on ucpp.
1290 "--with-idlc-cpp=cpp"
1291 ;; The fonts require an external tarball (crosextrafonts).
1292 ;; They should not be needed when system fonts are available.
1294 ;; With java, the build fails since sac.jar is missing.
1296 ;; FIXME: Enable once the corresponding inputs are packaged.
1298 ;; This could (Debian does this) be a separate output containing only
1299 ;; program/libfirebird_sdbclo.so, if there's a way to point to it.
1300 "--enable-firebird-sdbc"
1301 ;; XXX: PDFium support requires fetching an external tarball and
1302 ;; patching the build scripts to work with GCC5. Try enabling this
1303 ;; when our default compiler is >=GCC 6.
1306 "--enable-build-opensymbol")))
1307 (home-page "https://www.libreoffice.org/")
1308 (synopsis "Office suite")
1309 (description "LibreOffice is a comprehensive office suite. It contains
1310 a number of components: Writer, a word processor; Calc, a spreadsheet
1311 application; Impress, a presentation engine; Draw, a drawing and
1312 flowcharting application; Base, a database and database frontend;
1313 Math for editing mathematics.")
1314 (license license:mpl2.0)))