libreoffice.scm 51 KB

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