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 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, 2018, 2019, 2020 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 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 autotools)
46 #:use-module (gnu packages base)
47 #:use-module (gnu packages bison)
48 #:use-module (gnu packages boost)
49 #:use-module (gnu packages check)
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages cups)
52 #:use-module (gnu packages curl)
53 #:use-module (gnu packages cyrus-sasl)
54 #:use-module (gnu packages databases)
55 #:use-module (gnu packages documentation)
56 #:use-module (gnu packages flex)
57 #:use-module (gnu packages fontutils)
58 #:use-module (gnu packages freedesktop)
59 #:use-module (gnu packages ghostscript)
60 #:use-module (gnu packages gl)
61 #:use-module (gnu packages glib)
62 #:use-module (gnu packages gnome)
63 #:use-module (gnu packages gperf)
64 #:use-module (gnu packages gnupg)
65 #:use-module (gnu packages gstreamer)
66 #:use-module (gnu packages gtk)
67 #:use-module (gnu packages icu4c)
68 #:use-module (gnu packages image)
69 #:use-module (gnu packages java)
70 #:use-module (gnu packages linux)
71 #:use-module (gnu packages logging)
72 #:use-module (gnu packages maths)
73 #:use-module (gnu packages nss)
74 #:use-module (gnu packages openldap)
75 #:use-module (gnu packages pdf)
76 #:use-module (gnu packages perl)
77 #:use-module (gnu packages perl-compression)
78 #:use-module (gnu packages pkg-config)
79 #:use-module (gnu packages python)
80 #:use-module (gnu packages rdf)
81 #:use-module (gnu packages scanner)
82 #:use-module (gnu packages tls)
83 #:use-module (gnu packages version-control)
84 #:use-module (gnu packages xml)
85 #:use-module (gnu packages xorg))
94 (uri (string-append "http://kohei.us/files/ixion/src/libixion-"
98 "1rmrl2zjzi4z0abf2cd54acypkccdhx2065dlyzy6xg83gv0mxmi"))))
99 (build-system gnu-build-system)
101 `(("pkg-config" ,pkg-config)))
106 (home-page "https://gitlab.com/ixion/ixion")
107 (synopsis "General purpose formula parser and interpreter")
108 (description "Ixion is a library for calculating the results of formula
109 expressions stored in multiple named targets, or \"cells\". The cells can
110 be referenced from each other, and the library takes care of resolving
111 their dependencies automatically upon calculation.")
112 (license license:mpl2.0)))
121 (uri (string-append "http://kohei.us/files/orcus/src/lib"
122 "orcus-" version ".tar.xz"))
125 "14gbnqsv5n2fm4sxa17014f440clrzls6p2w2ixk9wipg4950v9s"))))
126 (build-system gnu-build-system)
128 `(("pkg-config" ,pkg-config)))
134 (home-page "https://gitlab.com/orcus/orcus")
135 (synopsis "File import filter library for spreadsheet documents")
136 (description "Orcus is a library that provides a collection of standalone
137 file processing filters. It is currently focused on providing filters for
138 spreadsheet documents. The library includes import filters for
139 Microsoft Excel 2007 XML, Microsoft Excel 2003 XML, Open Document Spreadsheet,
140 Plain Text, Gnumeric XML, Generic XML. It also includes low-level parsers for
142 (license license:mpl2.0)))
144 (define-public unoconv
151 (uri (pypi-uri "unoconv" version))
153 (base32 "0cb0bvyxib3xrj0jdgizhp6p057lr8kqnd3n921rin37ivcvz3ih"))))
154 (build-system python-build-system)
157 (modify-phases %standard-phases
158 (add-after 'unpack 'stop-hash-sniffing
159 ;; Fixes <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39647#11>.
160 ;; Submitted upsteam: <https://github.com/unoconv/unoconv/pull/531>.
162 (substitute* "unoconv"
163 (("sys.argv\\[0\\]\\.split\\('2'\\)")
164 "os.path.basename(sys.argv[0]).split('2')"))
166 (add-after 'unpack 'patch-find_offices
167 ;; find_offices is a convoluted cross-platform treasure hunt.
168 ;; Keep things simple and return the correct paths immediately.
169 (lambda* (#:key inputs #:allow-other-keys)
170 (let* ((libreoffice (assoc-ref inputs "libreoffice")))
171 (substitute* "unoconv"
172 (("def find_offices\\(\\):" match)
176 "'" libreoffice "/lib/libreoffice', "
177 "'" libreoffice "/lib/libreoffice/program', "
178 "'" libreoffice "/lib/libreoffice/program', "
179 "'" libreoffice "/lib/libreoffice/program/pyuno.so', "
180 "'" libreoffice "/bin/soffice', "
185 `(("libreoffice" ,libreoffice)))
186 (home-page "http://dag.wiee.rs/home-made/unoconv/")
187 (synopsis "Convert between any document format supported by LibreOffice")
189 "Unoconv is a command-line utility to convert documents from any format
190 that LibreOffice can import, to any format it can export. It can be used for
191 batch processing and can apply custom style templates and filters.
193 Unoconv converts between over a hundred formats, including Open Document
194 Format (@file{.odt}, @file{.ods}, @file{.odp})), Portable Document Format
195 (@file{.pdf}), HTML and XHTML, RTF, DocBook (@file{.xml}), @file{.doc} and
196 @file{.docx}), @file{.xls} and @file{.xlsx}).
198 All required fonts must be installed on the converting system.")
199 (license license:gpl2)))
201 (define-public librevenge
208 (uri (string-append "mirror://sourceforge/libwpd/librevenge/librevenge-"
209 version "/librevenge-" version ".tar.xz"))
211 "1cj76cz4mqcy2mgv9l5xlc95bypyk8zbq0ls9cswqrs2y0lhfgwk"))))
212 (build-system gnu-build-system)
214 `(("cppunit" ,cppunit)
216 ("pkg-config" ,pkg-config)))
219 (propagated-inputs ; Referenced by .la files
222 ;; avoid triggering configure errors by simple inclusion of boost headers
223 `(#:configure-flags '("--disable-werror"
224 ;; Avoid undefined library references
225 "LDFLAGS=-lboost_system")))
226 (home-page "https://sourceforge.net/p/libwpd/wiki/librevenge/")
227 (synopsis "Document importer for office suites")
228 (description "Librevenge is a base library for writing document import
229 filters. It has interfaces for text documents, vector graphics,
230 spreadsheets and presentations.")
231 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
233 (define-public libwpd
240 (uri (string-append "mirror://sourceforge/libwpd/libwpd/"
241 "libwpd-" version "/libwpd-" version ".tar.xz"))
243 "02fx8bngslcj7i5g1gx2kiign4vp09wrmp5wpvix9igxcavb0r94"))))
244 (build-system gnu-build-system)
246 `(#:configure-flags '("--disable-werror")))
248 `(("doxygen" ,doxygen)
249 ("pkg-config" ,pkg-config)))
251 `(("librevenge" ,librevenge))) ; in Requires field of .pkg
254 (home-page "http://libwpd.sourceforge.net/")
255 (synopsis "Library for importing WordPerfect documents")
256 (description "Libwpd is a C++ library designed to help process
257 WordPerfect documents. It is most commonly used to import such documents
258 into other word processors.")
259 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
261 (define-public libe-book
268 (uri (string-append "mirror://sourceforge/libebook/libe-book-"
269 version "/libe-book-" version ".tar.xz"))
272 "1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by"))))
273 (build-system gnu-build-system)
275 `(("cppunit" ,cppunit)
277 ("pkg-config" ,pkg-config)))
278 (propagated-inputs ; in Requires or Requires.private field of .pkg
280 ("liblangtag" ,liblangtag)
281 ("librevenge" ,librevenge)
282 ("libxml2" ,libxml2)))
286 ;; avoid triggering configure errors by simple inclusion of boost headers
287 `(#:configure-flags '("--disable-werror")))
288 (home-page "http://libebook.sourceforge.net")
289 (synopsis "Library for import of reflowable e-book formats")
290 (description "Libe-book is a library and a set of tools for reading and
291 converting various reflowable e-book formats. Currently supported are:
292 Broad Band eBook, eReader .pdb, FictionBook v. 2 (including zipped files),
293 PalmDoc Ebook, Plucker .pdb, QiOO (mobile format, for java-enabled
294 cellphones), TCR (simple compressed text format), TealDoc, zTXT,
295 ZVR (simple compressed text format).")
296 (license license:mpl2.0)))
298 (define-public libepubgen
305 (uri (string-append "mirror://sourceforge/libepubgen/libepubgen-"
306 version "/libepubgen-" version ".tar.xz"))
309 "1b8mc9zzrqypj1v9zdy3ybc48pw0rfr06cyi7n6grvybjjwq9q03"))))
310 (build-system gnu-build-system)
312 `(("cppunit" ,cppunit)
313 ("pkg-config" ,pkg-config)))
315 `(("libxml2" ,libxml2)
317 (propagated-inputs ; in Requires field of .pkg
318 `(("librevenge" ,librevenge)))
319 (home-page "https://sourceforge.net/projects/libepubgen/")
320 (synopsis "EPUB generator library for librevenge")
321 (description "libepubgen is an EPUB generator for librevenge. It supports
322 librevenge's text document interface and--currently in a very limited
323 way--presentation and vector drawing interfaces.")
324 (license license:mpl2.0)))
326 (define-public libwpg
333 (uri (string-append "mirror://sourceforge/libwpg/libwpg/"
334 "libwpg-" version "/libwpg-" version ".tar.xz"))
336 "074x159immf139szkswv2zapnq75p7xk10dbha2p9193hgwggcwr"))))
337 (build-system gnu-build-system)
339 `(("doxygen" ,doxygen)
340 ("pkg-config" ,pkg-config)))
342 `(("libwpd" ,libwpd))) ; in Requires field of .pkg
346 (home-page "http://libwpg.sourceforge.net/")
347 (synopsis "Library and tools for the WordPerfect Graphics format")
348 (description "The libwpg project provides a library and tools for
349 working with graphics in the WPG (WordPerfect Graphics) format.")
350 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
352 (define-public libcmis
359 (uri (string-append "https://github.com/tdf/libcmis/releases/download/v"
360 version "/libcmis-" version ".tar.xz"))
363 "18h0a2gsfxvlv03nlcfvw9bzsflq5sin9agq6za103hr0ab8vcfp"))))
364 (build-system gnu-build-system)
366 `(("cppunit" ,cppunit)
367 ("pkg-config" ,pkg-config)))
368 (propagated-inputs ; in Requires field of .pkg
370 ("libxml2" ,libxml2)))
373 ("cyrus-sasl" ,cyrus-sasl)
374 ("openssl" ,openssl)))
378 ;; FIXME: Man pages generation requires docbook-to-man; reenable
379 ;; it once this is available.
381 ;; XXX: A configure test fails with GCC7 when including Boost headers.
383 ;; During configure, the boost headers are found, but linking
384 ;; fails without the following flag.
385 (string-append "--with-boost="
386 (assoc-ref %build-inputs "boost")))))
387 (home-page "https://github.com/tdf/libcmis")
388 (synopsis "CMIS client library")
389 (description "LibCMIS is a C++ client library for the CMIS interface. It
390 allows C++ applications to connect to any ECM behaving as a CMIS server such
391 as Alfresco or Nuxeo.")
393 (list license:mpl1.1 license:gpl2+ license:lgpl2.1+)))) ; triple license
395 (define-public libabw
402 (uri (string-append "https://dev-www.libreoffice.org/src/libabw/"
403 "libabw-" version ".tar.xz"))
405 "1vbfrmnvib3cym0yyyabnd8xpx4f7wp20vnn09s6dln347fajqz7"))))
406 (build-system gnu-build-system)
408 `(("doxygen" ,doxygen)
411 ("pkg-config" ,pkg-config)))
412 (propagated-inputs ; in Requires or Requires.private field of .pkg
413 `(("librevenge" ,librevenge)
414 ("libxml2" ,libxml2)))
417 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libabw")
418 (synopsis "Library for parsing the AbiWord format")
419 (description "Libabw is a library that parses the file format of
421 (license license:mpl2.0)))
423 (define-public libcdr
430 (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
431 name "-" version ".tar.xz"))
433 "0qgqlw6i25zfq1gf7f6r5hrhawlrgh92sg238kjpf2839aq01k81"))))
434 (build-system gnu-build-system)
436 `(("cppunit" ,cppunit)
438 ("pkg-config" ,pkg-config)))
439 (propagated-inputs ; in Requires or Requires.private field of .pkg
442 ("librevenge" ,librevenge)
446 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libcdr")
447 (synopsis "Library for parsing the CorelDRAW format")
448 (description "Libcdr is a library that parses the file format of
449 CorelDRAW documents of all versions.")
450 (license license:mpl2.0)))
452 (define-public libetonyek
459 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
460 name "-" version ".tar.xz"))
462 "0jhsbdimiyijdqriy0zzkjjgc4wi6fjimhdg4mdybrlwg7l7f5p6"))))
463 (build-system gnu-build-system)
465 `(#:configure-flags '("--with-mdds=1.5")))
467 `(("cppunit" ,cppunit)
470 ("pkg-config" ,pkg-config)))
471 (propagated-inputs ; in Requires or Requires.private field of .pkg
472 `(("liblangtag" ,liblangtag)
473 ("librevenge" ,librevenge)
480 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek")
481 (synopsis "Library for parsing the Apple Keynote format")
482 (description "Libetonyek is a library that parses the file format of
483 Apple Keynote documents. It currently supports Keynote versions 2 to 5.")
484 (license license:mpl2.0)))
486 (define-public liblangtag
493 (uri (string-append "https://bitbucket.org/tagoh/liblangtag/downloads/"
494 "liblangtag-" version ".tar.bz2"))
496 (base32 "1g9kwxx60q0hpwvs66ys1cb9qg54hfvbivadwli8sfpc085a44hz"))))
497 (build-system gnu-build-system)
499 `(("libtool" ,libtool)
500 ("pkg-config" ,pkg-config)))
502 `(("libxml2" ,libxml2)))
503 (home-page "https://bitbucket.org/tagoh/liblangtag")
504 (synopsis "Library to access tags for identifying languages")
505 (description "Liblangtag implements an interface to work with tags
506 for identifying languages as described in RFC 5646. It supports the
507 extensions described in RFC6067 and RFC6497, and Extension T for
508 language/locale identifiers as described in the Unicode CLDR
510 (license (list license:lgpl3+ license:mpl2.0)))) ; dual license
512 (define-public libexttextcat
514 (name "libexttextcat")
519 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
520 name "-" version ".tar.xz"))
522 "1j6sjwkyhqvsgyw938bxxfwkzzi1mahk66g5342lv6j89jfvrz8k"))))
523 (build-system gnu-build-system)
524 (home-page "https://www.freedesktop.org/wiki/Software/libexttextcat/")
525 (synopsis "Text Categorization library")
526 (description "Libexttextcat is an N-Gram-Based Text Categorization
527 library primarily intended for language guessing.")
528 (license (license:non-copyleft "file://LICENSE"
529 "See LICENSE in the distribution."))))
531 (define-public libfreehand
538 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
539 name "-" version ".tar.xz"))
541 "1b1lvqh68rwij1yvmxy02hsmh7i74ma5767mk8mg5nx6chajshhf"))))
542 (build-system gnu-build-system)
544 '(#:phases (modify-phases %standard-phases
545 (add-before 'build 'adjust-for-ICU-65
547 ;; Fix build with ICU 65 and later. Taken from this
548 ;; upstream commit, remove for libfreehand > 0.1.2:
549 ;; https://gerrit.libreoffice.org/#/c/80224/
550 (substitute* "src/lib/libfreehand_utils.cpp"
552 (string-append all ";\n")))
555 `(("cppunit" ,cppunit)
559 ("pkg-config" ,pkg-config)))
563 (propagated-inputs ; in Requires or Requires.private field of .pkg
564 `(("librevenge" ,librevenge)
566 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libfreehand")
567 (synopsis "Library for parsing the FreeHand format")
568 (description "Libfreehand is a library that parses the file format of
569 Aldus/Macromedia/Adobe FreeHand documents.")
570 (license license:mpl2.0)))
572 (define-public libmspub
579 (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
580 name "-" version ".tar.xz"))
582 "1fhkn013gzg59f4z7rldpbi0nj7lgdqzxanspsqa6axvmahw2dpg"))))
583 (build-system gnu-build-system)
585 `(("doxygen" ,doxygen)
586 ("pkg-config" ,pkg-config)))
587 (propagated-inputs ; in Requires or Requires.private field of .pkg
589 ("librevenge" ,librevenge)
593 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libmspub")
594 (synopsis "Library for parsing the Microsoft Publisher format")
595 (description "Libmspub is a library that parses the file format of
596 Microsoft Publisher documents of all versions.")
597 (license license:mpl2.0)))
599 (define-public libnumbertext
601 (name "libnumbertext")
606 (uri (string-append "https://github.com/Numbertext/libnumbertext/"
607 "releases/download/" version
608 "/libnumbertext-" version ".tar.xz"))
610 (base32 "0mxf22gpbr818ib4av17zmyx6i6nf4br5qlxq0qvfz5z6h5j57vk"))))
611 (build-system gnu-build-system)
613 `(#:configure-flags '("--disable-static")))
614 (home-page "https://github.com/Numbertext/libnumbertext")
615 (synopsis "Language-neutral @code{NUMBERTEXT} and @code{MONEYTEXT} functions")
617 "The libnumbertext library provides language-neutral @code{NUMBERTEXT}
618 and @code{MONEYTEXT} functions for LibreOffice Calc, available for C++ and
620 (license (list license:lgpl3+ license:bsd-3))))
622 (define-public libpagemaker
624 (name "libpagemaker")
629 (uri (string-append "https://dev-www.libreoffice.org/src/libpagemaker/"
630 "libpagemaker-" version ".tar.xz"))
632 "17ai8ajffr0ixxmmcv3k5vgjlcsix38ldb4fw2arild70pbsrbb6"))))
633 (build-system gnu-build-system)
635 `(#:configure-flags '("--disable-werror")))
637 `(("doxygen" ,doxygen)
638 ("pkg-config" ,pkg-config)))
639 (propagated-inputs ; in Requires field of .pkg
640 `(("librevenge" ,librevenge)))
644 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libpagemaker")
645 (synopsis "Library for parsing the PageMaker format")
646 (description "Libpagemaker is a library that parses the file format of
647 Aldus/Adobe PageMaker documents. Currently it only understands documents
648 created by PageMaker version 6.x and 7.")
649 (license license:mpl2.0)))
651 (define-public libvisio
658 (uri (string-append "http://dev-www.libreoffice.org/src/libvisio/"
659 "libvisio-" version ".tar.xz"))
661 "0k7adcbbf27l7n453cca1m6s9yj6qvb5j6bsg2db09ybf3w8vbwg"))))
662 (build-system gnu-build-system)
664 `(("cppunit" ,cppunit)
668 ("pkg-config" ,pkg-config)))
669 (propagated-inputs ; in Requires or Requires.private field of .pkg
671 ("librevenge" ,librevenge)
672 ("libxml2" ,libxml2)))
675 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libvisio")
676 (synopsis "Library for parsing the Microsoft Visio format")
677 (description "Libvisio is a library that parses the file format of
678 Microsoft Visio documents of all versions.")
679 (license license:mpl2.0)))
681 (define-public libodfgen
688 (uri (string-append "mirror://sourceforge/libwpd/libodfgen/"
689 "libodfgen-" version "/libodfgen-" version ".tar.xz"))
691 "0cdq48wlpp8m0qmndybv64r0m4vh0qsqx69cn6ms533cjlgljgij"))))
692 (build-system gnu-build-system)
694 `(("doxygen" ,doxygen)
695 ("pkg-config" ,pkg-config)))
696 (propagated-inputs ; in Requires field of .pkg
697 `(("librevenge" ,librevenge)))
702 ;; avoid triggering configure errors by simple inclusion of boost headers
703 `(#:configure-flags '("--disable-werror")))
704 (home-page "https://sourceforge.net/p/libwpd/wiki/libodfgen/")
705 (synopsis "ODF (Open Document Format) library")
706 (description "Libodfgen is a library for generating documents in the
707 Open Document Format (ODF). It provides generator implementations for all
708 document interfaces supported by librevenge:
709 text documents, vector drawings, presentations and spreadsheets.")
710 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
712 (define-public libmwaw
719 (uri (string-append "mirror://sourceforge/libmwaw/libmwaw/libmwaw-"
720 version "/libmwaw-" version ".tar.xz"))
722 "1cdhm9yhanyv3w4vr73zhgyynmkhhkp3dyld7m11jd2yy04vnh04"))))
723 (build-system gnu-build-system)
725 `(("doxygen" ,doxygen)
726 ("pkg-config" ,pkg-config)))
727 (propagated-inputs ; in Requires field of .pkg
728 `(("librevenge" ,librevenge)))
732 (home-page "https://sourceforge.net/p/libmwaw/wiki/Home/")
733 (synopsis "Import library for some old Macintosh text documents")
734 (description "Libmwaw contains some import filters for old Macintosh
735 text documents (MacWrite, ClarisWorks, ... ) and for some graphics and
736 spreadsheet documents.")
737 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
739 (define-public libstaroffice
741 (name "libstaroffice")
746 (uri (string-append "https://github.com/fosnola/libstaroffice/releases/download/"
747 version "/libstaroffice-" version ".tar.xz"))
749 "1i0ykl0c94lc1qzb5mbyf9jr7qw8p38ja424whmhgrllh7ny203b"))))
750 (build-system gnu-build-system)
752 `(("librevenge" ,librevenge)
755 `(("pkg-config" ,pkg-config)))
756 (home-page "https://github.com/fosnola/libstaroffice")
757 (synopsis "Provides LibreOffice support for old StarOffice documents")
758 (description "@code{libstaroffice} is an import filter for the document formats
759 from the old StarOffice (.sdc, .sdw, ...).")
760 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
762 (define-public libwps
769 (uri (string-append "mirror://sourceforge/" name "/" name "/"
770 name "-" version "/" name "-" version ".tar.xz"))
772 "1ji9zd4wxmas03g8jyx0ih0amrqfazm5874a2v9rd7va50sf088l"))))
773 (build-system gnu-build-system)
775 `(("doxygen" ,doxygen)
776 ("pkg-config" ,pkg-config)))
777 (propagated-inputs ; in Requires field of .pkg
778 `(("librevenge" ,librevenge)))
782 (home-page "http://libwps.sourceforge.net/")
783 (synopsis "Import library for Microsoft Works text documents")
784 (description "Libwps is a library for importing files in the Microsoft
785 Works word processor file format.")
786 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
788 (define-public libzmf
795 (uri (string-append "http://dev-www.libreoffice.org/src/libzmf/libzmf-"
798 "08mg5kmkjrmqrd8j5rkzw9vdqlvibhb1ynp6bmfxnzq5rcq1l197"))))
799 (build-system gnu-build-system)
801 ;; A harmless 'sign-compare' error pops up on i686 so disable '-Werror'.
802 '(#:configure-flags '("--disable-werror")))
807 ("librevenge" ,librevenge)
810 `(("cppunit" ,cppunit)
812 ("pkg-config" ,pkg-config)))
813 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libzmf")
814 (synopsis "Parses file format of Zoner Callisto/Draw documents")
815 (description "Libzmf is a library that parses the file format of Zoner
816 Callisto/Draw documents. Currently it only understands documents created by
817 Zoner Draw version 4 and 5.")
818 (license license:mpl2.0)))
820 (define-public hunspell
828 (url "https://github.com/hunspell/hunspell")
829 (commit (string-append "v" version))))
830 (file-name (git-file-name name version))
833 "0qxlkd012r45ppd21kldbq9k5ac5nmxz290z6m2kch9l56v768k1"))))
834 (build-system gnu-build-system)
836 `(("autoconf" ,autoconf)
837 ("automake" ,automake)
838 ("libtool" ,libtool)))
841 (native-search-paths (list (search-path-specification
843 (files '("share/hunspell")))))
844 (home-page "https://hunspell.github.io/")
845 (synopsis "Spell checker")
846 (description "Hunspell is a spell checker and morphological analyzer
847 library and program designed for languages with rich morphology and complex
848 word compounding or character encoding.")
849 ;; Triple license, including "mpl1.1 or later".
850 (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))))
852 (define (dicollecte-french-dictionary variant synopsis)
853 ;; Return a French dictionary package from dicollecte.org, for the given
857 ("classique" "hunspell-dict-fr")
858 (_ (string-append "hunspell-dict-fr-" variant))))
862 "http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v"
867 "139hfrn5p87sl8hqmgkf6sgvnxrk2mm8vd8xsm8sm98qjnwlg0f9"))))
868 (build-system trivial-build-system)
869 (native-inputs `(("unzip" ,unzip)))
871 `(#:modules ((guix build utils))
873 (use-modules (guix build utils)
876 (let* ((out (assoc-ref %outputs "out"))
877 (hunspell (string-append out "/share/hunspell"))
878 (myspell (string-append out "/share/myspell"))
879 (doc (string-append out "/share/doc/"
881 (unzip (assoc-ref %build-inputs "unzip")))
882 (invoke (string-append unzip "/bin/unzip")
883 (assoc-ref %build-inputs "source"))
884 (for-each (cut install-file <> hunspell)
886 ,(string-append variant
889 (symlink hunspell (string-append myspell "/dicts"))
890 (for-each (cut install-file <> doc)
891 (find-files "." "\\.(txt|org|md)$"))
895 "This package provides a dictionary for the Hunspell spell-checking
897 (home-page "https://www.dicollecte.org/home.php?prj=fr")
898 (license license:mpl2.0)))
900 (define-syntax define-french-dictionary
901 (syntax-rules (synopsis)
902 ((_ name variant (synopsis text))
904 (dicollecte-french-dictionary variant text)))))
906 (define-french-dictionary hunspell-dict-fr-classique
908 ;; TRANSLATORS: In French, this is "Français classique".
909 (synopsis "Hunspell dictionary for ``classic'' French (recommended)"))
911 (define-french-dictionary hunspell-dict-fr-moderne
913 ;; TRANSLATORS: In French, this is "Français moderne".
914 (synopsis "Hunspell dictionary for ``modern'' French"))
916 (define-french-dictionary hunspell-dict-fr-réforme-1990
918 (synopsis "Hunspell dictionary for the post @dfn{1990 réforme} French"))
920 (define-french-dictionary hunspell-dict-fr-toutes-variantes
922 (synopsis "Hunspell dictionary for all variants of French"))
924 (define-public hunspell-dict-pl
926 (name "hunspell-dict-pl")
931 ;; Since creators of dictionary host only the latest daily release,
932 ;; we're using version mirrored by Arch Linux, which seems good
933 ;; enough. They're mirroring hunspell-pl releases since 2011.
934 (uri (string-append "https://sources.archlinux.org/other/community/"
935 "hunspell-pl/sjp-myspell-pl-"
938 "14mzf8glxkp2775dcqisb1zv6r8ncm3bvzl46q352rwyl2dg1c59"))))
940 (build-system trivial-build-system)
941 (native-inputs `(("unzip" ,unzip)))
943 `(#:modules ((guix build utils))
945 (use-modules (guix build utils)
948 (let* ((out (assoc-ref %outputs "out"))
949 (hunspell (string-append out "/share/hunspell"))
950 (myspell (string-append out "/share/myspell"))
951 (doc (string-append out "/share/doc/"
953 (unzip (string-append (assoc-ref %build-inputs "unzip")
955 (invoke unzip "-j" "-o" (assoc-ref %build-inputs "source"))
956 (invoke unzip "-j" "-o" "pl_PL.zip")
957 (for-each (cut install-file <> hunspell)
959 ,(string-append "pl_PL"
962 (symlink hunspell (string-append myspell "/dicts"))
963 (for-each (cut install-file <> doc)
964 (find-files "." "\\.(txt|org|md)$"))
966 (synopsis "Hunspell dictionary for Polish")
968 "This package provides a dictionary for the Hunspell spell-checking
970 (home-page "https://sjp.pl/slownik/ort/")
972 (list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))
974 (define-public hyphen
981 (uri (string-append "mirror://sourceforge/hunspell/Hyphen/"
982 (version-major+minor version) "/"
983 name "-" version ".tar.gz"))
985 "01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih"))))
986 (build-system gnu-build-system)
989 (home-page "http://hunspell.sourceforge.net/")
990 (synopsis "Hyphenation library")
991 (description "Hyphen is a hyphenation library using TeX hyphenation
992 patterns, which are pre-processed by a perl script.")
993 ;; Triple license, including "mpl1.1 or later".
995 (list license:mpl1.1 license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
997 (define-public mythes
1004 (uri (string-append "mirror://sourceforge/hunspell/MyThes/" version "/"
1005 name "-" version ".tar.gz"))
1007 "0prh19wy1c74kmzkkavm9qslk99gz8h8wmjvwzjc6lf8v2az708y"))))
1008 (build-system gnu-build-system)
1010 `(("pkg-config" ,pkg-config)))
1012 `(("hunspell" ,hunspell)
1014 (home-page "http://hunspell.sourceforge.net/")
1015 (synopsis "Thesaurus")
1016 (description "MyThes is a simple thesaurus that uses a structured text
1017 data file and an index file with binary search to look up words and phrases
1018 and to return information on pronunciations, meanings and synonyms.")
1019 (license (license:non-copyleft "file://COPYING"
1020 "See COPYING in the distribution."))))
1022 (define-public libqxp
1028 (uri (string-append "https://dev-www.libreoffice.org/src/libqxp/"
1029 "libqxp-" version ".tar.xz"))
1032 "0p4lb84m05wqd8qr8ni9sp80ivlm83ffn0nxiv4m42hj22qvcdz1"))))
1033 (build-system gnu-build-system)
1039 `(("cppunit" ,cppunit)
1040 ("pkg-config" ,pkg-config)))
1042 `(("librevenge" ,librevenge))) ; mentioned in Requires field
1043 (home-page "https://www.libreoffice.org")
1044 (synopsis "Library and tools for the QuarkXPress file format")
1045 (description "libqxp is a library and a set of tools for reading and
1046 converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
1047 (license license:mpl2.0)))
1049 (define-public libreoffice
1051 (name "libreoffice")
1058 "https://download.documentfoundation.org/libreoffice/src/"
1059 (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
1062 "1v4ili9j8d0xfj3q69niski1v65icg8xi09ip2bsk343rawwck3a"))))
1063 (build-system glib-or-gtk-build-system)
1066 ("cppunit" ,cppunit)
1068 ("pkg-config" ,pkg-config)
1069 ("python" ,python-wrapper)
1074 ("clucene" ,clucene)
1076 ("dbus-glib" ,dbus-glib)
1077 ("fontconfig" ,fontconfig)
1078 ("fontforge" ,fontforge)
1083 ("gobject-introspection" ,gobject-introspection)
1086 ("graphite2" ,graphite2)
1087 ("gst-plugins-base" ,gst-plugins-base)
1089 ("harfbuzz" ,harfbuzz)
1090 ("hunspell" ,hunspell)
1094 ("libcmis" ,libcmis)
1095 ("libjpeg-turbo" ,libjpeg-turbo)
1096 ("libe-book" ,libe-book)
1097 ("libepubgen" ,libepubgen)
1098 ("libetonyek" ,libetonyek)
1099 ("libexttextcat" ,libexttextcat)
1100 ("libfreehand" ,libfreehand)
1101 ("liblangtag" ,liblangtag)
1102 ;; XXX: Perhaps this should be propagated from xmlsec.
1103 ("libltdl" ,libltdl)
1104 ("libmspub" ,libmspub)
1105 ("libmwaw" ,libmwaw)
1106 ("libnumbertext" ,libnumbertext)
1107 ("libodfgen" ,libodfgen)
1108 ("libpagemaker" ,libpagemaker)
1110 ("libstaroffice" ,libstaroffice)
1111 ("libvisio" ,libvisio)
1114 ("libxrandr" ,libxrandr)
1115 ("libxrender" ,libxrender)
1116 ("libxslt" ,libxslt)
1119 ("lpsolve" ,lpsolve)
1120 ("mariadb" ,mariadb "dev")
1126 ("openldap" ,openldap)
1127 ("openssl" ,openssl)
1130 ("perl-archive-zip" ,perl-archive-zip)
1131 ("poppler" ,poppler)
1132 ("postgresql" ,postgresql)
1134 ("python-lxml" ,python-lxml)
1135 ("qrcodegen-cpp" ,qrcodegen-cpp)
1136 ("redland" ,redland)
1137 ("sane-backends" ,sane-backends)
1138 ("unixodbc" ,unixodbc)
1141 ("xdg-utils" ,xdg-utils)
1142 ("xmlsec" ,xmlsec-nss)
1145 `(#:tests? #f ; Building the tests already fails.
1146 #:make-flags '("build-nocheck") ; Do not build unit tests, which fails.
1148 (modify-phases %standard-phases
1149 (add-before 'configure 'prepare-src
1150 (lambda* (#:key inputs #:allow-other-keys)
1152 (list "sysui/CustomTarget_share.mk"
1153 "solenv/gbuild/gbuild.mk"
1154 "solenv/gbuild/platform/unxgcc.mk")
1155 (("/bin/sh") (which "sh")))
1157 ;; Use store references for strictly necessary commands,
1158 ;; but not for optional tools like ‘gdb’ and ‘valgrind’.
1159 (for-each (lambda (command)
1160 (substitute* "desktop/scripts/soffice.sh"
1161 (((format #f"~a " command))
1162 (format #f "~a " (which command)))))
1163 (list "dirname" "grep" "uname"))
1165 ;; GPGME++ headers are installed in a gpgme++ subdirectory, but
1166 ;; files in "xmlsecurity/source/gpg/" and elsewhere expect to
1167 ;; find them on the include path without a prefix.
1168 (substitute* '("xmlsecurity/Library_xsec_xmlsec.mk"
1169 "comphelper/Library_comphelper.mk")
1170 (("\\$\\$\\(INCLUDE\\)")
1171 (string-append "$$(INCLUDE) -I"
1172 (assoc-ref inputs "gpgme")
1173 "/include/gpgme++")))
1175 ;; /usr/bin/xdg-open doesn't exist on Guix System.
1176 (substitute* '("shell/source/unix/exec/shellexec.cxx"
1177 "shell/source/unix/misc/senddoc.sh")
1178 (("/usr/bin/xdg-open")
1179 (string-append (assoc-ref inputs "xdg-utils")
1183 (add-after 'install 'bin-and-desktop-install
1184 ;; Create 'soffice' and 'libreoffice' symlinks to the executable
1186 (lambda* (#:key outputs #:allow-other-keys)
1187 (let ((out (assoc-ref outputs "out")))
1188 (define (symlink-output src dst)
1189 (mkdir-p (dirname (string-append out dst)))
1190 (symlink (string-append out src) (string-append out dst)))
1191 (define (install src dst)
1192 (let ((dst (string-append out dst)))
1193 (mkdir-p (dirname dst))
1194 (copy-file src dst)))
1195 (define (install-desktop-file app)
1196 (let ((src (string-append "/lib/libreoffice/share/xdg/"
1198 (dst (string-append "/share/applications/libreoffice-"
1200 (substitute* (string-append out src)
1201 (("Exec=libreoffice[0-9]+\\.[0-9]+ ")
1202 (string-append "Exec=" out "/bin/libreoffice "))
1203 (("Icon=libreoffice.*")
1204 (string-append "Icon=" app "\n"))
1205 (("LibreOffice [0-9]+\\.[0-9]+")
1207 (symlink-output src dst)))
1208 (define (install-appdata app)
1209 (install-file (string-append
1210 "sysui/desktop/appstream-appdata/"
1211 "libreoffice-" app ".appdata.xml")
1212 (string-append out "/share/appdata")))
1213 (symlink-output "/lib/libreoffice/program/soffice"
1215 (symlink-output "/lib/libreoffice/program/soffice"
1217 (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.keys"
1218 "/share/mime-info/libreoffice.keys")
1219 (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.mime"
1220 "/share/mime-info/libreoffice.mime")
1222 "workdir/CustomTarget/sysui/share/libreoffice/openoffice.org.xml"
1223 "/share/mime/packages/libreoffice.xml")
1224 (for-each install-desktop-file
1225 '("base" "calc" "draw" "impress" "writer"
1226 "math" "startcenter"))
1227 (for-each install-appdata
1228 '("base" "calc" "draw" "impress" "writer"))
1229 (mkdir-p (string-append out "/share/icons/hicolor"))
1230 (copy-recursively "sysui/desktop/icons/hicolor"
1231 (string-append out "/share/icons/hicolor")))
1235 "--enable-release-build"
1236 ;; Avoid using all cpu cores by default
1237 (format #f "--with-parallelism=~d" (parallel-job-count))
1238 "--disable-fetch-external" ; disable downloads
1239 "--with-system-libs" ; enable all --with-system-* flags
1240 (string-append "--with-boost-libdir="
1241 (assoc-ref %build-inputs "boost") "/lib")
1242 ;; Avoid undefined symbols required by boost::spirit
1243 "LDFLAGS=-lboost_system"
1244 ;; Avoid a dependency on ucpp.
1245 "--with-idlc-cpp=cpp"
1246 ;; The fonts require an external tarball (crosextrafonts).
1247 ;; They should not be needed when system fonts are available.
1249 ;; With java, the build fails since sac.jar is missing.
1251 ;; FIXME: Enable once the corresponding inputs are packaged.
1253 "--disable-firebird-sdbc" ; embedded firebird
1254 ;; XXX: PDFium support requires fetching an external tarball and
1255 ;; patching the build scripts to work with GCC5. Try enabling this
1256 ;; when our default compiler is >=GCC 6.
1259 "--enable-build-opensymbol")))
1260 (home-page "https://www.libreoffice.org/")
1261 (synopsis "Office suite")
1262 (description "LibreOffice is a comprehensive office suite. It contains
1263 a number of components: Writer, a word processor; Calc, a spreadsheet
1264 application; Impress, a presentation engine; Draw, a drawing and
1265 flowcharting application; Base, a database and database frontend;
1266 Math for editing mathematics.")
1267 (license license:mpl2.0)))