;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
-;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
;;;
;;; This file is part of GNU Guix.
;;;
(define-module (gnu packages libreoffice)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (guix download)
#:use-module (guix git-download)
- #:use-module ((guix licenses)
- #:select (gpl2+ lgpl2.1+ lgpl3+ mpl1.1 mpl2.0
- non-copyleft x11-style bsd-3))
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (ice-9 match)
#:use-module (gnu packages)
+ #:use-module (gnu packages aidc)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
#:use-module (gnu packages image)
#:use-module (gnu packages java)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages logging)
#:use-module (gnu packages maths)
#:use-module (gnu packages nss)
#:use-module (gnu packages openldap)
(define-public ixion
(package
(name "ixion")
- (version "0.14.1")
+ (version "0.15.0")
(source
(origin
(method url-fetch)
version ".tar.xz"))
(sha256
(base32
- "14gdd6div4l22vnz3jn2qjxgjly98ck6p8c1v7386c41rx7kilba"))))
+ "1rmrl2zjzi4z0abf2cd54acypkccdhx2065dlyzy6xg83gv0mxmi"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
`(("mdds" ,mdds)
- ("python" ,python)))
+ ("python" ,python)
+ ("spdlog" ,spdlog)))
(home-page "https://gitlab.com/ixion/ixion")
(synopsis "General purpose formula parser and interpreter")
(description "Ixion is a library for calculating the results of formula
expressions stored in multiple named targets, or \"cells\". The cells can
be referenced from each other, and the library takes care of resolving
their dependencies automatically upon calculation.")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-public orcus
(package
(name "orcus")
- (version "0.14.1")
+ (version "0.15.3")
(source
(origin
(method url-fetch)
- (uri (string-append "http://kohei.us/files/" name "/src/lib"
- name "-" version ".tar.xz"))
+ (uri (string-append "http://kohei.us/files/orcus/src/lib"
+ "orcus-" version ".tar.xz"))
(sha256
(base32
- "1ays13a1x15j81dsrq0d3697v1bbqd3bfz3ajn6kb9d61y2drlgj"))))
+ "14gbnqsv5n2fm4sxa17014f440clrzls6p2w2ixk9wipg4950v9s"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
Microsoft Excel 2007 XML, Microsoft Excel 2003 XML, Open Document Spreadsheet,
Plain Text, Gnumeric XML, Generic XML. It also includes low-level parsers for
CSV, CSS and XML.")
- (license mpl2.0)))
+ (license license:mpl2.0)))
+
+(define-public unoconv
+ (package
+ (name "unoconv")
+ (version "0.9.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "unoconv" version))
+ (sha256
+ (base32 "0cb0bvyxib3xrj0jdgizhp6p057lr8kqnd3n921rin37ivcvz3ih"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'stop-hash-sniffing
+ ;; Fixes <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39647#11>.
+ ;; Submitted upsteam: <https://github.com/unoconv/unoconv/pull/531>.
+ (lambda _
+ (substitute* "unoconv"
+ (("sys.argv\\[0\\]\\.split\\('2'\\)")
+ "os.path.basename(sys.argv[0]).split('2')"))
+ #t))
+ (add-after 'unpack 'patch-find_offices
+ ;; find_offices is a convoluted cross-platform treasure hunt.
+ ;; Keep things simple and return the correct paths immediately.
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((libreoffice (assoc-ref inputs "libreoffice")))
+ (substitute* "unoconv"
+ (("def find_offices\\(\\):" match)
+ (string-append
+ match "\n"
+ " return [Office("
+ "'" libreoffice "/lib/libreoffice', "
+ "'" libreoffice "/lib/libreoffice/program', "
+ "'" libreoffice "/lib/libreoffice/program', "
+ "'" libreoffice "/lib/libreoffice/program/pyuno.so', "
+ "'" libreoffice "/bin/soffice', "
+ "sys.executable, "
+ "None)]\n")))
+ #t))))))
+ (inputs
+ `(("libreoffice" ,libreoffice)))
+ (home-page "http://dag.wiee.rs/home-made/unoconv/")
+ (synopsis "Convert between any document format supported by LibreOffice")
+ (description
+ "Unoconv is a command-line utility to convert documents from any format
+that LibreOffice can import, to any format it can export. It can be used for
+batch processing and can apply custom style templates and filters.
+
+Unoconv converts between over a hundred formats, including Open Document
+Format (@file{.odt}, @file{.ods}, @file{.odp})), Portable Document Format
+(@file{.pdf}), HTML and XHTML, RTF, DocBook (@file{.xml}), @file{.doc} and
+@file{.docx}), @file{.xls} and @file{.xlsx}).
+
+All required fonts must be installed on the converting system.")
+ (license license:gpl2)))
(define-public librevenge
(package
(source
(origin
(method url-fetch)
- (uri (string-append "mirror://sourceforge/libwpd/" name "/" name "-"
- version "/" name "-" version ".tar.xz"))
+ (uri (string-append "mirror://sourceforge/libwpd/librevenge/librevenge-"
+ version "/librevenge-" version ".tar.xz"))
(sha256 (base32
"1cj76cz4mqcy2mgv9l5xlc95bypyk8zbq0ls9cswqrs2y0lhfgwk"))))
(build-system gnu-build-system)
(description "Librevenge is a base library for writing document import
filters. It has interfaces for text documents, vector graphics,
spreadsheets and presentations.")
- (license (list mpl2.0 lgpl2.1+)))) ;dual licensed
+ (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
(define-public libwpd
(package
(description "Libwpd is a C++ library designed to help process
WordPerfect documents. It is most commonly used to import such documents
into other word processors.")
- (license (list mpl2.0 lgpl2.1+)))) ;dual licensed
+ (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
(define-public libe-book
(package
PalmDoc Ebook, Plucker .pdb, QiOO (mobile format, for java-enabled
cellphones), TCR (simple compressed text format), TealDoc, zTXT,
ZVR (simple compressed text format).")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-public libepubgen
(package
(description "libepubgen is an EPUB generator for librevenge. It supports
librevenge's text document interface and--currently in a very limited
way--presentation and vector drawing interfaces.")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-public libwpg
(package
(synopsis "Library and tools for the WordPerfect Graphics format")
(description "The libwpg project provides a library and tools for
working with graphics in the WPG (WordPerfect Graphics) format.")
- (license (list mpl2.0 lgpl2.1+)))) ;dual licensed
+ (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
(define-public libcmis
(package
(description "LibCMIS is a C++ client library for the CMIS interface. It
allows C++ applications to connect to any ECM behaving as a CMIS server such
as Alfresco or Nuxeo.")
- (license (list mpl1.1 gpl2+ lgpl2.1+)))) ; triple license
+ (license
+ (list license:mpl1.1 license:gpl2+ license:lgpl2.1+)))) ; triple license
(define-public libabw
(package
(synopsis "Library for parsing the AbiWord format")
(description "Libabw is a library that parses the file format of
AbiWord documents.")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-public libcdr
(package
(synopsis "Library for parsing the CorelDRAW format")
(description "Libcdr is a library that parses the file format of
CorelDRAW documents of all versions.")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-public libetonyek
(package
"0jhsbdimiyijdqriy0zzkjjgc4wi6fjimhdg4mdybrlwg7l7f5p6"))))
(build-system gnu-build-system)
(arguments
- `(#:configure-flags '("--with-mdds=1.4")))
+ `(#:configure-flags '("--with-mdds=1.5")))
(native-inputs
`(("cppunit" ,cppunit)
("doxygen" ,doxygen)
(synopsis "Library for parsing the Apple Keynote format")
(description "Libetonyek is a library that parses the file format of
Apple Keynote documents. It currently supports Keynote versions 2 to 5.")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-public liblangtag
(package
(name "liblangtag")
- (version "0.6.2")
+ (version "0.6.3")
(source
(origin
(method url-fetch)
(uri (string-append "https://bitbucket.org/tagoh/liblangtag/downloads/"
- name "-" version ".tar.bz2"))
+ "liblangtag-" version ".tar.bz2"))
(sha256
- (base32
- "0bnm4hllr8cfrybm8rw7b8n0nlhzhnv73bkg1bxk452g6a82f96n"))))
+ (base32 "1g9kwxx60q0hpwvs66ys1cb9qg54hfvbivadwli8sfpc085a44hz"))))
(build-system gnu-build-system)
(native-inputs
`(("libtool" ,libtool)
("pkg-config" ,pkg-config)))
(inputs
`(("libxml2" ,libxml2)))
- ;; As of December 2017, tagoh.bitbucket.org redirects to a hosting advert.
(home-page "https://bitbucket.org/tagoh/liblangtag")
(synopsis "Library to access tags for identifying languages")
(description "Liblangtag implements an interface to work with tags
extensions described in RFC6067 and RFC6497, and Extension T for
language/locale identifiers as described in the Unicode CLDR
standard 21.0.2.")
- (license (list lgpl3+ mpl2.0)))) ; dual license
+ (license (list license:lgpl3+ license:mpl2.0)))) ; dual license
(define-public libexttextcat
(package
(synopsis "Text Categorization library")
(description "Libexttextcat is an N-Gram-Based Text Categorization
library primarily intended for language guessing.")
- (license (non-copyleft "file://LICENSE"
- "See LICENSE in the distribution."))))
+ (license (license:non-copyleft "file://LICENSE"
+ "See LICENSE in the distribution."))))
(define-public libfreehand
(package
(sha256 (base32
"1b1lvqh68rwij1yvmxy02hsmh7i74ma5767mk8mg5nx6chajshhf"))))
(build-system gnu-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (add-before 'build 'adjust-for-ICU-65
+ (lambda _
+ ;; Fix build with ICU 65 and later. Taken from this
+ ;; upstream commit, remove for libfreehand > 0.1.2:
+ ;; https://gerrit.libreoffice.org/#/c/80224/
+ (substitute* "src/lib/libfreehand_utils.cpp"
+ (("U16_NEXT.*" all)
+ (string-append all ";\n")))
+ #t)))))
(native-inputs
`(("cppunit" ,cppunit)
("doxygen" ,doxygen)
(synopsis "Library for parsing the FreeHand format")
(description "Libfreehand is a library that parses the file format of
Aldus/Macromedia/Adobe FreeHand documents.")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-public libmspub
(package
(synopsis "Library for parsing the Microsoft Publisher format")
(description "Libmspub is a library that parses the file format of
Microsoft Publisher documents of all versions.")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-public libnumbertext
(package
(name "libnumbertext")
- (version "1.0.5")
+ (version "1.0.6")
(source
(origin
(method url-fetch)
"releases/download/" version
"/libnumbertext-" version ".tar.xz"))
(sha256
- (base32 "1xzlwhwwhvr76kfdsw5gvfjfdayz803z65h331gv5dpc9imhijg1"))))
+ (base32 "0mxf22gpbr818ib4av17zmyx6i6nf4br5qlxq0qvfz5z6h5j57vk"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags '("--disable-static")))
"The libnumbertext library provides language-neutral @code{NUMBERTEXT}
and @code{MONEYTEXT} functions for LibreOffice Calc, available for C++ and
Java.")
- (license (list lgpl3+ bsd-3))))
+ (license (list license:lgpl3+ license:bsd-3))))
(define-public libpagemaker
(package
(description "Libpagemaker is a library that parses the file format of
Aldus/Adobe PageMaker documents. Currently it only understands documents
created by PageMaker version 6.x and 7.")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-public libvisio
(package
(synopsis "Library for parsing the Microsoft Visio format")
(description "Libvisio is a library that parses the file format of
Microsoft Visio documents of all versions.")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-public libodfgen
(package
Open Document Format (ODF). It provides generator implementations for all
document interfaces supported by librevenge:
text documents, vector drawings, presentations and spreadsheets.")
- (license (list mpl2.0 lgpl2.1+)))) ; dual license
+ (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
(define-public libmwaw
(package
(description "Libmwaw contains some import filters for old Macintosh
text documents (MacWrite, ClarisWorks, ... ) and for some graphics and
spreadsheet documents.")
- (license (list mpl2.0 lgpl2.1+)))) ; dual license
+ (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
(define-public libstaroffice
(package
(synopsis "Provides LibreOffice support for old StarOffice documents")
(description "@code{libstaroffice} is an import filter for the document formats
from the old StarOffice (.sdc, .sdw, ...).")
- (license (list mpl2.0 lgpl2.1+)))) ; dual license
+ (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
(define-public libwps
(package
(name "libwps")
- (version "0.4.10")
+ (version "0.4.12")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/" name "/" name "/"
name "-" version "/" name "-" version ".tar.xz"))
(sha256 (base32
- "1ji9zd4wxmas03g8jyx0ih0amrqfazm5874a2v9rd7va50sf088l"))))
+ "1nsfacqp5sfkyayw7q0wp68lidksd1wjdix8qmsbf0vdl19gn6p2"))))
(build-system gnu-build-system)
(native-inputs
`(("doxygen" ,doxygen)
(synopsis "Import library for Microsoft Works text documents")
(description "Libwps is a library for importing files in the Microsoft
Works word processor file format.")
- (license (list mpl2.0 lgpl2.1+)))) ; dual license
+ (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
(define-public libzmf
(package
(description "Libzmf is a library that parses the file format of Zoner
Callisto/Draw documents. Currently it only understands documents created by
Zoner Draw version 4 and 5.")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-public hunspell
(package
library and program designed for languages with rich morphology and complex
word compounding or character encoding.")
;; Triple license, including "mpl1.1 or later".
- (license (list mpl1.1 gpl2+ lgpl2.1+))))
+ (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))))
(define (dicollecte-french-dictionary variant synopsis)
;; Return a French dictionary package from dicollecte.org, for the given
"This package provides a dictionary for the Hunspell spell-checking
library.")
(home-page "https://www.dicollecte.org/home.php?prj=fr")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-syntax define-french-dictionary
(syntax-rules (synopsis)
"toutesvariantes"
(synopsis "Hunspell dictionary for all variants of French"))
+(define-public hunspell-dict-pl
+ (package
+ (name "hunspell-dict-pl")
+ (version "20200327")
+ (source
+ (origin
+ (method url-fetch)
+ ;; Since creators of dictionary host only the latest daily release,
+ ;; we're using version mirrored by Arch Linux, which seems good
+ ;; enough. They're mirroring hunspell-pl releases since 2011.
+ (uri (string-append "https://sources.archlinux.org/other/community/"
+ "hunspell-pl/sjp-myspell-pl-"
+ version ".zip"))
+ (sha256 (base32
+ "14mzf8glxkp2775dcqisb1zv6r8ncm3bvzl46q352rwyl2dg1c59"))))
+
+ (build-system trivial-build-system)
+ (native-inputs `(("unzip" ,unzip)))
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder (begin
+ (use-modules (guix build utils)
+ (srfi srfi-26))
+
+ (let* ((out (assoc-ref %outputs "out"))
+ (hunspell (string-append out "/share/hunspell"))
+ (myspell (string-append out "/share/myspell"))
+ (doc (string-append out "/share/doc/"
+ ,name))
+ (unzip (string-append (assoc-ref %build-inputs "unzip")
+ "/bin/unzip")))
+ (invoke unzip "-j" "-o" (assoc-ref %build-inputs "source"))
+ (invoke unzip "-j" "-o" "pl_PL.zip")
+ (for-each (cut install-file <> hunspell)
+ (find-files "."
+ ,(string-append "pl_PL"
+ "\\.(dic|aff)$")))
+ (mkdir-p myspell)
+ (symlink hunspell (string-append myspell "/dicts"))
+ (for-each (cut install-file <> doc)
+ (find-files "." "\\.(txt|org|md)$"))
+ #t))))
+ (synopsis "Hunspell dictionary for Polish")
+ (description
+ "This package provides a dictionary for the Hunspell spell-checking
+library.")
+ (home-page "https://sjp.pl/slownik/ort/")
+ (license
+ (list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))
+
(define-public hyphen
(package
(name "hyphen")
(synopsis "Hyphenation library")
(description "Hyphen is a hyphenation library using TeX hyphenation
patterns, which are pre-processed by a perl script.")
- ;; triple license, including "mpl1.1 or later"
- (license (list mpl1.1 mpl2.0 gpl2+ lgpl2.1+))))
+ ;; Triple license, including "mpl1.1 or later".
+ (license
+ (list license:mpl1.1 license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
(define-public mythes
(package
(description "MyThes is a simple thesaurus that uses a structured text
data file and an index file with binary search to look up words and phrases
and to return information on pronunciations, meanings and synonyms.")
- (license (non-copyleft "file://COPYING"
- "See COPYING in the distribution."))))
+ (license (license:non-copyleft "file://COPYING"
+ "See COPYING in the distribution."))))
(define-public libqxp
(package
(synopsis "Library and tools for the QuarkXPress file format")
(description "libqxp is a library and a set of tools for reading and
converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
- (license mpl2.0)))
+ (license license:mpl2.0)))
(define-public libreoffice
(package
(name "libreoffice")
- (version "6.3.4.2")
+ (version "6.4.6.2")
(source
(origin
(method url-fetch)
"https://download.documentfoundation.org/libreoffice/src/"
(version-prefix version 3) "/libreoffice-" version ".tar.xz"))
(sha256
- (base32
- "1774vmf3lr5x24ikpn1z5vqcdwrhiwfkjy7sx09jqkvpm6d5awnb"))
- (patches (search-patches "libreoffice-icu.patch"
- "libreoffice-glm.patch"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- (for-each (lambda (file)
- ;; Adjust to renamed function in Poppler 0.72.
- (substitute* file (("getCString") "c_str")))
- (find-files "sdext/source/pdfimport/xpdfwrapper"))
- #t))))
+ (base32 "0k5aq1pfw2rpq28nkx6syrgwqbbdn6my9bnlqi3fn8qf572q30mb"))))
(build-system glib-or-gtk-build-system)
(native-inputs
`(("bison" ,bison)
("postgresql" ,postgresql)
("python" ,python)
("python-lxml" ,python-lxml)
+ ("qrcodegen-cpp" ,qrcodegen-cpp)
("redland" ,redland)
("sane-backends" ,sane-backends)
("unixodbc" ,unixodbc)
("xmlsec" ,xmlsec-nss)
("zip" ,zip)))
(arguments
- `(#:tests? #f ; Building the tests already fails.
+ `(#:tests? #f ; Building the tests already fails.
#:make-flags '("build-nocheck") ; Do not build unit tests, which fails.
#:phases
- (modify-phases %standard-phases
- (add-before 'configure 'prepare-src
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute*
- (list "sysui/CustomTarget_share.mk"
- "solenv/gbuild/gbuild.mk"
- "solenv/gbuild/platform/unxgcc.mk")
- (("/bin/sh") (which "sh")))
+ (modify-phases %standard-phases
+ (add-before 'configure 'prepare-src
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute*
+ (list "sysui/CustomTarget_share.mk"
+ "solenv/gbuild/gbuild.mk"
+ "solenv/gbuild/platform/unxgcc.mk")
+ (("/bin/sh") (which "sh")))
+
+ ;; Use store references for strictly necessary commands,
+ ;; but not for optional tools like ‘gdb’ and ‘valgrind’.
+ (for-each (lambda (command)
+ (substitute* "desktop/scripts/soffice.sh"
+ (((format #f"~a " command))
+ (format #f "~a " (which command)))))
+ (list "dirname" "grep" "uname"))
- ;; GPGME++ headers are installed in a gpgme++ subdirectory, but
- ;; files in "xmlsecurity/source/gpg/" and elsewhere expect to
- ;; find them on the include path without a prefix.
- (substitute* '("xmlsecurity/Library_xsec_xmlsec.mk"
- "comphelper/Library_comphelper.mk")
- (("\\$\\$\\(INCLUDE\\)")
- (string-append "$$(INCLUDE) -I"
- (assoc-ref inputs "gpgme")
- "/include/gpgme++")))
+ ;; GPGME++ headers are installed in a gpgme++ subdirectory, but
+ ;; files in "xmlsecurity/source/gpg/" and elsewhere expect to
+ ;; find them on the include path without a prefix.
+ (substitute* '("xmlsecurity/Library_xsec_xmlsec.mk"
+ "comphelper/Library_comphelper.mk")
+ (("\\$\\$\\(INCLUDE\\)")
+ (string-append "$$(INCLUDE) -I"
+ (assoc-ref inputs "gpgme")
+ "/include/gpgme++")))
- ;; /usr/bin/xdg-open doesn't exist on Guix System.
- (substitute* '("shell/source/unix/exec/shellexec.cxx"
- "shell/source/unix/misc/senddoc.sh")
- (("/usr/bin/xdg-open")
- (string-append (assoc-ref inputs "xdg-utils")
- "/bin/xdg-open")))
+ ;; /usr/bin/xdg-open doesn't exist on Guix System.
+ (substitute* '("shell/source/unix/exec/shellexec.cxx"
+ "shell/source/unix/misc/senddoc.sh")
+ (("/usr/bin/xdg-open")
+ (string-append (assoc-ref inputs "xdg-utils")
+ "/bin/xdg-open")))
- #t))
- (add-after 'install 'bin-and-desktop-install
- ;; Create 'soffice' and 'libreoffice' symlinks to the executable
- ;; script.
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (define (symlink-output src dst)
- (mkdir-p (dirname (string-append out dst)))
- (symlink (string-append out src) (string-append out dst)))
- (define (install src dst)
- (let ((dst (string-append out dst)))
- (mkdir-p (dirname dst))
- (copy-file src dst)))
- (define (install-desktop-file app)
- (let ((src (string-append "/lib/libreoffice/share/xdg/"
- app ".desktop"))
- (dst (string-append "/share/applications/libreoffice-"
- app ".desktop")))
- (substitute* (string-append out src)
- (("Exec=libreoffice[0-9]+\\.[0-9]+ ")
- (string-append "Exec=" out "/bin/libreoffice "))
- (("Icon=libreoffice.*")
- (string-append "Icon=" app "\n"))
- (("LibreOffice [0-9]+\\.[0-9]+")
- "LibreOffice"))
- (symlink-output src dst)))
- (define (install-appdata app)
- (install-file (string-append
- "sysui/desktop/appstream-appdata/"
- "libreoffice-" app ".appdata.xml")
- (string-append out "/share/appdata")))
- (symlink-output "/lib/libreoffice/program/soffice"
- "/bin/soffice")
- (symlink-output "/lib/libreoffice/program/soffice"
- "/bin/libreoffice")
- (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.keys"
- "/share/mime-info/libreoffice.keys")
- (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.mime"
- "/share/mime-info/libreoffice.mime")
- (install
- "workdir/CustomTarget/sysui/share/libreoffice/openoffice.org.xml"
- "/share/mime/packages/libreoffice.xml")
- (for-each install-desktop-file
- '("base" "calc" "draw" "impress" "writer"
- "math" "startcenter"))
- (for-each install-appdata
- '("base" "calc" "draw" "impress" "writer"))
- (mkdir-p (string-append out "/share/icons/hicolor"))
- (copy-recursively "sysui/desktop/icons/hicolor"
- (string-append out "/share/icons/hicolor")))
- #t)))
+ #t))
+ (add-after 'install 'bin-and-desktop-install
+ ;; Create 'soffice' and 'libreoffice' symlinks to the executable
+ ;; script.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (define (symlink-output src dst)
+ (mkdir-p (dirname (string-append out dst)))
+ (symlink (string-append out src) (string-append out dst)))
+ (define (install src dst)
+ (let ((dst (string-append out dst)))
+ (mkdir-p (dirname dst))
+ (copy-file src dst)))
+ (define (install-desktop-file app)
+ (let ((src (string-append "/lib/libreoffice/share/xdg/"
+ app ".desktop"))
+ (dst (string-append "/share/applications/libreoffice-"
+ app ".desktop")))
+ (substitute* (string-append out src)
+ (("Exec=libreoffice[0-9]+\\.[0-9]+ ")
+ (string-append "Exec=" out "/bin/libreoffice "))
+ (("Icon=libreoffice.*")
+ (string-append "Icon=" app "\n"))
+ (("LibreOffice [0-9]+\\.[0-9]+")
+ "LibreOffice"))
+ (symlink-output src dst)))
+ (define (install-appdata app)
+ (install-file (string-append
+ "sysui/desktop/appstream-appdata/"
+ "libreoffice-" app ".appdata.xml")
+ (string-append out "/share/appdata")))
+ (symlink-output "/lib/libreoffice/program/soffice"
+ "/bin/soffice")
+ (symlink-output "/lib/libreoffice/program/soffice"
+ "/bin/libreoffice")
+ (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.keys"
+ "/share/mime-info/libreoffice.keys")
+ (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.mime"
+ "/share/mime-info/libreoffice.mime")
+ (install
+ "workdir/CustomTarget/sysui/share/libreoffice/openoffice.org.xml"
+ "/share/mime/packages/libreoffice.xml")
+ (for-each install-desktop-file
+ '("base" "calc" "draw" "impress" "writer"
+ "math" "startcenter"))
+ (for-each install-appdata
+ '("base" "calc" "draw" "impress" "writer"))
+ (mkdir-p (string-append out "/share/icons/hicolor"))
+ (copy-recursively "sysui/desktop/icons/hicolor"
+ (string-append out "/share/icons/hicolor")))
+ #t)))
#:configure-flags
- (list
- "--enable-release-build"
- ;; Avoid using all cpu cores by default
- (format #f "--with-parallelism=~d" (parallel-job-count))
- "--disable-fetch-external" ; disable downloads
- "--with-system-libs" ; enable all --with-system-* flags
- (string-append "--with-boost-libdir="
- (assoc-ref %build-inputs "boost") "/lib")
- ;; Avoid undefined symbols required by boost::spirit
- "LDFLAGS=-lboost_system"
- ;; Avoid a dependency on ucpp.
- "--with-idlc-cpp=cpp"
- ;; The fonts require an external tarball (crosextrafonts).
- ;; They should not be needed when system fonts are available.
- "--without-fonts"
- ;; With java, the build fails since sac.jar is missing.
- "--without-java"
- ;; FIXME: Enable once the corresponding inputs are packaged.
- "--disable-coinmp"
- "--disable-firebird-sdbc" ; embedded firebird
- ;; XXX: PDFium support requires fetching an external tarball and
- ;; patching the build scripts to work with GCC5. Try enabling this
- ;; when our default compiler is >=GCC 6.
- "--disable-pdfium"
- "--disable-gtk" ; disable use of GTK+ 2
- "--without-doxygen"
- "--enable-build-opensymbol")))
+ (list
+ "--enable-release-build"
+ ;; Avoid using all cpu cores by default
+ (format #f "--with-parallelism=~d" (parallel-job-count))
+ "--disable-fetch-external" ; disable downloads
+ "--with-system-libs" ; enable all --with-system-* flags
+ (string-append "--with-boost-libdir="
+ (assoc-ref %build-inputs "boost") "/lib")
+ ;; Avoid undefined symbols required by boost::spirit
+ "LDFLAGS=-lboost_system"
+ ;; Avoid a dependency on ucpp.
+ "--with-idlc-cpp=cpp"
+ ;; The fonts require an external tarball (crosextrafonts).
+ ;; They should not be needed when system fonts are available.
+ "--without-fonts"
+ ;; With java, the build fails since sac.jar is missing.
+ "--without-java"
+ ;; FIXME: Enable once the corresponding inputs are packaged.
+ "--disable-coinmp"
+ "--disable-firebird-sdbc" ; embedded firebird
+ ;; XXX: PDFium support requires fetching an external tarball and
+ ;; patching the build scripts to work with GCC5. Try enabling this
+ ;; when our default compiler is >=GCC 6.
+ "--disable-pdfium"
+ "--without-doxygen"
+ "--enable-build-opensymbol")))
(home-page "https://www.libreoffice.org/")
(synopsis "Office suite")
(description "LibreOffice is a comprehensive office suite. It contains
application; Impress, a presentation engine; Draw, a drawing and
flowcharting application; Base, a database and database frontend;
Math for editing mathematics.")
- (license mpl2.0)))
+ (license license:mpl2.0)))