Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/libreoffice/, app-office/libreoffice/files/
Date: Tue, 13 Aug 2019 15:56:53
Message-Id: 1565711791.5e2da1fbd47186791c4f3023cbdcc8d991e8d564.asturm@gentoo
1 commit: 5e2da1fbd47186791c4f3023cbdcc8d991e8d564
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 13 12:37:23 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 13 15:56:31 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e2da1fb
7
8 app-office/libreoffice: Security cleanup
9
10 Bug: https://bugs.gentoo.org/690354
11 Package-Manager: Portage-2.3.69, Repoman-2.3.16
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 app-office/libreoffice/Manifest | 2 -
15 ...k3_kde5-non-native-fpicker-for-non-plasma.patch | 105 ----
16 ...-set-kfilewidgets-custom-widget-only-once.patch | 42 --
17 app-office/libreoffice/libreoffice-6.1.5.2.ebuild | 575 ---------------------
18 4 files changed, 724 deletions(-)
19
20 diff --git a/app-office/libreoffice/Manifest b/app-office/libreoffice/Manifest
21 index 738e0bcfb78..250205abdce 100644
22 --- a/app-office/libreoffice/Manifest
23 +++ b/app-office/libreoffice/Manifest
24 @@ -3,12 +3,10 @@ DIST 185d60944ea767075d27247c3162b3bc-unowinreg.dll 12288 BLAKE2B c067f60d0ee325
25 DIST 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip 9796 BLAKE2B a30b0225313b23092bc57ccd989f26ea04a323dcb17a0ea8baaa6a21b5d5e2b6e29fcae9d18ecd043073030e104ad56c86a115760590f57eda86c22c9fe478b0 SHA512 4a48f1e32907fb2dee601cda3cd7a0d7198b2d51f2a572b647f1e93f901fd511eef3567676e52dfb1723a2cdfbc01f2015ca0bb22903b0bc1476dd618cc9aa8a
26 DIST 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip 1521926 BLAKE2B d2769842c180997055648a8b1a33cc89988b74628bad8aa012242e0c1afa5b5b8568323c107187072207ee69bd841ba4ca3bbfe27ef65223ddc729d1a1aa6590 SHA512 ec5ae23c8fe2f5efc377f7a9665039afadf28b4d8f2791379296766a5fbc9a3bf7548f9b0e3b3b07762229ec733a92ccbb69791ee0318c9c6f78f8e847253d3f
27 DIST a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip 23150 BLAKE2B 51db6bd90585b13857ecb494c805c9fb6874e1e65d7aee73d23e1716670836a14b376bcca810f96fd55b0ed653b2660a268030f246c822cbb04f867ef763a3b3 SHA512 2d3835f7ac356805025cafedcad97faa48d0f5da386e6ac7b7451030059df8e2fdb0861ade07a576ebf9fb5b88a973585ab0437944b06aac9289d6898ba8586a
28 -DIST libreoffice-6.1.5.2.tar.xz 207918636 BLAKE2B bb4e57a5363e7dc6757c537ef46231ff748649ca4b79993f371e787adba8cd1f3dd988f11e8813c24eb952d00355b02b15f0b126ea2c1f9d9ce7d6c26bf71c38 SHA512 36027ad8a3940e803908561e04feebce297db2fd570b7e43bb43d8c0b7885729eeaf0a64fc5f9e642c1008ffea0b3b1b6d0008e349cd1897425dc818ac8bf140
29 DIST libreoffice-6.2.5.2.tar.xz 215008848 BLAKE2B 5dd1ef185820944816e01c8ed6a7873a5a8fe6f7f4b41fad279729970d85ff868f51ed573e8b3d0a554ffd1f8e295b6ff2e493e7f7250f8cb1c7c2a40115abf4 SHA512 b46b6731c415ab354ad7d876cb8905cb9eae2ca71639abf049ea7f5930601c957cc0eb04a2cd06949073ba5e94778ecdb449692ed8bbfbd95b05f6e7980d8d10
30 DIST libreoffice-6.2.6.2.tar.xz 214985796 BLAKE2B 642b92c02f4fab7075dc1c6ce79c3168401fb333fe1e2cadd2008cb2d2411769710374fa35e4928a7b51831dd7a83f0caa28a0fad2dc9478dd6b62e37888a5fa SHA512 6ea92025e32d0b73869139092ef8b6798e33d1f91a3af7b0202a2611b1a4376ce8019b7ca1e3b59692ff3a4f60c35acfefa7364b7f74d2d2236d72bac3d237cc
31 DIST libreoffice-6.3.0.4.tar.xz 224504440 BLAKE2B 4c006fa22dff53d3f8fd1baa5a414f9136472b13d7cd3d76a6bf055dcfe4b34aab3aa9c47b24f9b7d6aaa89691350cdf80548b7fcdb4ad8410723639d06dc576 SHA512 508beebf1e687e9ff668a82682561b639bd98ab85406178855b4301c7060147e1b5bea330e88d3bd7ef8de8f065d6a15d658eb436af0b03208c75d83a4deae40
32 DIST libreoffice-branding-gentoo-0.8.tar.xz 151568 BLAKE2B f03c7ddeb53c5ca3fd23401679601fcf2c4037ba17be4eb7b784c7ce7ebb71a24b8ab4aac8b7da8c6b1f14dd23bc1294ba85ff4f70ad271fb4ee3c5372e10883 SHA512 785031a699b1d1895ce4b50ffc3ddf645f3a0ef9acdf37facfd18cf75db9484cb8f53a50abb63d6006ead76a80b6ff5aa99661063245ebb84bd64013d713de7f
33 -DIST libreoffice-help-6.1.5.2.tar.xz 15758000 BLAKE2B e8db833db00116e210cd6da578ab05089fd12128bfb8015600027c9afca09a1afe7a62e30a0271dffead5d176c0195eae9095d0e00450a926999efadf3f7572f SHA512 0575244ae595af7383b244fd3f1855b7d63820f9c3ebf87bc9d0758463b4b289988bbed99f0985508d34793967734fd83ae2d1a5db514479bb2fe32e0498fc9f
34 DIST libreoffice-help-6.2.5.2.tar.xz 13023680 BLAKE2B f1f3a03104c1270e59f2b9130a29e1fbc99a9bf76b2bf4cedef8dc61487c9a2036f143501ad7fcd0c056c8b72446305b7a4ca9a719b11200ade5feca35e5e7ea SHA512 14f964161bd827a5846ec667ae1dac80d1485450e172da44010103e31f3872df62595e8b1b1d45c720caac9256d2adaf8f5a0bb80d059d35f1c560b533eb764c
35 DIST libreoffice-help-6.2.6.2.tar.xz 13023940 BLAKE2B ac5cf65a391ab7d5f7030f02665d7b2e670e9b26aae068f42ce1f64e3830474958ef6d61d1721e3cd83f749e4699627b08bce97f852d607394823a95e41e7ee5 SHA512 bf3896d24201475fd45fc9da62833f0114bcbebbdd46b780ad9a71569c943bba04e3591da925f621cdc05b74c457a2d8d4b42ba9ce137cb018efea1d33a458c4
36 DIST libreoffice-help-6.3.0.4.tar.xz 13191436 BLAKE2B 3ad8d319ede30de5ccf7d26768388795e957d6296e794bd38d318c5a8114a41bc25bfd11d562700b4db34dd900537509175581855d8421e57595aa31d7aa3ba2 SHA512 1f197abb10d140037f10eb43b571b9e8f7b74b502f5bb91f4a3b4b388cd31aa81175df410321b9b401432c5ac02f9d08c7d681f07d68dd1733fb0536a1551ce8
37
38 diff --git a/app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-non-native-fpicker-for-non-plasma.patch b/app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-non-native-fpicker-for-non-plasma.patch
39 deleted file mode 100644
40 index 30253e0b973..00000000000
41 --- a/app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-non-native-fpicker-for-non-plasma.patch
42 +++ /dev/null
43 @@ -1,105 +0,0 @@
44 -From bf93bae6990b01ee726b59b0969b93585719671a Mon Sep 17 00:00:00 2001
45 -From: Michael Weghorn <m.weghorn@××××××.de>
46 -Date: Wed, 30 Jan 2019 10:11:35 +0100
47 -Subject: tdf#122752 gtk3_kde5: Use non-native fpicker for non-Plasma desktops
48 -
49 -Adding the custom widgets to the native dialog currently depends
50 -on the native dialog using a KFileWidget, which is just the case for
51 -the native QFileDialog implementation on Plasma/KDE5.
52 -
53 -In order not to lose custom controls for non-Plasma desktops,
54 -fall back to using the non-native QFileDialog there and adding
55 -the custom controls to its layout.
56 -This was mostly taken over from Qt5FileDialog.
57 -(This is a similar approach as that taken for the kde5 VCL plugin
58 -in https://gerrit.libreoffice.org/#/c/67106/ ).
59 -
60 -Adding the controls to the layout returned by 'QFileDialog::layout()'
61 -cannot be used for the native dialog as well, since a nullptr is
62 -returned in this case.
63 -
64 -From QFileDialog doc:
65 -
66 -> By default, a platform-native file dialog will be used if the platform
67 -> has one. In that case, the widgets which would otherwise be used to
68 -> construct the dialog will not be instantiated, so related accessors such
69 -> as layout() and itemDelegate() will return null. You can set the
70 -> DontUseNativeDialog option to ensure that the widget-based
71 -> implementation will be used instead of the native dialog.
72 -
73 -Change-Id: I75fbe7731da28d0dc7df878f4c57e141d4d89902
74 -Reviewed-on: https://gerrit.libreoffice.org/67111
75 -Reviewed-by: Michael Weghorn <m.weghorn@××××××.de>
76 -Tested-by: Michael Weghorn <m.weghorn@××××××.de>
77 ----
78 - vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 26 +++++++++++++++++++++++++-
79 - vcl/unx/gtk3_kde5/kde5_filepicker.hxx | 2 ++
80 - 2 files changed, 27 insertions(+), 1 deletion(-)
81 -
82 -diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
83 -index 42e278a..33f64ad0 100644
84 ---- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
85 -+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
86 -@@ -17,6 +17,8 @@
87 - * the License at http://www.apache.org/licenses/LICENSE-2.0 .
88 - */
89 -
90 -+#include <vcl/svapp.hxx>
91 -+
92 - #include "kde5_filepicker.hxx"
93 -
94 - #include <KWindowSystem>
95 -@@ -57,7 +59,7 @@ KDE5FilePicker::KDE5FilePicker(QObject* parent)
96 - connect(_dialog, &QFileDialog::filterSelected, this, &KDE5FilePicker::filterChanged);
97 - connect(_dialog, &QFileDialog::fileSelected, this, &KDE5FilePicker::selectionChanged);
98 -
99 -- qApp->installEventFilter(this);
100 -+ setupCustomWidgets();
101 - }
102 -
103 - void KDE5FilePicker::enableFolderMode()
104 -@@ -232,6 +234,28 @@ void KDE5FilePicker::initialize(bool saveDialog)
105 -
106 - void KDE5FilePicker::setWinId(sal_uIntPtr winId) { _winId = winId; }
107 -
108 -+void KDE5FilePicker::setupCustomWidgets()
109 -+{
110 -+ // When using the platform-native Plasma/KDE5 file picker, we currently rely on KFileWidget
111 -+ // being present to add the custom controls visible (s. 'eventFilter' method).
112 -+ // Since this doesn't work for other desktop environments, use a non-native
113 -+ // dialog there in order not to lose the custom controls and insert the custom
114 -+ // widget in the layout returned by QFileDialog::layout()
115 -+ // (which returns nullptr for native file dialogs)
116 -+ if (Application::GetDesktopEnvironment() == "KDE5")
117 -+ {
118 -+ qApp->installEventFilter(this);
119 -+ }
120 -+ else
121 -+ {
122 -+ _dialog->setOption(QFileDialog::DontUseNativeDialog);
123 -+ QGridLayout* pLayout = static_cast<QGridLayout*>(_dialog->layout());
124 -+ assert(pLayout);
125 -+ const int row = pLayout->rowCount();
126 -+ pLayout->addWidget(_extraControls, row, 1);
127 -+ }
128 -+}
129 -+
130 - bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
131 - {
132 - if (e->type() == QEvent::Show && o->isWidgetType())
133 -diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
134 -index d999f7b..c979a5d 100644
135 ---- a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
136 -+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
137 -@@ -98,6 +98,8 @@ public:
138 -
139 - private:
140 - Q_DISABLE_COPY(KDE5FilePicker)
141 -+ // adds the custom controls to the dialog
142 -+ void setupCustomWidgets();
143 -
144 - protected:
145 - bool eventFilter(QObject* watched, QEvent* event) override;
146 ---
147 -cgit v1.1
148 -
149
150 diff --git a/app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-set-kfilewidgets-custom-widget-only-once.patch b/app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-set-kfilewidgets-custom-widget-only-once.patch
151 deleted file mode 100644
152 index 69134a8b992..00000000000
153 --- a/app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-set-kfilewidgets-custom-widget-only-once.patch
154 +++ /dev/null
155 @@ -1,42 +0,0 @@
156 -From 7b54f3db98e96231fc9f16429f325cdb1f37498c Mon Sep 17 00:00:00 2001
157 -From: Michael Weghorn <m.weghorn@××××××.de>
158 -Date: Thu, 31 Jan 2019 09:52:51 +0100
159 -Subject: tdf#123077 gtk3_kde5: Set KFileWidget's custom widget only once
160 -
161 -Since the event filter is only used to set the custom
162 -widget in the KFileWidget, it can and needs to be removed
163 -again once this has been done; which also avoids crashes.
164 -
165 -(s. https://gerrit.libreoffice.org/#/c/67185/ for more
166 -infos, where the same thing is done for kde5)
167 -
168 -Change-Id: I5c719fb17510916b4730ed5c00bb638df2f183e3
169 -Reviewed-on: https://gerrit.libreoffice.org/67184
170 -Tested-by: Jenkins
171 -Reviewed-by: Michael Weghorn <m.weghorn@××××××.de>
172 -(cherry picked from commit 30cc54a4532a732a0cf6dfe9943521978ff7292f)
173 -Reviewed-on: https://gerrit.libreoffice.org/67203
174 -Reviewed-by: Katarina Behrens <Katarina.Behrens@×××.de>
175 ----
176 - vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 4 ++++
177 - 1 file changed, 4 insertions(+)
178 -
179 -diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
180 -index 33f64ad0..9914869 100644
181 ---- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
182 -+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
183 -@@ -265,7 +265,11 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
184 - {
185 - KWindowSystem::setMainWindow(w, _winId);
186 - if (auto* fileWidget = w->findChild<KFileWidget*>({}, Qt::FindDirectChildrenOnly))
187 -+ {
188 - fileWidget->setCustomWidget(_extraControls);
189 -+ // remove event filter again; the only purpose was to set the custom widget here
190 -+ qApp->removeEventFilter(this);
191 -+ }
192 - }
193 - }
194 - return QObject::eventFilter(o, e);
195 ---
196 -cgit v1.1
197 -
198
199 diff --git a/app-office/libreoffice/libreoffice-6.1.5.2.ebuild b/app-office/libreoffice/libreoffice-6.1.5.2.ebuild
200 deleted file mode 100644
201 index d5b28f6d0e0..00000000000
202 --- a/app-office/libreoffice/libreoffice-6.1.5.2.ebuild
203 +++ /dev/null
204 @@ -1,575 +0,0 @@
205 -# Copyright 1999-2019 Gentoo Authors
206 -# Distributed under the terms of the GNU General Public License v2
207 -
208 -EAPI=6
209 -
210 -PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
211 -PYTHON_REQ_USE="threads(+),xml"
212 -
213 -MY_PV="${PV/_alpha/.alpha}"
214 -MY_PV="${MY_PV/_beta/.beta}"
215 -# experimental ; release ; old
216 -# Usually the tarballs are moved a lot so this should make everyone happy.
217 -DEV_URI="
218 - https://dev-builds.libreoffice.org/pre-releases/src
219 - https://download.documentfoundation.org/libreoffice/src/${MY_PV:0:5}/
220 - https://downloadarchive.documentfoundation.org/libreoffice/old/${MY_PV}/src
221 -"
222 -ADDONS_URI="https://dev-www.libreoffice.org/src/"
223 -
224 -BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
225 -# PATCHSET="${P}-patchset-01.tar.xz"
226 -
227 -[[ ${MY_PV} == *9999* ]] && inherit git-r3
228 -inherit autotools bash-completion-r1 check-reqs eapi7-ver flag-o-matic gnome2-utils java-pkg-opt-2 multiprocessing pax-utils python-single-r1 qmake-utils toolchain-funcs xdg-utils
229 -
230 -DESCRIPTION="A full office productivity suite"
231 -HOMEPAGE="https://www.libreoffice.org"
232 -SRC_URI="branding? ( https://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
233 -[[ -n ${PATCHSET} ]] && SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}"
234 -
235 -# Split modules following git/tarballs; Core MUST be first!
236 -# Help is used for the image generator
237 -# Only release has the tarballs
238 -if [[ ${MY_PV} != *9999* ]]; then
239 - for i in ${DEV_URI}; do
240 - SRC_URI+=" ${i}/${PN}-${MY_PV}.tar.xz"
241 - SRC_URI+=" ${i}/${PN}-help-${MY_PV}.tar.xz"
242 - done
243 - unset i
244 -fi
245 -unset DEV_URI
246 -
247 -# Really required addons
248 -# These are bundles that can't be removed for now due to huge patchsets.
249 -# If you want them gone, patches are welcome.
250 -ADDONS_SRC=(
251 - "java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
252 - # no release for 8 years, should we package it?
253 - "libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )"
254 - # Does not build with 1.6 rhino at all
255 - "libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )"
256 - # requirement of rhino
257 - "libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )"
258 - # not packageable
259 - "odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )"
260 -)
261 -SRC_URI+=" ${ADDONS_SRC[*]}"
262 -
263 -unset ADDONS_URI
264 -unset ADDONS_SRC
265 -
266 -# Extensions that need extra work:
267 -LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
268 -
269 -IUSE="accessibility bluetooth +branding coinmp +cups dbus debug eds firebird
270 -googledrive gstreamer +gtk gtk2 kde mysql odk pdfimport postgres test vlc
271 -$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
272 -
273 -REQUIRED_USE="${PYTHON_REQUIRED_USE}
274 - bluetooth? ( dbus )
275 - kde? ( gtk )
276 - libreoffice_extensions_nlpsolver? ( java )
277 - libreoffice_extensions_scripting-beanshell? ( java )
278 - libreoffice_extensions_scripting-javascript? ( java )
279 - libreoffice_extensions_wiki-publisher? ( java )
280 -"
281 -
282 -LICENSE="|| ( LGPL-3 MPL-1.1 )"
283 -SLOT="0"
284 -[[ ${MY_PV} == *9999* ]] || \
285 -KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86 ~amd64-linux ~x86-linux"
286 -
287 -COMMON_DEPEND="${PYTHON_DEPS}
288 - app-arch/unzip
289 - app-arch/zip
290 - app-crypt/gpgme[cxx]
291 - app-text/hunspell:=
292 - >=app-text/libabw-0.1.0
293 - >=app-text/libebook-0.1
294 - app-text/libepubgen
295 - >=app-text/libetonyek-0.1
296 - app-text/libexttextcat
297 - app-text/liblangtag
298 - >=app-text/libmspub-0.1.0
299 - >=app-text/libmwaw-0.3.1
300 - app-text/libnumbertext
301 - >=app-text/libodfgen-0.1.0
302 - app-text/libqxp
303 - app-text/libstaroffice
304 - app-text/libwpd:0.10[tools]
305 - app-text/libwpg:0.3
306 - >=app-text/libwps-0.4
307 - app-text/mythes
308 - >=dev-cpp/clucene-2.3.3.4-r2
309 - =dev-cpp/libcmis-0.5*
310 - dev-db/unixODBC
311 - dev-lang/perl
312 - dev-libs/boost:=[nls]
313 - dev-libs/expat
314 - dev-libs/hyphen
315 - dev-libs/icu:=
316 - dev-libs/libassuan
317 - dev-libs/libgpg-error
318 - =dev-libs/liborcus-0.13*
319 - dev-libs/librevenge
320 - dev-libs/libxml2
321 - dev-libs/libxslt
322 - dev-libs/nspr
323 - dev-libs/nss
324 - >=dev-libs/redland-1.0.16
325 - >=dev-libs/xmlsec-1.2.24[nss]
326 - media-gfx/graphite2
327 - media-libs/fontconfig
328 - media-libs/freetype:2
329 - >=media-libs/harfbuzz-0.9.42:=[graphite,icu]
330 - media-libs/lcms:2
331 - >=media-libs/libcdr-0.1.0
332 - >=media-libs/libepoxy-1.3.1[X]
333 - >=media-libs/libfreehand-0.1.0
334 - media-libs/libpagemaker
335 - >=media-libs/libpng-1.4:0=
336 - >=media-libs/libvisio-0.1.0
337 - media-libs/libzmf
338 - net-libs/neon
339 - net-misc/curl
340 - net-nds/openldap
341 - sci-mathematics/lpsolve
342 - sys-libs/zlib
343 - virtual/glu
344 - virtual/jpeg:0
345 - virtual/opengl
346 - x11-libs/cairo[X]
347 - x11-libs/libXinerama
348 - x11-libs/libXrandr
349 - x11-libs/libXrender
350 - accessibility? ( dev-python/lxml[${PYTHON_USEDEP}] )
351 - bluetooth? ( net-wireless/bluez )
352 - coinmp? ( sci-libs/coinor-mp )
353 - cups? ( net-print/cups )
354 - dbus? ( dev-libs/dbus-glib )
355 - eds? (
356 - dev-libs/glib:2
357 - gnome-base/dconf
358 - gnome-extra/evolution-data-server
359 - )
360 - firebird? ( >=dev-db/firebird-3.0.2.32703.0-r1[server] )
361 - gstreamer? (
362 - media-libs/gstreamer:1.0
363 - media-libs/gst-plugins-base:1.0
364 - )
365 - gtk? (
366 - dev-libs/glib:2
367 - dev-libs/gobject-introspection
368 - gnome-base/dconf
369 - media-libs/mesa[egl]
370 - x11-libs/gtk+:3
371 - x11-libs/pango
372 - )
373 - gtk2? (
374 - x11-libs/gdk-pixbuf
375 - >=x11-libs/gtk+-2.24:2
376 - x11-libs/pango
377 - )
378 - kde? (
379 - dev-qt/qtcore:5
380 - dev-qt/qtgui:5
381 - dev-qt/qtx11extras:5
382 - dev-qt/qtwidgets:5
383 - kde-frameworks/kconfig:5
384 - kde-frameworks/kcoreaddons:5
385 - kde-frameworks/ki18n:5
386 - kde-frameworks/kio:5
387 - kde-frameworks/kwindowsystem:5
388 - )
389 - libreoffice_extensions_scripting-beanshell? ( dev-java/bsh )
390 - libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
391 - mysql? ( dev-db/mysql-connector-c++ )
392 - pdfimport? ( app-text/poppler:=[cxx] )
393 - postgres? ( >=dev-db/postgresql-9.0:*[kerberos] )
394 -"
395 -
396 -RDEPEND="${COMMON_DEPEND}
397 - !app-office/libreoffice-bin
398 - !app-office/libreoffice-bin-debug
399 - !app-office/openoffice
400 - media-fonts/liberation-fonts
401 - || ( x11-misc/xdg-utils kde-plasma/kde-cli-tools )
402 - java? ( >=virtual/jre-1.6 )
403 - kde? ( kde-frameworks/breeze-icons:* )
404 - vlc? ( media-video/vlc )
405 -"
406 -
407 -if [[ ${MY_PV} != *9999* ]] && [[ ${PV} != *_* ]]; then
408 - PDEPEND="=app-office/libreoffice-l10n-$(ver_cut 1-2)*"
409 -else
410 - # Translations are not reliable on live ebuilds
411 - # rather force people to use english only.
412 - PDEPEND="!app-office/libreoffice-l10n"
413 -fi
414 -
415 -# FIXME: cppunit should be moved to test conditional
416 -# after everything upstream is under gbuild
417 -# as dmake execute tests right away
418 -# tests apparently also need google-carlito-fonts (not packaged)
419 -DEPEND="${COMMON_DEPEND}
420 - >=dev-libs/libatomic_ops-7.2d
421 - dev-perl/Archive-Zip
422 - >=dev-util/cppunit-1.14.0
423 - >=dev-util/gperf-3
424 - dev-util/intltool
425 - =dev-util/mdds-1.3*:1=
426 - media-libs/glm
427 - sys-devel/bison
428 - sys-devel/flex
429 - sys-devel/gettext
430 - sys-devel/ucpp
431 - virtual/pkgconfig
432 - x11-base/xorg-proto
433 - x11-libs/libXt
434 - x11-libs/libXtst
435 - java? (
436 - dev-java/ant-core
437 - >=virtual/jdk-1.6
438 - )
439 - odk? ( >=app-doc/doxygen-1.8.4 )
440 - test? (
441 - app-crypt/gnupg
442 - dev-util/cppunit
443 - media-fonts/dejavu
444 - media-fonts/liberation-fonts
445 - )
446 -"
447 -
448 -PATCHES=(
449 - # "${WORKDIR}"/${PATCHSET/.tar.xz/}
450 -
451 - # not upstreamable stuff
452 - "${FILESDIR}/${PN}-5.4-system-pyuno.patch"
453 - "${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
454 - "${FILESDIR}/${PN}-6.1-nomancompress.patch"
455 -
456 - # master branch
457 - "${FILESDIR}/${P}-gtk3_kde5-non-native-fpicker-for-non-plasma.patch"
458 - "${FILESDIR}/${P}-gtk3_kde5-set-kfilewidgets-custom-widget-only-once.patch"
459 -)
460 -
461 -S="${WORKDIR}/${PN}-${MY_PV}"
462 -
463 -_check_reqs() {
464 - CHECKREQS_MEMORY="512M"
465 - if is-flagq "-g*" && ! is-flagq "-g*0" ; then
466 - CHECKREQS_DISK_BUILD="22G"
467 - else
468 - CHECKREQS_DISK_BUILD="6G"
469 - fi
470 - check-reqs_$1
471 -}
472 -
473 -pkg_pretend() {
474 - use java || \
475 - ewarn "If you plan to use Base application you should enable java or you will get various crashes."
476 -
477 - if has_version "<app-office/libreoffice-5.3.0[firebird]"; then
478 - ewarn "Firebird has been upgraded to version 3. It is unable to read back Firebird 2.5 data, so"
479 - ewarn "embedded firebird odb files created in LibreOffice pre-5.3 can't be opened with this version."
480 - ewarn "See also: https://wiki.documentfoundation.org/ReleaseNotes/5.3#Base"
481 - fi
482 -
483 - [[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_pretend
484 -}
485 -
486 -pkg_setup() {
487 - java-pkg-opt-2_pkg_setup
488 - python-single-r1_pkg_setup
489 - xdg_environment_reset
490 -
491 - [[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_setup
492 -}
493 -
494 -src_unpack() {
495 - default
496 -
497 - if [[ ${MY_PV} = *9999* ]]; then
498 - local base_uri branch mypv
499 - base_uri="https://anongit.freedesktop.org/git"
500 - branch="master"
501 - mypv=${MY_PV/.9999}
502 - [[ ${mypv} != ${MY_PV} ]] && branch="${PN}-${mypv/./-}"
503 - git-r3_fetch "${base_uri}/${PN}/core" "refs/heads/${branch}"
504 - git-r3_checkout "${base_uri}/${PN}/core"
505 - LOCOREGIT_VERSION=${EGIT_VERSION}
506 -
507 - git-r3_fetch "${base_uri}/${PN}/help" "refs/heads/master"
508 - git-r3_checkout "${base_uri}/${PN}/help" "helpcontent2" # doesn't match on help
509 - fi
510 -}
511 -
512 -src_prepare() {
513 - default
514 -
515 - # sandbox violations on many systems, we don't need it. Bug #646406
516 - sed -i \
517 - -e "/KF5_CONFIG/s/kf5-config/no/" \
518 - configure.ac || die "Failed to disable kf5-config"
519 -
520 - AT_M4DIR="m4" eautoreconf
521 - # hack in the autogen.sh
522 - touch autogen.lastrun
523 -
524 - # system pyuno mess
525 - sed -i \
526 - -e "s:%eprefix%:${EPREFIX}:g" \
527 - -e "s:%libdir%:$(get_libdir):g" \
528 - pyuno/source/module/uno.py \
529 - pyuno/source/officehelper.py || die
530 - # sed in the tests
531 - sed -i \
532 - -e "s#all : build unitcheck#all : build#g" \
533 - solenv/gbuild/Module.mk || die
534 - sed -i \
535 - -e "s#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g" \
536 - -e "s#Makefile.gbuild all slowcheck#Makefile.gbuild all#g" \
537 - Makefile.in || die
538 -
539 - sed -i \
540 - -e "s,/usr/share/bash-completion/completions,$(get_bashcompdir)," \
541 - -e "s,\$INSTALLDIRNAME.sh,${PN}," \
542 - bin/distro-install-desktop-integration || die
543 -
544 - if use branding; then
545 - # hack...
546 - mv -v "${WORKDIR}/branding-intro.png" "icon-themes/colibre/brand/intro.png" || die
547 - fi
548 -
549 - # Don't list pdfimport support in desktop when built with none, bug # 605464
550 - if ! use pdfimport; then
551 - sed -i \
552 - -e ":MimeType: s:application/pdf;::" \
553 - -e ":Keywords: s:pdf;::" \
554 - sysui/desktop/menus/draw.desktop || die
555 - fi
556 -}
557 -
558 -src_configure() {
559 - # Set up Google API keys, see https://www.chromium.org/developers/how-tos/api-keys
560 - # Note: these are for Gentoo use ONLY. For your own distribution, please get
561 - # your own set of keys. Feel free to contact chromium@g.o for more info.
562 - local google_default_client_id="329227923882.apps.googleusercontent.com"
563 - local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
564 -
565 - # optimization flags
566 - export GMAKE_OPTIONS="${MAKEOPTS}"
567 - # System python enablement:
568 - export PYTHON_CFLAGS=$(python_get_CFLAGS)
569 - export PYTHON_LIBS=$(python_get_LIBS)
570 -
571 - if use kde; then
572 - export QT_SELECT=5 # bug 639620 needs proper fix though
573 - export QT5DIR="$(qt5_get_bindir)/../"
574 - export MOC5="$(qt5_get_bindir)/moc"
575 - fi
576 -
577 - local gentoo_buildid="Gentoo official package"
578 - if [[ -n ${LOCOREGIT_VERSION} ]]; then
579 - gentoo_buildid+=" (from git: ${LOCOREGIT_VERSION})"
580 - fi
581 -
582 - # system headers/libs/...: enforce using system packages
583 - # --disable-breakpad: requires not-yet-in-tree dev-utils/breakpad
584 - # --enable-cairo: ensure that cairo is always required
585 - # --enable-*-link: link to the library rather than just dlopen on runtime
586 - # --enable-release-build: build the libreoffice as release
587 - # --disable-fetch-external: prevent dowloading during compile phase
588 - # --enable-extension-integration: enable any extension integration support
589 - # --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
590 - # --disable-report-builder: too much java packages pulled in without pkgs
591 - # --without-system-sane: just sane.h header that is used for scan in writer,
592 - # not linked or anything else, worthless to depend on
593 - # --disable-pdfium: not yet packaged
594 - local myeconfargs=(
595 - --with-system-dicts
596 - --with-system-epoxy
597 - --with-system-headers
598 - --with-system-jars
599 - --with-system-libs
600 - --enable-cairo-canvas
601 - --enable-largefile
602 - --enable-mergelibs
603 - --enable-neon
604 - --enable-python=system
605 - --enable-randr
606 - --enable-release-build
607 - --disable-breakpad
608 - --disable-ccache
609 - --disable-dependency-tracking
610 - --disable-epm
611 - --disable-fetch-external
612 - --disable-gstreamer-0-10
613 - --disable-kde5
614 - --disable-online-update
615 - --disable-openssl
616 - --disable-pdfium
617 - --disable-qt5
618 - --disable-report-builder
619 - --with-alloc=system
620 - --with-build-version="${gentoo_buildid}"
621 - --enable-extension-integration
622 - --with-external-dict-dir="${EPREFIX}/usr/share/myspell"
623 - --with-external-hyph-dir="${EPREFIX}/usr/share/myspell"
624 - --with-external-thes-dir="${EPREFIX}/usr/share/myspell"
625 - --with-external-tar="${DISTDIR}"
626 - --with-lang=""
627 - --with-parallelism=$(makeopts_jobs)
628 - --with-system-ucpp
629 - --with-tls=nss
630 - --with-vendor="Gentoo Foundation"
631 - --with-x
632 - --without-fonts
633 - --without-myspell-dicts
634 - --without-help
635 - --with-helppack-integration
636 - --with-system-gpgmepp
637 - --without-system-sane
638 - $(use_enable bluetooth sdremote-bluetooth)
639 - $(use_enable coinmp)
640 - $(use_enable cups)
641 - $(use_enable dbus)
642 - $(use_enable debug)
643 - $(use_enable eds evolution2)
644 - $(use_enable firebird firebird-sdbc)
645 - $(use_enable gstreamer gstreamer-1-0)
646 - $(use_enable gtk gtk3)
647 - $(use_enable gtk2 gtk)
648 - $(use_enable kde gtk3-kde5)
649 - $(use_enable mysql ext-mariadb-connector)
650 - $(use_enable odk)
651 - $(use_enable pdfimport)
652 - $(use_enable postgres postgresql-sdbc)
653 - $(use_enable vlc)
654 - $(use_with accessibility lxml)
655 - $(use_with coinmp system-coinmp)
656 - $(use_with googledrive gdrive-client-id ${google_default_client_id})
657 - $(use_with googledrive gdrive-client-secret ${google_default_client_secret})
658 - $(use_with java)
659 - $(use_with mysql system-mysql-cppconn)
660 - $(use_with odk doxygen)
661 - )
662 -
663 - if use eds || use gtk; then
664 - myeconfargs+=( --enable-dconf --enable-gio )
665 - else
666 - myeconfargs+=( --disable-dconf --disable-gio )
667 - fi
668 -
669 - # libreoffice extensions handling
670 - for lo_xt in ${LO_EXTS}; do
671 - if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
672 - myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt}) )
673 - else
674 - myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt}) )
675 - fi
676 - done
677 -
678 - if use java; then
679 - # hsqldb: system one is too new
680 - myeconfargs+=(
681 - --without-junit
682 - --without-system-hsqldb
683 - --with-ant-home="${ANT_HOME}"
684 - --with-jdk-home=$(java-config --jdk-home 2>/dev/null)
685 - --with-jvm-path="${EPREFIX}/usr/lib/"
686 - )
687 -
688 - use libreoffice_extensions_scripting-beanshell && \
689 - myeconfargs+=( --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar) )
690 -
691 - use libreoffice_extensions_scripting-javascript && \
692 - myeconfargs+=( --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar) )
693 - fi
694 -
695 - is-flagq "-flto*" && myeconfargs+=( --enable-lto )
696 -
697 - econf "${myeconfargs[@]}"
698 -}
699 -
700 -src_compile() {
701 - # more and more LO stuff tries to use OpenGL, including tests during build
702 - # bug 501508, bug 540624, bug 545974 and probably more
703 - addpredict /dev/dri
704 - addpredict /dev/ati
705 - addpredict /dev/nvidiactl
706 -
707 - # hack for offlinehelp, this needs fixing upstream at some point
708 - # it is broken because we send --without-help
709 - # https://bugs.freedesktop.org/show_bug.cgi?id=46506
710 - (
711 - grep "^export" "${S}/config_host.mk" > "${T}/config_host.mk" || die
712 - source "${T}/config_host.mk" 2&> /dev/null
713 -
714 - local path="${WORKDIR}/helpcontent2/source/auxiliary/"
715 - mkdir -p "${path}" || die
716 -
717 - echo "perl \"${S}/helpcontent2/helpers/create_ilst.pl\" -dir=helpcontent2/source/media/helpimg > \"${path}/helpimg.ilst\""
718 - perl "${S}/helpcontent2/helpers/create_ilst.pl" \
719 - -dir=helpcontent2/source/media/helpimg \
720 - > "${path}/helpimg.ilst"
721 - [[ -s "${path}/helpimg.ilst" ]] || \
722 - ewarn "The help images list is empty, something is fishy, report a bug."
723 - )
724 -
725 - local target
726 - use test && target="build" || target="build-nocheck"
727 -
728 - # this is not a proper make script
729 - make ${target} || die
730 -}
731 -
732 -src_test() {
733 - make unitcheck || die
734 - make slowcheck || die
735 -}
736 -
737 -src_install() {
738 - # This is not Makefile so no buildserver
739 - make DESTDIR="${D}" distro-pack-install -o build -o check || die
740 -
741 - # bug 593514
742 - if use gtk; then
743 - dosym libreoffice/program/liblibreofficekitgtk.so \
744 - /usr/$(get_libdir)/liblibreofficekitgtk.so
745 - fi
746 -
747 - # bash completion aliases
748 - bashcomp_alias \
749 - libreoffice \
750 - unopkg loimpress lobase localc lodraw lomath lowriter lofromtemplate loweb loffice
751 -
752 - if use branding; then
753 - insinto /usr/$(get_libdir)/${PN}/program
754 - newins "${WORKDIR}/branding-sofficerc" sofficerc
755 - dodir /etc/env.d
756 - echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"etc/env.d/99${PN} || die
757 - fi
758 -
759 - # Hack for offlinehelp, this needs fixing upstream at some point.
760 - # It is broken because we send --without-help
761 - # https://bugs.freedesktop.org/show_bug.cgi?id=46506
762 - insinto /usr/$(get_libdir)/libreoffice/help
763 - doins xmlhelp/util/*.xsl
764 -
765 - pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/soffice.bin
766 - pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/unopkg.bin
767 -}
768 -
769 -pkg_postinst() {
770 - gnome2_icon_cache_update
771 - xdg_desktop_database_update
772 - xdg_mimeinfo_database_update
773 -}
774 -
775 -pkg_postrm() {
776 - gnome2_icon_cache_update
777 - xdg_desktop_database_update
778 - xdg_mimeinfo_database_update
779 -}