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, 2021 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 game-development)
61 #:use-module (gnu packages ghostscript)
62 #:use-module (gnu packages gl)
63 #:use-module (gnu packages glib)
64 #:use-module (gnu packages gnome)
65 #:use-module (gnu packages gperf)
66 #:use-module (gnu packages gnupg)
67 #:use-module (gnu packages gstreamer)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages icu4c)
70 #:use-module (gnu packages image)
71 #:use-module (gnu packages java)
72 #:use-module (gnu packages linux)
73 #:use-module (gnu packages logging)
74 #:use-module (gnu packages maths)
75 #:use-module (gnu packages nss)
76 #:use-module (gnu packages openldap)
77 #:use-module (gnu packages pdf)
78 #:use-module (gnu packages perl)
79 #:use-module (gnu packages perl-compression)
80 #:use-module (gnu packages pkg-config)
81 #:use-module (gnu packages python)
82 #:use-module (gnu packages rdf)
83 #:use-module (gnu packages scanner)
84 #:use-module (gnu packages tls)
85 #:use-module (gnu packages version-control)
86 #:use-module (gnu packages xml)
87 #:use-module (gnu packages xorg))
96 (uri (string-append "http://kohei.us/files/ixion/src/libixion-"
100 "17q84mhy4rb3masvjw24x549irdjmccnc8n04xh58v9l7hxn8v22"))))
101 (build-system gnu-build-system)
105 (list mdds python spdlog))
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 "1bps34sqz7wlrl01ssywjd5fbmssplifs0rskivgrg801lr6pcm4"))))
126 (build-system gnu-build-system)
128 `(#:configure-flags '("--disable-static")))
132 (list ixion mdds python zlib))
133 (home-page "https://gitlab.com/orcus/orcus")
134 (synopsis "File import filter library for spreadsheet documents")
135 (description "Orcus is a library that provides a collection of standalone
136 file processing filters. It is currently focused on providing filters for
137 spreadsheet documents. The library includes import filters for
138 Microsoft Excel 2007 XML, Microsoft Excel 2003 XML, Open Document Spreadsheet,
139 Plain Text, Gnumeric XML, Generic XML. It also includes low-level parsers for
141 (license license:mpl2.0)))
143 (define-public unoconv
150 (uri (pypi-uri "unoconv" version))
152 (base32 "0cb0bvyxib3xrj0jdgizhp6p057lr8kqnd3n921rin37ivcvz3ih"))))
153 (build-system python-build-system)
156 (modify-phases %standard-phases
157 (add-after 'unpack 'stop-hash-sniffing
158 ;; Fixes <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39647#11>.
159 ;; Submitted upsteam: <https://github.com/unoconv/unoconv/pull/531>.
161 (substitute* "unoconv"
162 (("sys.argv\\[0\\]\\.split\\('2'\\)")
163 "os.path.basename(sys.argv[0]).split('2')"))
165 (add-after 'unpack 'patch-find_offices
166 ;; find_offices is a convoluted cross-platform treasure hunt.
167 ;; Keep things simple and return the correct paths immediately.
168 (lambda* (#:key inputs #:allow-other-keys)
169 (let* ((libreoffice (assoc-ref inputs "libreoffice")))
170 (substitute* "unoconv"
171 (("def find_offices\\(\\):" match)
175 "'" libreoffice "/lib/libreoffice', "
176 "'" libreoffice "/lib/libreoffice/program', "
177 "'" libreoffice "/lib/libreoffice/program', "
178 "'" libreoffice "/lib/libreoffice/program/pyuno.so', "
179 "'" libreoffice "/bin/soffice', "
185 (home-page "http://dag.wiee.rs/home-made/unoconv/")
186 (synopsis "Convert between any document format supported by LibreOffice")
188 "Unoconv is a command-line utility to convert documents from any format
189 that LibreOffice can import, to any format it can export. It can be used for
190 batch processing and can apply custom style templates and filters.
192 Unoconv converts between over a hundred formats, including Open Document
193 Format (@file{.odt}, @file{.ods}, @file{.odp})), Portable Document Format
194 (@file{.pdf}), HTML and XHTML, RTF, DocBook (@file{.xml}), @file{.doc} and
195 @file{.docx}), @file{.xls} and @file{.xlsx}).
197 All required fonts must be installed on the converting system.")
198 (license license:gpl2)))
200 (define-public librevenge
207 (uri (string-append "mirror://sourceforge/libwpd/librevenge/librevenge-"
208 version "/librevenge-" version ".tar.xz"))
210 "1cj76cz4mqcy2mgv9l5xlc95bypyk8zbq0ls9cswqrs2y0lhfgwk"))))
211 (build-system gnu-build-system)
213 (list cppunit doxygen pkg-config))
216 (propagated-inputs ; Referenced by .la files
219 ;; avoid triggering configure errors by simple inclusion of boost headers
220 `(#:configure-flags '("--disable-werror"
221 ;; Avoid undefined library references
222 "LDFLAGS=-lboost_system")))
223 (home-page "https://sourceforge.net/p/libwpd/wiki/librevenge/")
224 (synopsis "Document importer for office suites")
225 (description "Librevenge is a base library for writing document import
226 filters. It has interfaces for text documents, vector graphics,
227 spreadsheets and presentations.")
228 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
230 (define-public libwpd
237 (uri (string-append "mirror://sourceforge/libwpd/libwpd/"
238 "libwpd-" version "/libwpd-" version ".tar.xz"))
240 "02fx8bngslcj7i5g1gx2kiign4vp09wrmp5wpvix9igxcavb0r94"))))
241 (build-system gnu-build-system)
243 `(#:configure-flags '("--disable-werror")))
245 (list doxygen pkg-config))
247 (list librevenge)) ; in Requires field of .pkg
250 (home-page "http://libwpd.sourceforge.net/")
251 (synopsis "Library for importing WordPerfect documents")
252 (description "Libwpd is a C++ library designed to help process
253 WordPerfect documents. It is most commonly used to import such documents
254 into other word processors.")
255 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
257 (define-public libe-book
264 (uri (string-append "mirror://sourceforge/libebook/libe-book-"
265 version "/libe-book-" version ".tar.xz"))
268 "1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by"))
269 (modules '((guix build utils)))
272 ;; This can be removed with the next release.
273 ;; Needed for icu4c compatibility >= 68.0.
274 (substitute* "src/lib/EBOOKCharsetConverter.cpp"
275 (("TRUE, TRUE, &status")
276 "true, true, &status"))))))
277 (build-system gnu-build-system)
279 (list cppunit gperf pkg-config))
280 (propagated-inputs ; in Requires or Requires.private field of .pkg
281 (list icu4c liblangtag librevenge libxml2))
285 ;; avoid triggering configure errors by simple inclusion of boost headers
286 `(#:configure-flags '("--disable-werror")))
287 (home-page "http://libebook.sourceforge.net")
288 (synopsis "Library for import of reflowable e-book formats")
289 (description "Libe-book is a library and a set of tools for reading and
290 converting various reflowable e-book formats. Currently supported are:
291 Broad Band eBook, eReader .pdb, FictionBook v. 2 (including zipped files),
292 PalmDoc Ebook, Plucker .pdb, QiOO (mobile format, for java-enabled
293 cellphones), TCR (simple compressed text format), TealDoc, zTXT,
294 ZVR (simple compressed text format).")
295 (license license:mpl2.0)))
297 (define-public libepubgen
304 (uri (string-append "mirror://sourceforge/libepubgen/libepubgen-"
305 version "/libepubgen-" version ".tar.xz"))
308 "1b8mc9zzrqypj1v9zdy3ybc48pw0rfr06cyi7n6grvybjjwq9q03"))))
309 (build-system gnu-build-system)
311 (list cppunit pkg-config))
313 (list libxml2 boost))
314 (propagated-inputs ; in Requires field of .pkg
316 (home-page "https://sourceforge.net/projects/libepubgen/")
317 (synopsis "EPUB generator library for librevenge")
318 (description "libepubgen is an EPUB generator for librevenge. It supports
319 librevenge's text document interface and--currently in a very limited
320 way--presentation and vector drawing interfaces.")
321 (license license:mpl2.0)))
323 (define-public libwpg
330 (uri (string-append "mirror://sourceforge/libwpg/libwpg/"
331 "libwpg-" version "/libwpg-" version ".tar.xz"))
333 "074x159immf139szkswv2zapnq75p7xk10dbha2p9193hgwggcwr"))))
334 (build-system gnu-build-system)
336 (list doxygen pkg-config))
338 (list libwpd)) ; in Requires field of .pkg
341 (home-page "http://libwpg.sourceforge.net/")
342 (synopsis "Library and tools for the WordPerfect Graphics format")
343 (description "The libwpg project provides a library and tools for
344 working with graphics in the WPG (WordPerfect Graphics) format.")
345 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
347 (define-public libcmis
354 (uri (string-append "https://github.com/tdf/libcmis/releases/download/v"
355 version "/libcmis-" version ".tar.xz"))
358 "18h0a2gsfxvlv03nlcfvw9bzsflq5sin9agq6za103hr0ab8vcfp"))))
359 (build-system gnu-build-system)
361 (list cppunit pkg-config))
362 (propagated-inputs ; in Requires field of .pkg
365 (list boost cyrus-sasl openssl))
369 ;; FIXME: Man pages generation requires docbook-to-man; reenable
370 ;; it once this is available.
372 ;; XXX: A configure test fails with GCC7 when including Boost headers.
374 ;; During configure, the boost headers are found, but linking
375 ;; fails without the following flag.
376 (string-append "--with-boost="
377 (assoc-ref %build-inputs "boost")))))
378 (home-page "https://github.com/tdf/libcmis")
379 (synopsis "CMIS client library")
380 (description "LibCMIS is a C++ client library for the CMIS interface. It
381 allows C++ applications to connect to any ECM behaving as a CMIS server such
382 as Alfresco or Nuxeo.")
384 (list license:mpl1.1 license:gpl2+ license:lgpl2.1+)))) ; triple license
386 (define-public libabw
393 (uri (string-append "https://dev-www.libreoffice.org/src/libabw/"
394 "libabw-" version ".tar.xz"))
396 "1vbfrmnvib3cym0yyyabnd8xpx4f7wp20vnn09s6dln347fajqz7"))))
397 (build-system gnu-build-system)
399 (list doxygen gperf perl pkg-config))
400 (propagated-inputs ; in Requires or Requires.private field of .pkg
401 (list librevenge libxml2))
404 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libabw")
405 (synopsis "Library for parsing the AbiWord format")
406 (description "Libabw is a library that parses the file format of
408 (license license:mpl2.0)))
410 (define-public libcdr
417 (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
418 name "-" version ".tar.xz"))
420 "1m6dirmyhqwnrpv80z97x5k5hdh4kh8a8zlq3smbjrilc6fj8rjn"))))
421 (build-system gnu-build-system)
423 (list cppunit doxygen pkg-config))
424 (propagated-inputs ; in Requires or Requires.private field of .pkg
425 (list icu4c lcms librevenge zlib))
428 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libcdr")
429 (synopsis "Library for parsing the CorelDRAW format")
430 (description "Libcdr is a library that parses the file format of
431 CorelDRAW documents of all versions.")
432 (license license:mpl2.0)))
434 (define-public libetonyek
441 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
442 name "-" version ".tar.xz"))
444 "16hy60ws29pb4pz3z5l4920yn9hnk2vlij0xfs5qi1w4drd46c5l"))))
445 (build-system gnu-build-system)
447 `(#:configure-flags '("--with-mdds=1.5")))
449 (list cppunit doxygen gperf pkg-config))
450 (propagated-inputs ; in Requires or Requires.private field of .pkg
451 (list liblangtag librevenge libxml2 zlib))
453 (list boost glm mdds))
454 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek")
455 (synopsis "Library for parsing the Apple Keynote format")
456 (description "Libetonyek is a library that parses the file format of
457 Apple Keynote documents. It currently supports Keynote versions 2 to 5.")
458 (license license:mpl2.0)))
460 (define-public liblangtag
467 (uri (string-append "https://bitbucket.org/tagoh/liblangtag/downloads/"
468 "liblangtag-" version ".tar.bz2"))
470 (base32 "1g9kwxx60q0hpwvs66ys1cb9qg54hfvbivadwli8sfpc085a44hz"))))
471 (build-system gnu-build-system)
473 (list libtool pkg-config))
476 (home-page "https://bitbucket.org/tagoh/liblangtag")
477 (synopsis "Library to access tags for identifying languages")
478 (description "Liblangtag implements an interface to work with tags
479 for identifying languages as described in RFC 5646. It supports the
480 extensions described in RFC6067 and RFC6497, and Extension T for
481 language/locale identifiers as described in the Unicode CLDR
483 (license (list license:lgpl3+ license:mpl2.0)))) ; dual license
485 (define-public libexttextcat
487 (name "libexttextcat")
492 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
493 name "-" version ".tar.xz"))
495 "1j6sjwkyhqvsgyw938bxxfwkzzi1mahk66g5342lv6j89jfvrz8k"))))
496 (build-system gnu-build-system)
497 (home-page "https://www.freedesktop.org/wiki/Software/libexttextcat/")
498 (synopsis "Text Categorization library")
499 (description "Libexttextcat is an N-Gram-Based Text Categorization
500 library primarily intended for language guessing.")
501 (license (license:non-copyleft "file://LICENSE"
502 "See LICENSE in the distribution."))))
504 (define-public libfreehand
511 (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
512 name "-" version ".tar.xz"))
514 "1b1lvqh68rwij1yvmxy02hsmh7i74ma5767mk8mg5nx6chajshhf"))))
515 (build-system gnu-build-system)
517 '(#:configure-flags '("--disable-werror")
518 #:phases (modify-phases %standard-phases
519 (add-before 'build 'adjust-for-ICU-65
521 ;; Fix build with ICU 65 and later. Taken from this
522 ;; upstream commit, remove for libfreehand > 0.1.2:
523 ;; https://gerrit.libreoffice.org/#/c/80224/
524 (substitute* "src/lib/libfreehand_utils.cpp"
526 (string-append all ";\n")))
529 (list cppunit doxygen gperf perl pkg-config))
532 (propagated-inputs ; in Requires or Requires.private field of .pkg
533 (list librevenge zlib))
534 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libfreehand")
535 (synopsis "Library for parsing the FreeHand format")
536 (description "Libfreehand is a library that parses the file format of
537 Aldus/Macromedia/Adobe FreeHand documents.")
538 (license license:mpl2.0)))
540 (define-public libmspub
547 (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
548 name "-" version ".tar.xz"))
550 "1fhkn013gzg59f4z7rldpbi0nj7lgdqzxanspsqa6axvmahw2dpg"))
551 (modules '((guix build utils)))
554 ;; This can be removed with the next release.
555 ;; https://gerrit.libreoffice.org/c/libmspub/+/73814
556 (substitute* "src/lib/MSPUBMetaData.h"
557 (("include <vector>" all)
558 (string-append all "\n#include <cstdint>")))))))
559 (build-system gnu-build-system)
561 (list doxygen pkg-config))
562 (propagated-inputs ; in Requires or Requires.private field of .pkg
563 (list icu4c librevenge zlib))
566 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libmspub")
567 (synopsis "Library for parsing the Microsoft Publisher format")
568 (description "Libmspub is a library that parses the file format of
569 Microsoft Publisher documents of all versions.")
570 (license license:mpl2.0)))
572 (define-public libnumbertext
574 (name "libnumbertext")
579 (uri (string-append "https://github.com/Numbertext/libnumbertext/"
580 "releases/download/" version
581 "/libnumbertext-" version ".tar.xz"))
583 (base32 "1z31idnmd9iv6ra5dcsn7q70wv32clk2sqc5bbhimqcsp2f29f0p"))))
584 (build-system gnu-build-system)
586 `(#:configure-flags '("--disable-static")))
587 (home-page "https://github.com/Numbertext/libnumbertext")
588 (synopsis "Language-neutral @code{NUMBERTEXT} and @code{MONEYTEXT} functions")
590 "The libnumbertext library provides language-neutral @code{NUMBERTEXT}
591 and @code{MONEYTEXT} functions for LibreOffice Calc, available for C++ and
593 (license (list license:lgpl3+ license:bsd-3))))
595 (define-public libpagemaker
597 (name "libpagemaker")
602 (uri (string-append "https://dev-www.libreoffice.org/src/libpagemaker/"
603 "libpagemaker-" version ".tar.xz"))
605 "17ai8ajffr0ixxmmcv3k5vgjlcsix38ldb4fw2arild70pbsrbb6"))))
606 (build-system gnu-build-system)
608 `(#:configure-flags '("--disable-werror")))
610 (list doxygen pkg-config))
611 (propagated-inputs ; in Requires field of .pkg
615 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libpagemaker")
616 (synopsis "Library for parsing the PageMaker format")
617 (description "Libpagemaker is a library that parses the file format of
618 Aldus/Adobe PageMaker documents. Currently it only understands documents
619 created by PageMaker version 6.x and 7.")
620 (license license:mpl2.0)))
622 (define-public libvisio
629 (uri (string-append "http://dev-www.libreoffice.org/src/libvisio/"
630 "libvisio-" version ".tar.xz"))
632 "0k7adcbbf27l7n453cca1m6s9yj6qvb5j6bsg2db09ybf3w8vbwg"))))
633 (build-system gnu-build-system)
635 (list cppunit doxygen gperf perl pkg-config))
636 (propagated-inputs ; in Requires or Requires.private field of .pkg
637 (list icu4c librevenge libxml2))
640 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libvisio")
641 (synopsis "Library for parsing the Microsoft Visio format")
642 (description "Libvisio is a library that parses the file format of
643 Microsoft Visio documents of all versions.")
644 (license license:mpl2.0)))
646 (define-public libodfgen
653 (uri (string-append "mirror://sourceforge/libwpd/libodfgen/"
654 "libodfgen-" version "/libodfgen-" version ".tar.xz"))
656 "0986c5gw4vdfz7bcmpdfz07inba5wxsx4f6xvndknqj6zlkh082m"))))
657 (build-system gnu-build-system)
659 (list doxygen pkg-config))
660 (propagated-inputs ; in Requires field of .pkg
663 (list boost libxml2 zlib))
665 ;; Avoid triggering configure errors by simple inclusion of Boost headers.
666 `(#:configure-flags '("--disable-werror")))
667 (home-page "https://sourceforge.net/p/libwpd/wiki/libodfgen/")
668 (synopsis "ODF (Open Document Format) library")
669 (description "Libodfgen is a library for generating documents in the
670 Open Document Format (ODF). It provides generator implementations for all
671 document interfaces supported by librevenge:
672 text documents, vector drawings, presentations and spreadsheets.")
673 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
675 (define-public libmwaw
682 (uri (string-append "mirror://sourceforge/libmwaw/libmwaw/libmwaw-"
683 version "/libmwaw-" version ".tar.xz"))
685 (base32 "1bx5xnw8sk5h26x2z7hfac7hfbm68zqg0jilp15qr0pwxqsf4wmj"))))
686 (build-system gnu-build-system)
688 (list doxygen pkg-config))
689 (propagated-inputs ; in Requires field of .pc file
693 (home-page "https://sourceforge.net/p/libmwaw/wiki/Home/")
694 (synopsis "Import library for some old Macintosh text documents")
695 (description "Libmwaw contains some import filters for old Macintosh
696 text documents (MacWrite, ClarisWorks, ... ) and for some graphics and
697 spreadsheet documents.")
698 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
700 (define-public libstaroffice
702 (name "libstaroffice")
707 (uri (string-append "https://github.com/fosnola/libstaroffice/releases/download/"
708 version "/libstaroffice-" version ".tar.xz"))
710 "1ny8411273k2bq7mnpmcvri3rd46b2j67wfypqkp3y8nhanv0kzr"))))
711 (build-system gnu-build-system)
713 (list librevenge zlib))
716 (home-page "https://github.com/fosnola/libstaroffice")
717 (synopsis "Provides LibreOffice support for old StarOffice documents")
718 (description "@code{libstaroffice} is an import filter for the document formats
719 from the old StarOffice (.sdc, .sdw, ...).")
720 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
722 (define-public libwps
729 (uri (string-append "mirror://sourceforge/" name "/" name "/"
730 name "-" version "/" name "-" version ".tar.xz"))
732 "1nsfacqp5sfkyayw7q0wp68lidksd1wjdix8qmsbf0vdl19gn6p2"))))
733 (build-system gnu-build-system)
735 (list doxygen pkg-config))
736 (propagated-inputs ; in Requires field of .pkg
740 (home-page "http://libwps.sourceforge.net/")
741 (synopsis "Import library for Microsoft Works text documents")
742 (description "Libwps is a library for importing files in the Microsoft
743 Works word processor file format.")
744 (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
746 (define-public libzmf
753 (uri (string-append "http://dev-www.libreoffice.org/src/libzmf/libzmf-"
756 "08mg5kmkjrmqrd8j5rkzw9vdqlvibhb1ynp6bmfxnzq5rcq1l197"))))
757 (build-system gnu-build-system)
759 ;; A harmless 'sign-compare' error pops up on i686 so disable '-Werror'.
760 '(#:configure-flags '("--disable-werror")))
762 (list boost icu4c libpng librevenge zlib))
764 (list cppunit doxygen pkg-config))
765 (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libzmf")
766 (synopsis "Parses file format of Zoner Callisto/Draw documents")
767 (description "Libzmf is a library that parses the file format of Zoner
768 Callisto/Draw documents. Currently it only understands documents created by
769 Zoner Draw version 4 and 5.")
770 (license license:mpl2.0)))
772 (define-public hunspell
780 (url "https://github.com/hunspell/hunspell")
781 (commit (string-append "v" version))))
782 (file-name (git-file-name name version))
785 "0qxlkd012r45ppd21kldbq9k5ac5nmxz290z6m2kch9l56v768k1"))))
786 (build-system gnu-build-system)
788 (list autoconf automake libtool))
791 (native-search-paths (list (search-path-specification
793 (files '("share/hunspell")))))
794 (home-page "https://hunspell.github.io/")
795 (synopsis "Spell checker")
796 (description "Hunspell is a spell checker and morphological analyzer
797 library and program designed for languages with rich morphology and complex
798 word compounding or character encoding.")
799 ;; Triple license, including "mpl1.1 or later".
800 (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))))
802 (define (dicollecte-french-dictionary variant synopsis)
803 ;; Return a French dictionary package from dicollecte.org, for the given
807 ("classique" "hunspell-dict-fr")
808 (_ (string-append "hunspell-dict-fr-" variant))))
812 "http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v"
817 "139hfrn5p87sl8hqmgkf6sgvnxrk2mm8vd8xsm8sm98qjnwlg0f9"))))
818 (build-system trivial-build-system)
819 (native-inputs (list unzip))
821 `(#:modules ((guix build utils))
823 (use-modules (guix build utils)
826 (let* ((out (assoc-ref %outputs "out"))
827 (hunspell (string-append out "/share/hunspell"))
828 (myspell (string-append out "/share/myspell"))
829 (doc (string-append out "/share/doc/"
831 (unzip (assoc-ref %build-inputs "unzip")))
832 (invoke (string-append unzip "/bin/unzip")
833 (assoc-ref %build-inputs "source"))
834 (for-each (cut install-file <> hunspell)
836 ,(string-append variant
839 (symlink hunspell (string-append myspell "/dicts"))
840 (for-each (cut install-file <> doc)
841 (find-files "." "\\.(txt|org|md)$"))
845 "This package provides a dictionary for the Hunspell spell-checking
847 (home-page "https://www.dicollecte.org/home.php?prj=fr")
848 (license license:mpl2.0)))
850 (define-syntax define-french-dictionary
851 (syntax-rules (synopsis)
852 ((_ name variant (synopsis text))
854 (dicollecte-french-dictionary variant text)))))
856 (define-french-dictionary hunspell-dict-fr-classique
858 ;; TRANSLATORS: In French, this is "Français classique".
859 (synopsis "Hunspell dictionary for ``classic'' French (recommended)"))
861 (define-french-dictionary hunspell-dict-fr-moderne
863 ;; TRANSLATORS: In French, this is "Français moderne".
864 (synopsis "Hunspell dictionary for ``modern'' French"))
866 (define-french-dictionary hunspell-dict-fr-réforme-1990
868 (synopsis "Hunspell dictionary for the post @dfn{1990 réforme} French"))
870 (define-french-dictionary hunspell-dict-fr-toutes-variantes
872 (synopsis "Hunspell dictionary for all variants of French"))
874 (define-public hunspell-dict-pl
876 (name "hunspell-dict-pl")
881 ;; Since creators of dictionary host only the latest daily release,
882 ;; we're using version mirrored by Arch Linux, which seems good
883 ;; enough. They're mirroring hunspell-pl releases since 2011.
884 (uri (string-append "https://sources.archlinux.org/other/community/"
885 "hunspell-pl/sjp-myspell-pl-"
888 "14mzf8glxkp2775dcqisb1zv6r8ncm3bvzl46q352rwyl2dg1c59"))))
890 (build-system trivial-build-system)
891 (native-inputs (list unzip))
893 `(#:modules ((guix build utils))
895 (use-modules (guix build utils)
898 (let* ((out (assoc-ref %outputs "out"))
899 (hunspell (string-append out "/share/hunspell"))
900 (myspell (string-append out "/share/myspell"))
901 (doc (string-append out "/share/doc/"
903 (unzip (search-input-file %build-inputs
905 (invoke unzip "-j" "-o" (assoc-ref %build-inputs "source"))
906 (invoke unzip "-j" "-o" "pl_PL.zip")
907 (for-each (cut install-file <> hunspell)
909 ,(string-append "pl_PL"
912 (symlink hunspell (string-append myspell "/dicts"))
913 (for-each (cut install-file <> doc)
914 (find-files "." "\\.(txt|org|md)$"))
916 (synopsis "Hunspell dictionary for Polish")
918 "This package provides a dictionary for the Hunspell spell-checking
920 (home-page "https://sjp.pl/slownik/ort/")
922 (list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))
924 (define-public hunspell-dict-de
926 (name "hunspell-dict-de")
931 (uri (string-append "https://www.j3e.de/ispell/igerman98/dict/"
932 "igerman98-" version ".tar.bz2"))
934 (base32 "1a3055hp2bc4q4nlg3gmg0147p3a1zlfnc65xiv2v9pyql1nya8p"))))
935 (build-system gnu-build-system)
937 `(#:make-flags '("hunspell/de_DE.dic")
939 (modify-phases %standard-phases
941 (replace 'install ;no install target
942 (lambda* (#:key outputs #:allow-other-keys)
943 (let* ((out (assoc-ref outputs "out"))
944 (share (string-append out "/share/hunspell/")))
945 (install-file "hunspell/de_DE.aff" share)
946 (install-file "hunspell/de_DE.dic" share)
948 #:tests? #f)) ; no tests
950 (list hunspell ispell perl))
951 (synopsis "Hunspell dictionary for German (de_DE)")
952 (description "This package provides a dictionary for the Hunspell
953 spell-checking library.")
954 (home-page "https://www.j3e.de/ispell/igerman98/")
955 (license (list license:gpl2 license:gpl3))))
957 (define-public hyphen
964 (uri (string-append "mirror://sourceforge/hunspell/Hyphen/"
965 (version-major+minor version) "/"
966 name "-" version ".tar.gz"))
968 "01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih"))))
969 (build-system gnu-build-system)
972 (home-page "http://hunspell.sourceforge.net/")
973 (synopsis "Hyphenation library")
974 (description "Hyphen is a hyphenation library using TeX hyphenation
975 patterns, which are pre-processed by a perl script.")
976 ;; Triple license, including "mpl1.1 or later".
978 (list license:mpl1.1 license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
980 (define-public mythes
987 (uri (string-append "mirror://sourceforge/hunspell/MyThes/" version "/"
988 name "-" version ".tar.gz"))
990 "0prh19wy1c74kmzkkavm9qslk99gz8h8wmjvwzjc6lf8v2az708y"))))
991 (build-system gnu-build-system)
995 (list hunspell perl))
996 (home-page "http://hunspell.sourceforge.net/")
997 (synopsis "Thesaurus")
998 (description "MyThes is a simple thesaurus that uses a structured text
999 data file and an index file with binary search to look up words and phrases
1000 and to return information on pronunciations, meanings and synonyms.")
1001 (license (license:non-copyleft "file://COPYING"
1002 "See COPYING in the distribution."))))
1004 (define-public libqxp
1010 (uri (string-append "https://dev-www.libreoffice.org/src/libqxp/"
1011 "libqxp-" version ".tar.xz"))
1014 "0p4lb84m05wqd8qr8ni9sp80ivlm83ffn0nxiv4m42hj22qvcdz1"))))
1015 (build-system gnu-build-system)
1017 (list boost icu4c zlib))
1019 (list cppunit pkg-config))
1021 (list librevenge)) ; mentioned in Requires field
1022 (home-page "https://www.libreoffice.org")
1023 (synopsis "Library and tools for the QuarkXPress file format")
1024 (description "libqxp is a library and a set of tools for reading and
1025 converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
1026 (license license:mpl2.0)))
1028 ;; When updating libreoffice, also make sure to update the
1029 ;; hunspell dictionaries! They use the libreoffice version.
1030 (define-public libreoffice
1032 (name "libreoffice")
1039 "https://download.documentfoundation.org/libreoffice/src/"
1040 (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
1042 (base32 "1jsskhnlyra7q6d12kkc8dxq5fgrnd8grl32bdck7j9hkwv6d13m"))))
1043 (build-system glib-or-gtk-build-system)
1046 ("cppunit" ,cppunit)
1048 ("pkg-config" ,pkg-config)
1049 ("python" ,python-wrapper)
1051 ("ziptime" ,ziptime)))
1056 ("clucene" ,clucene)
1058 ("dbus-glib" ,dbus-glib)
1059 ("firebird" ,firebird)
1060 ("fontconfig" ,fontconfig)
1061 ("fontforge" ,fontforge)
1066 ("gobject-introspection" ,gobject-introspection)
1069 ("graphite2" ,graphite2)
1070 ("gst-plugins-base" ,gst-plugins-base)
1072 ("harfbuzz" ,harfbuzz)
1073 ("hunspell" ,hunspell)
1077 ("libcmis" ,libcmis)
1078 ("libjpeg-turbo" ,libjpeg-turbo)
1079 ("libe-book" ,libe-book)
1080 ("libepubgen" ,libepubgen)
1081 ("libetonyek" ,libetonyek)
1082 ("libexttextcat" ,libexttextcat)
1083 ("libfreehand" ,libfreehand)
1084 ("liblangtag" ,liblangtag)
1085 ;; XXX: Perhaps this should be propagated from xmlsec.
1086 ("libltdl" ,libltdl)
1087 ("libmspub" ,libmspub)
1088 ("libmwaw" ,libmwaw)
1089 ("libnumbertext" ,libnumbertext)
1090 ("libodfgen" ,libodfgen)
1091 ("libpagemaker" ,libpagemaker)
1093 ("libstaroffice" ,libstaroffice)
1094 ("libvisio" ,libvisio)
1097 ("libxrandr" ,libxrandr)
1098 ("libxrender" ,libxrender)
1099 ("libxslt" ,libxslt)
1102 ("lpsolve" ,lpsolve)
1103 ("mariadb" ,mariadb "dev")
1109 ("openldap" ,openldap)
1110 ("openssl" ,openssl)
1113 ("perl-archive-zip" ,perl-archive-zip)
1114 ("poppler" ,poppler)
1115 ("postgresql" ,postgresql)
1117 ("python-lxml" ,python-lxml)
1118 ("qrcodegen-cpp" ,qrcodegen-cpp)
1119 ("redland" ,redland)
1120 ("sane-backends" ,sane-backends)
1121 ("unixodbc" ,unixodbc)
1124 ("xdg-utils" ,xdg-utils)
1125 ("xmlsec" ,xmlsec-nss)
1127 ("dtoa" ; needed after version 6.4.7.2.
1130 (uri "https://dev-www.libreoffice.org/src/dtoa-20180411.tgz")
1132 (base32 "1d0iwy0q5sjznv23d3nbwmy0r7m1mdzlnv5pc4izddkx9xld10h0"))))))
1134 `(#:tests? #f ; Building the tests already fails.
1136 (modify-phases %standard-phases
1137 (add-after 'unpack 'insert-external-tarballs
1138 (lambda* (#:key inputs #:allow-other-keys)
1139 (mkdir-p "external/tarballs")
1140 (copy-file (assoc-ref inputs "dtoa")
1141 "external/tarballs/dtoa-20180411.tgz")
1143 (add-before 'configure 'prepare-src
1144 (lambda* (#:key inputs #:allow-other-keys)
1146 (list "sysui/CustomTarget_share.mk"
1147 "solenv/gbuild/gbuild.mk"
1148 "solenv/gbuild/platform/unxgcc.mk")
1149 (("/bin/sh") (which "sh")))
1151 ;; Use store references for strictly necessary commands,
1152 ;; but not for optional tools like ‘gdb’ and ‘valgrind’.
1153 (for-each (lambda (command)
1154 (substitute* "desktop/scripts/soffice.sh"
1155 (((format #f"~a " command))
1156 (format #f "~a " (which command)))))
1157 (list "dirname" "grep" "uname"))
1159 ;; GPGME++ headers are installed in a gpgme++ subdirectory, but
1160 ;; configure is hardcoded to use FHS directories.
1161 (substitute* "configure"
1162 (("GPGMEPP_CFLAGS=-I/usr")
1163 (string-append "GPGMEPP_CFLAGS=-I"
1164 (assoc-ref inputs "gpgme"))))
1166 ;; /usr/bin/xdg-open doesn't exist on Guix System.
1167 (substitute* '("shell/source/unix/exec/shellexec.cxx"
1168 "shell/source/unix/misc/senddoc.sh")
1169 (("/usr/bin/xdg-open")
1170 (search-input-file inputs "/bin/xdg-open")))))
1171 (add-after 'install 'reset-zip-timestamps
1172 (lambda* (#:key outputs #:allow-other-keys)
1173 (let ((out (assoc-ref outputs "out")))
1174 (for-each (lambda (file)
1175 (invoke "ziptime" file))
1176 ;; So many different extensions for .zip files.
1177 (find-files out "\\.(bau|dat|otp|ott|zip)$")))))
1178 (add-after 'install 'bin-and-desktop-install
1179 ;; Create 'soffice' and 'libreoffice' symlinks to the executable
1181 (lambda* (#:key outputs #:allow-other-keys)
1182 (let ((out (assoc-ref outputs "out")))
1183 (define (symlink-output src dst)
1184 (mkdir-p (dirname (string-append out dst)))
1185 (symlink (string-append out src) (string-append out dst)))
1186 (define (install src dst)
1187 (let ((dst (string-append out dst)))
1188 (mkdir-p (dirname dst))
1189 (copy-file src dst)))
1190 (define (install-desktop-file app)
1191 (let ((src (string-append "/lib/libreoffice/share/xdg/"
1193 (dst (string-append "/share/applications/libreoffice-"
1195 (substitute* (string-append out src)
1196 (("Exec=libreoffice[0-9]+\\.[0-9]+ ")
1197 (string-append "Exec=" out "/bin/libreoffice "))
1198 (("Icon=libreoffice.*")
1199 (string-append "Icon=" app "\n"))
1200 (("LibreOffice [0-9]+\\.[0-9]+")
1202 (symlink-output src dst)))
1203 (define (install-appdata app)
1204 (install-file (string-append
1205 "sysui/desktop/appstream-appdata/"
1206 "libreoffice-" app ".appdata.xml")
1207 (string-append out "/share/appdata")))
1208 (symlink-output "/lib/libreoffice/program/soffice"
1210 (symlink-output "/lib/libreoffice/program/soffice"
1213 "workdir/CustomTarget/sysui/share/libreoffice/openoffice.org.xml"
1214 "/share/mime/packages/libreoffice.xml")
1215 (for-each install-desktop-file
1216 '("base" "calc" "draw" "impress" "writer"
1217 "math" "startcenter"))
1218 (for-each install-appdata
1219 '("base" "calc" "draw" "impress" "writer"))
1220 (mkdir-p (string-append out "/share/icons/hicolor"))
1221 (copy-recursively "sysui/desktop/icons/hicolor"
1222 (string-append out "/share/icons/hicolor")))
1226 "--enable-release-build"
1227 "--with-vendor=GNU Guix"
1228 ;; Avoid using all cpu cores by default
1229 (format #f "--with-parallelism=~d" (parallel-job-count))
1230 "--disable-fetch-external" ; disable downloads
1231 "--with-system-libs" ; enable all --with-system-* flags
1232 (string-append "--with-boost-libdir="
1233 (assoc-ref %build-inputs "boost") "/lib")
1234 ;; Avoid undefined symbols required by boost::spirit
1235 "LDFLAGS=-lboost_system"
1236 ;; Avoid a dependency on ucpp.
1237 "--with-idlc-cpp=cpp"
1238 ;; The fonts require an external tarball (crosextrafonts).
1239 ;; They should not be needed when system fonts are available.
1241 ;; With java, the build fails since sac.jar is missing.
1243 ;; FIXME: Enable once the corresponding inputs are packaged.
1246 ;; This could (Debian does this) be a separate output containing only
1247 ;; program/libfirebird_sdbclo.so, if there's a way to point to it.
1248 "--enable-firebird-sdbc"
1249 ;; XXX: PDFium support requires fetching an external tarball and
1250 ;; patching the build scripts to work with GCC5. Try enabling this
1251 ;; when our default compiler is >=GCC 6.
1254 "--enable-build-opensymbol")))
1255 (home-page "https://www.libreoffice.org/")
1256 (synopsis "Office suite")
1257 (description "LibreOffice is a comprehensive office suite. It contains
1258 a number of components: Writer, a word processor; Calc, a spreadsheet
1259 application; Impress, a presentation engine; Draw, a drawing and
1260 flowcharting application; Base, a database and database frontend;
1261 Math for editing mathematics.")
1262 (license license:mpl2.0)))