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