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