libreoffice.scm 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175
  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 Efraim Flashner <efraim@flashner.co.il>
  5. ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
  6. ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
  7. ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
  8. ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
  9. ;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
  10. ;;; Copyright © 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
  11. ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
  12. ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
  13. ;;; Copyright © 2018 Jonathan Brielmaier <jonathan.brielmaier@web.de>
  14. ;;;
  15. ;;; This file is part of GNU Guix.
  16. ;;;
  17. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  18. ;;; under the terms of the GNU General Public License as published by
  19. ;;; the Free Software Foundation; either version 3 of the License, or (at
  20. ;;; your option) any later version.
  21. ;;;
  22. ;;; GNU Guix is distributed in the hope that it will be useful, but
  23. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  24. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  25. ;;; GNU General Public License for more details.
  26. ;;;
  27. ;;; You should have received a copy of the GNU General Public License
  28. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  29. (define-module (gnu packages libreoffice)
  30. #:use-module (guix build-system glib-or-gtk)
  31. #:use-module (guix build-system gnu)
  32. #:use-module (guix build-system trivial)
  33. #:use-module (guix download)
  34. #:use-module (guix git-download)
  35. #:use-module ((guix licenses)
  36. #:select (gpl2+ lgpl2.1+ lgpl3+ mpl1.1 mpl2.0
  37. non-copyleft x11-style bsd-3))
  38. #:use-module (guix packages)
  39. #:use-module (guix utils)
  40. #:use-module (ice-9 match)
  41. #:use-module (gnu packages)
  42. #:use-module (gnu packages autotools)
  43. #:use-module (gnu packages base)
  44. #:use-module (gnu packages bison)
  45. #:use-module (gnu packages boost)
  46. #:use-module (gnu packages check)
  47. #:use-module (gnu packages compression)
  48. #:use-module (gnu packages cups)
  49. #:use-module (gnu packages curl)
  50. #:use-module (gnu packages cyrus-sasl)
  51. #:use-module (gnu packages databases)
  52. #:use-module (gnu packages documentation)
  53. #:use-module (gnu packages flex)
  54. #:use-module (gnu packages fontutils)
  55. #:use-module (gnu packages ghostscript)
  56. #:use-module (gnu packages gl)
  57. #:use-module (gnu packages glib)
  58. #:use-module (gnu packages gnome)
  59. #:use-module (gnu packages gperf)
  60. #:use-module (gnu packages gnupg)
  61. #:use-module (gnu packages gnuzilla)
  62. #:use-module (gnu packages gstreamer)
  63. #:use-module (gnu packages gtk)
  64. #:use-module (gnu packages icu4c)
  65. #:use-module (gnu packages image)
  66. #:use-module (gnu packages java)
  67. #:use-module (gnu packages linux)
  68. #:use-module (gnu packages maths)
  69. #:use-module (gnu packages openldap)
  70. #:use-module (gnu packages pdf)
  71. #:use-module (gnu packages perl)
  72. #:use-module (gnu packages perl-compression)
  73. #:use-module (gnu packages pkg-config)
  74. #:use-module (gnu packages python)
  75. #:use-module (gnu packages python-xyz)
  76. #:use-module (gnu packages rdf)
  77. #:use-module (gnu packages scanner)
  78. #:use-module (gnu packages tls)
  79. #:use-module (gnu packages version-control)
  80. #:use-module (gnu packages xml)
  81. #:use-module (gnu packages xorg))
  82. (define-public ixion
  83. (package
  84. (name "ixion")
  85. (version "0.14.1")
  86. (source
  87. (origin
  88. (method url-fetch)
  89. (uri (string-append "http://kohei.us/files/ixion/src/libixion-"
  90. version ".tar.xz"))
  91. (sha256
  92. (base32
  93. "14gdd6div4l22vnz3jn2qjxgjly98ck6p8c1v7386c41rx7kilba"))))
  94. (build-system gnu-build-system)
  95. (native-inputs
  96. `(("pkg-config" ,pkg-config)))
  97. (inputs
  98. `(("mdds" ,mdds)
  99. ("python" ,python)))
  100. (home-page "https://gitlab.com/ixion/ixion")
  101. (synopsis "General purpose formula parser and interpreter")
  102. (description "Ixion is a library for calculating the results of formula
  103. expressions stored in multiple named targets, or \"cells\". The cells can
  104. be referenced from each other, and the library takes care of resolving
  105. their dependencies automatically upon calculation.")
  106. (license mpl2.0)))
  107. (define-public orcus
  108. (package
  109. (name "orcus")
  110. (version "0.14.1")
  111. (source
  112. (origin
  113. (method url-fetch)
  114. (uri (string-append "http://kohei.us/files/" name "/src/lib"
  115. name "-" version ".tar.xz"))
  116. (sha256
  117. (base32
  118. "1ays13a1x15j81dsrq0d3697v1bbqd3bfz3ajn6kb9d61y2drlgj"))))
  119. (build-system gnu-build-system)
  120. (native-inputs
  121. `(("pkg-config" ,pkg-config)))
  122. (inputs
  123. `(("ixion" ,ixion)
  124. ("mdds" ,mdds)
  125. ("python" ,python)
  126. ("zlib" ,zlib)))
  127. (home-page "https://gitlab.com/orcus/orcus")
  128. (synopsis "File import filter library for spreadsheet documents")
  129. (description "Orcus is a library that provides a collection of standalone
  130. file processing filters. It is currently focused on providing filters for
  131. spreadsheet documents. The library includes import filters for
  132. Microsoft Excel 2007 XML, Microsoft Excel 2003 XML, Open Document Spreadsheet,
  133. Plain Text, Gnumeric XML, Generic XML. It also includes low-level parsers for
  134. CSV, CSS and XML.")
  135. (license mpl2.0)))
  136. (define-public librevenge
  137. (package
  138. (name "librevenge")
  139. (version "0.0.4")
  140. (source
  141. (origin
  142. (method url-fetch)
  143. (uri (string-append "mirror://sourceforge/libwpd/" name "/" name "-"
  144. version "/" name "-" version ".tar.xz"))
  145. (sha256 (base32
  146. "1cj76cz4mqcy2mgv9l5xlc95bypyk8zbq0ls9cswqrs2y0lhfgwk"))))
  147. (build-system gnu-build-system)
  148. (native-inputs
  149. `(("cppunit" ,cppunit)
  150. ("doxygen" ,doxygen)
  151. ("pkg-config" ,pkg-config)))
  152. (inputs
  153. `(("zlib" ,zlib)))
  154. (propagated-inputs ; Referenced by .la files
  155. `(("boost" ,boost)))
  156. (arguments
  157. ;; avoid triggering configure errors by simple inclusion of boost headers
  158. `(#:configure-flags '("--disable-werror"
  159. ;; Avoid undefined library references
  160. "LDFLAGS=-lboost_system")))
  161. (home-page "https://sourceforge.net/p/libwpd/wiki/librevenge/")
  162. (synopsis "Document importer for office suites")
  163. (description "Librevenge is a base library for writing document import
  164. filters. It has interfaces for text documents, vector graphics,
  165. spreadsheets and presentations.")
  166. (license (list mpl2.0 lgpl2.1+)))) ;dual licensed
  167. (define-public libwpd
  168. (package
  169. (name "libwpd")
  170. (version "0.10.2")
  171. (source
  172. (origin
  173. (method url-fetch)
  174. (uri (string-append "mirror://sourceforge/" name "/" name "/"
  175. name "-" version "/" name "-" version ".tar.xz"))
  176. (sha256 (base32
  177. "0436gnidx45a9vx114hhh216jrh57mqb9zyssyjfadagmyz6hgrj"))))
  178. (build-system gnu-build-system)
  179. (native-inputs
  180. `(("doxygen" ,doxygen)
  181. ("pkg-config" ,pkg-config)))
  182. (propagated-inputs
  183. `(("librevenge" ,librevenge))) ; in Requires field of .pkg
  184. (inputs
  185. `(("zlib" ,zlib)))
  186. (home-page "http://libwpd.sourceforge.net/")
  187. (synopsis "Library for importing WordPerfect documents")
  188. (description "Libwpd is a C++ library designed to help process
  189. WordPerfect documents. It is most commonly used to import such documents
  190. into other word processors.")
  191. (license (list mpl2.0 lgpl2.1+)))) ;dual licensed
  192. (define-public libe-book
  193. (package
  194. (name "libe-book")
  195. (version "0.1.3")
  196. (source
  197. (origin
  198. (method url-fetch)
  199. (uri (string-append "mirror://sourceforge/libebook/libe-book-"
  200. version "/libe-book-" version ".tar.xz"))
  201. (sha256
  202. (base32
  203. "1yg1vws1wggzhjw672bpgh2x541g5i9wryf67g51m0r79zrqz3by"))))
  204. (build-system gnu-build-system)
  205. (native-inputs
  206. `(("cppunit" ,cppunit)
  207. ("gperf" ,gperf)
  208. ("pkg-config" ,pkg-config)))
  209. (propagated-inputs ; in Requires or Requires.private field of .pkg
  210. `(("icu4c" ,icu4c)
  211. ("liblangtag" ,liblangtag)
  212. ("librevenge" ,librevenge)
  213. ("libxml2" ,libxml2)))
  214. (inputs
  215. `(("boost" ,boost)))
  216. (arguments
  217. ;; avoid triggering configure errors by simple inclusion of boost headers
  218. `(#:configure-flags '("--disable-werror")))
  219. (home-page "http://libebook.sourceforge.net")
  220. (synopsis "Library for import of reflowable e-book formats")
  221. (description "Libe-book is a library and a set of tools for reading and
  222. converting various reflowable e-book formats. Currently supported are:
  223. Broad Band eBook, eReader .pdb, FictionBook v. 2 (including zipped files),
  224. PalmDoc Ebook, Plucker .pdb, QiOO (mobile format, for java-enabled
  225. cellphones), TCR (simple compressed text format), TealDoc, zTXT,
  226. ZVR (simple compressed text format).")
  227. (license mpl2.0)))
  228. (define-public libepubgen
  229. (package
  230. (name "libepubgen")
  231. (version "0.1.1")
  232. (source
  233. (origin
  234. (method url-fetch)
  235. (uri (string-append "mirror://sourceforge/libepubgen/libepubgen-"
  236. version "/libepubgen-" version ".tar.xz"))
  237. (sha256
  238. (base32
  239. "1b8mc9zzrqypj1v9zdy3ybc48pw0rfr06cyi7n6grvybjjwq9q03"))))
  240. (build-system gnu-build-system)
  241. (native-inputs
  242. `(("cppunit" ,cppunit)
  243. ("pkg-config" ,pkg-config)))
  244. (inputs
  245. `(("libxml2" ,libxml2)
  246. ("boost" ,boost)))
  247. (propagated-inputs ; in Requires field of .pkg
  248. `(("librevenge" ,librevenge)))
  249. (home-page "https://sourceforge.net/projects/libepubgen/")
  250. (synopsis "EPUB generator library for librevenge")
  251. (description "libepubgen is an EPUB generator for librevenge. It supports
  252. librevenge's text document interface and--currently in a very limited
  253. way--presentation and vector drawing interfaces.")
  254. (license mpl2.0)))
  255. (define-public libwpg
  256. (package
  257. (name "libwpg")
  258. (version "0.3.2")
  259. (source
  260. (origin
  261. (method url-fetch)
  262. (uri (string-append "mirror://sourceforge/" name "/" name "/"
  263. name "-" version "/" name "-" version ".tar.xz"))
  264. (sha256 (base32
  265. "0cwc5zkp210c661l0bvk6q21jg9ak5g8gmy578w5fgfnjymz3yjp"))))
  266. (build-system gnu-build-system)
  267. (native-inputs
  268. `(("doxygen" ,doxygen)
  269. ("pkg-config" ,pkg-config)))
  270. (propagated-inputs
  271. `(("libwpd" ,libwpd))) ; in Requires field of .pkg
  272. (inputs
  273. `(("perl" ,perl)
  274. ("zlib" ,zlib)))
  275. (home-page "http://libwpg.sourceforge.net/")
  276. (synopsis "Library and tools for the WordPerfect Graphics format")
  277. (description "The libwpg project provides a library and tools for
  278. working with graphics in the WPG (WordPerfect Graphics) format.")
  279. (license (list mpl2.0 lgpl2.1+)))) ;dual licensed
  280. (define-public libcmis
  281. (package
  282. (name "libcmis")
  283. (version "0.5.2")
  284. (source
  285. (origin
  286. (method url-fetch)
  287. (uri (string-append "https://github.com/tdf/libcmis/releases/download/v"
  288. version "/libcmis-" version ".tar.xz"))
  289. (sha256
  290. (base32
  291. "18h0a2gsfxvlv03nlcfvw9bzsflq5sin9agq6za103hr0ab8vcfp"))))
  292. (build-system gnu-build-system)
  293. (native-inputs
  294. `(("cppunit" ,cppunit)
  295. ("pkg-config" ,pkg-config)))
  296. (propagated-inputs ; in Requires field of .pkg
  297. `(("curl" ,curl)
  298. ("libxml2" ,libxml2)))
  299. (inputs
  300. `(("boost" ,boost)
  301. ("cyrus-sasl" ,cyrus-sasl)
  302. ("openssl" ,openssl)))
  303. (arguments
  304. `(#:configure-flags
  305. (list
  306. ;; FIXME: Man pages generation requires docbook-to-man; reenable
  307. ;; it once this is available.
  308. "--without-man"
  309. ;; During configure, the boost headers are found, but linking
  310. ;; fails without the following flag.
  311. (string-append "--with-boost="
  312. (assoc-ref %build-inputs "boost")))))
  313. (home-page "https://github.com/tdf/libcmis")
  314. (synopsis "CMIS client library")
  315. (description "LibCMIS is a C++ client library for the CMIS interface. It
  316. allows C++ applications to connect to any ECM behaving as a CMIS server such
  317. as Alfresco or Nuxeo.")
  318. (license (list mpl1.1 gpl2+ lgpl2.1+)))) ; triple license
  319. (define-public libabw
  320. (package
  321. (name "libabw")
  322. (version "0.1.2")
  323. (source
  324. (origin
  325. (method url-fetch)
  326. (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
  327. name "-" version ".tar.xz"))
  328. (sha256 (base32
  329. "11949iscdb99f2jplxjd39282jxcrf2fw0sqbh5dl7gqb96r8whb"))))
  330. (build-system gnu-build-system)
  331. (native-inputs
  332. `(("doxygen" ,doxygen)
  333. ("gperf" ,gperf)
  334. ("perl" ,perl)
  335. ("pkg-config" ,pkg-config)))
  336. (propagated-inputs ; in Requires or Requires.private field of .pkg
  337. `(("librevenge" ,librevenge)
  338. ("libxml2" ,libxml2)))
  339. (inputs
  340. `(("boost" ,boost)))
  341. (arguments
  342. ;; avoid triggering configure errors by simple inclusion of boost headers
  343. `(#:configure-flags '("--disable-werror")))
  344. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libabw")
  345. (synopsis "Library for parsing the AbiWord format")
  346. (description "Libabw is a library that parses the file format of
  347. AbiWord documents.")
  348. (license mpl2.0)))
  349. (define-public libcdr
  350. (package
  351. (name "libcdr")
  352. (version "0.1.5")
  353. (source
  354. (origin
  355. (method url-fetch)
  356. (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
  357. name "-" version ".tar.xz"))
  358. (sha256 (base32
  359. "0j1skr11jwvafn0l6p37v3i4lqc8wcn489g8f7c4mqwbk94mrkka"))))
  360. (build-system gnu-build-system)
  361. (native-inputs
  362. `(("cppunit" ,cppunit)
  363. ("doxygen" ,doxygen)
  364. ("pkg-config" ,pkg-config)))
  365. (propagated-inputs ; in Requires or Requires.private field of .pkg
  366. `(("icu4c" ,icu4c)
  367. ("lcms" ,lcms)
  368. ("librevenge" ,librevenge)
  369. ("zlib" ,zlib)))
  370. (inputs
  371. `(("boost" ,boost)))
  372. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libcdr")
  373. (synopsis "Library for parsing the CorelDRAW format")
  374. (description "Libcdr is a library that parses the file format of
  375. CorelDRAW documents of all versions.")
  376. (license mpl2.0)))
  377. (define-public libetonyek
  378. (package
  379. (name "libetonyek")
  380. (version "0.1.9")
  381. (source
  382. (origin
  383. (method url-fetch)
  384. (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
  385. name "-" version ".tar.xz"))
  386. (sha256 (base32
  387. "0jhsbdimiyijdqriy0zzkjjgc4wi6fjimhdg4mdybrlwg7l7f5p6"))))
  388. (build-system gnu-build-system)
  389. (arguments
  390. `(#:configure-flags '("--with-mdds=1.4")))
  391. (native-inputs
  392. `(("cppunit" ,cppunit)
  393. ("doxygen" ,doxygen)
  394. ("gperf" ,gperf)
  395. ("pkg-config" ,pkg-config)))
  396. (propagated-inputs ; in Requires or Requires.private field of .pkg
  397. `(("liblangtag" ,liblangtag)
  398. ("librevenge" ,librevenge)
  399. ("libxml2" ,libxml2)
  400. ("zlib" ,zlib)))
  401. (inputs
  402. `(("boost" ,boost)
  403. ("glm" ,glm)
  404. ("mdds" ,mdds)))
  405. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek")
  406. (synopsis "Library for parsing the Apple Keynote format")
  407. (description "Libetonyek is a library that parses the file format of
  408. Apple Keynote documents. It currently supports Keynote versions 2 to 5.")
  409. (license mpl2.0)))
  410. (define-public liblangtag
  411. (package
  412. (name "liblangtag")
  413. (version "0.6.2")
  414. (source
  415. (origin
  416. (method url-fetch)
  417. (uri (string-append "https://bitbucket.org/tagoh/liblangtag/downloads/"
  418. name "-" version ".tar.bz2"))
  419. (sha256
  420. (base32
  421. "0bnm4hllr8cfrybm8rw7b8n0nlhzhnv73bkg1bxk452g6a82f96n"))))
  422. (build-system gnu-build-system)
  423. (native-inputs
  424. `(("libtool" ,libtool)
  425. ("pkg-config" ,pkg-config)))
  426. (inputs
  427. `(("libxml2" ,libxml2)))
  428. ;; As of December 2017, tagoh.bitbucket.org redirects to a hosting advert.
  429. (home-page "https://bitbucket.org/tagoh/liblangtag")
  430. (synopsis "Library to access tags for identifying languages")
  431. (description "Liblangtag implements an interface to work with tags
  432. for identifying languages as described in RFC 5646. It supports the
  433. extensions described in RFC6067 and RFC6497, and Extension T for
  434. language/locale identifiers as described in the Unicode CLDR
  435. standard 21.0.2.")
  436. (license (list lgpl3+ mpl2.0)))) ; dual license
  437. (define-public libexttextcat
  438. (package
  439. (name "libexttextcat")
  440. (version "3.4.5")
  441. (source
  442. (origin
  443. (method url-fetch)
  444. (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
  445. name "-" version ".tar.xz"))
  446. (sha256 (base32
  447. "1j6sjwkyhqvsgyw938bxxfwkzzi1mahk66g5342lv6j89jfvrz8k"))))
  448. (build-system gnu-build-system)
  449. (home-page "https://www.freedesktop.org/wiki/Software/libexttextcat/")
  450. (synopsis "Text Categorization library")
  451. (description "Libexttextcat is an N-Gram-Based Text Categorization
  452. library primarily intended for language guessing.")
  453. (license (non-copyleft "file://LICENSE"
  454. "See LICENSE in the distribution."))))
  455. (define-public libfreehand
  456. (package
  457. (name "libfreehand")
  458. (version "0.1.2")
  459. (source
  460. (origin
  461. (method url-fetch)
  462. (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
  463. name "-" version ".tar.xz"))
  464. (sha256 (base32
  465. "1b1lvqh68rwij1yvmxy02hsmh7i74ma5767mk8mg5nx6chajshhf"))))
  466. (build-system gnu-build-system)
  467. (native-inputs
  468. `(("cppunit" ,cppunit)
  469. ("doxygen" ,doxygen)
  470. ("gperf" ,gperf)
  471. ("perl" ,perl)
  472. ("pkg-config" ,pkg-config)))
  473. (inputs
  474. `(("icu4c" ,icu4c)
  475. ("lcms" ,lcms)))
  476. (propagated-inputs ; in Requires or Requires.private field of .pkg
  477. `(("librevenge" ,librevenge)
  478. ("zlib" ,zlib)))
  479. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libfreehand")
  480. (synopsis "Library for parsing the FreeHand format")
  481. (description "Libfreehand is a library that parses the file format of
  482. Aldus/Macromedia/Adobe FreeHand documents.")
  483. (license mpl2.0)))
  484. (define-public libmspub
  485. (package
  486. (name "libmspub")
  487. (version "0.1.4")
  488. (source
  489. (origin
  490. (method url-fetch)
  491. (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
  492. name "-" version ".tar.xz"))
  493. (sha256 (base32
  494. "1fhkn013gzg59f4z7rldpbi0nj7lgdqzxanspsqa6axvmahw2dpg"))))
  495. (build-system gnu-build-system)
  496. (native-inputs
  497. `(("doxygen" ,doxygen)
  498. ("pkg-config" ,pkg-config)))
  499. (propagated-inputs ; in Requires or Requires.private field of .pkg
  500. `(("icu4c" ,icu4c)
  501. ("librevenge" ,librevenge)
  502. ("zlib" ,zlib)))
  503. (inputs
  504. `(("boost" ,boost)))
  505. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libmspub")
  506. (synopsis "Library for parsing the Microsoft Publisher format")
  507. (description "Libmspub is a library that parses the file format of
  508. Microsoft Publisher documents of all versions.")
  509. (license mpl2.0)))
  510. (define-public libnumbertext
  511. (package
  512. (name "libnumbertext")
  513. (version "1.0")
  514. (source
  515. (origin
  516. (method url-fetch)
  517. (uri (string-append "https://github.com/numbertext/" name
  518. "/archive/" version ".tar.gz"))
  519. (sha256
  520. (base32
  521. "0wnsn4911fdd2na8jxkcvmk04a6xw6qlviic9w4qwg9fcym6866v"))
  522. (file-name (string-append name "-" version ".tar.gz"))))
  523. (build-system gnu-build-system)
  524. (arguments
  525. `(#:configure-flags '("--disable-static")))
  526. (native-inputs
  527. `(("autoconf" ,autoconf)
  528. ("automake" ,automake)
  529. ("libtool" ,libtool)
  530. ("pkg-config" ,pkg-config)))
  531. (home-page "https://github.com/Numbertext/libnumbertext")
  532. (synopsis "Language-neutral @code{NUMBERTEXT} and @code{MONEYTEXT} functions")
  533. (description
  534. "The libnumbertext library provides language-neutral @code{NUMBERTEXT}
  535. and @code{MONEYTEXT} functions for LibreOffice Calc, available for C++ and
  536. Java.")
  537. (license (list lgpl3+ bsd-3))))
  538. (define-public libpagemaker
  539. (package
  540. (name "libpagemaker")
  541. (version "0.0.4")
  542. (source
  543. (origin
  544. (method url-fetch)
  545. (uri (string-append "https://dev-www.libreoffice.org/src/" name "/"
  546. name "-" version ".tar.xz"))
  547. (sha256 (base32
  548. "17ai8ajffr0ixxmmcv3k5vgjlcsix38ldb4fw2arild70pbsrbb6"))))
  549. (build-system gnu-build-system)
  550. (native-inputs
  551. `(("doxygen" ,doxygen)
  552. ("pkg-config" ,pkg-config)))
  553. (propagated-inputs ; in Requires field of .pkg
  554. `(("librevenge" ,librevenge)))
  555. (inputs
  556. `(("boost" ,boost)
  557. ("zlib" ,zlib)))
  558. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libpagemaker")
  559. (synopsis "Library for parsing the PageMaker format")
  560. (description "Libpagemaker is a library that parses the file format of
  561. Aldus/Adobe PageMaker documents. Currently it only understands documents
  562. created by PageMaker version 6.x and 7.")
  563. (license mpl2.0)))
  564. (define-public libvisio
  565. (package
  566. (name "libvisio")
  567. (version "0.1.6")
  568. (source
  569. (origin
  570. (method url-fetch)
  571. (uri (string-append "http://dev-www.libreoffice.org/src/" name "/"
  572. name "-" version ".tar.xz"))
  573. (sha256 (base32
  574. "1yahpfl13qk6178irv8jn5ppxdn7isafqisyqsdw0lqxcz9h447y"))))
  575. (build-system gnu-build-system)
  576. (native-inputs
  577. `(("cppunit" ,cppunit)
  578. ("doxygen" ,doxygen)
  579. ("gperf" ,gperf)
  580. ("perl" ,perl)
  581. ("pkg-config" ,pkg-config)))
  582. (propagated-inputs ; in Requires or Requires.private field of .pkg
  583. `(("icu4c" ,icu4c)
  584. ("librevenge" ,librevenge)
  585. ("libxml2" ,libxml2)))
  586. (inputs
  587. `(("boost" ,boost)))
  588. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libvisio")
  589. (synopsis "Library for parsing the Microsoft Visio format")
  590. (description "Libvisio is a library that parses the file format of
  591. Microsoft Visio documents of all versions.")
  592. (license mpl2.0)))
  593. (define-public libodfgen
  594. (package
  595. (name "libodfgen")
  596. (version "0.1.7")
  597. (source
  598. (origin
  599. (method url-fetch)
  600. (uri (string-append "mirror://sourceforge/libwpd/" name "/"
  601. name "-" version "/" name "-" version ".tar.xz"))
  602. (sha256 (base32
  603. "0cdq48wlpp8m0qmndybv64r0m4vh0qsqx69cn6ms533cjlgljgij"))))
  604. (build-system gnu-build-system)
  605. (native-inputs
  606. `(("doxygen" ,doxygen)
  607. ("pkg-config" ,pkg-config)))
  608. (propagated-inputs ; in Requires field of .pkg
  609. `(("librevenge" ,librevenge)))
  610. (inputs
  611. `(("boost" ,boost)
  612. ("zlib" ,zlib)))
  613. (arguments
  614. ;; avoid triggering configure errors by simple inclusion of boost headers
  615. `(#:configure-flags '("--disable-werror")))
  616. (home-page "https://sourceforge.net/p/libwpd/wiki/libodfgen/")
  617. (synopsis "ODF (Open Document Format) library")
  618. (description "Libodfgen is a library for generating documents in the
  619. Open Document Format (ODF). It provides generator implementations for all
  620. document interfaces supported by librevenge:
  621. text documents, vector drawings, presentations and spreadsheets.")
  622. (license (list mpl2.0 lgpl2.1+)))) ; dual license
  623. (define-public libmwaw
  624. (package
  625. (name "libmwaw")
  626. (version "0.3.14")
  627. (source
  628. (origin
  629. (method url-fetch)
  630. (uri (string-append "mirror://sourceforge/" name "/" name "/" name "-"
  631. version "/" name "-" version ".tar.xz"))
  632. (sha256 (base32
  633. "1s9wyf8pyh3fbazq2d2b6fgi7s7bid60viw2xbdkmn2ywlfbza5c"))))
  634. (build-system gnu-build-system)
  635. (native-inputs
  636. `(("doxygen" ,doxygen)
  637. ("pkg-config" ,pkg-config)))
  638. (propagated-inputs ; in Requires field of .pkg
  639. `(("librevenge" ,librevenge)))
  640. (inputs
  641. `(("boost" ,boost)
  642. ("zlib" ,zlib)))
  643. (home-page "https://sourceforge.net/p/libmwaw/wiki/Home/")
  644. (synopsis "Import library for some old Macintosh text documents")
  645. (description "Libmwaw contains some import filters for old Macintosh
  646. text documents (MacWrite, ClarisWorks, ... ) and for some graphics and
  647. spreadsheet documents.")
  648. (license (list mpl2.0 lgpl2.1+)))) ; dual license
  649. (define-public libstaroffice
  650. (package
  651. (name "libstaroffice")
  652. (version "0.0.6")
  653. (source
  654. (origin
  655. (method url-fetch)
  656. (uri (string-append "https://github.com/fosnola/libstaroffice/releases/download/"
  657. version "/libstaroffice-" version ".tar.xz"))
  658. (sha256 (base32
  659. "1i0ykl0c94lc1qzb5mbyf9jr7qw8p38ja424whmhgrllh7ny203b"))))
  660. (build-system gnu-build-system)
  661. (inputs
  662. `(("librevenge" ,librevenge)
  663. ("zlib" ,zlib)))
  664. (native-inputs
  665. `(("pkg-config" ,pkg-config)))
  666. (home-page "https://github.com/fosnola/libstaroffice")
  667. (synopsis "Provides LibreOffice support for old StarOffice documents")
  668. (description "@code{libstaroffice} is an import filter for the document formats
  669. from the old StarOffice (.sdc, .sdw, ...).")
  670. (license (list mpl2.0 lgpl2.1+)))) ; dual license
  671. (define-public libwps
  672. (package
  673. (name "libwps")
  674. (version "0.4.10")
  675. (source
  676. (origin
  677. (method url-fetch)
  678. (uri (string-append "mirror://sourceforge/" name "/" name "/"
  679. name "-" version "/" name "-" version ".tar.xz"))
  680. (sha256 (base32
  681. "1ji9zd4wxmas03g8jyx0ih0amrqfazm5874a2v9rd7va50sf088l"))))
  682. (build-system gnu-build-system)
  683. (native-inputs
  684. `(("doxygen" ,doxygen)
  685. ("pkg-config" ,pkg-config)))
  686. (propagated-inputs ; in Requires field of .pkg
  687. `(("librevenge" ,librevenge)))
  688. (inputs
  689. `(("boost" ,boost)
  690. ("zlib" ,zlib)))
  691. (home-page "http://libwps.sourceforge.net/")
  692. (synopsis "Import library for Microsoft Works text documents")
  693. (description "Libwps is a library for importing files in the Microsoft
  694. Works word processor file format.")
  695. (license (list mpl2.0 lgpl2.1+)))) ; dual license
  696. (define-public libzmf
  697. (package
  698. (name "libzmf")
  699. (version "0.0.2")
  700. (source
  701. (origin
  702. (method url-fetch)
  703. (uri (string-append "http://dev-www.libreoffice.org/src/libzmf/libzmf-"
  704. version ".tar.xz"))
  705. (sha256 (base32
  706. "08mg5kmkjrmqrd8j5rkzw9vdqlvibhb1ynp6bmfxnzq5rcq1l197"))))
  707. (build-system gnu-build-system)
  708. (arguments
  709. ;; A harmless 'sign-compare' error pops up on i686 so disable '-Werror'.
  710. '(#:configure-flags '("--disable-werror")))
  711. (inputs
  712. `(("boost" ,boost)
  713. ("icu4c" ,icu4c)
  714. ("libpng" ,libpng)
  715. ("librevenge" ,librevenge)
  716. ("zlib" ,zlib)))
  717. (native-inputs
  718. `(("cppunit" ,cppunit)
  719. ("doxygen" ,doxygen)
  720. ("pkg-config" ,pkg-config)))
  721. (home-page "https://wiki.documentfoundation.org/DLP/Libraries/libzmf")
  722. (synopsis "Parses file format of Zoner Callisto/Draw documents")
  723. (description "Libzmf is a library that parses the file format of Zoner
  724. Callisto/Draw documents. Currently it only understands documents created by
  725. Zoner Draw version 4 and 5.")
  726. (license mpl2.0)))
  727. (define-public hunspell
  728. (package
  729. (name "hunspell")
  730. (version "1.7.0")
  731. (source
  732. (origin
  733. (method git-fetch)
  734. (uri (git-reference
  735. (url "https://github.com/hunspell/hunspell")
  736. (commit (string-append "v" version))))
  737. (file-name (git-file-name name version))
  738. (sha256
  739. (base32
  740. "0qxlkd012r45ppd21kldbq9k5ac5nmxz290z6m2kch9l56v768k1"))))
  741. (build-system gnu-build-system)
  742. (native-inputs
  743. `(("autoconf" ,autoconf)
  744. ("automake" ,automake)
  745. ("libtool" ,libtool)))
  746. (inputs
  747. `(("perl" ,perl)))
  748. (native-search-paths (list (search-path-specification
  749. (variable "DICPATH")
  750. (files '("share/hunspell")))))
  751. (home-page "https://hunspell.github.io/")
  752. (synopsis "Spell checker")
  753. (description "Hunspell is a spell checker and morphological analyzer
  754. library and program designed for languages with rich morphology and complex
  755. word compounding or character encoding.")
  756. ;; Triple license, including "mpl1.1 or later".
  757. (license (list mpl1.1 gpl2+ lgpl2.1+))))
  758. (define (dicollecte-french-dictionary variant synopsis)
  759. ;; Return a French dictionary package from dicollecte.org, for the given
  760. ;; VARIANT.
  761. (package
  762. (name (match variant
  763. ("classique" "hunspell-dict-fr")
  764. (_ (string-append "hunspell-dict-fr-" variant))))
  765. (version "6.2")
  766. (source (origin
  767. (uri (string-append
  768. "http://www.dicollecte.org/download/fr/hunspell-french-dictionaries-v"
  769. version ".zip"))
  770. (method url-fetch)
  771. (sha256
  772. (base32
  773. "139hfrn5p87sl8hqmgkf6sgvnxrk2mm8vd8xsm8sm98qjnwlg0f9"))))
  774. (build-system trivial-build-system)
  775. (native-inputs `(("unzip" ,unzip)))
  776. (arguments
  777. `(#:modules ((guix build utils))
  778. #:builder (begin
  779. (use-modules (guix build utils)
  780. (srfi srfi-26))
  781. (let* ((out (assoc-ref %outputs "out"))
  782. (hunspell (string-append out "/share/hunspell"))
  783. (myspell (string-append out "/share/myspell"))
  784. (doc (string-append out "/share/doc/"
  785. ,name))
  786. (unzip (assoc-ref %build-inputs "unzip")))
  787. (invoke (string-append unzip "/bin/unzip")
  788. (assoc-ref %build-inputs "source"))
  789. (for-each (cut install-file <> hunspell)
  790. (find-files "."
  791. ,(string-append variant
  792. "\\.(dic|aff)$")))
  793. (mkdir-p myspell)
  794. (symlink hunspell (string-append myspell "/dicts"))
  795. (for-each (cut install-file <> doc)
  796. (find-files "." "\\.(txt|org|md)$"))
  797. #t))))
  798. (synopsis synopsis)
  799. (description
  800. "This package provides a dictionary for the Hunspell spell-checking
  801. library.")
  802. (home-page "https://www.dicollecte.org/home.php?prj=fr")
  803. (license mpl2.0)))
  804. (define-syntax define-french-dictionary
  805. (syntax-rules (synopsis)
  806. ((_ name variant (synopsis text))
  807. (define-public name
  808. (dicollecte-french-dictionary variant text)))))
  809. (define-french-dictionary hunspell-dict-fr-classique
  810. "classique"
  811. ;; TRANSLATORS: In French, this is "Français classique".
  812. (synopsis "Hunspell dictionary for ``classic'' French (recommended)"))
  813. (define-french-dictionary hunspell-dict-fr-moderne
  814. "moderne"
  815. ;; TRANSLATORS: In French, this is "Français moderne".
  816. (synopsis "Hunspell dictionary for ``modern'' French"))
  817. (define-french-dictionary hunspell-dict-fr-réforme-1990
  818. "reforme1990"
  819. (synopsis "Hunspell dictionary for the post @dfn{1990 réforme} French"))
  820. (define-french-dictionary hunspell-dict-fr-toutes-variantes
  821. "toutesvariantes"
  822. (synopsis "Hunspell dictionary for all variants of French"))
  823. (define-public hyphen
  824. (package
  825. (name "hyphen")
  826. (version "2.8.8")
  827. (source
  828. (origin
  829. (method url-fetch)
  830. (uri (string-append "mirror://sourceforge/hunspell/Hyphen/"
  831. (version-major+minor version) "/"
  832. name "-" version ".tar.gz"))
  833. (sha256 (base32
  834. "01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih"))))
  835. (build-system gnu-build-system)
  836. (inputs
  837. `(("perl" ,perl)))
  838. (home-page "http://hunspell.sourceforge.net/")
  839. (synopsis "Hyphenation library")
  840. (description "Hyphen is a hyphenation library using TeX hyphenation
  841. patterns, which are pre-processed by a perl script.")
  842. ;; triple license, including "mpl1.1 or later"
  843. (license (list mpl1.1 mpl2.0 gpl2+ lgpl2.1+))))
  844. (define-public mythes
  845. (package
  846. (name "mythes")
  847. (version "1.2.4")
  848. (source
  849. (origin
  850. (method url-fetch)
  851. (uri (string-append "mirror://sourceforge/hunspell/MyThes/" version "/"
  852. name "-" version ".tar.gz"))
  853. (sha256 (base32
  854. "0prh19wy1c74kmzkkavm9qslk99gz8h8wmjvwzjc6lf8v2az708y"))))
  855. (build-system gnu-build-system)
  856. (native-inputs
  857. `(("pkg-config" ,pkg-config)))
  858. (inputs
  859. `(("hunspell" ,hunspell)
  860. ("perl" ,perl)))
  861. (home-page "http://hunspell.sourceforge.net/")
  862. (synopsis "Thesaurus")
  863. (description "MyThes is a simple thesaurus that uses a structured text
  864. data file and an index file with binary search to look up words and phrases
  865. and to return information on pronunciations, meanings and synonyms.")
  866. (license (non-copyleft "file://COPYING"
  867. "See COPYING in the distribution."))))
  868. (define-public libqxp
  869. (package
  870. (name "libqxp")
  871. (version "0.0.1")
  872. (source (origin
  873. (method url-fetch)
  874. (uri (string-append "https://dev-www.libreoffice.org/src/libqxp/"
  875. "libqxp-" version ".tar.xz"))
  876. (sha256
  877. (base32
  878. "0wswz49y0lqwqw2nj9j7jaj5ag88hapcz8czgkxax57zhihpy9cc"))))
  879. (build-system gnu-build-system)
  880. (inputs
  881. `(("boost" ,boost)
  882. ("icu4c" ,icu4c)
  883. ("zlib" ,zlib)))
  884. (native-inputs
  885. `(("cppunit" ,cppunit)
  886. ("pkg-config" ,pkg-config)))
  887. (propagated-inputs
  888. `(("librevenge" ,librevenge))) ; mentioned in Requires field
  889. (home-page "https://www.libreoffice.org")
  890. (synopsis "Library and tools for the QuarkXPress file format")
  891. (description "libqxp is a library and a set of tools for reading and
  892. converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
  893. (license mpl2.0)))
  894. (define-public libreoffice
  895. (package
  896. (name "libreoffice")
  897. (version "6.1.5.2")
  898. (source
  899. (origin
  900. (method url-fetch)
  901. (uri
  902. (string-append
  903. "https://download.documentfoundation.org/libreoffice/src/"
  904. (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
  905. (sha256
  906. (base32
  907. "1wh8qhqkmb89nmfcb0w6iwpdzxwqr7c5kzxgpk4gy60xin6gwjgb"))
  908. (patches
  909. (append (list (origin
  910. ;; Support newer versions of Orcus and MDDS. These patches
  911. ;; are taken from upstream, but we use the patches from Arch
  912. ;; because they are adapted for the release tarball.
  913. ;; Note: remove the related substitutions below when these
  914. ;; are no longer needed.
  915. (method url-fetch)
  916. (uri (string-append "https://git.archlinux.org/svntogit"
  917. "/packages.git/plain/trunk/"
  918. "0001-Update-orcus-to-0.14.0.patch?&id="
  919. "4002fa927f2a143bd2ec008a0c400b2ce9f2c8a7"))
  920. (file-name "libreoffice-orcus.patch")
  921. (sha256
  922. (base32
  923. "0v1knblrmfzkb4g9pm5mdnrmjib59bznvca1ygbwlap2ln1h4mk0")))
  924. (origin
  925. (method url-fetch)
  926. (uri (string-append "https://git.archlinux.org/svntogit"
  927. "/packages.git/plain/trunk/"
  928. "0001-Update-mdds-to-1.4.1.patch?&id="
  929. "4002fa927f2a143bd2ec008a0c400b2ce9f2c8a7"))
  930. (file-name "libreoffice-mdds.patch")
  931. (sha256
  932. (base32
  933. "0apbmammmp4pk473xiv5vk50r4c5gjvqzf9jkficksvz58q6114f"))))
  934. (search-patches "libreoffice-boost.patch"
  935. "libreoffice-icu.patch"
  936. "libreoffice-glm.patch")))
  937. (modules '((guix build utils)))
  938. (snippet
  939. '(begin
  940. (for-each (lambda (file)
  941. ;; Adjust to renamed function in Poppler 0.72.
  942. (substitute* file (("getCString") "c_str")))
  943. (find-files "sdext/source/pdfimport/xpdfwrapper"))
  944. #t))))
  945. (build-system glib-or-gtk-build-system)
  946. (native-inputs
  947. `(("bison" ,bison)
  948. ("cppunit" ,cppunit-1.14)
  949. ("flex" ,flex)
  950. ("pkg-config" ,pkg-config)
  951. ("python" ,python-wrapper)
  952. ("which" ,which)))
  953. (inputs
  954. `(("bluez" ,bluez)
  955. ("boost" ,boost)
  956. ("clucene" ,clucene)
  957. ("cups" ,cups)
  958. ("dbus-glib" ,dbus-glib)
  959. ("fontconfig" ,fontconfig)
  960. ("gconf" ,gconf)
  961. ("glew" ,glew)
  962. ("glm" ,glm)
  963. ("gperf" ,gperf)
  964. ("gpgme" ,gpgme)
  965. ("graphite2" ,graphite2)
  966. ("gst-plugins-base" ,gst-plugins-base)
  967. ("gtk+" ,gtk+)
  968. ("harfbuzz" ,harfbuzz)
  969. ("hunspell" ,hunspell)
  970. ("hyphen" ,hyphen)
  971. ("libabw" ,libabw)
  972. ("libcdr" ,libcdr)
  973. ("libcmis" ,libcmis)
  974. ("libjpeg-turbo" ,libjpeg-turbo)
  975. ("libe-book" ,libe-book)
  976. ("libepubgen" ,libepubgen)
  977. ("libetonyek" ,libetonyek)
  978. ("libexttextcat" ,libexttextcat)
  979. ("libfreehand" ,libfreehand)
  980. ("liblangtag" ,liblangtag)
  981. ;; XXX: Perhaps this should be propagated from xmlsec.
  982. ("libltdl" ,libltdl)
  983. ("libmspub" ,libmspub)
  984. ("libmwaw" ,libmwaw)
  985. ("libnumbertext" ,libnumbertext)
  986. ("libodfgen" ,libodfgen)
  987. ("libpagemaker" ,libpagemaker)
  988. ("libqxp" ,libqxp)
  989. ("libstaroffice" ,libstaroffice)
  990. ("libvisio" ,libvisio)
  991. ("libwpg" ,libwpg)
  992. ("libwps" ,libwps)
  993. ("libxrandr" ,libxrandr)
  994. ("libxrender" ,libxrender)
  995. ("libxslt" ,libxslt)
  996. ("libxt" ,libxt)
  997. ("libzmf" ,libzmf)
  998. ("lpsolve" ,lpsolve)
  999. ("mdds" ,mdds)
  1000. ("mythes" ,mythes)
  1001. ("neon" ,neon)
  1002. ("nspr" ,nspr)
  1003. ("nss" ,nss)
  1004. ("openldap" ,openldap)
  1005. ("openssl" ,openssl)
  1006. ("orcus" ,orcus)
  1007. ("perl" ,perl)
  1008. ("perl-archive-zip" ,perl-archive-zip)
  1009. ("poppler" ,poppler)
  1010. ("postgresql" ,postgresql)
  1011. ("python" ,python)
  1012. ("python-lxml" ,python-lxml)
  1013. ("redland" ,redland)
  1014. ("sane-backends" ,sane-backends)
  1015. ("unixodbc" ,unixodbc)
  1016. ("unzip" ,unzip)
  1017. ("vigra" ,vigra)
  1018. ("xmlsec" ,xmlsec-nss)
  1019. ("zip" ,zip)))
  1020. (arguments
  1021. `(#:tests? #f ; Building the tests already fails.
  1022. #:make-flags '("build-nocheck") ; Do not build unit tests, which fails.
  1023. #:phases
  1024. (modify-phases %standard-phases
  1025. (add-before 'configure 'prepare-src
  1026. (lambda* (#:key inputs #:allow-other-keys)
  1027. (substitute*
  1028. (list "sysui/CustomTarget_share.mk"
  1029. "solenv/gbuild/gbuild.mk"
  1030. "solenv/gbuild/platform/unxgcc.mk")
  1031. (("/bin/sh") (which "sh")))
  1032. ;; XXX: Adjust the checks for MDDS and liborcus to avoid having
  1033. ;; to re-bootstrap the whole thing. Remove this with the related
  1034. ;; patches above.
  1035. (substitute* "configure"
  1036. (("mdds-1.2 >= 1.2.3") "mdds-1.4 >= 1.4.1")
  1037. (("liborcus-0.13 >= 0.13.3") "liborcus-0.14 >= 0.14.0"))
  1038. ;; GPGME++ headers are installed in a gpgme++ subdirectory, but
  1039. ;; files in "xmlsecurity/source/gpg/" and elsewhere expect to
  1040. ;; find them on the include path without a prefix.
  1041. (substitute* '("xmlsecurity/Library_xsec_xmlsec.mk"
  1042. "comphelper/Library_comphelper.mk")
  1043. (("\\$\\$\\(INCLUDE\\)")
  1044. (string-append "$$(INCLUDE) -I"
  1045. (assoc-ref inputs "gpgme")
  1046. "/include/gpgme++")))
  1047. #t))
  1048. (add-after 'install 'bin-and-desktop-install
  1049. ;; Create 'soffice' and 'libreoffice' symlinks to the executable
  1050. ;; script.
  1051. (lambda* (#:key outputs #:allow-other-keys)
  1052. (let ((out (assoc-ref outputs "out")))
  1053. (define (symlink-output src dst)
  1054. (mkdir-p (dirname (string-append out dst)))
  1055. (symlink (string-append out src) (string-append out dst)))
  1056. (define (install src dst)
  1057. (let ((dst (string-append out dst)))
  1058. (mkdir-p (dirname dst))
  1059. (copy-file src dst)))
  1060. (define (install-desktop-file app)
  1061. (let ((src (string-append "/lib/libreoffice/share/xdg/"
  1062. app ".desktop"))
  1063. (dst (string-append "/share/applications/libreoffice-"
  1064. app ".desktop")))
  1065. (substitute* (string-append out src)
  1066. (("Exec=libreoffice[0-9]+\\.[0-9]+ ")
  1067. (string-append "Exec=" out "/bin/libreoffice "))
  1068. (("Icon=libreoffice.*")
  1069. (string-append "Icon=" app "\n"))
  1070. (("LibreOffice [0-9]+\\.[0-9]+")
  1071. "LibreOffice"))
  1072. (symlink-output src dst)))
  1073. (define (install-appdata app)
  1074. (install-file (string-append
  1075. "sysui/desktop/appstream-appdata/"
  1076. "libreoffice-" app ".appdata.xml")
  1077. (string-append out "/share/appdata")))
  1078. (symlink-output "/lib/libreoffice/program/soffice"
  1079. "/bin/soffice")
  1080. (symlink-output "/lib/libreoffice/program/soffice"
  1081. "/bin/libreoffice")
  1082. (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.keys"
  1083. "/share/mime-info/libreoffice.keys")
  1084. (install "workdir/CustomTarget/sysui/share/libreoffice/openoffice.mime"
  1085. "/share/mime-info/libreoffice.mime")
  1086. (install
  1087. "workdir/CustomTarget/sysui/share/libreoffice/openoffice.org.xml"
  1088. "/share/mime/packages/libreoffice.xml")
  1089. (for-each install-desktop-file
  1090. '("base" "calc" "draw" "impress" "writer"
  1091. "math" "startcenter"))
  1092. (for-each install-appdata
  1093. '("base" "calc" "draw" "impress" "writer"))
  1094. (mkdir-p (string-append out "/share/icons/hicolor"))
  1095. (copy-recursively "sysui/desktop/icons/hicolor"
  1096. (string-append out "/share/icons/hicolor")))
  1097. #t)))
  1098. #:configure-flags
  1099. (list
  1100. "--enable-release-build"
  1101. "--enable-verbose"
  1102. ;; Avoid using all cpu cores by default
  1103. (format #f "--with-parallelism=~d" (parallel-job-count))
  1104. "--disable-fetch-external" ; disable downloads
  1105. "--with-system-libs" ; enable all --with-system-* flags
  1106. (string-append "--with-boost-libdir="
  1107. (assoc-ref %build-inputs "boost") "/lib")
  1108. ;; Avoid undefined symbols required by boost::spirit
  1109. "LDFLAGS=-lboost_system"
  1110. ;; Avoid a dependency on ucpp.
  1111. "--with-idlc-cpp=cpp"
  1112. ;; The fonts require an external tarball (crosextrafonts).
  1113. ;; They should not be needed when system fonts are available.
  1114. "--without-fonts"
  1115. ;; With java, the build fails since sac.jar is missing.
  1116. "--without-java"
  1117. ;; FIXME: Enable once the corresponding inputs are packaged.
  1118. "--without-system-npapi-headers"
  1119. "--disable-coinmp"
  1120. "--disable-firebird-sdbc" ; embedded firebird
  1121. "--disable-gltf"
  1122. ;; XXX: PDFium support requires fetching an external tarball and
  1123. ;; patching the build scripts to work with GCC5. Try enabling this
  1124. ;; when our default compiler is >=GCC 6.
  1125. "--disable-pdfium"
  1126. "--disable-gtk" ; disable use of GTK+ 2
  1127. "--without-doxygen")))
  1128. (home-page "https://www.libreoffice.org/")
  1129. (synopsis "Office suite")
  1130. (description "LibreOffice is a comprehensive office suite. It contains
  1131. a number of components: Writer, a word processor; Calc, a spreadsheet
  1132. application; Impress, a presentation engine; Draw, a drawing and
  1133. flowcharting application; Base, a database and database frontend;
  1134. Math for editing mathematics.")
  1135. (license mpl2.0)))