1 |
commit: c48fa388500567bae7f3e7cfdb2660998d089f4c |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 10 09:39:46 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 10 09:43:43 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c48fa388 |
7 |
|
8 |
app-office/libreoffice: 5.4.5.1 version bump |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
app-office/libreoffice/Manifest | 2 + |
13 |
.../files/libreoffice-5.4.5.1-pyuno-crash.patch | 87 ++++ |
14 |
app-office/libreoffice/libreoffice-5.4.5.1.ebuild | 580 +++++++++++++++++++++ |
15 |
3 files changed, 669 insertions(+) |
16 |
|
17 |
diff --git a/app-office/libreoffice/Manifest b/app-office/libreoffice/Manifest |
18 |
index 266e3bc93e3..78dfafcffc8 100644 |
19 |
--- a/app-office/libreoffice/Manifest |
20 |
+++ b/app-office/libreoffice/Manifest |
21 |
@@ -5,8 +5,10 @@ DIST 4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2 555 |
22 |
DIST 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip 1521926 BLAKE2B d2769842c180997055648a8b1a33cc89988b74628bad8aa012242e0c1afa5b5b8568323c107187072207ee69bd841ba4ca3bbfe27ef65223ddc729d1a1aa6590 SHA512 ec5ae23c8fe2f5efc377f7a9665039afadf28b4d8f2791379296766a5fbc9a3bf7548f9b0e3b3b07762229ec733a92ccbb69791ee0318c9c6f78f8e847253d3f |
23 |
DIST a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip 23150 BLAKE2B 51db6bd90585b13857ecb494c805c9fb6874e1e65d7aee73d23e1716670836a14b376bcca810f96fd55b0ed653b2660a268030f246c822cbb04f867ef763a3b3 SHA512 2d3835f7ac356805025cafedcad97faa48d0f5da386e6ac7b7451030059df8e2fdb0861ade07a576ebf9fb5b88a973585ab0437944b06aac9289d6898ba8586a |
24 |
DIST libreoffice-5.4.4.2.tar.xz 193657116 BLAKE2B 1be8565481bbdf930f6bbbd894dbe5d0be7faeba068517e15a2b23acfd2d8d06960e5991fd9d990c49ad13857177020e22fdb5c272587bc25cac4bdf23bb7fa1 SHA512 f7142fd73aa037b0bbffd3fa5af58049ab6688900976296ba2e53956227aef8920cb229aad4eec05ff36c8dde584415f7893893cc81cac72b305f67b80e36882 |
25 |
+DIST libreoffice-5.4.5.1.tar.xz 193846832 BLAKE2B 50e9afb84d6e1901c3a6c99d1a4d3e274894d001afce71a0ced6a3ba0682995adf75e21eed40cfbc6d159581bf152273fad85615030fee33ba63dbf1ca15148d SHA512 70ef595aab3ddc81a000c18f2f783e5a87d98326fd3b69923c43e94e832a7f4d89f0d7444073d9ec48590e9a90b9fcd049ba0c85d17ac7921cd022cb2d0bebd5 |
26 |
DIST libreoffice-6.0.0.3-patchset-01.tar.xz 33032 BLAKE2B 1fad88d703b9ff097a6870d6f74731de3e6bd5f7b91938e674b28bf82bae0b075d910a930b2e3c82fc1ff5dff81f13575fed351f8165cec67903e8949e06b9d4 SHA512 2fb4f02e93b648fbf611b62ad8bfe93fd4b228bee84612a9d62e9bc061cabf51ae76d7d9cbfbad186669db109fe829765c816eb27960f97ca37e7fe0536d72e9 |
27 |
DIST libreoffice-6.0.1.1.tar.xz 203420780 BLAKE2B 80478e0627843abcf61c067592f3220f83ae43123d95dcab82197389f538f843001a6fabdc0d67e3cbca734cf68f2effdc09fa7d15e7b49c719f26d9ebf70791 SHA512 dc9dbef56a5c1df0ac0a4418a42e9200fe1a2e52d3708ad9d86ad1b35171c258fa9a88a4427992aeae83f5e0f22613cf885f068c99e76e5fe376888f4edf7855 |
28 |
DIST libreoffice-branding-gentoo-0.8.tar.xz 151568 BLAKE2B f03c7ddeb53c5ca3fd23401679601fcf2c4037ba17be4eb7b784c7ce7ebb71a24b8ab4aac8b7da8c6b1f14dd23bc1294ba85ff4f70ad271fb4ee3c5372e10883 SHA512 785031a699b1d1895ce4b50ffc3ddf645f3a0ef9acdf37facfd18cf75db9484cb8f53a50abb63d6006ead76a80b6ff5aa99661063245ebb84bd64013d713de7f |
29 |
DIST libreoffice-help-5.4.4.2.tar.xz 2343352 BLAKE2B d94528f6dcc85730f2443f3a84beff0cd113bb9c423d767c74d831649e56b0c92279474a0f1169ebc0ffd7804d57dba86aaa352e7fd1d9df9721f3ff6059047c SHA512 55abdde1cf0f62d213a897cc30b92ae04960c9b1e6e69c4f86242d2beecd787f44be9c3d0c8684d775ffe40b17d685a71739c9c2f08753649c4e1298fdf94226 |
30 |
+DIST libreoffice-help-5.4.5.1.tar.xz 2343180 BLAKE2B bd36ecae88313b60e9ad220f8ce47185e070e275d873741e96a98fd6d2dbf546b579fc304c1931775de86734710d2b91542ee9c9749b6036fe8e443cfecb60ed SHA512 b3860dd592207f83b8c6613fdb42962a9e175f6e850282cef6380869add7fe81c7292fdd145f2e2616f8113e2c18f6ed60210d4a182c1be021d7a1db61c9d89d |
31 |
DIST libreoffice-help-6.0.1.1.tar.xz 2972872 BLAKE2B fed3b8182a9459453a71c0cf76b53220081b33bf4a5f88ef603b39101a19a80f4545033c5e2f817c973d0edfdca48c954249761246d53c1eea798a5059ee2800 SHA512 bbebc878b25f80642c6ebd961e8531cf4f1379cc409a63391ca731e83e71e4e83e2a7ef6ae00b56812a8a4ae2c5de5ea5465aba70b357850b7b9c5f672521336 |
32 |
|
33 |
diff --git a/app-office/libreoffice/files/libreoffice-5.4.5.1-pyuno-crash.patch b/app-office/libreoffice/files/libreoffice-5.4.5.1-pyuno-crash.patch |
34 |
new file mode 100644 |
35 |
index 00000000000..850f56465c7 |
36 |
--- /dev/null |
37 |
+++ b/app-office/libreoffice/files/libreoffice-5.4.5.1-pyuno-crash.patch |
38 |
@@ -0,0 +1,87 @@ |
39 |
+From 42e2c4af310deb7660b07c6307459c9d2a42bb8b Mon Sep 17 00:00:00 2001 |
40 |
+From: Michael Stahl <mstahl@××××××.com> |
41 |
+Date: Thu, 1 Feb 2018 13:52:00 +0100 |
42 |
+Subject: tdf#114815 pyuno: avoid 2 threads initing python in parallel |
43 |
+ |
44 |
+According to the crash reports, it's possible for the grammar checking |
45 |
+thread to call GetGrammarChecker, instantiating lightproof, at the same |
46 |
+time as the main thread instantiates LngSvcMgr, which also instantiates |
47 |
+(some?) (all?) grammar checkers. |
48 |
+ |
49 |
+Ensure that pyuno_loader::CreateInstance() initialises Python only |
50 |
+once with a C++11 thread safe static. |
51 |
+ |
52 |
+For the backport, use rtl::Static instead, because on the 5.4 branch |
53 |
+MSVC does not have HAVE_THREADSAFE_STATICS enabled. |
54 |
+ |
55 |
+Change-Id: I5b1faba9107355c508831a078366e4a29fdbfadf |
56 |
+(cherry picked from commit 5357ca82846ea7147ad61e9340f25647a5934eb0) |
57 |
+Reviewed-on: https://gerrit.libreoffice.org/49116 |
58 |
+Tested-by: Jenkins <ci@×××××××××××.org> |
59 |
+Reviewed-by: Stephan Bergmann <sbergman@××××××.com> |
60 |
+(cherry picked from commit 362b0c521c1c58dc8ea5e87ecbb482d5bdc073f4) |
61 |
+Reviewed-on: https://gerrit.libreoffice.org/49298 |
62 |
+Reviewed-by: Michael Meeks <michael.meeks@×××××××××.com> |
63 |
+Tested-by: Markus Mohrhard <markus.mohrhard@××××××××××.com> |
64 |
+Reviewed-by: Markus Mohrhard <markus.mohrhard@××××××××××.com> |
65 |
+--- |
66 |
+ pyuno/source/loader/pyuno_loader.cxx | 25 +++++++++++++++++++++---- |
67 |
+ 1 file changed, 21 insertions(+), 4 deletions(-) |
68 |
+ |
69 |
+diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx |
70 |
+index adbf6c8..0408af0 100644 |
71 |
+--- a/pyuno/source/loader/pyuno_loader.cxx |
72 |
++++ b/pyuno/source/loader/pyuno_loader.cxx |
73 |
+@@ -31,6 +31,7 @@ |
74 |
+ #include <rtl/ustrbuf.hxx> |
75 |
+ #include <rtl/strbuf.hxx> |
76 |
+ #include <rtl/bootstrap.hxx> |
77 |
++#include <rtl/instance.hxx> |
78 |
+ |
79 |
+ #include <cppuhelper/implementationentry.hxx> |
80 |
+ #include <cppuhelper/factory.hxx> |
81 |
+@@ -176,11 +177,10 @@ static void prependPythonPath( const OUString & pythonPathBootstrap ) |
82 |
+ osl_setEnvironment(envVar.pData, envValue.pData); |
83 |
+ } |
84 |
+ |
85 |
+-Reference< XInterface > CreateInstance( const Reference< XComponentContext > & ctx ) |
86 |
++struct PythonInit |
87 |
+ { |
88 |
+- Reference< XInterface > ret; |
89 |
+- |
90 |
+- if( ! Py_IsInitialized() ) |
91 |
++PythonInit() { |
92 |
++ if (! Py_IsInitialized()) // may be inited by getComponentContext() already |
93 |
+ { |
94 |
+ OUString pythonPath; |
95 |
+ OUString pythonHome; |
96 |
+@@ -236,9 +236,26 @@ Reference< XInterface > CreateInstance( const Reference< XComponentContext > & c |
97 |
+ // PyThreadAttach below. |
98 |
+ PyThreadState_Delete(tstate); |
99 |
+ } |
100 |
++} |
101 |
++}; |
102 |
++ |
103 |
++namespace { |
104 |
++ struct thePythonInit : public rtl::Static<PythonInit, thePythonInit> {}; |
105 |
++} |
106 |
++ |
107 |
++Reference<XInterface> CreateInstance(const Reference<XComponentContext> & ctx) |
108 |
++{ |
109 |
++ // tdf#114815 thread-safe static to init python only once |
110 |
++ thePythonInit::get(); |
111 |
++ |
112 |
++ Reference< XInterface > ret; |
113 |
+ |
114 |
+ PyThreadAttach attach( PyInterpreterState_Head() ); |
115 |
+ { |
116 |
++ // note: this can't race against getComponentContext() because |
117 |
++ // either (in soffice.bin) CreateInstance() must be called before |
118 |
++ // getComponentContext() can be called, or (in python.bin) the other |
119 |
++ // way around |
120 |
+ if( ! Runtime::isInitialized() ) |
121 |
+ { |
122 |
+ Runtime::initialize( ctx ); |
123 |
+-- |
124 |
+cgit v1.1 |
125 |
+ |
126 |
|
127 |
diff --git a/app-office/libreoffice/libreoffice-5.4.5.1.ebuild b/app-office/libreoffice/libreoffice-5.4.5.1.ebuild |
128 |
new file mode 100644 |
129 |
index 00000000000..9ebcfd8ed95 |
130 |
--- /dev/null |
131 |
+++ b/app-office/libreoffice/libreoffice-5.4.5.1.ebuild |
132 |
@@ -0,0 +1,580 @@ |
133 |
+# Copyright 1999-2018 Gentoo Foundation |
134 |
+# Distributed under the terms of the GNU General Public License v2 |
135 |
+ |
136 |
+EAPI=6 |
137 |
+ |
138 |
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) |
139 |
+PYTHON_REQ_USE="threads,xml" |
140 |
+ |
141 |
+# experimental ; release ; old |
142 |
+# Usually the tarballs are moved a lot so this should make |
143 |
+# everyone happy. |
144 |
+DEV_URI=" |
145 |
+ https://dev-builds.libreoffice.org/pre-releases/src |
146 |
+ https://download.documentfoundation.org/libreoffice/src/${PV:0:5}/ |
147 |
+ https://download.documentfoundation.org/libreoffice/old/${PV}/ |
148 |
+" |
149 |
+ADDONS_URI="https://dev-www.libreoffice.org/src/" |
150 |
+ |
151 |
+BRANDING="${PN}-branding-gentoo-0.8.tar.xz" |
152 |
+# PATCHSET="${P}-patchset-01.tar.xz" |
153 |
+ |
154 |
+[[ ${PV} == *9999* ]] && SCM_ECLASS="git-r3" |
155 |
+inherit multiprocessing autotools bash-completion-r1 check-reqs gnome2-utils java-pkg-opt-2 pax-utils python-single-r1 toolchain-funcs flag-o-matic versionator xdg-utils qmake-utils ${SCM_ECLASS} |
156 |
+unset SCM_ECLASS |
157 |
+ |
158 |
+DESCRIPTION="A full office productivity suite" |
159 |
+HOMEPAGE="https://www.libreoffice.org" |
160 |
+SRC_URI="branding? ( https://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )" |
161 |
+[[ -n ${PATCHSET} ]] && SRC_URI+=" http://dev.gentooexperimental.org/~scarabeus/${PATCHSET}" |
162 |
+ |
163 |
+# Split modules following git/tarballs |
164 |
+# Core MUST be first! |
165 |
+# Help is used for the image generator |
166 |
+# Only release has the tarballs |
167 |
+if [[ ${PV} != *9999* ]]; then |
168 |
+ for i in ${DEV_URI}; do |
169 |
+ SRC_URI+=" ${i}/${P}.tar.xz" |
170 |
+ SRC_URI+=" ${i}/${PN}-help-${PV}.tar.xz" |
171 |
+ done |
172 |
+ unset i |
173 |
+fi |
174 |
+unset DEV_URI |
175 |
+ |
176 |
+# Really required addons |
177 |
+# These are bundles that can't be removed for now due to huge patchsets. |
178 |
+# If you want them gone, patches are welcome. |
179 |
+ADDONS_SRC=( |
180 |
+ "collada? ( ${ADDONS_URI}/4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2 )" |
181 |
+ "java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )" |
182 |
+ # no release for 8 years, should we package it? |
183 |
+ "libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )" |
184 |
+ # Does not build with 1.6 rhino at all |
185 |
+ "libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )" |
186 |
+ # requirement of rhino |
187 |
+ "libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )" |
188 |
+ # not packageable |
189 |
+ "odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )" |
190 |
+) |
191 |
+SRC_URI+=" ${ADDONS_SRC[*]}" |
192 |
+ |
193 |
+unset ADDONS_URI |
194 |
+unset ADDONS_SRC |
195 |
+ |
196 |
+# Extensions that need extra work: |
197 |
+LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher" |
198 |
+ |
199 |
+IUSE="bluetooth +branding coinmp collada +cups dbus debug eds firebird gltf googledrive |
200 |
+gstreamer +gtk gtk3 jemalloc kde libressl mysql odk pdfimport postgres quickstarter test vlc |
201 |
+$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})" |
202 |
+ |
203 |
+LICENSE="|| ( LGPL-3 MPL-1.1 )" |
204 |
+SLOT="0" |
205 |
+[[ ${PV} == *9999* ]] || \ |
206 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux" |
207 |
+ |
208 |
+COMMON_DEPEND="${PYTHON_DEPS} |
209 |
+ app-arch/unzip |
210 |
+ app-arch/zip |
211 |
+ app-crypt/gpgme[cxx] |
212 |
+ app-text/hunspell:= |
213 |
+ >=app-text/libabw-0.1.0 |
214 |
+ >=app-text/libebook-0.1 |
215 |
+ >=app-text/libetonyek-0.1 |
216 |
+ app-text/libexttextcat |
217 |
+ app-text/liblangtag |
218 |
+ >=app-text/libmspub-0.1.0 |
219 |
+ >=app-text/libmwaw-0.3.1 |
220 |
+ >=app-text/libodfgen-0.1.0 |
221 |
+ app-text/libstaroffice |
222 |
+ app-text/libwpd:0.10[tools] |
223 |
+ app-text/libwpg:0.3 |
224 |
+ >=app-text/libwps-0.4 |
225 |
+ app-text/mythes |
226 |
+ >=dev-cpp/clucene-2.3.3.4-r2 |
227 |
+ =dev-cpp/libcmis-0.5* |
228 |
+ dev-db/unixODBC |
229 |
+ dev-lang/perl |
230 |
+ dev-libs/boost:= |
231 |
+ dev-libs/expat |
232 |
+ dev-libs/hyphen |
233 |
+ dev-libs/icu:= |
234 |
+ dev-libs/libassuan |
235 |
+ dev-libs/libgpg-error |
236 |
+ =dev-libs/liborcus-0.12* |
237 |
+ dev-libs/librevenge |
238 |
+ dev-libs/nspr |
239 |
+ dev-libs/nss |
240 |
+ !libressl? ( >=dev-libs/openssl-1.0.0d:0 ) |
241 |
+ libressl? ( dev-libs/libressl ) |
242 |
+ >=dev-libs/redland-1.0.16 |
243 |
+ >=dev-libs/xmlsec-1.2.24[nss] |
244 |
+ media-gfx/graphite2 |
245 |
+ media-libs/fontconfig |
246 |
+ media-libs/freetype:2 |
247 |
+ >=media-libs/harfbuzz-0.9.42:=[graphite,icu] |
248 |
+ media-libs/lcms:2 |
249 |
+ >=media-libs/libcdr-0.1.0 |
250 |
+ >=media-libs/libepoxy-1.3.1[X] |
251 |
+ >=media-libs/libfreehand-0.1.0 |
252 |
+ media-libs/libpagemaker |
253 |
+ >=media-libs/libpng-1.4:0= |
254 |
+ >=media-libs/libvisio-0.1.0 |
255 |
+ media-libs/libzmf |
256 |
+ net-libs/neon |
257 |
+ net-misc/curl |
258 |
+ net-nds/openldap |
259 |
+ sci-mathematics/lpsolve |
260 |
+ virtual/glu |
261 |
+ virtual/jpeg:0 |
262 |
+ virtual/opengl |
263 |
+ x11-libs/cairo[X] |
264 |
+ x11-libs/libXinerama |
265 |
+ x11-libs/libXrandr |
266 |
+ x11-libs/libXrender |
267 |
+ bluetooth? ( net-wireless/bluez ) |
268 |
+ coinmp? ( sci-libs/coinor-mp ) |
269 |
+ collada? ( media-libs/opencollada ) |
270 |
+ cups? ( net-print/cups ) |
271 |
+ dbus? ( dev-libs/dbus-glib ) |
272 |
+ eds? ( |
273 |
+ dev-libs/glib:2 |
274 |
+ gnome-base/dconf |
275 |
+ gnome-extra/evolution-data-server |
276 |
+ ) |
277 |
+ firebird? ( >=dev-db/firebird-3.0.2.32703.0-r1 ) |
278 |
+ gltf? ( >=media-libs/libgltf-0.1.0 ) |
279 |
+ gstreamer? ( |
280 |
+ media-libs/gstreamer:1.0 |
281 |
+ media-libs/gst-plugins-base:1.0 |
282 |
+ ) |
283 |
+ gtk? ( |
284 |
+ x11-libs/gdk-pixbuf |
285 |
+ >=x11-libs/gtk+-2.24:2 |
286 |
+ ) |
287 |
+ gtk3? ( |
288 |
+ dev-libs/glib:2 |
289 |
+ dev-libs/gobject-introspection |
290 |
+ gnome-base/dconf |
291 |
+ x11-libs/gtk+:3 |
292 |
+ ) |
293 |
+ jemalloc? ( dev-libs/jemalloc ) |
294 |
+ kde? ( |
295 |
+ dev-qt/qtcore:4 |
296 |
+ dev-qt/qtgui:4 |
297 |
+ kde-frameworks/kdelibs |
298 |
+ ) |
299 |
+ libreoffice_extensions_scripting-beanshell? ( dev-java/bsh ) |
300 |
+ libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 ) |
301 |
+ mysql? ( dev-db/mysql-connector-c++ ) |
302 |
+ pdfimport? ( app-text/poppler:=[cxx] ) |
303 |
+ postgres? ( >=dev-db/postgresql-9.0:*[kerberos] ) |
304 |
+" |
305 |
+ |
306 |
+RDEPEND="${COMMON_DEPEND} |
307 |
+ !app-office/libreoffice-bin |
308 |
+ !app-office/libreoffice-bin-debug |
309 |
+ !app-office/openoffice |
310 |
+ media-fonts/dejavu |
311 |
+ media-fonts/liberation-fonts |
312 |
+ media-fonts/libertine |
313 |
+ || ( x11-misc/xdg-utils kde-plasma/kde-cli-tools ) |
314 |
+ java? ( >=virtual/jre-1.6 ) |
315 |
+ kde? ( kde-frameworks/oxygen-icons:* ) |
316 |
+ vlc? ( media-video/vlc ) |
317 |
+" |
318 |
+ |
319 |
+if [[ ${PV} != *9999* ]]; then |
320 |
+ PDEPEND="=app-office/libreoffice-l10n-$(get_version_component_range 1-2)*" |
321 |
+else |
322 |
+ # Translations are not reliable on live ebuilds |
323 |
+ # rather force people to use english only. |
324 |
+ PDEPEND="!app-office/libreoffice-l10n" |
325 |
+fi |
326 |
+ |
327 |
+# FIXME: cppunit should be moved to test conditional |
328 |
+# after everything upstream is under gbuild |
329 |
+# as dmake execute tests right away |
330 |
+DEPEND="${COMMON_DEPEND} |
331 |
+ !<sys-devel/make-3.82 |
332 |
+ >=dev-libs/libatomic_ops-7.2d |
333 |
+ >=dev-libs/libxml2-2.7.8 |
334 |
+ dev-libs/libxslt |
335 |
+ dev-perl/Archive-Zip |
336 |
+ >=dev-util/cppunit-1.14.0 |
337 |
+ >=dev-util/gperf-3 |
338 |
+ dev-util/intltool |
339 |
+ >=dev-util/mdds-1.2.2:1= |
340 |
+ media-libs/glm |
341 |
+ sys-devel/bison |
342 |
+ sys-devel/flex |
343 |
+ sys-devel/gettext |
344 |
+ sys-devel/ucpp |
345 |
+ sys-libs/zlib |
346 |
+ virtual/pkgconfig |
347 |
+ x11-libs/libXt |
348 |
+ x11-libs/libXtst |
349 |
+ x11-proto/randrproto |
350 |
+ x11-proto/xextproto |
351 |
+ x11-proto/xineramaproto |
352 |
+ x11-proto/xproto |
353 |
+ java? ( |
354 |
+ dev-java/ant-core |
355 |
+ >=virtual/jdk-1.6 |
356 |
+ ) |
357 |
+ odk? ( >=app-doc/doxygen-1.8.4 ) |
358 |
+ test? ( |
359 |
+ dev-util/cppunit |
360 |
+ media-fonts/dejavu |
361 |
+ ) |
362 |
+" |
363 |
+ |
364 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
365 |
+ bluetooth? ( dbus ) |
366 |
+ collada? ( gltf ) |
367 |
+ libreoffice_extensions_nlpsolver? ( java ) |
368 |
+ libreoffice_extensions_scripting-beanshell? ( java ) |
369 |
+ libreoffice_extensions_scripting-javascript? ( java ) |
370 |
+ libreoffice_extensions_wiki-publisher? ( java ) |
371 |
+" |
372 |
+ |
373 |
+PATCHES=( |
374 |
+ # not upstreamable stuff |
375 |
+ "${FILESDIR}/${PN}-5.4-system-pyuno.patch" |
376 |
+ "${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch" |
377 |
+ |
378 |
+ # TODO: upstream |
379 |
+ "${FILESDIR}/${PN}-5.2.5.1-glibc-2.24.patch" |
380 |
+ "${FILESDIR}/${PN}-5.4.4.2-poppler-0.62.patch" # bug 642602 |
381 |
+ |
382 |
+ "${FILESDIR}/${P}-pyuno-crash.patch" # 5.4.5 branch commit after release |
383 |
+) |
384 |
+ |
385 |
+pkg_pretend() { |
386 |
+ use java || \ |
387 |
+ ewarn "If you plan to use Base application you should enable java or you will get various crashes." |
388 |
+ |
389 |
+ if has_version "<app-office/libreoffice-5.3.0[firebird]"; then |
390 |
+ ewarn "Firebird has been upgraded to version 3.0.0. It is unable to read back Firebird 2.5 data," |
391 |
+ ewarn "so embedded firebird odb files created in LibreOffice pre-5.3 cannot be opened with LibreOffice 5.3." |
392 |
+ ewarn "See also: https://wiki.documentfoundation.org/ReleaseNotes/5.3#Base" |
393 |
+ fi |
394 |
+ |
395 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
396 |
+ |
397 |
+ CHECKREQS_MEMORY="512M" |
398 |
+ if is-flagq "-g*" && ! is-flagq "-g*0" ; then |
399 |
+ CHECKREQS_DISK_BUILD="22G" |
400 |
+ else |
401 |
+ CHECKREQS_DISK_BUILD="6G" |
402 |
+ fi |
403 |
+ check-reqs_pkg_pretend |
404 |
+ fi |
405 |
+} |
406 |
+ |
407 |
+pkg_setup() { |
408 |
+ java-pkg-opt-2_pkg_setup |
409 |
+ python-single-r1_pkg_setup |
410 |
+ xdg_environment_reset |
411 |
+ |
412 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
413 |
+ CHECKREQS_MEMORY="512M" |
414 |
+ if is-flagq "-g*" && ! is-flagq "-g*0" ; then |
415 |
+ CHECKREQS_DISK_BUILD="22G" |
416 |
+ else |
417 |
+ CHECKREQS_DISK_BUILD="6G" |
418 |
+ fi |
419 |
+ check-reqs_pkg_setup |
420 |
+ fi |
421 |
+} |
422 |
+ |
423 |
+src_unpack() { |
424 |
+ [[ -n ${PATCHSET} ]] && unpack ${PATCHSET} |
425 |
+ use branding && unpack "${BRANDING}" |
426 |
+ |
427 |
+ if [[ ${PV} != *9999* ]]; then |
428 |
+ unpack "${P}.tar.xz" |
429 |
+ unpack "${PN}-help-${PV}.tar.xz" |
430 |
+ else |
431 |
+ local base_uri branch mypv |
432 |
+ base_uri="https://anongit.freedesktop.org/git" |
433 |
+ branch="master" |
434 |
+ mypv=${PV/.9999} |
435 |
+ [[ ${mypv} != ${PV} ]] && branch="${PN}-${mypv/./-}" |
436 |
+ git-r3_fetch "${base_uri}/${PN}/core" "refs/heads/${branch}" |
437 |
+ git-r3_checkout "${base_uri}/${PN}/core" |
438 |
+ |
439 |
+ git-r3_fetch "${base_uri}/${PN}/help" "refs/heads/master" |
440 |
+ git-r3_checkout "${base_uri}/${PN}/help" "helpcontent2" # doesn't match on help |
441 |
+ fi |
442 |
+} |
443 |
+ |
444 |
+src_prepare() { |
445 |
+ [[ -n ${PATCHSET} ]] && eapply "${WORKDIR}/${PATCHSET/.tar.xz/}" |
446 |
+ default |
447 |
+ |
448 |
+ AT_M4DIR="m4" eautoreconf |
449 |
+ # hack in the autogen.sh |
450 |
+ touch autogen.lastrun |
451 |
+ |
452 |
+ # system pyuno mess |
453 |
+ sed -i \ |
454 |
+ -e "s:%eprefix%:${EPREFIX}:g" \ |
455 |
+ -e "s:%libdir%:$(get_libdir):g" \ |
456 |
+ pyuno/source/module/uno.py \ |
457 |
+ pyuno/source/officehelper.py || die |
458 |
+ # sed in the tests |
459 |
+ sed -i \ |
460 |
+ -e "s#all : build unitcheck#all : build#g" \ |
461 |
+ solenv/gbuild/Module.mk || die |
462 |
+ sed -i \ |
463 |
+ -e "s#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g" \ |
464 |
+ -e "s#Makefile.gbuild all slowcheck#Makefile.gbuild all#g" \ |
465 |
+ Makefile.in || die |
466 |
+ |
467 |
+ sed -i \ |
468 |
+ -e "s,/usr/share/bash-completion/completions,$(get_bashcompdir)," \ |
469 |
+ -e "s,\$INSTALLDIRNAME.sh,${PN}," \ |
470 |
+ bin/distro-install-desktop-integration || die |
471 |
+ |
472 |
+ if use branding; then |
473 |
+ # hack... |
474 |
+ mv -v "${WORKDIR}/branding-intro.png" "${S}/icon-themes/galaxy/brand/intro.png" || die |
475 |
+ fi |
476 |
+ |
477 |
+ # Don't list pdfimport support in desktop when built with none, bug # 605464 |
478 |
+ if ! use pdfimport; then |
479 |
+ sed -i \ |
480 |
+ -e ":MimeType: s:application/pdf;::" \ |
481 |
+ -e ":Keywords: s:pdf;::" \ |
482 |
+ sysui/desktop/menus/draw.desktop || die |
483 |
+ fi |
484 |
+} |
485 |
+ |
486 |
+src_configure() { |
487 |
+ # Set up Google API keys, see https://www.chromium.org/developers/how-tos/api-keys |
488 |
+ # Note: these are for Gentoo use ONLY. For your own distribution, please get |
489 |
+ # your own set of keys. Feel free to contact chromium@g.o for more info. |
490 |
+ local google_default_client_id="329227923882.apps.googleusercontent.com" |
491 |
+ local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu" |
492 |
+ |
493 |
+ # optimization flags |
494 |
+ export GMAKE_OPTIONS="${MAKEOPTS}" |
495 |
+ # System python enablement: |
496 |
+ export PYTHON_CFLAGS=$(python_get_CFLAGS) |
497 |
+ export PYTHON_LIBS=$(python_get_LIBS) |
498 |
+ |
499 |
+ if use collada; then |
500 |
+ export OPENCOLLADA_CFLAGS="-I/usr/include/opencollada/COLLADABaseUtils -I/usr/include/opencollada/COLLADAFramework -I/usr/include/opencollada/COLLADASaxFrameworkLoader -I/usr/include/opencollada/GeneratedSaxParser" |
501 |
+ export OPENCOLLADA_LIBS="-L /usr/$(get_libdir)/opencollada -lOpenCOLLADABaseUtils -lOpenCOLLADAFramework -lOpenCOLLADASaxFrameworkLoader -lGeneratedSaxParser" |
502 |
+ fi |
503 |
+ |
504 |
+ if use kde; then |
505 |
+ # bug 544108, bug 599076 |
506 |
+ export QMAKEQT4="$(qt4_get_bindir)/qmake" |
507 |
+ export MOCQT4="$(qt4_get_bindir)/moc" |
508 |
+ fi |
509 |
+ |
510 |
+ # system headers/libs/...: enforce using system packages |
511 |
+ # --disable-breakpad: requires not-yet-in-tree dev-utils/breakpad |
512 |
+ # --enable-cairo: ensure that cairo is always required |
513 |
+ # --enable-*-link: link to the library rather than just dlopen on runtime |
514 |
+ # --enable-release-build: build the libreoffice as release |
515 |
+ # --disable-fetch-external: prevent dowloading during compile phase |
516 |
+ # --enable-extension-integration: enable any extension integration support |
517 |
+ # --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs |
518 |
+ # --disable-report-builder: too much java packages pulled in without pkgs |
519 |
+ # --without-system-sane: just sane.h header that is used for scan in writer, |
520 |
+ # not linked or anything else, worthless to depend on |
521 |
+ # --disable-pdfium: not yet packaged |
522 |
+ local myeconfargs=( |
523 |
+ --with-system-dicts |
524 |
+ --with-system-epoxy |
525 |
+ --with-system-headers |
526 |
+ --with-system-jars |
527 |
+ --with-system-libs |
528 |
+ --enable-cairo-canvas |
529 |
+ --enable-largefile |
530 |
+ --enable-mergelibs |
531 |
+ --enable-neon |
532 |
+ --enable-python=system |
533 |
+ --enable-randr |
534 |
+ --enable-release-build |
535 |
+ --disable-breakpad |
536 |
+ --disable-ccache |
537 |
+ --disable-dependency-tracking |
538 |
+ --disable-epm |
539 |
+ --disable-fetch-external |
540 |
+ --disable-gstreamer-0-10 |
541 |
+ --disable-online-update |
542 |
+ --disable-pdfium |
543 |
+ --disable-report-builder |
544 |
+ --with-alloc=$(use jemalloc && echo "jemalloc" || echo "system") |
545 |
+ --with-build-version="Gentoo official package" |
546 |
+ --enable-extension-integration |
547 |
+ --with-external-dict-dir="${EPREFIX}/usr/share/myspell" |
548 |
+ --with-external-hyph-dir="${EPREFIX}/usr/share/myspell" |
549 |
+ --with-external-thes-dir="${EPREFIX}/usr/share/myspell" |
550 |
+ --with-external-tar="${DISTDIR}" |
551 |
+ --with-lang="" |
552 |
+ --with-parallelism=$(makeopts_jobs) |
553 |
+ --with-system-ucpp |
554 |
+ --with-vendor="Gentoo Foundation" |
555 |
+ --with-x |
556 |
+ --without-fonts |
557 |
+ --without-myspell-dicts |
558 |
+ --without-help |
559 |
+ --with-helppack-integration |
560 |
+ --with-system-gpgmepp |
561 |
+ --without-system-sane |
562 |
+ $(use_enable bluetooth sdremote-bluetooth) |
563 |
+ $(use_enable coinmp) |
564 |
+ $(use_enable collada) |
565 |
+ $(use_enable cups) |
566 |
+ $(use_enable debug) |
567 |
+ $(use_enable dbus) |
568 |
+ $(use_enable eds evolution2) |
569 |
+ $(use_enable firebird firebird-sdbc) |
570 |
+ $(use_enable gltf) |
571 |
+ $(use_enable gstreamer gstreamer-1-0) |
572 |
+ $(use_enable gtk) |
573 |
+ $(use_enable gtk3) |
574 |
+ $(use_enable kde kde4) |
575 |
+ $(use_enable mysql ext-mariadb-connector) |
576 |
+ $(use_enable odk) |
577 |
+ $(use_enable pdfimport) |
578 |
+ $(use_enable postgres postgresql-sdbc) |
579 |
+ $(use_enable quickstarter systray) |
580 |
+ $(use_enable vlc) |
581 |
+ $(use_with coinmp system-coinmp) |
582 |
+ $(use_with collada system-opencollada) |
583 |
+ $(use_with gltf system-libgltf) |
584 |
+ $(use_with googledrive gdrive-client-id ${google_default_client_id}) |
585 |
+ $(use_with googledrive gdrive-client-secret ${google_default_client_secret}) |
586 |
+ $(use_with java) |
587 |
+ $(use_with mysql system-mysql-cppconn) |
588 |
+ $(use_with odk doxygen) |
589 |
+ ) |
590 |
+ |
591 |
+ if use eds || use gtk3; then |
592 |
+ myeconfargs+=( --enable-dconf --enable-gio ) |
593 |
+ else |
594 |
+ myeconfargs+=( --disable-dconf --disable-gio ) |
595 |
+ fi |
596 |
+ |
597 |
+ # libreoffice extensions handling |
598 |
+ for lo_xt in ${LO_EXTS}; do |
599 |
+ if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then |
600 |
+ myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt}) ) |
601 |
+ else |
602 |
+ myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt}) ) |
603 |
+ fi |
604 |
+ done |
605 |
+ |
606 |
+ if use java; then |
607 |
+ # hsqldb: system one is too new |
608 |
+ myeconfargs+=( |
609 |
+ --without-junit |
610 |
+ --without-system-hsqldb |
611 |
+ --with-ant-home="${ANT_HOME}" |
612 |
+ --with-jdk-home=$(java-config --jdk-home 2>/dev/null) |
613 |
+ --with-jvm-path="${EPREFIX}/usr/lib/" |
614 |
+ ) |
615 |
+ |
616 |
+ use libreoffice_extensions_scripting-beanshell && \ |
617 |
+ myeconfargs+=( --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar) ) |
618 |
+ |
619 |
+ use libreoffice_extensions_scripting-javascript && \ |
620 |
+ myeconfargs+=( --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar) ) |
621 |
+ fi |
622 |
+ |
623 |
+ econf "${myeconfargs[@]}" |
624 |
+} |
625 |
+ |
626 |
+src_compile() { |
627 |
+ # more and more LO stuff tries to use OpenGL, including tests during build |
628 |
+ # bug 501508, bug 540624, bug 545974 and probably more |
629 |
+ addpredict /dev/dri |
630 |
+ addpredict /dev/ati |
631 |
+ addpredict /dev/nvidiactl |
632 |
+ |
633 |
+ # hack for offlinehelp, this needs fixing upstream at some point |
634 |
+ # it is broken because we send --without-help |
635 |
+ # https://bugs.freedesktop.org/show_bug.cgi?id=46506 |
636 |
+ ( |
637 |
+ grep "^export" "${S}/config_host.mk" > "${T}/config_host.mk" || die |
638 |
+ source "${T}/config_host.mk" 2&> /dev/null |
639 |
+ |
640 |
+ local path="${WORKDIR}/helpcontent2/source/auxiliary/" |
641 |
+ mkdir -p "${path}" || die |
642 |
+ |
643 |
+ echo "perl \"${S}/helpcontent2/helpers/create_ilst.pl\" -dir=helpcontent2/source/media/helpimg > \"${path}/helpimg.ilst\"" |
644 |
+ perl "${S}/helpcontent2/helpers/create_ilst.pl" \ |
645 |
+ -dir=helpcontent2/source/media/helpimg \ |
646 |
+ > "${path}/helpimg.ilst" |
647 |
+ [[ -s "${path}/helpimg.ilst" ]] || \ |
648 |
+ ewarn "The help images list is empty, something is fishy, report a bug." |
649 |
+ ) |
650 |
+ |
651 |
+ local target |
652 |
+ use test && target="build" || target="build-nocheck" |
653 |
+ |
654 |
+ # this is not a proper make script |
655 |
+ make ${target} || die |
656 |
+} |
657 |
+ |
658 |
+src_test() { |
659 |
+ make unitcheck || die |
660 |
+ make slowcheck || die |
661 |
+} |
662 |
+ |
663 |
+src_install() { |
664 |
+ # This is not Makefile so no buildserver |
665 |
+ make DESTDIR="${D}" distro-pack-install -o build -o check || die |
666 |
+ |
667 |
+ # bug 593514 |
668 |
+ if use gtk3; then |
669 |
+ dosym libreoffice/program/liblibreofficekitgtk.so \ |
670 |
+ /usr/$(get_libdir)/liblibreofficekitgtk.so |
671 |
+ fi |
672 |
+ |
673 |
+ # bash completion aliases |
674 |
+ bashcomp_alias \ |
675 |
+ libreoffice \ |
676 |
+ unopkg loimpress lobase localc lodraw lomath lowriter lofromtemplate loweb loffice |
677 |
+ |
678 |
+ if use branding; then |
679 |
+ insinto /usr/$(get_libdir)/${PN}/program |
680 |
+ newins "${WORKDIR}/branding-sofficerc" sofficerc |
681 |
+ dodir /etc/env.d |
682 |
+ echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"etc/env.d/99${PN} || die |
683 |
+ fi |
684 |
+ |
685 |
+ # Hack for offlinehelp, this needs fixing upstream at some point. |
686 |
+ # It is broken because we send --without-help |
687 |
+ # https://bugs.freedesktop.org/show_bug.cgi?id=46506 |
688 |
+ insinto /usr/$(get_libdir)/libreoffice/help |
689 |
+ doins xmlhelp/util/*.xsl |
690 |
+ |
691 |
+ # Remove desktop files to support old installs that can't parse mime |
692 |
+ rm -r "${ED}"usr/share/mimelnk/ || die |
693 |
+ |
694 |
+ pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/soffice.bin |
695 |
+ pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/unopkg.bin |
696 |
+} |
697 |
+ |
698 |
+pkg_preinst() { |
699 |
+ gnome2_icon_savelist |
700 |
+} |
701 |
+ |
702 |
+pkg_postinst() { |
703 |
+ gnome2_icon_cache_update |
704 |
+ xdg_desktop_database_update |
705 |
+ xdg_mimeinfo_database_update |
706 |
+} |
707 |
+ |
708 |
+pkg_postrm() { |
709 |
+ gnome2_icon_cache_update |
710 |
+ xdg_desktop_database_update |
711 |
+ xdg_mimeinfo_database_update |
712 |
+} |