Gentoo Archives: gentoo-commits

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