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