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