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: Mon, 01 Oct 2018 18:13:21
Message-Id: 1538417537.a36ad9ed62b301fe337d2d81c5441e119108e76d.asturm@gentoo
1 commit: a36ad9ed62b301fe337d2d81c5441e119108e76d
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 1 17:38:11 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 1 18:12:17 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a36ad9ed
7
8 app-office/libreoffice: 6.1.2.1 version bump
9
10 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
11 Package-Manager: Portage-2.3.50, Repoman-2.3.11
12
13 app-office/libreoffice/Manifest | 2 +
14 app-office/libreoffice/libreoffice-6.1.2.1.ebuild | 568 ++++++++++++++++++++++
15 2 files changed, 570 insertions(+)
16
17 diff --git a/app-office/libreoffice/Manifest b/app-office/libreoffice/Manifest
18 index 6258b4e18a4..12c823fdb4a 100644
19 --- a/app-office/libreoffice/Manifest
20 +++ b/app-office/libreoffice/Manifest
21 @@ -6,6 +6,8 @@ DIST a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip 23150 BLAKE2B 51db6bd9058
22 DIST libreoffice-6.0.5.2-patchset-01.tar.xz 39820 BLAKE2B d8b436378b05a8a58156817b5d1e0323fd6fcfde9aa9fc4fc6a8056a06a16c84c5860ffe1ae715faddb707c5aa417b43e6c7f5c05821f86208edbb3778d830a1 SHA512 ec99a6358c0a20075abc0aa136ad6ccded4562fa0f25897efe2a8783fb33b97b92a2dd8041206b3344a79dfd10ebe98b79c8bf0b4e8539e45942978f0028dc59
23 DIST libreoffice-6.0.6.2.tar.xz 205022916 BLAKE2B 715d24c7bbfe4d570011f5090cf647421f68e73fb76047ec0fb973ec0bfb30be3ec1d521bdd92369e23abaa444e7afd3e070ff613486e8f85b9ca76d9496fd0e SHA512 8cf7bd4d8f81ee09f8a21c4ccb12f788c67cf1cba71e08b9b720f9e8b4ec2dfcc25452ef05b6b60529463241c2b23a70eb6a79a8f15b95e890a2ea9cbb458517
24 DIST libreoffice-6.1.1.2.tar.xz 207211808 BLAKE2B 9c60f6153a82903252102056d27ae412350200fcdb8dfc8cbefeb92bd50eebfbd11bda06e20f35d19320591f9cfdfa53c9f1fda8c66d2bee66c59c37f27753be SHA512 c3429fbd247c4b17f4e140751fcb1e593705aa60911556c4dfc960ebaa6fe50a39d933d14bfc3c89cdd92619f41611eb1aa0090fe9d391d84989d206005af3ea
25 +DIST libreoffice-6.1.2.1.tar.xz 207364016 BLAKE2B 9046cd4eaa30be40e5223718491ef5f39ad6940ae6bef1c88618eb42dfffeb9980db164367f7c6518979f57b31688abcc81068be2da4de08b6da5a7245e50283 SHA512 b7c7839da8251fd0f01794381d77a5abd4d092f21589df046402a1d332d782608aa00ab29ad60c9a34f27f11576d70c5a678e87a0f53c5b4065ae59fe77a0367
26 DIST libreoffice-branding-gentoo-0.8.tar.xz 151568 BLAKE2B f03c7ddeb53c5ca3fd23401679601fcf2c4037ba17be4eb7b784c7ce7ebb71a24b8ab4aac8b7da8c6b1f14dd23bc1294ba85ff4f70ad271fb4ee3c5372e10883 SHA512 785031a699b1d1895ce4b50ffc3ddf645f3a0ef9acdf37facfd18cf75db9484cb8f53a50abb63d6006ead76a80b6ff5aa99661063245ebb84bd64013d713de7f
27 DIST libreoffice-help-6.0.6.2.tar.xz 2972748 BLAKE2B 38534d5fd08751af587fd5b5be03b39b086e2bc26878c50e98bafd7a2b48f517ac29b8d434748449b0a3e8a451c31f40255094d64965800aadfd94c111295be5 SHA512 89caab57774f85f3e58523c0debb57247a0f10959634bf296aaacc4928bcce6ea8ed9f167b267e2e0eeb52b69714eeb094fedfa3e810cf409dfbc7c5e49b7c13
28 DIST libreoffice-help-6.1.1.2.tar.xz 15757536 BLAKE2B 5e93bb65c6e42f924bd1c782e472f247b97cb9264c671d932a71cf67813d529c363a8664eeca48b407a0882ad2d0d7392cffcfddea0f35f0c62881b3c11d70ce SHA512 6e22a3efa9c6db97dec27a5f6ef21efb0c0665712715338d8fb73340a9572841fcaac63b0f6b03d67bc9c459a85d1910c18a5830ff8541265509cf8a1bdc3aa1
29 +DIST libreoffice-help-6.1.2.1.tar.xz 15757852 BLAKE2B 2f40eeb16956695e6a4f5d9bf6ac6ad8a72a4a38dd4b481320c1ffe7bf41b789e938291631816ee84cf4da83a0347d34383e9ed9c3f4b48374cf15cea13243a7 SHA512 6cabaed79d0405e4e35af3e3689561e0d447bbf98b081b6a40fd52c37bda7b0886d4df4ea1c2deaa7db56c26933b5697ae4ef796f6e763a58b7ee729debcca6e
30
31 diff --git a/app-office/libreoffice/libreoffice-6.1.2.1.ebuild b/app-office/libreoffice/libreoffice-6.1.2.1.ebuild
32 new file mode 100644
33 index 00000000000..e889c4c70b1
34 --- /dev/null
35 +++ b/app-office/libreoffice/libreoffice-6.1.2.1.ebuild
36 @@ -0,0 +1,568 @@
37 +# Copyright 1999-2018 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=6
41 +
42 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
43 +PYTHON_REQ_USE="threads,xml"
44 +
45 +MY_PV="${PV/_alpha/.alpha}"
46 +MY_PV="${MY_PV/_beta/.beta}"
47 +# experimental ; release ; old
48 +# Usually the tarballs are moved a lot so this should make everyone happy.
49 +DEV_URI="
50 + https://dev-builds.libreoffice.org/pre-releases/src
51 + https://download.documentfoundation.org/libreoffice/src/${MY_PV:0:5}/
52 + https://downloadarchive.documentfoundation.org/libreoffice/old/${MY_PV}/src
53 +"
54 +ADDONS_URI="https://dev-www.libreoffice.org/src/"
55 +
56 +BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
57 +# PATCHSET="${P}-patchset-01.tar.xz"
58 +
59 +[[ ${MY_PV} == *9999* ]] && SCM_ECLASS="git-r3"
60 +inherit autotools bash-completion-r1 check-reqs eapi7-ver flag-o-matic gnome2-utils java-pkg-opt-2 multiprocessing pax-utils python-single-r1 qmake-utils toolchain-funcs xdg-utils ${SCM_ECLASS}
61 +unset SCM_ECLASS
62 +
63 +DESCRIPTION="A full office productivity suite"
64 +HOMEPAGE="https://www.libreoffice.org"
65 +SRC_URI="branding? ( https://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
66 +[[ -n ${PATCHSET} ]] && SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}"
67 +
68 +# Split modules following git/tarballs; Core MUST be first!
69 +# Help is used for the image generator
70 +# Only release has the tarballs
71 +if [[ ${MY_PV} != *9999* ]]; then
72 + for i in ${DEV_URI}; do
73 + SRC_URI+=" ${i}/${PN}-${MY_PV}.tar.xz"
74 + SRC_URI+=" ${i}/${PN}-help-${MY_PV}.tar.xz"
75 + done
76 + unset i
77 +fi
78 +unset DEV_URI
79 +
80 +# Really required addons
81 +# These are bundles that can't be removed for now due to huge patchsets.
82 +# If you want them gone, patches are welcome.
83 +ADDONS_SRC=(
84 + "java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
85 + # no release for 8 years, should we package it?
86 + "libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )"
87 + # Does not build with 1.6 rhino at all
88 + "libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )"
89 + # requirement of rhino
90 + "libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )"
91 + # not packageable
92 + "odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )"
93 +)
94 +SRC_URI+=" ${ADDONS_SRC[*]}"
95 +
96 +unset ADDONS_URI
97 +unset ADDONS_SRC
98 +
99 +# Extensions that need extra work:
100 +LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
101 +
102 +IUSE="accessibility bluetooth +branding coinmp +cups dbus debug eds firebird
103 +googledrive gstreamer +gtk gtk2 kde mysql odk pdfimport postgres test vlc
104 +$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
105 +
106 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
107 + bluetooth? ( dbus )
108 + kde? ( gtk )
109 + libreoffice_extensions_nlpsolver? ( java )
110 + libreoffice_extensions_scripting-beanshell? ( java )
111 + libreoffice_extensions_scripting-javascript? ( java )
112 + libreoffice_extensions_wiki-publisher? ( java )
113 +"
114 +
115 +LICENSE="|| ( LGPL-3 MPL-1.1 )"
116 +SLOT="0"
117 +[[ ${MY_PV} == *9999* ]] || \
118 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux"
119 +
120 +COMMON_DEPEND="${PYTHON_DEPS}
121 + app-arch/unzip
122 + app-arch/zip
123 + app-crypt/gpgme[cxx]
124 + app-text/hunspell:=
125 + >=app-text/libabw-0.1.0
126 + >=app-text/libebook-0.1
127 + app-text/libepubgen
128 + >=app-text/libetonyek-0.1
129 + app-text/libexttextcat
130 + app-text/liblangtag
131 + >=app-text/libmspub-0.1.0
132 + >=app-text/libmwaw-0.3.1
133 + app-text/libnumbertext
134 + >=app-text/libodfgen-0.1.0
135 + app-text/libqxp
136 + app-text/libstaroffice
137 + app-text/libwpd:0.10[tools]
138 + app-text/libwpg:0.3
139 + >=app-text/libwps-0.4
140 + app-text/mythes
141 + >=dev-cpp/clucene-2.3.3.4-r2
142 + =dev-cpp/libcmis-0.5*
143 + dev-db/unixODBC
144 + dev-lang/perl
145 + dev-libs/boost:=[nls]
146 + dev-libs/expat
147 + dev-libs/hyphen
148 + dev-libs/icu:=
149 + dev-libs/libassuan
150 + dev-libs/libgpg-error
151 + =dev-libs/liborcus-0.13*
152 + dev-libs/librevenge
153 + dev-libs/libxml2
154 + dev-libs/libxslt
155 + dev-libs/nspr
156 + dev-libs/nss
157 + >=dev-libs/redland-1.0.16
158 + >=dev-libs/xmlsec-1.2.24[nss]
159 + media-gfx/graphite2
160 + media-libs/fontconfig
161 + media-libs/freetype:2
162 + >=media-libs/harfbuzz-0.9.42:=[graphite,icu]
163 + media-libs/lcms:2
164 + >=media-libs/libcdr-0.1.0
165 + >=media-libs/libepoxy-1.3.1[X]
166 + >=media-libs/libfreehand-0.1.0
167 + media-libs/libpagemaker
168 + >=media-libs/libpng-1.4:0=
169 + >=media-libs/libvisio-0.1.0
170 + media-libs/libzmf
171 + net-libs/neon
172 + net-misc/curl
173 + net-nds/openldap
174 + sci-mathematics/lpsolve
175 + sys-libs/zlib:=
176 + virtual/glu
177 + virtual/jpeg:0
178 + virtual/opengl
179 + x11-libs/cairo[X]
180 + x11-libs/libXinerama
181 + x11-libs/libXrandr
182 + x11-libs/libXrender
183 + accessibility? ( dev-python/lxml[${PYTHON_USEDEP}] )
184 + bluetooth? ( net-wireless/bluez )
185 + coinmp? ( sci-libs/coinor-mp )
186 + cups? ( net-print/cups )
187 + dbus? ( dev-libs/dbus-glib )
188 + eds? (
189 + dev-libs/glib:2
190 + gnome-base/dconf
191 + gnome-extra/evolution-data-server
192 + )
193 + firebird? ( >=dev-db/firebird-3.0.2.32703.0-r1[server] )
194 + gstreamer? (
195 + media-libs/gstreamer:1.0
196 + media-libs/gst-plugins-base:1.0
197 + )
198 + gtk? (
199 + dev-libs/glib:2
200 + dev-libs/gobject-introspection
201 + gnome-base/dconf
202 + media-libs/mesa[egl]
203 + x11-libs/gtk+:3
204 + x11-libs/pango
205 + )
206 + gtk2? (
207 + x11-libs/gdk-pixbuf
208 + >=x11-libs/gtk+-2.24:2
209 + x11-libs/pango
210 + )
211 + kde? (
212 + dev-qt/qtcore:5
213 + dev-qt/qtgui:5
214 + dev-qt/qtx11extras:5
215 + dev-qt/qtwidgets:5
216 + kde-frameworks/kconfig:5
217 + kde-frameworks/kcoreaddons:5
218 + kde-frameworks/ki18n:5
219 + kde-frameworks/kio:5
220 + kde-frameworks/kwindowsystem:5
221 + )
222 + libreoffice_extensions_scripting-beanshell? ( dev-java/bsh )
223 + libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
224 + mysql? ( dev-db/mysql-connector-c++ )
225 + pdfimport? ( app-text/poppler:=[cxx] )
226 + postgres? ( >=dev-db/postgresql-9.0:*[kerberos] )
227 +"
228 +
229 +RDEPEND="${COMMON_DEPEND}
230 + !app-office/libreoffice-bin
231 + !app-office/libreoffice-bin-debug
232 + !app-office/openoffice
233 + media-fonts/dejavu
234 + media-fonts/liberation-fonts
235 + media-fonts/libertine
236 + || ( x11-misc/xdg-utils kde-plasma/kde-cli-tools )
237 + java? ( >=virtual/jre-1.6 )
238 + kde? ( kde-frameworks/breeze-icons:* )
239 + vlc? ( media-video/vlc )
240 +"
241 +
242 +if [[ ${MY_PV} != *9999* ]] && [[ ${PV} != *_* ]]; then
243 + PDEPEND="=app-office/libreoffice-l10n-$(ver_cut 1-2)*"
244 +else
245 + # Translations are not reliable on live ebuilds
246 + # rather force people to use english only.
247 + PDEPEND="!app-office/libreoffice-l10n"
248 +fi
249 +
250 +# FIXME: cppunit should be moved to test conditional
251 +# after everything upstream is under gbuild
252 +# as dmake execute tests right away
253 +DEPEND="${COMMON_DEPEND}
254 + >=dev-libs/libatomic_ops-7.2d
255 + dev-perl/Archive-Zip
256 + >=dev-util/cppunit-1.14.0
257 + >=dev-util/gperf-3
258 + dev-util/intltool
259 + =dev-util/mdds-1.3*:1=
260 + media-libs/glm
261 + sys-devel/bison
262 + sys-devel/flex
263 + sys-devel/gettext
264 + sys-devel/ucpp
265 + virtual/pkgconfig
266 + x11-base/xorg-proto
267 + x11-libs/libXt
268 + x11-libs/libXtst
269 + java? (
270 + dev-java/ant-core
271 + >=virtual/jdk-1.6
272 + )
273 + odk? ( >=app-doc/doxygen-1.8.4 )
274 + test? (
275 + app-crypt/gnupg
276 + dev-util/cppunit
277 + media-fonts/dejavu
278 + )
279 +"
280 +
281 +PATCHES=(
282 + # "${WORKDIR}"/${PATCHSET/.tar.xz/}
283 +
284 + # not upstreamable stuff
285 + "${FILESDIR}/${PN}-5.4-system-pyuno.patch"
286 + "${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
287 +
288 + # TODO: upstream
289 + "${FILESDIR}/${PN}-5.2.5.1-glibc-2.24.patch"
290 +)
291 +
292 +S="${WORKDIR}/${PN}-${MY_PV}"
293 +
294 +_check_reqs() {
295 + CHECKREQS_MEMORY="512M"
296 + if is-flagq "-g*" && ! is-flagq "-g*0" ; then
297 + CHECKREQS_DISK_BUILD="22G"
298 + else
299 + CHECKREQS_DISK_BUILD="6G"
300 + fi
301 + check-reqs_$1
302 +}
303 +
304 +pkg_pretend() {
305 + use java || \
306 + ewarn "If you plan to use Base application you should enable java or you will get various crashes."
307 +
308 + if has_version "<app-office/libreoffice-5.3.0[firebird]"; then
309 + ewarn "Firebird has been upgraded to version 3. It is unable to read back Firebird 2.5 data, so"
310 + ewarn "embedded firebird odb files created in LibreOffice pre-5.3 can't be opened with this version."
311 + ewarn "See also: https://wiki.documentfoundation.org/ReleaseNotes/5.3#Base"
312 + fi
313 +
314 + [[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_pretend
315 +}
316 +
317 +pkg_setup() {
318 + java-pkg-opt-2_pkg_setup
319 + python-single-r1_pkg_setup
320 + xdg_environment_reset
321 +
322 + [[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_setup
323 +}
324 +
325 +src_unpack() {
326 + default
327 +
328 + if [[ ${MY_PV} = *9999* ]]; then
329 + local base_uri branch mypv
330 + base_uri="https://anongit.freedesktop.org/git"
331 + branch="master"
332 + mypv=${MY_PV/.9999}
333 + [[ ${mypv} != ${MY_PV} ]] && branch="${PN}-${mypv/./-}"
334 + git-r3_fetch "${base_uri}/${PN}/core" "refs/heads/${branch}"
335 + git-r3_checkout "${base_uri}/${PN}/core"
336 +
337 + git-r3_fetch "${base_uri}/${PN}/help" "refs/heads/master"
338 + git-r3_checkout "${base_uri}/${PN}/help" "helpcontent2" # doesn't match on help
339 + fi
340 +}
341 +
342 +src_prepare() {
343 + default
344 +
345 + # sandbox violations on many systems, we don't need it. Bug #646406
346 + sed -i \
347 + -e "/KF5_CONFIG/s/kf5-config/no/" \
348 + configure.ac || die "Failed to disable kf5-config"
349 +
350 + AT_M4DIR="m4" eautoreconf
351 + # hack in the autogen.sh
352 + touch autogen.lastrun
353 +
354 + # system pyuno mess
355 + sed -i \
356 + -e "s:%eprefix%:${EPREFIX}:g" \
357 + -e "s:%libdir%:$(get_libdir):g" \
358 + pyuno/source/module/uno.py \
359 + pyuno/source/officehelper.py || die
360 + # sed in the tests
361 + sed -i \
362 + -e "s#all : build unitcheck#all : build#g" \
363 + solenv/gbuild/Module.mk || die
364 + sed -i \
365 + -e "s#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g" \
366 + -e "s#Makefile.gbuild all slowcheck#Makefile.gbuild all#g" \
367 + Makefile.in || die
368 +
369 + sed -i \
370 + -e "s,/usr/share/bash-completion/completions,$(get_bashcompdir)," \
371 + -e "s,\$INSTALLDIRNAME.sh,${PN}," \
372 + bin/distro-install-desktop-integration || die
373 +
374 + if use branding; then
375 + # hack...
376 + mv -v "${WORKDIR}/branding-intro.png" "icon-themes/colibre/brand/intro.png" || die
377 + fi
378 +
379 + # Don't list pdfimport support in desktop when built with none, bug # 605464
380 + if ! use pdfimport; then
381 + sed -i \
382 + -e ":MimeType: s:application/pdf;::" \
383 + -e ":Keywords: s:pdf;::" \
384 + sysui/desktop/menus/draw.desktop || die
385 + fi
386 +}
387 +
388 +src_configure() {
389 + # Set up Google API keys, see https://www.chromium.org/developers/how-tos/api-keys
390 + # Note: these are for Gentoo use ONLY. For your own distribution, please get
391 + # your own set of keys. Feel free to contact chromium@g.o for more info.
392 + local google_default_client_id="329227923882.apps.googleusercontent.com"
393 + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
394 +
395 + # optimization flags
396 + export GMAKE_OPTIONS="${MAKEOPTS}"
397 + # System python enablement:
398 + export PYTHON_CFLAGS=$(python_get_CFLAGS)
399 + export PYTHON_LIBS=$(python_get_LIBS)
400 +
401 + if use kde; then
402 + export QT_SELECT=5 # bug 639620 needs proper fix though
403 + export QT5DIR="$(qt5_get_bindir)/../"
404 + export MOC5="$(qt5_get_bindir)/moc"
405 + fi
406 +
407 + # system headers/libs/...: enforce using system packages
408 + # --disable-breakpad: requires not-yet-in-tree dev-utils/breakpad
409 + # --enable-cairo: ensure that cairo is always required
410 + # --enable-*-link: link to the library rather than just dlopen on runtime
411 + # --enable-release-build: build the libreoffice as release
412 + # --disable-fetch-external: prevent dowloading during compile phase
413 + # --enable-extension-integration: enable any extension integration support
414 + # --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
415 + # --disable-report-builder: too much java packages pulled in without pkgs
416 + # --without-system-sane: just sane.h header that is used for scan in writer,
417 + # not linked or anything else, worthless to depend on
418 + # --disable-pdfium: not yet packaged
419 + local myeconfargs=(
420 + --with-system-dicts
421 + --with-system-epoxy
422 + --with-system-headers
423 + --with-system-jars
424 + --with-system-libs
425 + --enable-cairo-canvas
426 + --enable-largefile
427 + --enable-mergelibs
428 + --enable-neon
429 + --enable-python=system
430 + --enable-randr
431 + --enable-release-build
432 + --disable-breakpad
433 + --disable-ccache
434 + --disable-dependency-tracking
435 + --disable-epm
436 + --disable-fetch-external
437 + --disable-gstreamer-0-10
438 + --disable-kde5
439 + --disable-online-update
440 + --disable-openssl
441 + --disable-pdfium
442 + --disable-qt5
443 + --disable-report-builder
444 + --with-alloc=system
445 + --with-build-version="Gentoo official package"
446 + --enable-extension-integration
447 + --with-external-dict-dir="${EPREFIX}/usr/share/myspell"
448 + --with-external-hyph-dir="${EPREFIX}/usr/share/myspell"
449 + --with-external-thes-dir="${EPREFIX}/usr/share/myspell"
450 + --with-external-tar="${DISTDIR}"
451 + --with-lang=""
452 + --with-parallelism=$(makeopts_jobs)
453 + --with-system-ucpp
454 + --with-tls=nss
455 + --with-vendor="Gentoo Foundation"
456 + --with-x
457 + --without-fonts
458 + --without-myspell-dicts
459 + --without-help
460 + --with-helppack-integration
461 + --with-system-gpgmepp
462 + --without-system-sane
463 + $(use_enable bluetooth sdremote-bluetooth)
464 + $(use_enable coinmp)
465 + $(use_enable cups)
466 + $(use_enable dbus)
467 + $(use_enable debug)
468 + $(use_enable eds evolution2)
469 + $(use_enable firebird firebird-sdbc)
470 + $(use_enable gstreamer gstreamer-1-0)
471 + $(use_enable gtk gtk3)
472 + $(use_enable gtk2 gtk)
473 + $(use_enable kde gtk3-kde5)
474 + $(use_enable mysql ext-mariadb-connector)
475 + $(use_enable odk)
476 + $(use_enable pdfimport)
477 + $(use_enable postgres postgresql-sdbc)
478 + $(use_enable vlc)
479 + $(use_with accessibility lxml)
480 + $(use_with coinmp system-coinmp)
481 + $(use_with googledrive gdrive-client-id ${google_default_client_id})
482 + $(use_with googledrive gdrive-client-secret ${google_default_client_secret})
483 + $(use_with java)
484 + $(use_with mysql system-mysql-cppconn)
485 + $(use_with odk doxygen)
486 + )
487 +
488 + if use eds || use gtk; then
489 + myeconfargs+=( --enable-dconf --enable-gio )
490 + else
491 + myeconfargs+=( --disable-dconf --disable-gio )
492 + fi
493 +
494 + # libreoffice extensions handling
495 + for lo_xt in ${LO_EXTS}; do
496 + if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
497 + myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt}) )
498 + else
499 + myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt}) )
500 + fi
501 + done
502 +
503 + if use java; then
504 + # hsqldb: system one is too new
505 + myeconfargs+=(
506 + --without-junit
507 + --without-system-hsqldb
508 + --with-ant-home="${ANT_HOME}"
509 + --with-jdk-home=$(java-config --jdk-home 2>/dev/null)
510 + --with-jvm-path="${EPREFIX}/usr/lib/"
511 + )
512 +
513 + use libreoffice_extensions_scripting-beanshell && \
514 + myeconfargs+=( --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar) )
515 +
516 + use libreoffice_extensions_scripting-javascript && \
517 + myeconfargs+=( --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar) )
518 + fi
519 +
520 + is-flagq "-flto*" && myeconfargs+=( --enable-lto )
521 +
522 + econf "${myeconfargs[@]}"
523 +}
524 +
525 +src_compile() {
526 + # more and more LO stuff tries to use OpenGL, including tests during build
527 + # bug 501508, bug 540624, bug 545974 and probably more
528 + addpredict /dev/dri
529 + addpredict /dev/ati
530 + addpredict /dev/nvidiactl
531 +
532 + # hack for offlinehelp, this needs fixing upstream at some point
533 + # it is broken because we send --without-help
534 + # https://bugs.freedesktop.org/show_bug.cgi?id=46506
535 + (
536 + grep "^export" "${S}/config_host.mk" > "${T}/config_host.mk" || die
537 + source "${T}/config_host.mk" 2&> /dev/null
538 +
539 + local path="${WORKDIR}/helpcontent2/source/auxiliary/"
540 + mkdir -p "${path}" || die
541 +
542 + echo "perl \"${S}/helpcontent2/helpers/create_ilst.pl\" -dir=helpcontent2/source/media/helpimg > \"${path}/helpimg.ilst\""
543 + perl "${S}/helpcontent2/helpers/create_ilst.pl" \
544 + -dir=helpcontent2/source/media/helpimg \
545 + > "${path}/helpimg.ilst"
546 + [[ -s "${path}/helpimg.ilst" ]] || \
547 + ewarn "The help images list is empty, something is fishy, report a bug."
548 + )
549 +
550 + local target
551 + use test && target="build" || target="build-nocheck"
552 +
553 + # this is not a proper make script
554 + make ${target} || die
555 +}
556 +
557 +src_test() {
558 + make unitcheck || die
559 + make slowcheck || die
560 +}
561 +
562 +src_install() {
563 + # This is not Makefile so no buildserver
564 + make DESTDIR="${D}" distro-pack-install -o build -o check || die
565 +
566 + # bug 593514
567 + if use gtk; then
568 + dosym libreoffice/program/liblibreofficekitgtk.so \
569 + /usr/$(get_libdir)/liblibreofficekitgtk.so
570 + fi
571 +
572 + # bash completion aliases
573 + bashcomp_alias \
574 + libreoffice \
575 + unopkg loimpress lobase localc lodraw lomath lowriter lofromtemplate loweb loffice
576 +
577 + if use branding; then
578 + insinto /usr/$(get_libdir)/${PN}/program
579 + newins "${WORKDIR}/branding-sofficerc" sofficerc
580 + dodir /etc/env.d
581 + echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"etc/env.d/99${PN} || die
582 + fi
583 +
584 + # Hack for offlinehelp, this needs fixing upstream at some point.
585 + # It is broken because we send --without-help
586 + # https://bugs.freedesktop.org/show_bug.cgi?id=46506
587 + insinto /usr/$(get_libdir)/libreoffice/help
588 + doins xmlhelp/util/*.xsl
589 +
590 + pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/soffice.bin
591 + pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/unopkg.bin
592 +}
593 +
594 +pkg_postinst() {
595 + gnome2_icon_cache_update
596 + xdg_desktop_database_update
597 + xdg_mimeinfo_database_update
598 +}
599 +
600 +pkg_postrm() {
601 + gnome2_icon_cache_update
602 + xdg_desktop_database_update
603 + xdg_mimeinfo_database_update
604 +}