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: Sun, 27 May 2018 21:34:39
Message-Id: 1527456856.8375630a36f2c2dec6f2352e293c7e1a2d762705.asturm@gentoo
1 commit: 8375630a36f2c2dec6f2352e293c7e1a2d762705
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 27 21:17:46 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun May 27 21:34:16 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8375630a
7
8 app-office/libreoffice: Add 6.1 stable branch
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 app-office/libreoffice/libreoffice-6.1.9999.ebuild | 570 +++++++++++++++++++++
13 1 file changed, 570 insertions(+)
14
15 diff --git a/app-office/libreoffice/libreoffice-6.1.9999.ebuild b/app-office/libreoffice/libreoffice-6.1.9999.ebuild
16 new file mode 100644
17 index 00000000000..cc4c2bc8ce1
18 --- /dev/null
19 +++ b/app-office/libreoffice/libreoffice-6.1.9999.ebuild
20 @@ -0,0 +1,570 @@
21 +# Copyright 1999-2018 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 +MY_PV="${PV/_alpha/.alpha}"
30 +MY_PV="${MY_PV/_beta/.beta}"
31 +# experimental ; release ; old
32 +# Usually the tarballs are moved a lot so this should make everyone happy.
33 +DEV_URI="
34 + https://dev-builds.libreoffice.org/pre-releases/src
35 + https://download.documentfoundation.org/libreoffice/src/${MY_PV:0:5}/
36 + https://downloadarchive.documentfoundation.org/libreoffice/old/${MY_PV}/src
37 +"
38 +ADDONS_URI="https://dev-www.libreoffice.org/src/"
39 +
40 +BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
41 +# PATCHSET="${P}-patchset-01.tar.xz"
42 +
43 +[[ ${MY_PV} == *9999* ]] && SCM_ECLASS="git-r3"
44 +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}
45 +unset SCM_ECLASS
46 +
47 +DESCRIPTION="A full office productivity suite"
48 +HOMEPAGE="https://www.libreoffice.org"
49 +SRC_URI="branding? ( https://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
50 +[[ -n ${PATCHSET} ]] && SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}"
51 +
52 +# Split modules following git/tarballs; Core MUST be first!
53 +# Help is used for the image generator
54 +# Only release has the tarballs
55 +if [[ ${MY_PV} != *9999* ]]; then
56 + for i in ${DEV_URI}; do
57 + SRC_URI+=" ${i}/${PN}-${MY_PV}.tar.xz"
58 + SRC_URI+=" ${i}/${PN}-help-${MY_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 googledrive
87 +gstreamer +gtk gtk2 kde libressl mysql odk pdfimport postgres test vlc
88 +$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
89 +
90 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
91 + bluetooth? ( dbus )
92 + kde? ( gtk )
93 + libreoffice_extensions_nlpsolver? ( java )
94 + libreoffice_extensions_scripting-beanshell? ( java )
95 + libreoffice_extensions_scripting-javascript? ( java )
96 + libreoffice_extensions_wiki-publisher? ( java )
97 +"
98 +
99 +LICENSE="|| ( LGPL-3 MPL-1.1 )"
100 +SLOT="0"
101 +[[ ${MY_PV} == *9999* ]] || \
102 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
103 +
104 +COMMON_DEPEND="${PYTHON_DEPS}
105 + app-arch/unzip
106 + app-arch/zip
107 + app-crypt/gpgme[cxx]
108 + app-text/hunspell:=
109 + >=app-text/libabw-0.1.0
110 + >=app-text/libebook-0.1
111 + app-text/libepubgen
112 + >=app-text/libetonyek-0.1
113 + app-text/libexttextcat
114 + app-text/liblangtag
115 + >=app-text/libmspub-0.1.0
116 + >=app-text/libmwaw-0.3.1
117 + app-text/libnumbertext
118 + >=app-text/libodfgen-0.1.0
119 + app-text/libqxp
120 + app-text/libstaroffice
121 + app-text/libwpd:0.10[tools]
122 + app-text/libwpg:0.3
123 + >=app-text/libwps-0.4
124 + app-text/mythes
125 + >=dev-cpp/clucene-2.3.3.4-r2
126 + =dev-cpp/libcmis-0.5*
127 + dev-db/unixODBC
128 + dev-lang/perl
129 + dev-libs/boost:=[nls]
130 + dev-libs/expat
131 + dev-libs/hyphen
132 + dev-libs/icu:=
133 + dev-libs/libassuan
134 + dev-libs/libgpg-error
135 + >=dev-libs/liborcus-0.13.3
136 + dev-libs/librevenge
137 + dev-libs/nspr
138 + dev-libs/nss
139 + !libressl? ( >=dev-libs/openssl-1.0.0d:0 )
140 + libressl? ( dev-libs/libressl )
141 + >=dev-libs/redland-1.0.16
142 + >=dev-libs/xmlsec-1.2.24[nss]
143 + media-gfx/graphite2
144 + media-libs/fontconfig
145 + media-libs/freetype:2
146 + >=media-libs/harfbuzz-0.9.42:=[graphite,icu]
147 + media-libs/lcms:2
148 + >=media-libs/libcdr-0.1.0
149 + >=media-libs/libepoxy-1.3.1[X]
150 + >=media-libs/libfreehand-0.1.0
151 + media-libs/libpagemaker
152 + >=media-libs/libpng-1.4:0=
153 + >=media-libs/libvisio-0.1.0
154 + media-libs/libzmf
155 + net-libs/neon
156 + net-misc/curl
157 + net-nds/openldap
158 + sci-mathematics/lpsolve
159 + virtual/glu
160 + virtual/jpeg:0
161 + virtual/opengl
162 + x11-libs/cairo[X]
163 + x11-libs/libXinerama
164 + x11-libs/libXrandr
165 + x11-libs/libXrender
166 + bluetooth? ( net-wireless/bluez )
167 + coinmp? ( sci-libs/coinor-mp )
168 + cups? ( net-print/cups )
169 + dbus? ( dev-libs/dbus-glib )
170 + eds? (
171 + dev-libs/glib:2
172 + gnome-base/dconf
173 + gnome-extra/evolution-data-server
174 + )
175 + firebird? ( >=dev-db/firebird-3.0.2.32703.0-r1[server] )
176 + gstreamer? (
177 + media-libs/gstreamer:1.0
178 + media-libs/gst-plugins-base:1.0
179 + )
180 + gtk? (
181 + dev-libs/glib:2
182 + dev-libs/gobject-introspection
183 + gnome-base/dconf
184 + media-libs/mesa[egl]
185 + x11-libs/gtk+:3
186 + )
187 + gtk2? (
188 + x11-libs/gdk-pixbuf
189 + >=x11-libs/gtk+-2.24:2
190 + )
191 + kde? (
192 + dev-qt/qtcore:5
193 + dev-qt/qtgui:5
194 + dev-qt/qtx11extras:5
195 + dev-qt/qtwidgets:5
196 + kde-frameworks/kconfig:5
197 + kde-frameworks/kcoreaddons:5
198 + kde-frameworks/ki18n:5
199 + kde-frameworks/kio:5
200 + kde-frameworks/kwindowsystem:5
201 + )
202 + libreoffice_extensions_scripting-beanshell? ( dev-java/bsh )
203 + libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
204 + mysql? ( dev-db/mysql-connector-c++ )
205 + pdfimport? ( app-text/poppler:=[cxx] )
206 + postgres? ( >=dev-db/postgresql-9.0:*[kerberos] )
207 +"
208 +
209 +RDEPEND="${COMMON_DEPEND}
210 + !app-office/libreoffice-bin
211 + !app-office/libreoffice-bin-debug
212 + !app-office/openoffice
213 + media-fonts/dejavu
214 + media-fonts/liberation-fonts
215 + media-fonts/libertine
216 + || ( x11-misc/xdg-utils kde-plasma/kde-cli-tools )
217 + java? ( >=virtual/jre-1.6 )
218 + kde? ( kde-frameworks/breeze-icons:* )
219 + vlc? ( media-video/vlc )
220 +"
221 +
222 +if [[ ${MY_PV} != *9999* ]] && [[ ${PV} != *_* ]]; then
223 + PDEPEND="=app-office/libreoffice-l10n-$(ver_cut 1-2)*"
224 +else
225 + # Translations are not reliable on live ebuilds
226 + # rather force people to use english only.
227 + PDEPEND="!app-office/libreoffice-l10n"
228 +fi
229 +
230 +# FIXME: cppunit should be moved to test conditional
231 +# after everything upstream is under gbuild
232 +# as dmake execute tests right away
233 +DEPEND="${COMMON_DEPEND}
234 + !<sys-devel/make-3.82
235 + >=dev-libs/libatomic_ops-7.2d
236 + >=dev-libs/libxml2-2.7.8
237 + dev-libs/libxslt
238 + dev-perl/Archive-Zip
239 + >=dev-util/cppunit-1.14.0
240 + >=dev-util/gperf-3
241 + dev-util/intltool
242 + >=dev-util/mdds-1.2.3:1=
243 + media-libs/glm
244 + sys-devel/bison
245 + sys-devel/flex
246 + sys-devel/gettext
247 + sys-devel/ucpp
248 + sys-libs/zlib
249 + virtual/pkgconfig
250 + x11-base/xorg-proto
251 + x11-libs/libXt
252 + x11-libs/libXtst
253 + java? (
254 + dev-java/ant-core
255 + >=virtual/jdk-1.6
256 + )
257 + odk? ( >=app-doc/doxygen-1.8.4 )
258 + test? (
259 + app-crypt/gnupg
260 + dev-util/cppunit
261 + media-fonts/dejavu
262 + )
263 +"
264 +
265 +PATCHES=(
266 + # "${WORKDIR}"/${PATCHSET/.tar.xz/}
267 +
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 +S="${WORKDIR}/${PN}-${MY_PV}"
277 +
278 +_check_reqs() {
279 + CHECKREQS_MEMORY="512M"
280 + if is-flagq "-g*" && ! is-flagq "-g*0" ; then
281 + CHECKREQS_DISK_BUILD="22G"
282 + else
283 + CHECKREQS_DISK_BUILD="6G"
284 + fi
285 +}
286 +
287 +pkg_pretend() {
288 + use java || \
289 + ewarn "If you plan to use Base application you should enable java or you will get various crashes."
290 +
291 + if has_version "<app-office/libreoffice-5.3.0[firebird]"; then
292 + ewarn "Firebird has been upgraded to version 3. It is unable to read back Firebird 2.5 data, so"
293 + ewarn "embedded firebird odb files created in LibreOffice pre-5.3 can't be opened with this version."
294 + ewarn "See also: https://wiki.documentfoundation.org/ReleaseNotes/5.3#Base"
295 + fi
296 +
297 + if [[ ${MERGE_TYPE} != binary ]]; then
298 + _check_reqs
299 + check-reqs_pkg_pretend
300 + fi
301 +}
302 +
303 +pkg_setup() {
304 + java-pkg-opt-2_pkg_setup
305 + python-single-r1_pkg_setup
306 + xdg_environment_reset
307 +
308 + if [[ ${MERGE_TYPE} != binary ]]; then
309 + _check_reqs
310 + check-reqs_pkg_setup
311 + fi
312 +}
313 +
314 +src_unpack() {
315 + default
316 +
317 + if [[ ${MY_PV} = *9999* ]]; then
318 + local base_uri branch mypv
319 + base_uri="https://anongit.freedesktop.org/git"
320 + branch="master"
321 + mypv=${MY_PV/.9999}
322 + [[ ${mypv} != ${MY_PV} ]] && branch="${PN}-${mypv/./-}"
323 + git-r3_fetch "${base_uri}/${PN}/core" "refs/heads/${branch}"
324 + git-r3_checkout "${base_uri}/${PN}/core"
325 +
326 + git-r3_fetch "${base_uri}/${PN}/help" "refs/heads/master"
327 + git-r3_checkout "${base_uri}/${PN}/help" "helpcontent2" # doesn't match on help
328 + fi
329 +}
330 +
331 +src_prepare() {
332 + default
333 +
334 + # sandbox violations on many systems, we don't need it. Bug #646406
335 + sed -i \
336 + -e "/KF5_CONFIG/s/kf5-config/no/" \
337 + configure.ac || die "Failed to disable kf5-config"
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" "icon-themes/colibre/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 + # Set up Google API keys, see https://www.chromium.org/developers/how-tos/api-keys
379 + # Note: these are for Gentoo use ONLY. For your own distribution, please get
380 + # your own set of keys. Feel free to contact chromium@g.o for more info.
381 + local google_default_client_id="329227923882.apps.googleusercontent.com"
382 + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
383 +
384 + # optimization flags
385 + export GMAKE_OPTIONS="${MAKEOPTS}"
386 + # System python enablement:
387 + export PYTHON_CFLAGS=$(python_get_CFLAGS)
388 + export PYTHON_LIBS=$(python_get_LIBS)
389 +
390 + if use kde; then
391 + export QT_SELECT=5 # bug 639620 needs proper fix though
392 + export QT5DIR="$(qt5_get_bindir)/../"
393 + export MOC5="$(qt5_get_bindir)/moc"
394 + fi
395 +
396 + # system headers/libs/...: enforce using system packages
397 + # --disable-breakpad: requires not-yet-in-tree dev-utils/breakpad
398 + # --enable-cairo: ensure that cairo is always required
399 + # --enable-*-link: link to the library rather than just dlopen on runtime
400 + # --enable-release-build: build the libreoffice as release
401 + # --disable-fetch-external: prevent dowloading during compile phase
402 + # --enable-extension-integration: enable any extension integration support
403 + # --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
404 + # --disable-report-builder: too much java packages pulled in without pkgs
405 + # --without-system-sane: just sane.h header that is used for scan in writer,
406 + # not linked or anything else, worthless to depend on
407 + # --disable-pdfium: not yet packaged
408 + local myeconfargs=(
409 + --with-system-dicts
410 + --with-system-epoxy
411 + --with-system-headers
412 + --with-system-jars
413 + --with-system-libs
414 + --enable-cairo-canvas
415 + --enable-largefile
416 + --enable-mergelibs
417 + --enable-neon
418 + --enable-python=system
419 + --enable-randr
420 + --enable-release-build
421 + --disable-breakpad
422 + --disable-ccache
423 + --disable-dependency-tracking
424 + --disable-epm
425 + --disable-fetch-external
426 + --disable-gstreamer-0-10
427 + --disable-online-update
428 + --disable-pdfium
429 + --disable-report-builder
430 + --with-alloc=system
431 + --with-build-version="Gentoo official package"
432 + --enable-extension-integration
433 + --with-external-dict-dir="${EPREFIX}/usr/share/myspell"
434 + --with-external-hyph-dir="${EPREFIX}/usr/share/myspell"
435 + --with-external-thes-dir="${EPREFIX}/usr/share/myspell"
436 + --with-external-tar="${DISTDIR}"
437 + --with-lang=""
438 + --with-parallelism=$(makeopts_jobs)
439 + --with-system-ucpp
440 + --with-vendor="Gentoo Foundation"
441 + --with-x
442 + --without-fonts
443 + --without-myspell-dicts
444 + --without-help
445 + --with-helppack-integration
446 + --with-system-gpgmepp
447 + --without-system-sane
448 + $(use_enable bluetooth sdremote-bluetooth)
449 + $(use_enable coinmp)
450 + $(use_enable cups)
451 + $(use_enable dbus)
452 + $(use_enable debug)
453 + $(use_enable eds evolution2)
454 + $(use_enable firebird firebird-sdbc)
455 + $(use_enable gstreamer gstreamer-1-0)
456 + $(use_enable gtk gtk3)
457 + $(use_enable gtk2 gtk)
458 + $(use_enable kde gtk3-kde5)
459 + $(use_enable kde kde5)
460 + $(use_enable kde qt5)
461 + $(use_enable mysql ext-mariadb-connector)
462 + $(use_enable odk)
463 + $(use_enable pdfimport)
464 + $(use_enable postgres postgresql-sdbc)
465 + $(use_enable vlc)
466 + $(use_with coinmp system-coinmp)
467 + $(use_with googledrive gdrive-client-id ${google_default_client_id})
468 + $(use_with googledrive gdrive-client-secret ${google_default_client_secret})
469 + $(use_with java)
470 + $(use_with mysql system-mysql-cppconn)
471 + $(use_with odk doxygen)
472 + )
473 +
474 + if use eds || use gtk; then
475 + myeconfargs+=( --enable-dconf --enable-gio )
476 + else
477 + myeconfargs+=( --disable-dconf --disable-gio )
478 + fi
479 +
480 + # libreoffice extensions handling
481 + for lo_xt in ${LO_EXTS}; do
482 + if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
483 + myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt}) )
484 + else
485 + myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt}) )
486 + fi
487 + done
488 +
489 + if use java; then
490 + # hsqldb: system one is too new
491 + myeconfargs+=(
492 + --without-junit
493 + --without-system-hsqldb
494 + --with-ant-home="${ANT_HOME}"
495 + --with-jdk-home=$(java-config --jdk-home 2>/dev/null)
496 + --with-jvm-path="${EPREFIX}/usr/lib/"
497 + )
498 +
499 + use libreoffice_extensions_scripting-beanshell && \
500 + myeconfargs+=( --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar) )
501 +
502 + use libreoffice_extensions_scripting-javascript && \
503 + myeconfargs+=( --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar) )
504 + fi
505 +
506 + is-flagq "-flto*" && myeconfargs+=( --enable-lto )
507 +
508 + econf "${myeconfargs[@]}"
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 gtk; 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_postinst() {
581 + gnome2_icon_cache_update
582 + xdg_desktop_database_update
583 + xdg_mimeinfo_database_update
584 +}
585 +
586 +pkg_postrm() {
587 + gnome2_icon_cache_update
588 + xdg_desktop_database_update
589 + xdg_mimeinfo_database_update
590 +}