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