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/
Date: Mon, 29 Jun 2020 06:32:59
Message-Id: 1593412366.b8e70c301bfb772379c7b70fef5dbed4e05bd445.asturm@gentoo
1 commit: b8e70c301bfb772379c7b70fef5dbed4e05bd445
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 29 05:44:14 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 29 06:32:46 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8e70c30
7
8 app-office/libreoffice: 6.4.5.2 version bump
9
10 Not released yet => no KEYWORDS.
11
12 Package-Manager: Portage-2.3.103, Repoman-2.3.23
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14
15 app-office/libreoffice/Manifest | 2 +
16 app-office/libreoffice/libreoffice-6.4.5.2.ebuild | 566 ++++++++++++++++++++++
17 2 files changed, 568 insertions(+)
18
19 diff --git a/app-office/libreoffice/Manifest b/app-office/libreoffice/Manifest
20 index eca8e76affa..3bc5c706672 100644
21 --- a/app-office/libreoffice/Manifest
22 +++ b/app-office/libreoffice/Manifest
23 @@ -19,7 +19,9 @@ DIST eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip 427800 BLAKE2B d3ac085a3
24 DIST f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip 211919 BLAKE2B 2c72493e44d3ad1714d294fb7baaa85d33fef2eb4ce75bf507b65f78f1d9d399bb5eb72cee188a8abc4b234eb2845a26755791fb3ac104ffe6e55013ab41ca8b SHA512 c1a15ebbfe817ec79d4b3f1c97d096bf8511737d7d35d97302856ccfb3de14a1cd16bd31000415d9ab24bbd9ef770d37855cee4b819ff0e8fca2f2766920a114
25 DIST libreoffice-6.4.3.2.tar.xz 230409812 BLAKE2B f9cdad1540c45525bd70596dc3033e3466fcdf3d96547222b936141e49ff6d45581ca59d0e42c4bb79fcb63586d748ccafae712369e024105235e2a9b69be7ce SHA512 ee11c704fa7184ffe371aa36c835c4c7fb06ef03d08fa0a5a9e647e80610db275e091d1ac79c1fe11af0c7f14dd72c821da9e7e6ba59573fc88cec79f84c873a
26 DIST libreoffice-6.4.4.2.tar.xz 231325236 BLAKE2B 25e1c765cb0ff9c195ca46a9fe857eef22ab6319da6b069e2c5c093a8f13eac2e1c5efa31fbacd4e3acbdc07e75745ff5c62c180cb61141319422720405a4638 SHA512 8e2b6a2d34fbc182ce4ec0b6d6bfb30665ff5cee0a27a22551c71d4eddf63b812d676ea8dea9a2e4bb028a2365b5e23908679efbe4696032e1abeedecb85b8d3
27 +DIST libreoffice-6.4.5.2.tar.xz 236255044 BLAKE2B a83ad0c50d1b7e686188c35c5f319b73e7984ad214e125102824789d1f56083a4ed8795cf7d8942fc0b3ddf3cad13f326225812458007a97a166bc5543c47eda SHA512 f0a5ac37b9c8e46bfd50bf9137d193a83d55d8d451c5b27d86b7f257633e861eb79422e1e64f7c462ae4a9045e00827beed302ab6f0773f8864c03bb11d3b752
28 DIST libreoffice-branding-gentoo-0.8.tar.xz 151568 BLAKE2B f03c7ddeb53c5ca3fd23401679601fcf2c4037ba17be4eb7b784c7ce7ebb71a24b8ab4aac8b7da8c6b1f14dd23bc1294ba85ff4f70ad271fb4ee3c5372e10883 SHA512 785031a699b1d1895ce4b50ffc3ddf645f3a0ef9acdf37facfd18cf75db9484cb8f53a50abb63d6006ead76a80b6ff5aa99661063245ebb84bd64013d713de7f
29 DIST libreoffice-help-6.4.3.2.tar.xz 88297704 BLAKE2B bbd1af159c8b8db1909335f37095812ec3ce81d73644a30a85f3e37daeabeb9a158451b8e586f24d4b7544c8cd0948eeb20ede464384c3277d196f33322e63fb SHA512 9f8c1bcde27d153389d124af1393d0939262c85a1624f0b475a5515b5737612cb607d04742a069534771eee51ba98896926804ec7001d6bc2110dccdd6e7615a
30 DIST libreoffice-help-6.4.4.2.tar.xz 88296340 BLAKE2B 73ef558b830e0e2899eb72727e0eb81327807ff2d474c8d956700a09bcadc73cbff26688063f91d3a496afa55ab9a7d4847d84334b89fe4fafe17fb445fbb33d SHA512 7084428e63a458c4e35c135b16dd980fa98695be0ba974cac656a7ef6cb15b059a082891c3f74b72a62f92549afefe46c14ab30b5491fd9e3fea6d5923720b3d
31 +DIST libreoffice-help-6.4.5.2.tar.xz 88376816 BLAKE2B 8c5f8a3379dd77f41e3350314fa250ede503d998afda3cb2c8c95a4dd3b565bd6d0004b4dd7ff7b079fdb4de766fa105a8dbbd49b5ced5587e5a716aba31ba26 SHA512 fffa5338baa5ebd7bdf607f83b31440c66c19c42136b41505074fe1a7a4bb1630e080e4fc2dd114f8ab0654507f4a84d4190bb134a4756d895ec350cccc10e11
32 DIST skia-m83-8ce842d38d0b32149e874d6855c91e8c68ba65a7.tar.xz 8218672 BLAKE2B cfeb805d82ce1f5dd70c7365983fa8107d5ccda9409b2654c032115cdf8a1c32fa0451162b0cceec3dcc0054e3d0d0e13583ea93843b0d0a6eb948cc31c15ce0 SHA512 1018fc1cc8a7edc15745cc20791f9a22e5b318018ba619d6cb5b6995d3e81ab93c910bb3a42734872d3be54893c2ce7db507b2c61088660b2ce6630ff9b36ebb
33
34 diff --git a/app-office/libreoffice/libreoffice-6.4.5.2.ebuild b/app-office/libreoffice/libreoffice-6.4.5.2.ebuild
35 new file mode 100644
36 index 00000000000..8d83fe8214b
37 --- /dev/null
38 +++ b/app-office/libreoffice/libreoffice-6.4.5.2.ebuild
39 @@ -0,0 +1,566 @@
40 +# Copyright 1999-2020 Gentoo Authors
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +EAPI=7
44 +
45 +PYTHON_COMPAT=( python3_{6,7,8} )
46 +PYTHON_REQ_USE="threads(+),xml"
47 +
48 +MY_PV="${PV/_alpha/.alpha}"
49 +MY_PV="${MY_PV/_beta/.beta}"
50 +# experimental ; release ; old
51 +# Usually the tarballs are moved a lot so this should make everyone happy.
52 +DEV_URI="
53 + https://dev-builds.libreoffice.org/pre-releases/src
54 + https://download.documentfoundation.org/libreoffice/src/${MY_PV:0:5}/
55 + https://downloadarchive.documentfoundation.org/libreoffice/old/${MY_PV}/src
56 +"
57 +ADDONS_URI="https://dev-www.libreoffice.org/src/"
58 +
59 +BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
60 +# PATCHSET="${P}-patchset-01.tar.xz"
61 +
62 +[[ ${MY_PV} == *9999* ]] && inherit git-r3
63 +inherit autotools bash-completion-r1 check-reqs flag-o-matic java-pkg-opt-2 multiprocessing python-single-r1 qmake-utils toolchain-funcs xdg-utils
64 +
65 +DESCRIPTION="A full office productivity suite"
66 +HOMEPAGE="https://www.libreoffice.org"
67 +SRC_URI="branding? ( https://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
68 +[[ -n ${PATCHSET} ]] && SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}"
69 +
70 +# Split modules following git/tarballs; Core MUST be first!
71 +# Help is used for the image generator
72 +# Only release has the tarballs
73 +if [[ ${MY_PV} != *9999* ]]; then
74 + for i in ${DEV_URI}; do
75 + SRC_URI+=" ${i}/${PN}-${MY_PV}.tar.xz"
76 + SRC_URI+=" ${i}/${PN}-help-${MY_PV}.tar.xz"
77 + done
78 + unset i
79 +fi
80 +unset DEV_URI
81 +
82 +# Really required addons
83 +# These are bundles that can't be removed for now due to huge patchsets.
84 +# If you want them gone, patches are welcome.
85 +ADDONS_SRC=(
86 + # QR code generating library for >=libreoffice-6.4
87 + "${ADDONS_URI}/QR-Code-generator-1.4.0.tar.gz"
88 + "base? (
89 + ${ADDONS_URI}/commons-logging-1.2-src.tar.gz
90 + ${ADDONS_URI}/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
91 + ${ADDONS_URI}/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
92 + ${ADDONS_URI}/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
93 + ${ADDONS_URI}/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
94 + ${ADDONS_URI}/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
95 + ${ADDONS_URI}/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
96 + ${ADDONS_URI}/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
97 + ${ADDONS_URI}/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
98 + ${ADDONS_URI}/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
99 + ${ADDONS_URI}/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
100 + ${ADDONS_URI}/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
101 + )"
102 + "java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
103 + # no release for 8 years, should we package it?
104 + "libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )"
105 + # Does not build with 1.6 rhino at all
106 + "libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )"
107 + # requirement of rhino
108 + "libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )"
109 + # not packageable
110 + "odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )"
111 +)
112 +SRC_URI+=" ${ADDONS_SRC[*]}"
113 +
114 +unset ADDONS_URI
115 +unset ADDONS_SRC
116 +
117 +# Extensions that need extra work:
118 +LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
119 +
120 +IUSE="accessibility base bluetooth +branding coinmp +cups +dbus debug eds firebird
121 +googledrive gstreamer +gtk kde ldap +mariadb odk pdfimport postgres test
122 +$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
123 +
124 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
125 + base? ( firebird java )
126 + bluetooth? ( dbus )
127 + gtk? ( dbus )
128 + libreoffice_extensions_nlpsolver? ( java )
129 + libreoffice_extensions_scripting-beanshell? ( java )
130 + libreoffice_extensions_scripting-javascript? ( java )
131 + libreoffice_extensions_wiki-publisher? ( java )
132 +"
133 +
134 +RESTRICT="!test? ( test )"
135 +
136 +LICENSE="|| ( LGPL-3 MPL-1.1 )"
137 +SLOT="0"
138 +
139 +[[ ${MY_PV} == *9999* ]] || \
140 +KEYWORDS=""
141 +#KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
142 +
143 +BDEPEND="
144 + dev-util/intltool
145 + sys-devel/bison
146 + sys-devel/flex
147 + sys-devel/gettext
148 + virtual/pkgconfig
149 + odk? ( >=app-doc/doxygen-1.8.4 )
150 +"
151 +COMMON_DEPEND="${PYTHON_DEPS}
152 + app-arch/unzip
153 + app-arch/zip
154 + app-crypt/gpgme[cxx]
155 + app-text/hunspell:=
156 + >=app-text/libabw-0.1.0
157 + >=app-text/libebook-0.1
158 + app-text/libepubgen
159 + >=app-text/libetonyek-0.1
160 + app-text/libexttextcat
161 + app-text/liblangtag
162 + >=app-text/libmspub-0.1.0
163 + >=app-text/libmwaw-0.3.1
164 + app-text/libnumbertext
165 + >=app-text/libodfgen-0.1.0
166 + app-text/libqxp
167 + app-text/libstaroffice
168 + app-text/libwpd:0.10[tools]
169 + app-text/libwpg:0.3
170 + >=app-text/libwps-0.4
171 + app-text/mythes
172 + >=dev-cpp/clucene-2.3.3.4-r2
173 + >=dev-cpp/libcmis-0.5.2
174 + dev-db/unixODBC
175 + dev-lang/perl
176 + >=dev-libs/boost-1.72.0:=[nls]
177 + dev-libs/expat
178 + dev-libs/hyphen
179 + dev-libs/icu:=
180 + dev-libs/libassuan
181 + dev-libs/libgpg-error
182 + >=dev-libs/liborcus-0.15.0
183 + dev-libs/librevenge
184 + dev-libs/libxml2
185 + dev-libs/libxslt
186 + dev-libs/nspr
187 + dev-libs/nss
188 + >=dev-libs/redland-1.0.16
189 + >=dev-libs/xmlsec-1.2.28[nss]
190 + media-gfx/fontforge
191 + media-gfx/graphite2
192 + media-libs/fontconfig
193 + media-libs/freetype:2
194 + >=media-libs/harfbuzz-0.9.42:=[graphite,icu]
195 + media-libs/lcms:2
196 + >=media-libs/libcdr-0.1.0
197 + >=media-libs/libepoxy-1.3.1[X]
198 + >=media-libs/libfreehand-0.1.0
199 + media-libs/libpagemaker
200 + >=media-libs/libpng-1.4:0=
201 + >=media-libs/libvisio-0.1.0
202 + media-libs/libzmf
203 + net-libs/neon
204 + net-misc/curl
205 + sci-mathematics/lpsolve
206 + sys-libs/zlib
207 + virtual/glu
208 + virtual/jpeg:0
209 + virtual/opengl
210 + x11-libs/cairo[X]
211 + x11-libs/libXinerama
212 + x11-libs/libXrandr
213 + x11-libs/libXrender
214 + accessibility? (
215 + $(python_gen_cond_dep 'dev-python/lxml[${PYTHON_MULTI_USEDEP}]')
216 + )
217 + bluetooth? (
218 + dev-libs/glib:2
219 + net-wireless/bluez
220 + )
221 + coinmp? ( sci-libs/coinor-mp )
222 + cups? ( net-print/cups )
223 + dbus? ( sys-apps/dbus[X] )
224 + eds? (
225 + dev-libs/glib:2
226 + gnome-base/dconf
227 + gnome-extra/evolution-data-server
228 + )
229 + firebird? ( >=dev-db/firebird-3.0.2.32703.0-r1[server] )
230 + gstreamer? (
231 + media-libs/gstreamer:1.0
232 + media-libs/gst-plugins-base:1.0
233 + )
234 + gtk? (
235 + dev-libs/glib:2
236 + dev-libs/gobject-introspection
237 + gnome-base/dconf
238 + media-libs/mesa[egl]
239 + x11-libs/gtk+:3
240 + x11-libs/pango
241 + )
242 + kde? (
243 + dev-qt/qtcore:5
244 + dev-qt/qtgui:5
245 + dev-qt/qtwidgets:5
246 + dev-qt/qtx11extras:5
247 + kde-frameworks/kconfig:5
248 + kde-frameworks/kcoreaddons:5
249 + kde-frameworks/ki18n:5
250 + kde-frameworks/kio:5
251 + kde-frameworks/kwindowsystem:5
252 + )
253 + ldap? ( net-nds/openldap )
254 + libreoffice_extensions_scripting-beanshell? ( dev-java/bsh )
255 + libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
256 + mariadb? ( dev-db/mariadb-connector-c )
257 + !mariadb? ( dev-db/mysql-connector-c )
258 + pdfimport? ( app-text/poppler:=[cxx] )
259 + postgres? ( >=dev-db/postgresql-9.0:*[kerberos] )
260 +"
261 +# FIXME: cppunit should be moved to test conditional
262 +# after everything upstream is under gbuild
263 +# as dmake execute tests right away
264 +# tests apparently also need google-carlito-fonts (not packaged)
265 +DEPEND="${COMMON_DEPEND}
266 + >=dev-libs/libatomic_ops-7.2d
267 + dev-perl/Archive-Zip
268 + >=dev-util/cppunit-1.14.0
269 + >=dev-util/gperf-3.1
270 + dev-util/mdds:1/1.5
271 + media-libs/glm
272 + sys-devel/ucpp
273 + x11-base/xorg-proto
274 + x11-libs/libXt
275 + x11-libs/libXtst
276 + java? (
277 + dev-java/ant-core
278 + >=virtual/jdk-1.8
279 + )
280 + test? (
281 + app-crypt/gnupg
282 + dev-util/cppunit
283 + media-fonts/dejavu
284 + media-fonts/liberation-fonts
285 + )
286 +"
287 +RDEPEND="${COMMON_DEPEND}
288 + !app-office/libreoffice-bin
289 + !app-office/libreoffice-bin-debug
290 + !app-office/openoffice
291 + media-fonts/liberation-fonts
292 + || ( x11-misc/xdg-utils kde-plasma/kde-cli-tools )
293 + java? ( >=virtual/jre-1.8 )
294 + kde? ( kde-frameworks/breeze-icons:* )
295 +"
296 +if [[ ${MY_PV} != *9999* ]] && [[ ${PV} != *_* ]]; then
297 + PDEPEND="=app-office/libreoffice-l10n-$(ver_cut 1-2)*"
298 +else
299 + # Translations are not reliable on live ebuilds
300 + # rather force people to use english only.
301 + PDEPEND="!app-office/libreoffice-l10n"
302 +fi
303 +
304 +PATCHES=(
305 + # "${WORKDIR}"/${PATCHSET/.tar.xz/}
306 +
307 + # not upstreamable stuff
308 + "${FILESDIR}/${PN}-5.4-system-pyuno.patch"
309 + "${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
310 + "${FILESDIR}/${PN}-6.1-nomancompress.patch"
311 +
312 + # git master
313 + "${FILESDIR}/${PN}-6.4.3.2-boost-1.73.patch" # bug 721806
314 +)
315 +
316 +S="${WORKDIR}/${PN}-${MY_PV}"
317 +
318 +_check_reqs() {
319 + CHECKREQS_MEMORY="512M"
320 + if is-flagq "-g*" && ! is-flagq "-g*0" ; then
321 + CHECKREQS_DISK_BUILD="22G"
322 + else
323 + CHECKREQS_DISK_BUILD="6G"
324 + fi
325 + check-reqs_$1
326 +}
327 +
328 +pkg_pretend() {
329 + use base ||
330 + ewarn "If you plan to use Base application you must enable USE base."
331 + use java ||
332 + ewarn "Without USE java, several wizards are not going to be available."
333 +
334 + [[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_pretend
335 +}
336 +
337 +pkg_setup() {
338 + java-pkg-opt-2_pkg_setup
339 + python-single-r1_pkg_setup
340 + xdg_environment_reset
341 +
342 + [[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_setup
343 +}
344 +
345 +src_unpack() {
346 + default
347 +
348 + if [[ ${MY_PV} = *9999* ]]; then
349 + local base_uri branch mypv
350 + base_uri="https://anongit.freedesktop.org/git"
351 + branch="master"
352 + mypv=${MY_PV/.9999}
353 + [[ ${mypv} != ${MY_PV} ]] && branch="${PN}-${mypv/./-}"
354 + git-r3_fetch "${base_uri}/${PN}/core" "refs/heads/${branch}"
355 + git-r3_checkout "${base_uri}/${PN}/core"
356 + LOCOREGIT_VERSION=${EGIT_VERSION}
357 +
358 + git-r3_fetch "${base_uri}/${PN}/help" "refs/heads/master"
359 + git-r3_checkout "${base_uri}/${PN}/help" "helpcontent2" # doesn't match on help
360 + fi
361 +}
362 +
363 +src_prepare() {
364 + default
365 +
366 + # sandbox violations on many systems, we don't need it. Bug #646406
367 + sed -i \
368 + -e "/KF5_CONFIG/s/kf5-config/no/" \
369 + configure.ac || die "Failed to disable kf5-config"
370 +
371 + AT_M4DIR="m4" eautoreconf
372 + # hack in the autogen.sh
373 + touch autogen.lastrun
374 +
375 + # system pyuno mess
376 + sed -i \
377 + -e "s:%eprefix%:${EPREFIX}:g" \
378 + -e "s:%libdir%:$(get_libdir):g" \
379 + pyuno/source/module/uno.py \
380 + pyuno/source/officehelper.py || die
381 + # sed in the tests
382 + sed -i \
383 + -e "s#all : build unitcheck#all : build#g" \
384 + solenv/gbuild/Module.mk || die
385 + sed -i \
386 + -e "s#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g" \
387 + -e "s#Makefile.gbuild all slowcheck#Makefile.gbuild all#g" \
388 + Makefile.in || die
389 +
390 + sed -i \
391 + -e "s,/usr/share/bash-completion/completions,$(get_bashcompdir)," \
392 + -e "s,\$INSTALLDIRNAME.sh,${PN}," \
393 + bin/distro-install-desktop-integration || die
394 +
395 + if use branding; then
396 + # hack...
397 + mv -v "${WORKDIR}/branding-intro.png" "icon-themes/colibre/brand/intro.png" || die
398 + fi
399 +
400 + # Don't list pdfimport support in desktop when built with none, bug # 605464
401 + if ! use pdfimport; then
402 + sed -i \
403 + -e ":MimeType: s:application/pdf;::" \
404 + -e ":Keywords: s:pdf;::" \
405 + sysui/desktop/menus/draw.desktop || die
406 + fi
407 +}
408 +
409 +src_configure() {
410 + # Set up Google API keys, see https://www.chromium.org/developers/how-tos/api-keys
411 + # Note: these are for Gentoo use ONLY. For your own distribution, please get
412 + # your own set of keys. Feel free to contact chromium@g.o for more info.
413 + local google_default_client_id="329227923882.apps.googleusercontent.com"
414 + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
415 +
416 + # optimization flags
417 + export GMAKE_OPTIONS="${MAKEOPTS}"
418 + # System python enablement:
419 + export PYTHON_CFLAGS=$(python_get_CFLAGS)
420 + export PYTHON_LIBS=$(python_get_LIBS)
421 +
422 + if use kde; then
423 + export QT_SELECT=5 # bug 639620 needs proper fix though
424 + export QT5DIR="$(qt5_get_bindir)/../"
425 + export MOC5="$(qt5_get_bindir)/moc"
426 + fi
427 +
428 + local gentoo_buildid="Gentoo official package"
429 + if [[ -n ${LOCOREGIT_VERSION} ]]; then
430 + gentoo_buildid+=" (from git: ${LOCOREGIT_VERSION})"
431 + fi
432 +
433 + # system headers/libs/...: enforce using system packages
434 + # --disable-breakpad: requires not-yet-in-tree dev-utils/breakpad
435 + # --enable-cairo: ensure that cairo is always required
436 + # --enable-*-link: link to the library rather than just dlopen on runtime
437 + # --enable-release-build: build the libreoffice as release
438 + # --disable-fetch-external: prevent dowloading during compile phase
439 + # --enable-extension-integration: enable any extension integration support
440 + # --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
441 + # --disable-report-builder: too much java packages pulled in without pkgs
442 + # --without-system-sane: just sane.h header that is used for scan in writer,
443 + # not linked or anything else, worthless to depend on
444 + # --disable-pdfium: not yet packaged
445 + # --without-system-qrencode: has no real build system and LO is the only user
446 + local myeconfargs=(
447 + --with-system-dicts
448 + --with-system-epoxy
449 + --with-system-headers
450 + --with-system-jars
451 + --with-system-libs
452 + --enable-build-opensymbol
453 + --enable-cairo-canvas
454 + --enable-largefile
455 + --enable-mergelibs
456 + --enable-neon
457 + --enable-python=system
458 + --enable-randr
459 + --enable-release-build
460 + --disable-breakpad
461 + --disable-bundle-mariadb
462 + --disable-ccache
463 + --disable-epm
464 + --disable-fetch-external
465 + --disable-gtk3-kde5
466 + --disable-online-update
467 + --disable-openssl
468 + --disable-pdfium
469 + --disable-vlc
470 + --with-build-version="${gentoo_buildid}"
471 + --enable-extension-integration
472 + --with-external-dict-dir="${EPREFIX}/usr/share/myspell"
473 + --with-external-hyph-dir="${EPREFIX}/usr/share/myspell"
474 + --with-external-thes-dir="${EPREFIX}/usr/share/myspell"
475 + --with-external-tar="${DISTDIR}"
476 + --with-lang=""
477 + --with-parallelism=$(makeopts_jobs)
478 + --with-system-ucpp
479 + --with-tls=nss
480 + --with-vendor="Gentoo Foundation"
481 + --with-x
482 + --without-fonts
483 + --without-myspell-dicts
484 + --with-help="html"
485 + --without-helppack-integration
486 + --with-system-gpgmepp
487 + --without-system-jfreereport
488 + --without-system_apache_commons
489 + --without-system-sane
490 + --without-system-qrcodegen
491 + $(use_enable base report-builder)
492 + $(use_enable bluetooth sdremote-bluetooth)
493 + $(use_enable coinmp)
494 + $(use_enable cups)
495 + $(use_enable dbus)
496 + $(use_enable debug)
497 + $(use_enable eds evolution2)
498 + $(use_enable firebird firebird-sdbc)
499 + $(use_enable gstreamer gstreamer-1-0)
500 + $(use_enable gtk gtk3)
501 + $(use_enable kde kf5)
502 + $(use_enable kde qt5)
503 + $(use_enable ldap)
504 + $(use_enable odk)
505 + $(use_enable pdfimport)
506 + $(use_enable postgres postgresql-sdbc)
507 + $(use_with accessibility lxml)
508 + $(use_with coinmp system-coinmp)
509 + $(use_with googledrive gdrive-client-id ${google_default_client_id})
510 + $(use_with googledrive gdrive-client-secret ${google_default_client_secret})
511 + $(use_with java)
512 + $(use_with odk doxygen)
513 + )
514 +
515 + if use eds || use gtk; then
516 + myeconfargs+=( --enable-dconf --enable-gio )
517 + else
518 + myeconfargs+=( --disable-dconf --disable-gio )
519 + fi
520 +
521 + # libreoffice extensions handling
522 + for lo_xt in ${LO_EXTS}; do
523 + if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
524 + myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt}) )
525 + else
526 + myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt}) )
527 + fi
528 + done
529 +
530 + if use java; then
531 + # hsqldb: system one is too new
532 + myeconfargs+=(
533 + --without-junit
534 + --without-system-hsqldb
535 + --with-ant-home="${ANT_HOME}"
536 + --with-jdk-home=$(java-config --jdk-home 2>/dev/null)
537 + --with-jvm-path="${EPREFIX}/usr/lib/"
538 + )
539 +
540 + use libreoffice_extensions_scripting-beanshell && \
541 + myeconfargs+=( --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar) )
542 +
543 + use libreoffice_extensions_scripting-javascript && \
544 + myeconfargs+=( --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar) )
545 + fi
546 +
547 + is-flagq "-flto*" && myeconfargs+=( --enable-lto )
548 +
549 + MARIADBCONFIG="$(type -p $(usex mariadb mariadb mysql)_config)" \
550 + econf "${myeconfargs[@]}"
551 +}
552 +
553 +src_compile() {
554 + # more and more LO stuff tries to use OpenGL, including tests during build
555 + # bug 501508, bug 540624, bug 545974 and probably more
556 + addpredict /dev/dri
557 + addpredict /dev/ati
558 + addpredict /dev/nvidiactl
559 +
560 + local target
561 + use test && target="build" || target="build-nocheck"
562 +
563 + # this is not a proper make script
564 + make ${target} || die
565 +}
566 +
567 +src_test() {
568 + make unitcheck || die
569 + make slowcheck || die
570 +}
571 +
572 +src_install() {
573 + # This is not Makefile so no buildserver
574 + emake DESTDIR="${D}" distro-pack-install -o build -o check
575 +
576 + # bug 593514
577 + if use gtk; then
578 + dosym libreoffice/program/liblibreofficekitgtk.so \
579 + /usr/$(get_libdir)/liblibreofficekitgtk.so
580 + fi
581 +
582 + # bash completion aliases
583 + bashcomp_alias \
584 + libreoffice \
585 + unopkg loimpress lobase localc lodraw lomath lowriter lofromtemplate loweb loffice
586 +
587 + if use branding; then
588 + insinto /usr/$(get_libdir)/${PN}/program
589 + newins "${WORKDIR}/branding-sofficerc" sofficerc
590 + dodir /etc/env.d
591 + echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"/etc/env.d/99${PN} || die
592 + fi
593 +}
594 +
595 +pkg_postinst() {
596 + xdg_icon_cache_update
597 + xdg_desktop_database_update
598 + xdg_mimeinfo_database_update
599 +}
600 +
601 +pkg_postrm() {
602 + xdg_icon_cache_update
603 + xdg_desktop_database_update
604 + xdg_mimeinfo_database_update
605 +}