Gentoo Archives: gentoo-commits

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