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