Gentoo Archives: gentoo-commits

From: "Tomas Chvatal (scarabeus)" <scarabeus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-office/libreoffice: libreoffice-4.2.6.2.ebuild ChangeLog
Date: Sat, 23 Aug 2014 09:56:21
Message-Id: 20140823095617.AB62C3C28@oystercatcher.gentoo.org
1 scarabeus 14/08/23 09:56:17
2
3 Modified: ChangeLog
4 Added: libreoffice-4.2.6.2.ebuild
5 Log:
6 Version bump to 4.2.6 fixes bug#520282.
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 8EEE3BE8)
9
10 Revision Changes Path
11 1.567 app-office/libreoffice/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/ChangeLog?rev=1.567&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/ChangeLog?rev=1.567&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/ChangeLog?r1=1.566&r2=1.567
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v
20 retrieving revision 1.566
21 retrieving revision 1.567
22 diff -u -r1.566 -r1.567
23 --- ChangeLog 21 Aug 2014 12:13:49 -0000 1.566
24 +++ ChangeLog 23 Aug 2014 09:56:17 -0000 1.567
25 @@ -1,6 +1,11 @@
26 # ChangeLog for app-office/libreoffice
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v 1.566 2014/08/21 12:13:49 scarabeus Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v 1.567 2014/08/23 09:56:17 scarabeus Exp $
30 +
31 +*libreoffice-4.2.6.2 (23 Aug 2014)
32 +
33 + 23 Aug 2014; Tomáš Chvátal <scarabeus@g.o> +libreoffice-4.2.6.2.ebuild:
34 + Version bump to 4.2.6 fixes bug#520282.
35
36 21 Aug 2014; Tomáš Chvátal <scarabeus@g.o>
37 -files/libreoffice-4.2.5.2-jpeg-9a.patch, libreoffice-4.2.5.2.ebuild:
38
39
40
41 1.1 app-office/libreoffice/libreoffice-4.2.6.2.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-4.2.6.2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-4.2.6.2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: libreoffice-4.2.6.2.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-4.2.6.2.ebuild,v 1.1 2014/08/23 09:56:17 scarabeus Exp $
51
52 EAPI=5
53
54 KDE_REQUIRED="optional"
55 QT_MINIMAL="4.7.4"
56 KDE_SCM="git"
57 CMAKE_REQUIRED="never"
58
59 PYTHON_COMPAT=( python2_7 python3_3 python3_4 )
60 PYTHON_REQ_USE="threads,xml"
61
62 # experimental ; release ; old
63 # Usually the tarballs are moved a lot so this should make
64 # everyone happy.
65 DEV_URI="
66 http://dev-builds.libreoffice.org/pre-releases/src
67 http://download.documentfoundation.org/libreoffice/src/${PV:0:5}/
68 http://download.documentfoundation.org/libreoffice/old/${PV}/
69 "
70 EXT_URI="http://ooo.itc.hu/oxygenoffice/download/libreoffice"
71 ADDONS_URI="http://dev-www.libreoffice.org/src/"
72
73 BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
74 # PATCHSET="${P}-patchset-01.tar.xz"
75
76 [[ ${PV} == *9999* ]] && SCM_ECLASS="git-2"
77 inherit base autotools bash-completion-r1 check-reqs eutils java-pkg-opt-2 kde4-base pax-utils python-single-r1 multilib toolchain-funcs flag-o-matic nsplugins ${SCM_ECLASS}
78 unset SCM_ECLASS
79
80 DESCRIPTION="LibreOffice, a full office productivity suite"
81 HOMEPAGE="http://www.libreoffice.org"
82 SRC_URI="branding? ( http://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
83 [[ -n ${PATCHSET} ]] && SRC_URI+=" http://dev.gentooexperimental.org/~scarabeus/${PATCHSET}"
84
85 # Split modules following git/tarballs
86 # Core MUST be first!
87 # Help is used for the image generator
88 MODULES="core help"
89 # Only release has the tarballs
90 if [[ ${PV} != *9999* ]]; then
91 for i in ${DEV_URI}; do
92 for mod in ${MODULES}; do
93 if [[ ${mod} == core ]]; then
94 SRC_URI+=" ${i}/${P}.tar.xz"
95 else
96 SRC_URI+=" ${i}/${PN}-${mod}-${PV}.tar.xz"
97 fi
98 done
99 unset mod
100 done
101 unset i
102 fi
103 unset DEV_URI
104
105 # Really required addons
106 # These are bundles that can't be removed for now due to huge patchsets.
107 # If you want them gone, patches are welcome.
108 ADDONS_SRC+=" ${ADDONS_URI}/d62650a6f908e85643e557a236ea989c-vigra1.6.0.tar.gz"
109 ADDONS_SRC+=" ${ADDONS_URI}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz" # modifies source code
110 ADDONS_SRC+=" java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
111 ADDONS_SRC+=" libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )" # no release for 8 years, should we package it?
112 ADDONS_SRC+=" libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )" # Does not build with 1.6 rhino at all
113 ADDONS_SRC+=" libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )" # requirement of rhino
114 ADDONS_SRC+=" odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )" # not packageable
115 SRC_URI+=" ${ADDONS_SRC}"
116
117 unset ADDONS_URI
118 unset EXT_URI
119 unset ADDONS_SRC
120
121 IUSE="bluetooth +branding +cups dbus debug eds firebird gnome gstreamer +gtk
122 gtk3 jemalloc kde mysql odk opengl postgres telepathy test +vba vlc +webdav"
123
124 LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
125 # Unpackaged separate extensions:
126 # diagram: lo has 0.9.5 upstream is weirdly patched 0.9.4 -> wtf?
127 # hunart: only on ooo extensions -> fubared download path somewhere on sf
128 # numbertext, typo, validator, watch-window: ^^
129 # oooblogger: no homepage or anything
130 # Extensions that need extra work:
131 for lo_xt in ${LO_EXTS}; do
132 IUSE+=" libreoffice_extensions_${lo_xt}"
133 done
134 unset lo_xt
135
136 LICENSE="|| ( LGPL-3 MPL-1.1 )"
137 SLOT="0"
138 [[ ${PV} == *9999* ]] || \
139 KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
140
141 COMMON_DEPEND="
142 ${PYTHON_DEPS}
143 app-arch/zip
144 app-arch/unzip
145 >=app-text/hunspell-1.3.2-r3
146 app-text/mythes
147 app-text/libabw
148 >=app-text/libexttextcat-3.2
149 app-text/libebook
150 app-text/libetonyek
151 app-text/liblangtag
152 app-text/libmspub
153 >=app-text/libmwaw-0.2
154 >=app-text/libodfgen-0.0.3
155 app-text/libwpd:0.9[tools]
156 app-text/libwpg:0.2
157 >=app-text/libwps-0.2.2
158 >=app-text/poppler-0.16:=[xpdf-headers(+),cxx]
159 >=dev-cpp/clucene-2.3.3.4-r2
160 dev-cpp/libcmis:0.4
161 dev-db/unixODBC
162 >=dev-libs/boost-1.46:=
163 dev-libs/expat
164 >=dev-libs/hyphen-2.7.1
165 >=dev-libs/icu-4.8.1.1:=
166 >=dev-libs/libatomic_ops-7.2d
167 =dev-libs/liborcus-0.5*:=
168 >=dev-libs/nspr-4.8.8
169 >=dev-libs/nss-3.12.9
170 >=dev-lang/perl-5.0
171 >=dev-libs/openssl-1.0.0d:0
172 >=dev-libs/redland-1.0.16
173 media-gfx/graphite2
174 >=media-libs/fontconfig-2.8.0
175 media-libs/freetype:2
176 >=media-libs/harfbuzz-0.9.18:=[icu(+)]
177 media-libs/lcms:2
178 >=media-libs/libpng-1.4
179 >=media-libs/libcdr-0.0.5
180 media-libs/libfreehand
181 media-libs/libvisio
182 >=net-misc/curl-7.21.4
183 net-nds/openldap
184 sci-mathematics/lpsolve
185 virtual/jpeg:0
186 >=x11-libs/cairo-1.10.0[X]
187 x11-libs/libXinerama
188 x11-libs/libXrandr
189 x11-libs/libXrender
190 bluetooth? ( net-wireless/bluez )
191 cups? ( net-print/cups )
192 dbus? ( >=dev-libs/dbus-glib-0.92 )
193 eds? ( gnome-extra/evolution-data-server )
194 firebird? ( >=dev-db/firebird-2.5 )
195 gnome? ( gnome-base/gconf:2 )
196 gtk? (
197 x11-libs/gdk-pixbuf[X]
198 >=x11-libs/gtk+-2.24:2
199 )
200 gtk3? ( >=x11-libs/gtk+-3.2:3 )
201 gstreamer? (
202 media-libs/gstreamer:1.0
203 media-libs/gst-plugins-base:1.0
204 )
205 jemalloc? ( dev-libs/jemalloc )
206 libreoffice_extensions_scripting-beanshell? ( >=dev-java/bsh-2.0_beta4 )
207 libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
208 libreoffice_extensions_wiki-publisher? (
209 dev-java/commons-codec:0
210 dev-java/commons-httpclient:3
211 dev-java/commons-lang:2.1
212 dev-java/commons-logging:0
213 dev-java/tomcat-servlet-api:3.0
214 )
215 mysql? ( >=dev-db/mysql-connector-c++-1.1.0 )
216 opengl? (
217 virtual/glu
218 virtual/opengl
219 )
220 postgres? ( >=dev-db/postgresql-base-9.0[kerberos] )
221 telepathy? (
222 dev-libs/glib:2
223 >=net-libs/telepathy-glib-0.18.0
224 >=x11-libs/gtk+-2.24:2
225 )
226 webdav? ( net-libs/neon )
227 "
228
229 RDEPEND="${COMMON_DEPEND}
230 !app-office/libreoffice-bin
231 !app-office/libreoffice-bin-debug
232 !<app-office/openoffice-bin-3.4.0-r1
233 !app-office/openoffice
234 media-fonts/libertine-ttf
235 media-fonts/liberation-fonts
236 media-fonts/urw-fonts
237 java? ( >=virtual/jre-1.6 )
238 vlc? ( media-video/vlc )
239 "
240
241 if [[ ${PV} != *9999* ]]; then
242 PDEPEND="~app-office/libreoffice-l10n-${PV}"
243 else
244 # Translations are not reliable on live ebuilds
245 # rather force people to use english only.
246 PDEPEND="!app-office/libreoffice-l10n"
247 fi
248
249 # FIXME: cppunit should be moved to test conditional
250 # after everything upstream is under gbuild
251 # as dmake execute tests right away
252 DEPEND="${COMMON_DEPEND}
253 >=dev-libs/libxml2-2.7.8
254 dev-libs/libxslt
255 dev-perl/Archive-Zip
256 dev-util/cppunit
257 >=dev-util/gperf-3
258 dev-util/intltool
259 >=dev-util/mdds-0.10.3:=
260 virtual/pkgconfig
261 net-misc/npapi-sdk
262 >=sys-apps/findutils-4.4.2
263 sys-devel/bison
264 sys-apps/coreutils
265 sys-devel/flex
266 sys-devel/gettext
267 >=sys-devel/make-3.82
268 sys-devel/ucpp
269 sys-libs/zlib
270 x11-libs/libXt
271 x11-libs/libXtst
272 x11-proto/randrproto
273 x11-proto/xextproto
274 x11-proto/xineramaproto
275 x11-proto/xproto
276 java? (
277 >=virtual/jdk-1.6
278 >=dev-java/ant-core-1.7
279 )
280 odk? ( >=app-doc/doxygen-1.8.4 )
281 test? ( dev-util/cppunit )
282 "
283
284 PATCHES=(
285 # not upstreamable stuff
286 "${FILESDIR}/${PN}-3.7-system-pyuno.patch"
287
288 # staged for git master
289 "${FILESDIR}/${PN}-4.2.0.4-curl-config.patch"
290 )
291
292 REQUIRED_USE="
293 ${PYTHON_REQUIRED_USE}
294 bluetooth? ( dbus )
295 gnome? ( gtk )
296 eds? ( gnome )
297 telepathy? ( gtk )
298 libreoffice_extensions_nlpsolver? ( java )
299 libreoffice_extensions_scripting-beanshell? ( java )
300 libreoffice_extensions_scripting-javascript? ( java )
301 libreoffice_extensions_wiki-publisher? ( java )
302 "
303
304 CHECKREQS_MEMORY="512M"
305 CHECKREQS_DISK_BUILD="6G"
306
307 pkg_pretend() {
308 local pgslot
309
310 if [[ ${MERGE_TYPE} != binary ]]; then
311 check-reqs_pkg_pretend
312
313 if [[ $(gcc-major-version) -lt 4 ]] || \
314 ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) \
315 ; then
316 eerror "Compilation with gcc older than 4.6 is not supported"
317 die "Too old gcc found."
318 fi
319 fi
320
321 # Ensure pg version but we have to be sure the pg is installed (first
322 # install on clean system)
323 if use postgres && has_version dev-db/postgresql-base; then
324 pgslot=$(postgresql-config show)
325 if [[ ${pgslot//.} < 90 ]] ; then
326 eerror "PostgreSQL slot must be set to 9.0 or higher."
327 eerror " postgresql-config set 9.0"
328 die "PostgreSQL slot is not set to 9.0 or higher."
329 fi
330 fi
331 }
332
333 pkg_setup() {
334 java-pkg-opt-2_pkg_setup
335 kde4-base_pkg_setup
336 python-single-r1_pkg_setup
337
338 [[ ${MERGE_TYPE} != binary ]] && check-reqs_pkg_setup
339 }
340
341 src_unpack() {
342 local mod mod2 dest tmplfile tmplname mypv
343
344 [[ -n ${PATCHSET} ]] && unpack ${PATCHSET}
345 use branding && unpack "${BRANDING}"
346
347 if [[ ${PV} != *9999* ]]; then
348 unpack "${P}.tar.xz"
349 for mod in ${MODULES}; do
350 [[ ${mod} == core ]] && continue
351 unpack "${PN}-${mod}-${PV}.tar.xz"
352 done
353 else
354 for mod in ${MODULES}; do
355 mypv=${PV/.9999}
356 [[ ${mypv} != ${PV} ]] && EGIT_BRANCH="${PN}-${mypv/./-}"
357 EGIT_PROJECT="${PN}/${mod}"
358 EGIT_SOURCEDIR="${WORKDIR}/${P}"
359 [[ ${mod} != core ]] && EGIT_SOURCEDIR="${WORKDIR}/${PN}-${mod}-${PV}"
360 EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${mod}"
361 EGIT_NOUNPACK="true"
362 git-2_src_unpack
363 if [[ ${mod} != core ]]; then
364 mod2=${mod}
365 # mapping does not match on help
366 [[ ${mod} == help ]] && mod2="helpcontent2"
367 mkdir -p "${S}/${mod2}/" || die
368 mv -n "${WORKDIR}/${PN}-${mod}-${PV}"/* "${S}/${mod2}" || die
369 rm -rf "${WORKDIR}/${PN}-${mod}-${PV}"
370 fi
371 done
372 unset EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
373 fi
374 }
375
376 src_prepare() {
377 # optimization flags
378 export GMAKE_OPTIONS="${MAKEOPTS}"
379 # System python 2.7 enablement:
380 export PYTHON_CFLAGS=$(python_get_CFLAGS)
381 export PYTHON_LIBS=$(python_get_LIBS)
382
383 # patchset
384 if [[ -n ${PATCHSET} ]]; then
385 EPATCH_FORCE="yes" \
386 EPATCH_SOURCE="${WORKDIR}/${PATCHSET/.tar.xz/}" \
387 EPATCH_SUFFIX="patch" \
388 epatch
389 fi
390
391 base_src_prepare
392
393 AT_M4DIR="m4" eautoreconf
394 # hack in the autogen.sh
395 touch autogen.lastrun
396
397 # system pyuno mess
398 sed \
399 -e "s:%eprefix%:${EPREFIX}:g" \
400 -e "s:%libdir%:$(get_libdir):g" \
401 -i pyuno/source/module/uno.py \
402 -i scripting/source/pyprov/officehelper.py || die
403 # sed in the tests
404 sed -i \
405 -e 's#all : build unitcheck#all : build#g' \
406 solenv/gbuild/Module.mk || die
407 sed -i \
408 -e 's#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g' \
409 -e 's#Makefile.gbuild all slowcheck#Makefile.gbuild all#g' \
410 Makefile.in || die
411
412 if use branding; then
413 # hack...
414 mv -v "${WORKDIR}/branding-intro.png" "${S}/icon-themes/galaxy/brand/intro.png" || die
415 fi
416 }
417
418 src_configure() {
419 local java_opts
420 local internal_libs
421 local lo_ext
422 local ext_opts
423 local jbs=$(sed -ne 's/.*\(-j[[:space:]]*\|--jobs=\)\([[:digit:]]\+\).*/\2/;T;p' <<< "${MAKEOPTS}")
424
425 # recheck that there is some value in jobs
426 [[ -z ${jbs} ]] && jbs="1"
427
428 # sane: just sane.h header that is used for scan in writer, not
429 # linked or anything else, worthless to depend on
430 # vigra: just uses templates from there
431 # it is serious pain in the ass for packaging
432 # should be replaced by boost::gil if someone interested
433 internal_libs+="
434 --without-system-sane
435 --without-system-vigra
436 "
437
438 # libreoffice extensions handling
439 for lo_xt in ${LO_EXTS}; do
440 if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
441 ext_opts+=" $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt})"
442 else
443 ext_opts+=" $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt})"
444 fi
445 done
446
447 if use java; then
448 # hsqldb: system one is too new
449 java_opts="
450 --without-junit
451 --without-system-hsqldb
452 --with-ant-home="${ANT_HOME}"
453 --with-jdk-home=$(java-config --jdk-home 2>/dev/null)
454 --with-jvm-path="${EPREFIX}/usr/lib/"
455 "
456
457 use libreoffice_extensions_scripting-beanshell && \
458 java_opts+=" --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)"
459
460 use libreoffice_extensions_scripting-javascript && \
461 java_opts+=" --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar)"
462
463 if use libreoffice_extensions_wiki-publisher; then
464 java_opts+="
465 --with-commons-codec-jar=$(java-pkg_getjar commons-codec commons-codec.jar)
466 --with-commons-httpclient-jar=$(java-pkg_getjar commons-httpclient-3 commons-httpclient.jar)
467 --with-commons-lang-jar=$(java-pkg_getjar commons-lang-2.1 commons-lang.jar)
468 --with-commons-logging-jar=$(java-pkg_getjar commons-logging commons-logging.jar)
469 --with-servlet-api-jar=$(java-pkg_getjar tomcat-servlet-api-3.0 servlet-api.jar)
470 "
471 fi
472 fi
473
474 # system headers/libs/...: enforce using system packages
475 # --enable-cairo: ensure that cairo is always required
476 # --enable-graphite: disabling causes build breakages
477 # --enable-*-link: link to the library rather than just dlopen on runtime
478 # --enable-release-build: build the libreoffice as release
479 # --disable-fetch-external: prevent dowloading during compile phase
480 # --disable-gnome-vfs: old gnome virtual fs support
481 # --disable-kdeab: kde3 adressbook
482 # --disable-kde: kde3 support
483 # --disable-systray: quickstarter does not actually work at all so do not
484 # promote it
485 # --enable-extension-integration: enable any extension integration support
486 # --without-{afms,fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
487 # --disable-report-builder: too much java packages pulled in without pkgs
488 econf \
489 --docdir="${EPREFIX}/usr/share/doc/${PF}/" \
490 --with-system-headers \
491 --with-system-libs \
492 --with-system-jars \
493 --with-system-dicts \
494 --enable-cairo-canvas \
495 --enable-graphite \
496 --enable-largefile \
497 --enable-mergelibs \
498 --enable-python=system \
499 --enable-randr \
500 --enable-randr-link \
501 --enable-release-build \
502 --disable-hardlink-deliver \
503 --disable-ccache \
504 --disable-crashdump \
505 --disable-dependency-tracking \
506 --disable-epm \
507 --disable-fetch-external \
508 --disable-gnome-vfs \
509 --disable-gstreamer-0-10 \
510 --disable-report-builder \
511 --disable-kdeab \
512 --disable-kde \
513 --disable-online-update \
514 --disable-systray \
515 --with-alloc=$(use jemalloc && echo "jemalloc" || echo "system") \
516 --with-build-version="Gentoo official package" \
517 --enable-extension-integration \
518 --with-external-dict-dir="${EPREFIX}/usr/share/myspell" \
519 --with-external-hyph-dir="${EPREFIX}/usr/share/myspell" \
520 --with-external-thes-dir="${EPREFIX}/usr/share/myspell" \
521 --with-external-tar="${DISTDIR}" \
522 --with-lang="" \
523 --with-parallelism=${jbs} \
524 --with-system-ucpp \
525 --with-vendor="Gentoo Foundation" \
526 --with-x \
527 --without-afms \
528 --without-fonts \
529 --without-myspell-dicts \
530 --without-help \
531 --with-helppack-integration \
532 --without-sun-templates \
533 $(use_enable bluetooth sdremote-bluetooth) \
534 $(use_enable cups) \
535 $(use_enable debug) \
536 $(use_enable dbus) \
537 $(use_enable eds evolution2) \
538 $(use_enable firebird firebird-sdbc) \
539 $(use_enable gnome gconf) \
540 $(use_enable gnome gio) \
541 $(use_enable gnome lockdown) \
542 $(use_enable gstreamer) \
543 $(use_enable gtk) \
544 $(use_enable gtk3) \
545 $(use_enable kde kde4) \
546 $(use_enable mysql ext-mariadb-connector) \
547 $(use_enable odk) \
548 $(use_enable opengl) \
549 $(use_enable postgres postgresql-sdbc) \
550 $(use_enable telepathy) \
551 $(use_enable vba) \
552 $(use_enable vlc) \
553 $(use_enable webdav neon) \
554 $(use_with java) \
555 $(use_with mysql system-mysql-cppconn) \
556 $(use_with odk doxygen) \
557 ${internal_libs} \
558 ${java_opts} \
559 ${ext_opts}
560 }
561
562 src_compile() {
563 # hack for offlinehelp, this needs fixing upstream at some point
564 # it is broken because we send --without-help
565 # https://bugs.freedesktop.org/show_bug.cgi?id=46506
566 (
567 grep "^export" "${S}/config_host.mk" > "${T}/config_host.mk"
568 source "${T}/config_host.mk" 2&> /dev/null
569
570 local path="${WORKDIR}/helpcontent2/source/auxiliary/"
571 mkdir -p "${path}" || die
572
573 echo "perl \"${S}/helpcontent2/helpers/create_ilst.pl\" -dir=icon-themes/galaxy/res/helpimg > \"${path}/helpimg.ilst\""
574 perl "${S}/helpcontent2/helpers/create_ilst.pl" \
575 -dir=icon-themes/galaxy/res/helpimg \
576 > "${path}/helpimg.ilst"
577 [[ -s "${path}/helpimg.ilst" ]] || ewarn "The help images list is empty, something is fishy, report a bug."
578 )
579
580 local target
581 use test && target="build" || target="build-nocheck"
582
583 # this is not a proper make script
584 make ${target} || die
585 }
586
587 src_test() {
588 make unitcheck || die
589 make slowcheck || die
590 }
591
592 src_install() {
593 # This is not Makefile so no buildserver
594 make DESTDIR="${D}" distro-pack-install -o build -o check || die
595
596 # Fix bash completion placement
597 newbashcomp "${ED}"/etc/bash_completion.d/libreoffice.sh ${PN}
598 rm -rf "${ED}"/etc/
599
600 if use branding; then
601 insinto /usr/$(get_libdir)/${PN}/program
602 newins "${WORKDIR}/branding-sofficerc" sofficerc
603 echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"/etc/env.d/99${PN}
604 fi
605
606 # symlink the nsplugin to proper location
607 # use gtk && inst_plugin /usr/$(get_libdir)/libreoffice/program/libnpsoplugin.so
608
609 # Hack for offlinehelp, this needs fixing upstream at some point.
610 # It is broken because we send --without-help
611 # https://bugs.freedesktop.org/show_bug.cgi?id=46506
612 insinto /usr/$(get_libdir)/libreoffice/help
613 doins xmlhelp/util/*.xsl
614
615 # Remove desktop files for support to old installs that can't parse mime
616 rm -rf "${ED}"/usr/share/mimelnk/
617
618 pax-mark -m "${ED}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
619 pax-mark -m "${ED}"/usr/$(get_libdir)/libreoffice/program/unopkg.bin
620 }
621
622 pkg_preinst() {
623 # Cache updates - all handled by kde eclass for all environments
624 kde4-base_pkg_preinst
625 }
626
627 pkg_postinst() {
628 kde4-base_pkg_postinst
629
630 use java || \
631 ewarn 'If you plan to use lbase application you should enable java or you will get various crashes.'
632 }
633
634 pkg_postrm() {
635 kde4-base_pkg_postrm
636 }