libreoffice.scm 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263
  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>
  16. ;;;
  17. ;;; This file is part of GNU Guix.
  18. ;;;
  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.
  23. ;;;
  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.
  28. ;;;
  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/>.
  31. (define-module (gnu packages libreoffice)
  32. #:use-module (guix build-system glib-or-gtk)
  33. #:use-module (guix build-system gnu)
  34. #:use-module (guix build-system python)
  35. #:use-module (guix build-system trivial)
  36. #:use-module (guix download)
  37. #:use-module (guix git-download)
  38. #:use-module ((guix licenses) #:prefix license:)
  39. #:use-module (guix packages)
  40. #:use-module (guix utils)
  41. #:use-module (ice-9 match)
  42. #:use-module (gnu packages)
  43. #:use-module (gnu packages aidc)
  44. #:use-module (gnu packages aspell)
  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 game-development)
  60. #:use-module (gnu packages ghostscript)
  61. #:use-module (gnu packages gl)
  62. #:use-module (gnu packages glib)
  63. #:use-module (gnu packages gnome)
  64. #:use-module (gnu packages gperf)
  65. #:use-module (gnu packages gnupg)
  66. #:use-module (gnu packages gstreamer)
  67. #:use-module (gnu packages gtk)
  68. #:use-module (gnu packages icu4c)
  69. #:use-module (gnu packages image)
  70. #:use-module (gnu packages java)
  71. #:use-module (gnu packages linux)
  72. #:use-module (gnu packages logging)
  73. #:use-module (gnu packages maths)
  74. #:use-module (gnu packages nss)
  75. #:use-module (gnu packages openldap)
  76. #:use-module (gnu packages pdf)
  77. #:use-module (gnu packages perl)
  78. #:use-module (gnu packages perl-compression)
  79. #:use-module (gnu packages pkg-config)
  80. #:use-module (gnu packages python)
  81. #:use-module (gnu packages rdf)
  82. #:use-module (gnu packages scanner)
  83. #:use-module (gnu packages tls)
  84. #:use-module (gnu packages version-control)
  85. #:use-module (gnu packages xml)
  86. #:use-module (gnu packages xorg))
  87. (define-public ixion
  88. (package
  89. (name "ixion")
  90. (version "0.16.1")
  91. (source
  92. (origin
  93. (method url-fetch)
  94. (uri (string-append "http://kohei.us/files/ixion/src/libixion-"
  95. version ".tar.xz"))
  96. (sha256
  97. (base32
  98. "17q84mhy4rb3masvjw24x549irdjmccnc8n04xh58v9l7hxn8v22"))))
  99. (build-system gnu-build-system)
  100. (native-inputs
  101. (list pkg-config))
  102. (inputs
  103. (list mdds python spdlog))
  104. (home-page "https://gitlab.com/ixion/ixion")
  105. (synopsis "General purpose formula parser and interpreter")
  106. (description "Ixion is a library for calculating the results of formula
  107. expressions stored in multiple named targets, or \"cells\". The cells can
  108. be referenced from each other, and the library takes care of resolving
  109. their dependencies automatically upon calculation.")
  110. (license license:mpl2.0)))
  111. (define-public orcus
  112. (package
  113. (name "orcus")
  114. (version "0.16.1")
  115. (source
  116. (origin
  117. (method url-fetch)
  118. (uri (string-append "http://kohei.us/files/orcus/src/lib"
  119. "orcus-" version ".tar.xz"))
  120. (sha256
  121. (base32
  122. "1bps34sqz7wlrl01ssywjd5fbmssplifs0rskivgrg801lr6pcm4"))))
  123. (build-system gnu-build-system)
  124. (arguments
  125. `(#:configure-flags '("--disable-static")))
  126. (native-inputs
  127. (list pkg-config))
  128. (inputs
  129. (list ixion mdds python zlib))
  130. (home-page "https://gitlab.com/orcus/orcus")
  131. (synopsis "File import filter library for spreadsheet documents")
  132. (description "Orcus is a library that provides a collection of standalone
  133. file processing filters. It is currently focused on providing filters for
  134. spreadsheet documents. The library includes import filters for
  135. Microsoft Excel 2007 XML, Microsoft Excel 2003 XML, Open Document Spreadsheet,
  136. Plain Text, Gnumeric XML, Generic XML. It also includes low-level parsers for
  137. CSV, CSS and XML.")
  138. (license license:mpl2.0)))
  139. (define-public unoconv
  140. (package
  141. (name "unoconv")
  142. (version "0.9.0")
  143. (source
  144. (origin
  145. (method url-fetch)
  146. (uri (pypi-uri "unoconv" version))
  147. (sha256
  148. (base32 "0cb0bvyxib3xrj0jdgizhp6p057lr8kqnd3n921rin37ivcvz3ih"))))
  149. (build-system python-build-system)
  150. (arguments
  151. `(#:phases
  152. (modify-phases %standard-phases
  153. (add-after 'unpack 'stop-hash-sniffing
  154. ;; Fixes <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39647#11>.
  155. ;; Submitted upsteam: <https://github.com/unoconv/unoconv/pull/531>.
  156. (lambda _
  157. (substitute* "unoconv"
  158. (("sys.argv\\[0\\]\\.split\\('2'\\)")
  159. "os.path.basename(sys.argv[0]).split('2')"))
  160. #t))
  161. (add-after 'unpack 'patch-find_offices
  162. ;; find_offices is a convoluted cross-platform treasure hunt.
  163. ;; Keep things simple and return the correct paths immediately.
  164. (lambda* (#:key inputs #:allow-other-keys)
  165. (let* ((libreoffice (assoc-ref inputs "libreoffice")))
  166. (substitute* "unoconv"
  167. (("def find_offices\\(\\):" match)
  168. (string-append
  169. match "\n"
  170. " return [Office("
  171. "'" libreoffice "/lib/libreoffice', "
  172. "'" libreoffice "/lib/libreoffice/program', "
  173. "'" libreoffice "/lib/libreoffice/program', "
  174. "'" libreoffice "/lib/libreoffice/program/pyuno.so', "
  175. "'" libreoffice "/bin/soffice', "
  176. "sys.executable, "
  177. "None)]\n")))
  178. #t))))))
  179. (inputs
  180. (list libreoffice))
  181. (home-page "http://dag.wiee.rs/home-made/unoconv/")
  182. (synopsis "Convert between any document format supported by LibreOffice")
  183. (description
  184. "Unoconv is a command-line utility to convert documents from any format
  185. that LibreOffice can import, to any format it can export. It can be used for
  186. batch processing and can apply custom style templates and filters.
  187. Unoconv converts between over a hundred formats, including Open Document
  188. Format (@file{.odt}, @file{.ods}, @file{.odp})), Portable Document Format
  189. (@file{.pdf}), HTML and XHTML, RTF, DocBook (@file{.xml}), @file{.doc} and
  190. @file{.docx}), @file{.xls} and @file{.xlsx}).
  191. All required fonts must be installed on the converting system.")
  192. (license license:gpl2)))
  193. (define-public librevenge
  194. (package
  195. (name "librevenge")
  196. (version "0.0.4")
  197. (source
  198. (origin
  199. (method url-fetch)
  200. (uri (string-append "mirror://sourceforge/libwpd/librevenge/librevenge-"
  201. version "/librevenge-" version ".tar.xz"))
  202. (sha256 (base32
  203. "1cj76cz4mqcy2mgv9l5xlc95bypyk8zbq0ls9cswqrs2y0lhfgwk"))))
  204. (build-system gnu-build-system)
  205. (native-inputs
  206. (list cppunit doxygen pkg-config))
  207. (inputs
  208. (list zlib))
  209. (propagated-inputs ; Referenced by .la files
  210. (list boost))
  211. (arguments
  212. ;; avoid triggering configure errors by simple inclusion of boost headers
  213. `(#:configure-flags '("--disable-werror"
  214. ;; Avoid undefined library references
  215. "LDFLAGS=-lboost_system")))
  216. (home-page "https://sourceforge.net/p/libwpd/wiki/librevenge/")
  217. (synopsis "Document importer for office suites")
  218. (description "Librevenge is a base library for writing document import
  219. filters. It has interfaces for text documents, vector graphics,
  220. spreadsheets and presentations.")
  221. (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
  222. (define-public libwpd
  223. (package
  224. (name "libwpd")
  225. (version "0.10.3")
  226. (source
  227. (origin
  228. (method url-fetch)
  229. (uri (string-append "mirror://sourceforge/libwpd/libwpd/"
  230. "libwpd-" version "/libwpd-" version ".tar.xz"))
  231. (sha256 (base32
  232. "02fx8bngslcj7i5g1gx2kiign4vp09wrmp5wpvix9igxcavb0r94"))))
  233. (build-system gnu-build-system)
  234. (arguments
  235. `(#:configure-flags '("--disable-werror")))
  236. (native-inputs
  237. (list doxygen pkg-config))
  238. (propagated-inputs
  239. (list librevenge)) ; in Requires field of .pkg
  240. (inputs
  241. (list zlib))
  242. (home-page "http://libwpd.sourceforge.net/")
  243. (synopsis "Library for importing WordPerfect documents")
  244. (description "Libwpd is a C++ library designed to help process
  245. WordPerfect documents. It is most commonly used to import such documents
  246. into other word processors.")
  247. (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
  248. (define-public libe-book
  249. (package
  250. (name "libe-book")
  251. (version "0.1.3")
  252. (source
  253. (origin
  254. (method url-fetch)
  255. (uri (string-append "mirror://sourceforge/libebook/libe-book-"
  256. version "/libe-book-" version ".tar.xz"))
  257. (sha256
  258. (base32
  259. "1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by"))
  260. (modules '((guix build utils)))
  261. (snippet
  262. '(begin
  263. ;; This can be removed with the next release.
  264. ;; Needed for icu4c compatibility >= 68.0.
  265. (substitute* "src/lib/EBOOKCharsetConverter.cpp"
  266. (("TRUE, TRUE, &status")
  267. "true, true, &status"))))))
  268. (build-system gnu-build-system)
  269. (native-inputs
  270. (list cppunit gperf pkg-config))
  271. (propagated-inputs ; in Requires or Requires.private field of .pkg
  272. (list icu4c liblangtag librevenge libxml2))
  273. (inputs
  274. (list boost))
  275. (arguments
  276. ;; avoid triggering configure errors by simple inclusion of boost headers
  277. `(#:configure-flags '("--disable-werror")))
  278. (home-page "http://libebook.sourceforge.net")
  279. (synopsis "Library for import of reflowable e-book formats")
  280. (description "Libe-book is a library and a set of tools for reading and
  281. converting various reflowable e-book formats. Currently supported are:
  282. Broad Band eBook, eReader .pdb, FictionBook v. 2 (including zipped files),
  283. PalmDoc Ebook, Plucker .pdb, QiOO (mobile format, for java-enabled
  284. cellphones), TCR (simple compressed text format), TealDoc, zTXT,
  285. ZVR (simple compressed text format).")
  286. (license license:mpl2.0)))
  287. (define-public libepubgen
  288. (package
  289. (name "libepubgen")
  290. (version "0.1.1")
  291. (source
  292. (origin
  293. (method url-fetch)
  294. (uri (string-append "mirror://sourceforge/libepubgen/libepubgen-"
  295. version "/libepubgen-" version ".tar.xz"))
  296. (sha256
  297. (base32
  298. "1b8mc9zzrqypj1v9zdy3ybc48pw0rfr06cyi7n6grvybjjwq9q03"))))
  299. (build-system gnu-build-system)
  300. (native-inputs
  301. (list cppunit pkg-config))
  302. (inputs
  303. (list libxml2 boost))
  304. (propagated-inputs ; in Requires field of .pkg
  305. (list librevenge))
  306. (home-page "https://sourceforge.net/projects/libepubgen/")
  307. (synopsis "EPUB generator library for librevenge")
  308. (description "libepubgen is an EPUB generator for librevenge. It supports
  309. librevenge's text document interface and--currently in a very limited
  310. way--presentation and vector drawing interfaces.")
  311. (license license:mpl2.0)))
  312. (define-public libwpg
  313. (package
  314. (name "libwpg")
  315. (version "0.3.3")
  316. (source
  317. (origin
  318. (method url-fetch)
  319. (uri (string-append "mirror://sourceforge/libwpg/libwpg/"
  320. "libwpg-" version "/libwpg-" version ".tar.xz"))
  321. (sha256 (base32
  322. "074x159immf139szkswv2zapnq75p7xk10dbha2p9193hgwggcwr"))))
  323. (build-system gnu-build-system)
  324. (native-inputs
  325. (list doxygen pkg-config))
  326. (propagated-inputs
  327. (list libwpd)) ; in Requires field of .pkg
  328. (inputs
  329. (list perl zlib))
  330. (home-page "http://libwpg.sourceforge.net/")
  331. (synopsis "Library and tools for the WordPerfect Graphics format")
  332. (description "The libwpg project provides a library and tools for
  333. working with graphics in the WPG (WordPerfect Graphics) format.")
  334. (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual-licensed
  335. (define-public libcmis
  336. (package
  337. (name "libcmis")
  338. (version "0.5.2")
  339. (source
  340. (origin
  341. (method url-fetch)
  342. (uri (string-append "https://github.com/tdf/libcmis/releases/download/v"
  343. version "/libcmis-" version ".tar.xz"))
  344. (sha256
  345. (base32
  346. "18h0a2gsfxvlv03nlcfvw9bzsflq5sin9agq6za103hr0ab8vcfp"))))
  347. (build-system gnu-build-system)
  348. (native-inputs
  349. (list cppunit pkg-config))
  350. (propagated-inputs ; in Requires field of .pkg
  351. (list curl libxml2))
  352. (inputs
  353. (list boost cyrus-sasl openssl))
  354. (arguments
  355. `(#:configure-flags
  356. (list
  357. ;; FIXME: Man pages generation requires docbook-to-man; reenable
  358. ;; it once this is available.
  359. "--without-man"
  360. ;; XXX: A configure test fails with GCC7 when including Boost headers.
  361. "--disable-werror"
  362. ;; During configure, the boost headers are found, but linking
  363. ;; fails without the following flag.
  364. (string-append "--with-boost="
  365. (assoc-ref %build-inputs "boost")))))
  366. (home-page "https://github.com/tdf/libcmis")
  367. (synopsis "CMIS client library")
  368. (description "LibCMIS is a C++ client library for the CMIS interface. It
  369. allows C++ applications to connect to any ECM behaving as a CMIS server such
  370. as Alfresco or Nuxeo.")
  371. (license
  372. (list license:mpl1.1 license:gpl2+ license:lgpl2.1+)))) ; triple license
  373. (define-public libabw
  374. (package
  375. (name "libabw")
  376. (version "0.1.3")
  377. (source
  378. (origin
  379. (method url-fetch)
  380. (uri (string-append "https://dev-www.libreoffice.org/src/libabw/"
  381. "libabw-" version ".tar.xz"))
  382. (sha256 (base32
  383. "1vbfrmnvib3cym0yyyabnd8xpx4f7wp20vnn09s6dln347fajqz7"))))
  384. (build-system gnu-build-system)
  385. (native-inputs
  386. (list doxygen gperf perl pkg-config))
  387. (propagated-inputs ; in Requires or Requires.private field of .pkg
  388. (list librevenge libxml2))
  389. (inputs
  390. (list boost))
  391. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libabw")
  392. (synopsis "Library for parsing the AbiWord format")
  393. (description "Libabw is a library that parses the file format of
  394. AbiWord documents.")
  395. (license license:mpl2.0)))
  396. (define-public libcdr
  397. (package
  398. (name "libcdr")
  399. (version "0.1.7")
  400. (source
  401. (origin
  402. (method url-fetch)
  403. (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
  404. name "-" version ".tar.xz"))
  405. (sha256 (base32
  406. "1m6dirmyhqwnrpv80z97x5k5hdh4kh8a8zlq3smbjrilc6fj8rjn"))))
  407. (build-system gnu-build-system)
  408. (native-inputs
  409. (list cppunit doxygen pkg-config))
  410. (propagated-inputs ; in Requires or Requires.private field of .pkg
  411. (list icu4c lcms librevenge zlib))
  412. (inputs
  413. (list boost))
  414. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libcdr")
  415. (synopsis "Library for parsing the CorelDRAW format")
  416. (description "Libcdr is a library that parses the file format of
  417. CorelDRAW documents of all versions.")
  418. (license license:mpl2.0)))
  419. (define-public libetonyek
  420. (package
  421. (name "libetonyek")
  422. (version "0.1.10")
  423. (source
  424. (origin
  425. (method url-fetch)
  426. (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
  427. name "-" version ".tar.xz"))
  428. (sha256 (base32
  429. "16hy60ws29pb4pz3z5l4920yn9hnk2vlij0xfs5qi1w4drd46c5l"))))
  430. (build-system gnu-build-system)
  431. (arguments
  432. `(#:configure-flags '("--with-mdds=1.5")))
  433. (native-inputs
  434. (list cppunit doxygen gperf pkg-config))
  435. (propagated-inputs ; in Requires or Requires.private field of .pkg
  436. (list liblangtag librevenge libxml2 zlib))
  437. (inputs
  438. (list boost glm mdds))
  439. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek")
  440. (synopsis "Library for parsing the Apple Keynote format")
  441. (description "Libetonyek is a library that parses the file format of
  442. Apple Keynote documents. It currently supports Keynote versions 2 to 5.")
  443. (license license:mpl2.0)))
  444. (define-public liblangtag
  445. (package
  446. (name "liblangtag")
  447. (version "0.6.3")
  448. (source
  449. (origin
  450. (method url-fetch)
  451. (uri (string-append "https://bitbucket.org/tagoh/liblangtag/downloads/"
  452. "liblangtag-" version ".tar.bz2"))
  453. (sha256
  454. (base32 "1g9kwxx60q0hpwvs66ys1cb9qg54hfvbivadwli8sfpc085a44hz"))))
  455. (build-system gnu-build-system)
  456. (native-inputs
  457. (list libtool pkg-config))
  458. (inputs
  459. (list libxml2))
  460. (home-page "https://bitbucket.org/tagoh/liblangtag")
  461. (synopsis "Library to access tags for identifying languages")
  462. (description "Liblangtag implements an interface to work with tags
  463. for identifying languages as described in RFC 5646. It supports the
  464. extensions described in RFC6067 and RFC6497, and Extension T for
  465. language/locale identifiers as described in the Unicode CLDR
  466. standard 21.0.2.")
  467. (license (list license:lgpl3+ license:mpl2.0)))) ; dual license
  468. (define-public libexttextcat
  469. (package
  470. (name "libexttextcat")
  471. (version "3.4.5")
  472. (source
  473. (origin
  474. (method url-fetch)
  475. (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
  476. name "-" version ".tar.xz"))
  477. (sha256 (base32
  478. "1j6sjwkyhqvsgyw938bxxfwkzzi1mahk66g5342lv6j89jfvrz8k"))))
  479. (build-system gnu-build-system)
  480. (home-page "https://www.freedesktop.org/wiki/Software/libexttextcat/")
  481. (synopsis "Text Categorization library")
  482. (description "Libexttextcat is an N-Gram-Based Text Categorization
  483. library primarily intended for language guessing.")
  484. (license (license:non-copyleft "file://LICENSE"
  485. "See LICENSE in the distribution."))))
  486. (define-public libfreehand
  487. (package
  488. (name "libfreehand")
  489. (version "0.1.2")
  490. (source
  491. (origin
  492. (method url-fetch)
  493. (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
  494. name "-" version ".tar.xz"))
  495. (sha256 (base32
  496. "1b1lvqh68rwij1yvmxy02hsmh7i74ma5767mk8mg5nx6chajshhf"))))
  497. (build-system gnu-build-system)
  498. (arguments
  499. '(#:configure-flags '("--disable-werror")
  500. #:phases (modify-phases %standard-phases
  501. (add-before 'build 'adjust-for-ICU-65
  502. (lambda _
  503. ;; Fix build with ICU 65 and later. Taken from this
  504. ;; upstream commit, remove for libfreehand > 0.1.2:
  505. ;; https://gerrit.libreoffice.org/#/c/80224/
  506. (substitute* "src/lib/libfreehand_utils.cpp"
  507. (("U16_NEXT.*" all)
  508. (string-append all ";\n")))
  509. #t)))))
  510. (native-inputs
  511. (list cppunit doxygen gperf perl pkg-config))
  512. (inputs
  513. (list icu4c lcms))
  514. (propagated-inputs ; in Requires or Requires.private field of .pkg
  515. (list librevenge zlib))
  516. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libfreehand")
  517. (synopsis "Library for parsing the FreeHand format")
  518. (description "Libfreehand is a library that parses the file format of
  519. Aldus/Macromedia/Adobe FreeHand documents.")
  520. (license license:mpl2.0)))
  521. (define-public libmspub
  522. (package
  523. (name "libmspub")
  524. (version "0.1.4")
  525. (source
  526. (origin
  527. (method url-fetch)
  528. (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
  529. name "-" version ".tar.xz"))
  530. (sha256 (base32
  531. "1fhkn013gzg59f4z7rldpbi0nj7lgdqzxanspsqa6axvmahw2dpg"))
  532. (modules '((guix build utils)))
  533. (snippet
  534. '(begin
  535. ;; This can be removed with the next release.
  536. ;; https://gerrit.libreoffice.org/c/libmspub/+/73814
  537. (substitute* "src/lib/MSPUBMetaData.h"
  538. (("include <vector>" all)
  539. (string-append all "\n#include <cstdint>")))))))
  540. (build-system gnu-build-system)
  541. (native-inputs
  542. (list doxygen pkg-config))
  543. (propagated-inputs ; in Requires or Requires.private field of .pkg
  544. (list icu4c librevenge zlib))
  545. (inputs
  546. (list boost))
  547. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libmspub")
  548. (synopsis "Library for parsing the Microsoft Publisher format")
  549. (description "Libmspub is a library that parses the file format of
  550. Microsoft Publisher documents of all versions.")
  551. (license license:mpl2.0)))
  552. (define-public libnumbertext
  553. (package
  554. (name "libnumbertext")
  555. (version "1.0.7")
  556. (source
  557. (origin
  558. (method url-fetch)
  559. (uri (string-append "https://github.com/Numbertext/libnumbertext/"
  560. "releases/download/" version
  561. "/libnumbertext-" version ".tar.xz"))
  562. (sha256
  563. (base32 "1z31idnmd9iv6ra5dcsn7q70wv32clk2sqc5bbhimqcsp2f29f0p"))))
  564. (build-system gnu-build-system)
  565. (arguments
  566. `(#:configure-flags '("--disable-static")))
  567. (home-page "https://github.com/Numbertext/libnumbertext")
  568. (synopsis "Language-neutral @code{NUMBERTEXT} and @code{MONEYTEXT} functions")
  569. (description
  570. "The libnumbertext library provides language-neutral @code{NUMBERTEXT}
  571. and @code{MONEYTEXT} functions for LibreOffice Calc, available for C++ and
  572. Java.")
  573. (license (list license:lgpl3+ license:bsd-3))))
  574. (define-public libpagemaker
  575. (package
  576. (name "libpagemaker")
  577. (version "0.0.4")
  578. (source
  579. (origin
  580. (method url-fetch)
  581. (uri (string-append "https://dev-www.libreoffice.org/src/libpagemaker/"
  582. "libpagemaker-" version ".tar.xz"))
  583. (sha256 (base32
  584. "17ai8ajffr0ixxmmcv3k5vgjlcsix38ldb4fw2arild70pbsrbb6"))))
  585. (build-system gnu-build-system)
  586. (arguments
  587. `(#:configure-flags '("--disable-werror")))
  588. (native-inputs
  589. (list doxygen pkg-config))
  590. (propagated-inputs ; in Requires field of .pkg
  591. (list librevenge))
  592. (inputs
  593. (list boost zlib))
  594. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libpagemaker")
  595. (synopsis "Library for parsing the PageMaker format")
  596. (description "Libpagemaker is a library that parses the file format of
  597. Aldus/Adobe PageMaker documents. Currently it only understands documents
  598. created by PageMaker version 6.x and 7.")
  599. (license license:mpl2.0)))
  600. (define-public libvisio
  601. (package
  602. (name "libvisio")
  603. (version "0.1.7")
  604. (source
  605. (origin
  606. (method url-fetch)
  607. (uri (string-append "http://dev-www.libreoffice.org/src/libvisio/"
  608. "libvisio-" version ".tar.xz"))
  609. (sha256 (base32
  610. "0k7adcbbf27l7n453cca1m6s9yj6qvb5j6bsg2db09ybf3w8vbwg"))))
  611. (build-system gnu-build-system)
  612. (native-inputs
  613. (list cppunit doxygen gperf perl pkg-config))
  614. (propagated-inputs ; in Requires or Requires.private field of .pkg
  615. (list icu4c librevenge libxml2))
  616. (inputs
  617. (list boost))
  618. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libvisio")
  619. (synopsis "Library for parsing the Microsoft Visio format")
  620. (description "Libvisio is a library that parses the file format of
  621. Microsoft Visio documents of all versions.")
  622. (license license:mpl2.0)))
  623. (define-public libodfgen
  624. (package
  625. (name "libodfgen")
  626. (version "0.1.8")
  627. (source
  628. (origin
  629. (method url-fetch)
  630. (uri (string-append "mirror://sourceforge/libwpd/libodfgen/"
  631. "libodfgen-" version "/libodfgen-" version ".tar.xz"))
  632. (sha256 (base32
  633. "0986c5gw4vdfz7bcmpdfz07inba5wxsx4f6xvndknqj6zlkh082m"))))
  634. (build-system gnu-build-system)
  635. (native-inputs
  636. (list doxygen pkg-config))
  637. (propagated-inputs ; in Requires field of .pkg
  638. (list librevenge))
  639. (inputs
  640. (list boost libxml2 zlib))
  641. (arguments
  642. ;; Avoid triggering configure errors by simple inclusion of Boost headers.
  643. `(#:configure-flags '("--disable-werror")))
  644. (home-page "https://sourceforge.net/p/libwpd/wiki/libodfgen/")
  645. (synopsis "ODF (Open Document Format) library")
  646. (description "Libodfgen is a library for generating documents in the
  647. Open Document Format (ODF). It provides generator implementations for all
  648. document interfaces supported by librevenge:
  649. text documents, vector drawings, presentations and spreadsheets.")
  650. (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
  651. (define-public libmwaw
  652. (package
  653. (name "libmwaw")
  654. (version "0.3.19")
  655. (source
  656. (origin
  657. (method url-fetch)
  658. (uri (string-append "mirror://sourceforge/libmwaw/libmwaw/libmwaw-"
  659. version "/libmwaw-" version ".tar.xz"))
  660. (sha256
  661. (base32 "1bx5xnw8sk5h26x2z7hfac7hfbm68zqg0jilp15qr0pwxqsf4wmj"))))
  662. (build-system gnu-build-system)
  663. (native-inputs
  664. (list doxygen pkg-config))
  665. (propagated-inputs ; in Requires field of .pc file
  666. (list librevenge))
  667. (inputs
  668. (list boost zlib))
  669. (home-page "https://sourceforge.net/p/libmwaw/wiki/Home/")
  670. (synopsis "Import library for some old Macintosh text documents")
  671. (description "Libmwaw contains some import filters for old Macintosh
  672. text documents (MacWrite, ClarisWorks, ... ) and for some graphics and
  673. spreadsheet documents.")
  674. (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
  675. (define-public libstaroffice
  676. (package
  677. (name "libstaroffice")
  678. (version "0.0.7")
  679. (source
  680. (origin
  681. (method url-fetch)
  682. (uri (string-append "https://github.com/fosnola/libstaroffice/releases/download/"
  683. version "/libstaroffice-" version ".tar.xz"))
  684. (sha256 (base32
  685. "1ny8411273k2bq7mnpmcvri3rd46b2j67wfypqkp3y8nhanv0kzr"))))
  686. (build-system gnu-build-system)
  687. (inputs
  688. (list librevenge zlib))
  689. (native-inputs
  690. (list pkg-config))
  691. (home-page "https://github.com/fosnola/libstaroffice")
  692. (synopsis "Provides LibreOffice support for old StarOffice documents")
  693. (description "@code{libstaroffice} is an import filter for the document formats
  694. from the old StarOffice (.sdc, .sdw, ...).")
  695. (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
  696. (define-public libwps
  697. (package
  698. (name "libwps")
  699. (version "0.4.12")
  700. (source
  701. (origin
  702. (method url-fetch)
  703. (uri (string-append "mirror://sourceforge/" name "/" name "/"
  704. name "-" version "/" name "-" version ".tar.xz"))
  705. (sha256 (base32
  706. "1nsfacqp5sfkyayw7q0wp68lidksd1wjdix8qmsbf0vdl19gn6p2"))))
  707. (build-system gnu-build-system)
  708. (native-inputs
  709. (list doxygen pkg-config))
  710. (propagated-inputs ; in Requires field of .pkg
  711. (list librevenge))
  712. (inputs
  713. (list boost zlib))
  714. (home-page "http://libwps.sourceforge.net/")
  715. (synopsis "Import library for Microsoft Works text documents")
  716. (description "Libwps is a library for importing files in the Microsoft
  717. Works word processor file format.")
  718. (license (list license:mpl2.0 license:lgpl2.1+)))) ; dual license
  719. (define-public libzmf
  720. (package
  721. (name "libzmf")
  722. (version "0.0.2")
  723. (source
  724. (origin
  725. (method url-fetch)
  726. (uri (string-append "http://dev-www.libreoffice.org/src/libzmf/libzmf-"
  727. version ".tar.xz"))
  728. (sha256 (base32
  729. "08mg5kmkjrmqrd8j5rkzw9vdqlvibhb1ynp6bmfxnzq5rcq1l197"))))
  730. (build-system gnu-build-system)
  731. (arguments
  732. ;; A harmless 'sign-compare' error pops up on i686 so disable '-Werror'.
  733. '(#:configure-flags '("--disable-werror")))
  734. (inputs
  735. (list boost icu4c libpng librevenge zlib))
  736. (native-inputs
  737. (list cppunit doxygen pkg-config))
  738. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libzmf")
  739. (synopsis "Parses file format of Zoner Callisto/Draw documents")
  740. (description "Libzmf is a library that parses the file format of Zoner
  741. Callisto/Draw documents. Currently it only understands documents created by
  742. Zoner Draw version 4 and 5.")
  743. (license license:mpl2.0)))
  744. (define-public hunspell
  745. (package
  746. (name "hunspell")
  747. (version "1.7.0")
  748. (source
  749. (origin
  750. (method git-fetch)
  751. (uri (git-reference
  752. (url "https://github.com/hunspell/hunspell")
  753. (commit (string-append "v" version))))
  754. (file-name (git-file-name name version))
  755. (sha256
  756. (base32
  757. "0qxlkd012r45ppd21kldbq9k5ac5nmxz290z6m2kch9l56v768k1"))))
  758. (build-system gnu-build-system)
  759. (native-inputs
  760. (list autoconf automake libtool))
  761. (inputs
  762. (list perl))
  763. (native-search-paths (list (search-path-specification
  764. (variable "DICPATH")
  765. (files '("share/hunspell")))))
  766. (home-page "https://hunspell.github.io/")
  767. (synopsis "Spell checker")
  768. (description "Hunspell is a spell checker and morphological analyzer
  769. library and program designed for languages with rich morphology and complex
  770. word compounding or character encoding.")
  771. ;; Triple license, including "mpl1.1 or later".
  772. (license (list license:mpl1.1 license:gpl2+ license:lgpl2.1+))))
  773. (define (dicollecte-french-dictionary variant synopsis)
  774. ;; Return a French dictionary package from dicollecte.org, for the given
  775. ;; VARIANT.
  776. (package
  777. (name (match variant
  778. ("classique" "hunspell-dict-fr")
  779. (_ (string-append "hunspell-dict-fr-" variant))))
  780. (version "6.2")
  781. (source (origin
  782. (uri (string-append
  783. "http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v"
  784. version ".zip"))
  785. (method url-fetch)
  786. (sha256
  787. (base32
  788. "139hfrn5p87sl8hqmgkf6sgvnxrk2mm8vd8xsm8sm98qjnwlg0f9"))))
  789. (build-system trivial-build-system)
  790. (native-inputs (list unzip))
  791. (arguments
  792. `(#:modules ((guix build utils))
  793. #:builder (begin
  794. (use-modules (guix build utils)
  795. (srfi srfi-26))
  796. (let* ((out (assoc-ref %outputs "out"))
  797. (hunspell (string-append out "/share/hunspell"))
  798. (myspell (string-append out "/share/myspell"))
  799. (doc (string-append out "/share/doc/"
  800. ,name))
  801. (unzip (assoc-ref %build-inputs "unzip")))
  802. (invoke (string-append unzip "/bin/unzip")
  803. (assoc-ref %build-inputs "source"))
  804. (for-each (cut install-file <> hunspell)
  805. (find-files "."
  806. ,(string-append variant
  807. "\\.(dic|aff)$")))
  808. (mkdir-p myspell)
  809. (symlink hunspell (string-append myspell "/dicts"))
  810. (for-each (cut install-file <> doc)
  811. (find-files "." "\\.(txt|org|md)$"))
  812. #t))))
  813. (synopsis synopsis)
  814. (description
  815. "This package provides a dictionary for the Hunspell spell-checking
  816. library.")
  817. (home-page "https://www.dicollecte.org/home.php?prj=fr")
  818. (license license:mpl2.0)))
  819. (define-syntax define-french-dictionary
  820. (syntax-rules (synopsis)
  821. ((_ name variant (synopsis text))
  822. (define-public name
  823. (dicollecte-french-dictionary variant text)))))
  824. (define-french-dictionary hunspell-dict-fr-classique
  825. "classique"
  826. ;; TRANSLATORS: In French, this is "Français classique".
  827. (synopsis "Hunspell dictionary for ``classic'' French (recommended)"))
  828. (define-french-dictionary hunspell-dict-fr-moderne
  829. "moderne"
  830. ;; TRANSLATORS: In French, this is "Français moderne".
  831. (synopsis "Hunspell dictionary for ``modern'' French"))
  832. (define-french-dictionary hunspell-dict-fr-réforme-1990
  833. "reforme1990"
  834. (synopsis "Hunspell dictionary for the post @dfn{1990 réforme} French"))
  835. (define-french-dictionary hunspell-dict-fr-toutes-variantes
  836. "toutesvariantes"
  837. (synopsis "Hunspell dictionary for all variants of French"))
  838. (define-public hunspell-dict-pl
  839. (package
  840. (name "hunspell-dict-pl")
  841. (version "20200327")
  842. (source
  843. (origin
  844. (method url-fetch)
  845. ;; Since creators of dictionary host only the latest daily release,
  846. ;; we're using version mirrored by Arch Linux, which seems good
  847. ;; enough. They're mirroring hunspell-pl releases since 2011.
  848. (uri (string-append "https://sources.archlinux.org/other/community/"
  849. "hunspell-pl/sjp-myspell-pl-"
  850. version ".zip"))
  851. (sha256 (base32
  852. "14mzf8glxkp2775dcqisb1zv6r8ncm3bvzl46q352rwyl2dg1c59"))))
  853. (build-system trivial-build-system)
  854. (native-inputs (list unzip))
  855. (arguments
  856. `(#:modules ((guix build utils))
  857. #:builder (begin
  858. (use-modules (guix build utils)
  859. (srfi srfi-26))
  860. (let* ((out (assoc-ref %outputs "out"))
  861. (hunspell (string-append out "/share/hunspell"))
  862. (myspell (string-append out "/share/myspell"))
  863. (doc (string-append out "/share/doc/"
  864. ,name))
  865. (unzip (search-input-file %build-inputs
  866. "/bin/unzip")))
  867. (invoke unzip "-j" "-o" (assoc-ref %build-inputs "source"))
  868. (invoke unzip "-j" "-o" "pl_PL.zip")
  869. (for-each (cut install-file <> hunspell)
  870. (find-files "."
  871. ,(string-append "pl_PL"
  872. "\\.(dic|aff)$")))
  873. (mkdir-p myspell)
  874. (symlink hunspell (string-append myspell "/dicts"))
  875. (for-each (cut install-file <> doc)
  876. (find-files "." "\\.(txt|org|md)$"))
  877. #t))))
  878. (synopsis "Hunspell dictionary for Polish")
  879. (description
  880. "This package provides a dictionary for the Hunspell spell-checking
  881. library.")
  882. (home-page "https://sjp.pl/slownik/ort/")
  883. (license
  884. (list license:gpl2 license:mpl1.1 license:cc-by4.0 license:lgpl2.1 license:asl2.0))))
  885. (define-public hunspell-dict-de
  886. (package
  887. (name "hunspell-dict-de")
  888. (version "20161207")
  889. (source
  890. (origin
  891. (method url-fetch)
  892. (uri (string-append "https://www.j3e.de/ispell/igerman98/dict/"
  893. "igerman98-" version ".tar.bz2"))
  894. (sha256
  895. (base32 "1a3055hp2bc4q4nlg3gmg0147p3a1zlfnc65xiv2v9pyql1nya8p"))))
  896. (build-system gnu-build-system)
  897. (arguments
  898. `(#:make-flags '("hunspell/de_DE.dic")
  899. #:phases
  900. (modify-phases %standard-phases
  901. (delete 'configure)
  902. (replace 'install ;no install target
  903. (lambda* (#:key outputs #:allow-other-keys)
  904. (let* ((out (assoc-ref outputs "out"))
  905. (share (string-append out "/share/hunspell/")))
  906. (install-file "hunspell/de_DE.aff" share)
  907. (install-file "hunspell/de_DE.dic" share)
  908. #t))))
  909. #:tests? #f)) ; no tests
  910. (native-inputs
  911. (list hunspell ispell perl))
  912. (synopsis "Hunspell dictionary for German (de_DE)")
  913. (description "This package provides a dictionary for the Hunspell
  914. spell-checking library.")
  915. (home-page "https://www.j3e.de/ispell/igerman98/")
  916. (license (list license:gpl2 license:gpl3))))
  917. (define-public hyphen
  918. (package
  919. (name "hyphen")
  920. (version "2.8.8")
  921. (source
  922. (origin
  923. (method url-fetch)
  924. (uri (string-append "mirror://sourceforge/hunspell/Hyphen/"
  925. (version-major+minor version) "/"
  926. name "-" version ".tar.gz"))
  927. (sha256 (base32
  928. "01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih"))))
  929. (build-system gnu-build-system)
  930. (inputs
  931. (list perl))
  932. (home-page "http://hunspell.sourceforge.net/")
  933. (synopsis "Hyphenation library")
  934. (description "Hyphen is a hyphenation library using TeX hyphenation
  935. patterns, which are pre-processed by a perl script.")
  936. ;; Triple license, including "mpl1.1 or later".
  937. (license
  938. (list license:mpl1.1 license:mpl2.0 license:gpl2+ license:lgpl2.1+))))
  939. (define-public mythes
  940. (package
  941. (name "mythes")
  942. (version "1.2.4")
  943. (source
  944. (origin
  945. (method url-fetch)
  946. (uri (string-append "mirror://sourceforge/hunspell/MyThes/" version "/"
  947. name "-" version ".tar.gz"))
  948. (sha256 (base32
  949. "0prh19wy1c74kmzkkavm9qslk99gz8h8wmjvwzjc6lf8v2az708y"))))
  950. (build-system gnu-build-system)
  951. (native-inputs
  952. (list pkg-config))
  953. (inputs
  954. (list hunspell perl))
  955. (home-page "http://hunspell.sourceforge.net/")
  956. (synopsis "Thesaurus")
  957. (description "MyThes is a simple thesaurus that uses a structured text
  958. data file and an index file with binary search to look up words and phrases
  959. and to return information on pronunciations, meanings and synonyms.")
  960. (license (license:non-copyleft "file://COPYING"
  961. "See COPYING in the distribution."))))
  962. (define-public libqxp
  963. (package
  964. (name "libqxp")
  965. (version "0.0.2")
  966. (source (origin
  967. (method url-fetch)
  968. (uri (string-append "https://dev-www.libreoffice.org/src/libqxp/"
  969. "libqxp-" version ".tar.xz"))
  970. (sha256
  971. (base32
  972. "0p4lb84m05wqd8qr8ni9sp80ivlm83ffn0nxiv4m42hj22qvcdz1"))))
  973. (build-system gnu-build-system)
  974. (inputs
  975. (list boost icu4c zlib))
  976. (native-inputs
  977. (list cppunit pkg-config))
  978. (propagated-inputs
  979. (list librevenge)) ; mentioned in Requires field
  980. (home-page "https://www.libreoffice.org")
  981. (synopsis "Library and tools for the QuarkXPress file format")
  982. (description "libqxp is a library and a set of tools for reading and
  983. converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
  984. (license license:mpl2.0)))
  985. ;; When updating libreoffice, also make sure to update the
  986. ;; hunspell dictionaries! They use the libreoffice version.
  987. (define-public libreoffice
  988. (package
  989. (name "libreoffice")
  990. (version "7.1.4.2")
  991. (source
  992. (origin
  993. (method url-fetch)
  994. (uri
  995. (string-append
  996. "https://download.documentfoundation.org/libreoffice/src/"
  997. (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
  998. (sha256
  999. (base32 "1jsskhnlyra7q6d12kkc8dxq5fgrnd8grl32bdck7j9hkwv6d13m"))))
  1000. (build-system glib-or-gtk-build-system)
  1001. (native-inputs
  1002. `(("bison" ,bison)
  1003. ("cppunit" ,cppunit)
  1004. ("flex" ,flex)
  1005. ("pkg-config" ,pkg-config)
  1006. ("python" ,python-wrapper)
  1007. ("which" ,which)
  1008. ("ziptime" ,ziptime)))
  1009. (inputs
  1010. `(("bluez" ,bluez)
  1011. ("boost" ,boost)
  1012. ("box2d" ,box2d)
  1013. ("clucene" ,clucene)
  1014. ("cups" ,cups)
  1015. ("dbus-glib" ,dbus-glib)
  1016. ("firebird" ,firebird)
  1017. ("fontconfig" ,fontconfig)
  1018. ("fontforge" ,fontforge)
  1019. ("gconf" ,gconf)
  1020. ("glew" ,glew)
  1021. ("glm" ,glm)
  1022. ("gnupg" ,gnupg)
  1023. ("gobject-introspection" ,gobject-introspection)
  1024. ("gperf" ,gperf)
  1025. ("gpgme" ,gpgme)
  1026. ("graphite2" ,graphite2)
  1027. ("gst-plugins-base" ,gst-plugins-base)
  1028. ("gtk+" ,gtk+)
  1029. ("harfbuzz" ,harfbuzz)
  1030. ("hunspell" ,hunspell)
  1031. ("hyphen" ,hyphen)
  1032. ("libabw" ,libabw)
  1033. ("libcdr" ,libcdr)
  1034. ("libcmis" ,libcmis)
  1035. ("libjpeg-turbo" ,libjpeg-turbo)
  1036. ("libe-book" ,libe-book)
  1037. ("libepubgen" ,libepubgen)
  1038. ("libetonyek" ,libetonyek)
  1039. ("libexttextcat" ,libexttextcat)
  1040. ("libfreehand" ,libfreehand)
  1041. ("liblangtag" ,liblangtag)
  1042. ;; XXX: Perhaps this should be propagated from xmlsec.
  1043. ("libltdl" ,libltdl)
  1044. ("libmspub" ,libmspub)
  1045. ("libmwaw" ,libmwaw)
  1046. ("libnumbertext" ,libnumbertext)
  1047. ("libodfgen" ,libodfgen)
  1048. ("libpagemaker" ,libpagemaker)
  1049. ("libqxp" ,libqxp)
  1050. ("libstaroffice" ,libstaroffice)
  1051. ("libvisio" ,libvisio)
  1052. ("libwpg" ,libwpg)
  1053. ("libwps" ,libwps)
  1054. ("libxrandr" ,libxrandr)
  1055. ("libxrender" ,libxrender)
  1056. ("libxslt" ,libxslt)
  1057. ("libxt" ,libxt)
  1058. ("libzmf" ,libzmf)
  1059. ("lpsolve" ,lpsolve)
  1060. ("mariadb" ,mariadb "dev")
  1061. ("mdds" ,mdds)
  1062. ("mythes" ,mythes)
  1063. ("neon" ,neon)
  1064. ("nspr" ,nspr)
  1065. ("nss" ,nss)
  1066. ("openldap" ,openldap)
  1067. ("openssl" ,openssl)
  1068. ("orcus" ,orcus)
  1069. ("perl" ,perl)
  1070. ("perl-archive-zip" ,perl-archive-zip)
  1071. ("poppler" ,poppler)
  1072. ("postgresql" ,postgresql)
  1073. ("python" ,python)
  1074. ("python-lxml" ,python-lxml)
  1075. ("qrcodegen-cpp" ,qrcodegen-cpp)
  1076. ("redland" ,redland)
  1077. ("sane-backends" ,sane-backends)
  1078. ("unixodbc" ,unixodbc)
  1079. ("unzip" ,unzip)
  1080. ("vigra" ,vigra)
  1081. ("xdg-utils" ,xdg-utils)
  1082. ("xmlsec" ,xmlsec-nss)
  1083. ("zip" ,zip)
  1084. ("dtoa" ; needed after version 6.4.7.2.
  1085. ,(origin
  1086. (method url-fetch)
  1087. (uri "https://dev-www.libreoffice.org/src/dtoa-20180411.tgz")
  1088. (sha256
  1089. (base32 "1d0iwy0q5sjznv23d3nbwmy0r7m1mdzlnv5pc4izddkx9xld10h0"))))))
  1090. (arguments
  1091. `(#:tests? #f ; Building the tests already fails.
  1092. #:phases
  1093. (modify-phases %standard-phases
  1094. (add-after 'unpack 'insert-external-tarballs
  1095. (lambda* (#:key inputs #:allow-other-keys)
  1096. (mkdir-p "external/tarballs")
  1097. (copy-file (assoc-ref inputs "dtoa")
  1098. "external/tarballs/dtoa-20180411.tgz")
  1099. #t))
  1100. (add-before 'configure 'prepare-src
  1101. (lambda* (#:key inputs #:allow-other-keys)
  1102. (substitute*
  1103. (list "sysui/CustomTarget_share.mk"
  1104. "solenv/gbuild/gbuild.mk"
  1105. "solenv/gbuild/platform/unxgcc.mk")
  1106. (("/bin/sh") (which "sh")))
  1107. ;; Use store references for strictly necessary commands,
  1108. ;; but not for optional tools like ‘gdb’ and ‘valgrind’.
  1109. (for-each (lambda (command)
  1110. (substitute* "desktop/scripts/soffice.sh"
  1111. (((format #f"~a " command))
  1112. (format #f "~a " (which command)))))
  1113. (list "dirname" "grep" "uname"))
  1114. ;; GPGME++ headers are installed in a gpgme++ subdirectory, but
  1115. ;; configure is hardcoded to use FHS directories.
  1116. (substitute* "configure"
  1117. (("GPGMEPP_CFLAGS=-I/usr")
  1118. (string-append "GPGMEPP_CFLAGS=-I"
  1119. (assoc-ref inputs "gpgme"))))
  1120. ;; /usr/bin/xdg-open doesn't exist on Guix System.
  1121. (substitute* '("shell/source/unix/exec/shellexec.cxx"
  1122. "shell/source/unix/misc/senddoc.sh")
  1123. (("/usr/bin/xdg-open")
  1124. (search-input-file inputs "/bin/xdg-open")))))
  1125. (add-after 'install 'reset-zip-timestamps
  1126. (lambda* (#:key outputs #:allow-other-keys)
  1127. (let ((out (assoc-ref outputs "out")))
  1128. (for-each (lambda (file)
  1129. (invoke "ziptime" file))
  1130. ;; So many different extensions for .zip files.
  1131. (find-files out "\\.(bau|dat|otp|ott|zip)$")))))
  1132. (add-after 'install 'bin-and-desktop-install
  1133. ;; Create 'soffice' and 'libreoffice' symlinks to the executable
  1134. ;; script.
  1135. (lambda* (#:key outputs #:allow-other-keys)
  1136. (let ((out (assoc-ref outputs "out")))
  1137. (define (symlink-output src dst)
  1138. (mkdir-p (dirname (string-append out dst)))
  1139. (symlink (string-append out src) (string-append out dst)))
  1140. (define (install src dst)
  1141. (let ((dst (string-append out dst)))
  1142. (mkdir-p (dirname dst))
  1143. (copy-file src dst)))
  1144. (define (install-desktop-file app)
  1145. (let ((src (string-append "/lib/libreoffice/share/xdg/"
  1146. app ".desktop"))
  1147. (dst (string-append "/share/applications/libreoffice-"
  1148. app ".desktop")))
  1149. (substitute* (string-append out src)
  1150. (("Exec=libreoffice[0-9]+\\.[0-9]+ ")
  1151. (string-append "Exec=" out "/bin/libreoffice "))
  1152. (("Icon=libreoffice.*")
  1153. (string-append "Icon=" app "\n"))
  1154. (("LibreOffice [0-9]+\\.[0-9]+")
  1155. "LibreOffice"))
  1156. (symlink-output src dst)))
  1157. (define (install-appdata app)
  1158. (install-file (string-append
  1159. "sysui/desktop/appstream-appdata/"
  1160. "libreoffice-" app ".appdata.xml")
  1161. (string-append out "/share/appdata")))
  1162. (symlink-output "/lib/libreoffice/program/soffice"
  1163. "/bin/soffice")
  1164. (symlink-output "/lib/libreoffice/program/soffice"
  1165. "/bin/libreoffice")
  1166. (install
  1167. "workdir/CustomTarget/sysui/share/libreoffice/openoffice.org.xml"
  1168. "/share/mime/packages/libreoffice.xml")
  1169. (for-each install-desktop-file
  1170. '("base" "calc" "draw" "impress" "writer"
  1171. "math" "startcenter"))
  1172. (for-each install-appdata
  1173. '("base" "calc" "draw" "impress" "writer"))
  1174. (mkdir-p (string-append out "/share/icons/hicolor"))
  1175. (copy-recursively "sysui/desktop/icons/hicolor"
  1176. (string-append out "/share/icons/hicolor")))
  1177. #t)))
  1178. #:configure-flags
  1179. (list
  1180. "--enable-release-build"
  1181. "--with-vendor=GNU Guix"
  1182. ;; Avoid using all cpu cores by default
  1183. (format #f "--with-parallelism=~d" (parallel-job-count))
  1184. "--disable-fetch-external" ; disable downloads
  1185. "--with-system-libs" ; enable all --with-system-* flags
  1186. (string-append "--with-boost-libdir="
  1187. (assoc-ref %build-inputs "boost") "/lib")
  1188. ;; Avoid undefined symbols required by boost::spirit
  1189. "LDFLAGS=-lboost_system"
  1190. ;; Avoid a dependency on ucpp.
  1191. "--with-idlc-cpp=cpp"
  1192. ;; The fonts require an external tarball (crosextrafonts).
  1193. ;; They should not be needed when system fonts are available.
  1194. "--without-fonts"
  1195. ;; With java, the build fails since sac.jar is missing.
  1196. "--without-java"
  1197. ;; FIXME: Enable once the corresponding inputs are packaged.
  1198. "--disable-coinmp"
  1199. "--disable-skia"
  1200. ;; This could (Debian does this) be a separate output containing only
  1201. ;; program/libfirebird_sdbclo.so, if there's a way to point to it.
  1202. "--enable-firebird-sdbc"
  1203. ;; XXX: PDFium support requires fetching an external tarball and
  1204. ;; patching the build scripts to work with GCC5. Try enabling this
  1205. ;; when our default compiler is >=GCC 6.
  1206. "--disable-pdfium"
  1207. "--without-doxygen"
  1208. "--enable-build-opensymbol")))
  1209. (home-page "https://www.libreoffice.org/")
  1210. (synopsis "Office suite")
  1211. (description "LibreOffice is a comprehensive office suite. It contains
  1212. a number of components: Writer, a word processor; Calc, a spreadsheet
  1213. application; Impress, a presentation engine; Draw, a drawing and
  1214. flowcharting application; Base, a database and database frontend;
  1215. Math for editing mathematics.")
  1216. (license license:mpl2.0)))