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.1.5.3.ebuild libreoffice-4.2.1.1.ebuild ChangeLog libreoffice-4.2.0.4.ebuild
Date: Tue, 25 Feb 2014 20:30:40
Message-Id: 20140225203031.189772004C@flycatcher.gentoo.org
1 scarabeus 14/02/25 20:30:31
2
3 Modified: ChangeLog
4 Added: libreoffice-4.1.5.3.ebuild
5 libreoffice-4.2.1.1.ebuild
6 Removed: libreoffice-4.2.0.4.ebuild
7 Log:
8 Version bump to 4.2.1.1 and 4.1.5.3.
9
10 (Portage version: 2.2.7/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 8EEE3BE8)
11
12 Revision Changes Path
13 1.541 app-office/libreoffice/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/ChangeLog?rev=1.541&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/ChangeLog?rev=1.541&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/ChangeLog?r1=1.540&r2=1.541
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v
22 retrieving revision 1.540
23 retrieving revision 1.541
24 diff -u -r1.540 -r1.541
25 --- ChangeLog 8 Feb 2014 14:06:02 -0000 1.540
26 +++ ChangeLog 25 Feb 2014 20:30:30 -0000 1.541
27 @@ -1,6 +1,13 @@
28 # ChangeLog for app-office/libreoffice
29 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v 1.540 2014/02/08 14:06:02 pacho Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v 1.541 2014/02/25 20:30:30 scarabeus Exp $
32 +
33 +*libreoffice-4.1.5.3 (25 Feb 2014)
34 +*libreoffice-4.2.1.1 (25 Feb 2014)
35 +
36 + 25 Feb 2014; Tomáš Chvátal <scarabeus@g.o> +libreoffice-4.1.5.3.ebuild,
37 + +libreoffice-4.2.1.1.ebuild, -libreoffice-4.2.0.4.ebuild:
38 + Version bump to 4.2.1.1 and 4.1.5.3.
39
40 08 Feb 2014; Pacho Ramos <pacho@g.o> libreoffice-4.1.4.2.ebuild:
41 amd64 stable, bug #500622
42
43
44
45 1.1 app-office/libreoffice/libreoffice-4.1.5.3.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-4.1.5.3.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-4.1.5.3.ebuild?rev=1.1&content-type=text/plain
49
50 Index: libreoffice-4.1.5.3.ebuild
51 ===================================================================
52 # Copyright 1999-2014 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-4.1.5.3.ebuild,v 1.1 2014/02/25 20:30:30 scarabeus Exp $
55
56 EAPI=5
57
58 KDE_REQUIRED="optional"
59 QT_MINIMAL="4.7.4"
60 KDE_SCM="git"
61 CMAKE_REQUIRED="never"
62
63 PYTHON_COMPAT=( python2_7 python3_3 )
64 PYTHON_REQ_USE="threads,xml"
65
66 # experimental ; release ; old
67 # Usually the tarballs are moved a lot so this should make
68 # everyone happy.
69 DEV_URI="
70 http://dev-builds.libreoffice.org/pre-releases/src
71 http://download.documentfoundation.org/libreoffice/src/${PV:0:5}/
72 http://download.documentfoundation.org/libreoffice/old/${PV}/
73 "
74 EXT_URI="http://ooo.itc.hu/oxygenoffice/download/libreoffice"
75 ADDONS_URI="http://dev-www.libreoffice.org/src/"
76
77 BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
78 # PATCHSET="${P}-patchset-01.tar.xz"
79
80 [[ ${PV} == *9999* ]] && SCM_ECLASS="git-2"
81 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}
82 unset SCM_ECLASS
83
84 DESCRIPTION="LibreOffice, a full office productivity suite."
85 HOMEPAGE="http://www.libreoffice.org"
86 SRC_URI="branding? ( http://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
87 [[ -n ${PATCHSET} ]] && SRC_URI+=" http://dev.gentooexperimental.org/~scarabeus/${PATCHSET}"
88
89 # Split modules following git/tarballs
90 # Core MUST be first!
91 # Help is used for the image generator
92 MODULES="core help"
93 # Only release has the tarballs
94 if [[ ${PV} != *9999* ]]; then
95 for i in ${DEV_URI}; do
96 for mod in ${MODULES}; do
97 if [[ ${mod} == core ]]; then
98 SRC_URI+=" ${i}/${P}.tar.xz"
99 else
100 SRC_URI+=" ${i}/${PN}-${mod}-${PV}.tar.xz"
101 fi
102 done
103 unset mod
104 done
105 unset i
106 fi
107 unset DEV_URI
108
109 # Really required addons
110 # These are bundles that can't be removed for now due to huge patchsets.
111 # If you want them gone, patches are welcome.
112 ADDONS_SRC+=" ${ADDONS_URI}/ea91f2fb4212a21d708aced277e6e85a-vigra1.4.0.tar.gz"
113 ADDONS_SRC+=" ${ADDONS_URI}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz" # modifies source code
114 ADDONS_SRC+=" java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
115 ADDONS_SRC+=" libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )" # no release for 8 years, should we package it?
116 ADDONS_SRC+=" libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )" # Does not build with 1.6 rhino at all
117 ADDONS_SRC+=" libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )" # requirement of rhino
118 ADDONS_SRC+=" odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )" # not packageable
119 SRC_URI+=" ${ADDONS_SRC}"
120
121 unset ADDONS_URI
122 unset EXT_URI
123 unset ADDONS_SRC
124
125 IUSE="bluetooth +branding +cups dbus debug eds gnome gstreamer +gtk
126 gtk3 jemalloc kde mysql odk opengl postgres telepathy test +vba +webdav"
127
128 LO_EXTS="nlpsolver presenter-minimizer scripting-beanshell scripting-javascript wiki-publisher"
129 # Unpackaged separate extensions:
130 # diagram: lo has 0.9.5 upstream is weirdly patched 0.9.4 -> wtf?
131 # hunart: only on ooo extensions -> fubared download path somewhere on sf
132 # numbertext, typo, validator, watch-window: ^^
133 # oooblogger: no homepage or anything
134 # Extensions that need extra work:
135 for lo_xt in ${LO_EXTS}; do
136 IUSE+=" libreoffice_extensions_${lo_xt}"
137 done
138 unset lo_xt
139
140 LICENSE="|| ( LGPL-3 MPL-1.1 )"
141 SLOT="0"
142 [[ ${PV} == *9999* ]] || \
143 KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
144
145 COMMON_DEPEND="
146 ${PYTHON_DEPS}
147 app-arch/zip
148 app-arch/unzip
149 >=app-text/hunspell-1.3.2-r3
150 app-text/mythes
151 >=app-text/libexttextcat-3.2
152 app-text/liblangtag
153 app-text/libmspub
154 <app-text/libmwaw-0.2.0
155 app-text/libodfgen
156 app-text/libwpd:0.9[tools]
157 app-text/libwpg:0.2
158 >=app-text/libwps-0.2.2
159 >=app-text/poppler-0.16:=[xpdf-headers(+),cxx]
160 >=dev-cpp/clucene-2.3.3.4-r2
161 >=dev-cpp/libcmis-0.3.1:0.3
162 dev-db/unixODBC
163 >=dev-libs/boost-1.46:=
164 dev-libs/expat
165 >=dev-libs/hyphen-2.7.1
166 >=dev-libs/icu-4.8.1.1:=
167 >=dev-libs/liborcus-0.5.1:=
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
172 >=dev-libs/redland-1.0.16[ssl]
173 media-gfx/graphite2
174 >=media-libs/fontconfig-2.8.0
175 media-libs/freetype:2
176 >=media-libs/harfbuzz-0.9.10:=[icu(+)]
177 media-libs/lcms:2
178 >=media-libs/libpng-1.4
179 >=media-libs/libcdr-0.0.5
180 media-libs/libvisio
181 >=net-misc/curl-7.21.4
182 net-nds/openldap
183 sci-mathematics/lpsolve
184 virtual/jpeg:0
185 >=x11-libs/cairo-1.10.0[X]
186 x11-libs/libXinerama
187 x11-libs/libXrandr
188 x11-libs/libXrender
189 bluetooth? ( net-wireless/bluez )
190 cups? ( net-print/cups )
191 dbus? ( >=dev-libs/dbus-glib-0.92 )
192 eds? ( gnome-extra/evolution-data-server )
193 gnome? ( gnome-base/gconf:2 )
194 gtk? (
195 x11-libs/gdk-pixbuf[X]
196 >=x11-libs/gtk+-2.24:2
197 )
198 gtk3? ( >=x11-libs/gtk+-3.2:3 )
199 gstreamer? (
200 media-libs/gstreamer:1.0
201 media-libs/gst-plugins-base:1.0
202 )
203 jemalloc? ( dev-libs/jemalloc )
204 libreoffice_extensions_scripting-beanshell? ( >=dev-java/bsh-2.0_beta4 )
205 libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
206 libreoffice_extensions_wiki-publisher? (
207 dev-java/commons-codec:0
208 dev-java/commons-httpclient:3
209 dev-java/commons-lang:2.1
210 dev-java/commons-logging:0
211 dev-java/tomcat-servlet-api:3.0
212 )
213 mysql? ( >=dev-db/mysql-connector-c++-1.1.0 )
214 opengl? (
215 virtual/glu
216 virtual/opengl
217 )
218 postgres? ( >=dev-db/postgresql-base-9.0[kerberos] )
219 telepathy? (
220 dev-libs/glib:2
221 >=net-libs/telepathy-glib-0.18.0
222 >=x11-libs/gtk+-2.24:2
223 )
224 webdav? ( net-libs/neon )
225 "
226
227 RDEPEND="${COMMON_DEPEND}
228 !app-office/libreoffice-bin
229 !app-office/libreoffice-bin-debug
230 !<app-office/openoffice-bin-3.4.0-r1
231 !app-office/openoffice
232 media-fonts/libertine-ttf
233 media-fonts/liberation-fonts
234 media-fonts/urw-fonts
235 java? ( >=virtual/jre-1.6 )
236 "
237
238 if [[ ${PV} != *9999* ]]; then
239 PDEPEND="~app-office/libreoffice-l10n-${PV}"
240 else
241 # Translations are not reliable on live ebuilds
242 # rather force people to use english only.
243 PDEPEND="!app-office/libreoffice-l10n"
244 fi
245
246 # FIXME: cppunit should be moved to test conditional
247 # after everything upstream is under gbuild
248 # as dmake execute tests right away
249 DEPEND="${COMMON_DEPEND}
250 >=dev-libs/libxml2-2.7.8
251 dev-libs/libxslt
252 dev-perl/Archive-Zip
253 dev-util/cppunit
254 >=dev-util/gperf-3
255 dev-util/intltool
256 =dev-util/mdds-0.8*:=
257 virtual/pkgconfig
258 net-misc/npapi-sdk
259 >=sys-apps/findutils-4.4.2
260 sys-devel/bison
261 sys-apps/coreutils
262 sys-devel/flex
263 sys-devel/gettext
264 >=sys-devel/make-3.82
265 sys-devel/ucpp
266 sys-libs/zlib
267 x11-libs/libXt
268 x11-libs/libXtst
269 x11-proto/randrproto
270 x11-proto/xextproto
271 x11-proto/xineramaproto
272 x11-proto/xproto
273 java? (
274 >=virtual/jdk-1.6
275 >=dev-java/ant-core-1.7
276 )
277 odk? ( app-doc/doxygen )
278 test? ( dev-util/cppunit )
279 "
280
281 PATCHES=(
282 # not upstreamable stuff
283 "${FILESDIR}/${PN}-3.7-system-pyuno.patch"
284
285 # picked from git master
286 "${FILESDIR}/${PN}-4.1.3.2-kde-recursiverepaint.patch"
287 "${FILESDIR}/${PN}-4.1.3.2-kde-calchang.patch"
288
289 # staged for git master
290 "${FILESDIR}/${PN}-4.1.4.2-curl-config.patch"
291 )
292
293 REQUIRED_USE="
294 ${PYTHON_REQUIRED_USE}
295 bluetooth? ( dbus )
296 gnome? ( gtk )
297 eds? ( gnome )
298 telepathy? ( gtk )
299 libreoffice_extensions_nlpsolver? ( java )
300 libreoffice_extensions_scripting-beanshell? ( java )
301 libreoffice_extensions_scripting-javascript? ( java )
302 libreoffice_extensions_wiki-publisher? ( java )
303 "
304
305 CHECKREQS_MEMORY="512M"
306 CHECKREQS_DISK_BUILD="6G"
307
308 pkg_pretend() {
309 local pgslot
310
311 if [[ ${MERGE_TYPE} != binary ]]; then
312 check-reqs_pkg_pretend
313
314 if [[ $(gcc-major-version) -lt 4 ]] || \
315 ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) \
316 ; then
317 eerror "Compilation with gcc older than 4.6 is not supported"
318 die "Too old gcc found."
319 fi
320 fi
321
322 # ensure pg version
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/$(get_libdir)/"
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-rpath: relative runtime path is not desired
484 # --disable-systray: quickstarter does not actually work at all so do not
485 # promote it
486 # --enable-extension-integration: enable any extension integration support
487 # --without-{afms,fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
488 # --disable-report-builder: too much java packages pulled in without pkgs
489 econf \
490 --docdir="${EPREFIX}/usr/share/doc/${PF}/" \
491 --with-system-headers \
492 --with-system-libs \
493 --with-system-jars \
494 --with-system-dicts \
495 --enable-cairo-canvas \
496 --enable-graphite \
497 --enable-largefile \
498 --enable-mergelibs \
499 --enable-python=system \
500 --enable-randr \
501 --enable-randr-link \
502 --enable-release-build \
503 --disable-hardlink-deliver \
504 --disable-ccache \
505 --disable-crashdump \
506 --disable-dependency-tracking \
507 --disable-epm \
508 --disable-fetch-external \
509 --disable-gnome-vfs \
510 --disable-gstreamer-0-10 \
511 --disable-report-builder \
512 --disable-kdeab \
513 --disable-kde \
514 --disable-online-update \
515 --disable-rpath \
516 --disable-systray \
517 --with-alloc=$(use jemalloc && echo "jemalloc" || echo "system") \
518 --with-build-version="Gentoo official package" \
519 --enable-extension-integration \
520 --with-external-dict-dir="${EPREFIX}/usr/share/myspell" \
521 --with-external-hyph-dir="${EPREFIX}/usr/share/myspell" \
522 --with-external-thes-dir="${EPREFIX}/usr/share/myspell" \
523 --with-external-tar="${DISTDIR}" \
524 --with-lang="" \
525 --with-parallelism=${jbs} \
526 --with-system-ucpp \
527 --with-vendor="Gentoo Foundation" \
528 --with-x \
529 --without-afms \
530 --without-fonts \
531 --without-myspell-dicts \
532 --without-help \
533 --with-helppack-integration \
534 --without-sun-templates \
535 $(use_enable bluetooth sdremote-bluetooth) \
536 $(use_enable cups) \
537 $(use_enable debug) \
538 $(use_enable dbus) \
539 $(use_enable eds evolution2) \
540 $(use_enable gnome gconf) \
541 $(use_enable gnome gio) \
542 $(use_enable gnome lockdown) \
543 $(use_enable gstreamer) \
544 $(use_enable gtk) \
545 $(use_enable gtk3) \
546 $(use_enable kde kde4) \
547 $(use_enable mysql ext-mariadb-connector) \
548 $(use_enable odk) \
549 $(use_enable opengl) \
550 $(use_enable postgres postgresql-sdbc) \
551 $(use_enable telepathy) \
552 $(use_enable test linkoo) \
553 $(use_enable vba) \
554 $(use_enable webdav neon) \
555 $(use_with java) \
556 $(use_with mysql system-mysql-cppconn) \
557 $(use_with odk doxygen) \
558 ${internal_libs} \
559 ${java_opts} \
560 ${ext_opts}
561 }
562
563 src_compile() {
564 # hack for offlinehelp, this needs fixing upstream at some point
565 # it is broken because we send --without-help
566 # https://bugs.freedesktop.org/show_bug.cgi?id=46506
567 (
568 grep "^export" "${S}/config_host.mk" > "${T}/config_host.mk"
569 source "${T}/config_host.mk" 2&> /dev/null
570
571 local path="${SOLARVER}/${INPATH}/res/img"
572 mkdir -p "${path}" || die
573
574 echo "perl \"${S}/helpcontent2/helpers/create_ilst.pl\" -dir=icon-themes/galaxy/res/helpimg > \"${path}/helpimg.ilst\""
575 perl "${S}/helpcontent2/helpers/create_ilst.pl" \
576 -dir=icon-themes/galaxy/res/helpimg \
577 > "${path}/helpimg.ilst"
578 [[ -s "${path}/helpimg.ilst" ]] || ewarn "The help images list is empty, something is fishy, report a bug."
579 )
580
581 local target
582 use test && target="build" || target="build-nocheck"
583
584 # this is not a proper make script
585 make ${target} || die
586 }
587
588 src_test() {
589 make unitcheck || die
590 make slowcheck || die
591 }
592
593 src_install() {
594 # This is not Makefile so no buildserver
595 make DESTDIR="${D}" distro-pack-install -o build -o check || die
596
597 # Fix bash completion placement
598 newbashcomp "${ED}"/etc/bash_completion.d/libreoffice.sh ${PN}
599 rm -rf "${ED}"/etc/
600
601 if use branding; then
602 insinto /usr/$(get_libdir)/${PN}/program
603 newins "${WORKDIR}/branding-sofficerc" sofficerc
604 echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"/etc/env.d/99${PN}
605 fi
606
607 # symlink the nsplugin to proper location
608 # use gtk && inst_plugin /usr/$(get_libdir)/libreoffice/program/libnpsoplugin.so
609
610 # Hack for offlinehelp, this needs fixing upstream at some point.
611 # It is broken because we send --without-help
612 # https://bugs.freedesktop.org/show_bug.cgi?id=46506
613 insinto /usr/$(get_libdir)/libreoffice/help
614 doins xmlhelp/util/*.xsl
615
616 # Remove desktop files for support to old installs that can't parse mime
617 rm -rf "${ED}"/usr/share/mimelnk/
618
619 pax-mark -m "${ED}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
620 pax-mark -m "${ED}"/usr/$(get_libdir)/libreoffice/program/unopkg.bin
621 }
622
623 pkg_preinst() {
624 # Cache updates - all handled by kde eclass for all environments
625 kde4-base_pkg_preinst
626 }
627
628 pkg_postinst() {
629 kde4-base_pkg_postinst
630
631 use java || \
632 ewarn 'If you plan to use lbase application you should enable java or you will get various crashes.'
633 }
634
635 pkg_postrm() {
636 kde4-base_pkg_postrm
637 }
638
639
640
641 1.1 app-office/libreoffice/libreoffice-4.2.1.1.ebuild
642
643 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-4.2.1.1.ebuild?rev=1.1&view=markup
644 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-4.2.1.1.ebuild?rev=1.1&content-type=text/plain
645
646 Index: libreoffice-4.2.1.1.ebuild
647 ===================================================================
648 # Copyright 1999-2014 Gentoo Foundation
649 # Distributed under the terms of the GNU General Public License v2
650 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-4.2.1.1.ebuild,v 1.1 2014/02/25 20:30:30 scarabeus Exp $
651
652 EAPI=5
653
654 KDE_REQUIRED="optional"
655 QT_MINIMAL="4.7.4"
656 KDE_SCM="git"
657 CMAKE_REQUIRED="never"
658
659 PYTHON_COMPAT=( python2_7 python3_3 )
660 PYTHON_REQ_USE="threads,xml"
661
662 # experimental ; release ; old
663 # Usually the tarballs are moved a lot so this should make
664 # everyone happy.
665 DEV_URI="
666 http://dev-builds.libreoffice.org/pre-releases/src
667 http://download.documentfoundation.org/libreoffice/src/${PV:0:5}/
668 http://download.documentfoundation.org/libreoffice/old/${PV}/
669 "
670 EXT_URI="http://ooo.itc.hu/oxygenoffice/download/libreoffice"
671 ADDONS_URI="http://dev-www.libreoffice.org/src/"
672
673 BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
674 # PATCHSET="${P}-patchset-01.tar.xz"
675
676 [[ ${PV} == *9999* ]] && SCM_ECLASS="git-2"
677 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}
678 unset SCM_ECLASS
679
680 DESCRIPTION="LibreOffice, a full office productivity suite."
681 HOMEPAGE="http://www.libreoffice.org"
682 SRC_URI="branding? ( http://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
683 [[ -n ${PATCHSET} ]] && SRC_URI+=" http://dev.gentooexperimental.org/~scarabeus/${PATCHSET}"
684
685 # Split modules following git/tarballs
686 # Core MUST be first!
687 # Help is used for the image generator
688 MODULES="core help"
689 # Only release has the tarballs
690 if [[ ${PV} != *9999* ]]; then
691 for i in ${DEV_URI}; do
692 for mod in ${MODULES}; do
693 if [[ ${mod} == core ]]; then
694 SRC_URI+=" ${i}/${P}.tar.xz"
695 else
696 SRC_URI+=" ${i}/${PN}-${mod}-${PV}.tar.xz"
697 fi
698 done
699 unset mod
700 done
701 unset i
702 fi
703 unset DEV_URI
704
705 # Really required addons
706 # These are bundles that can't be removed for now due to huge patchsets.
707 # If you want them gone, patches are welcome.
708 ADDONS_SRC+=" ${ADDONS_URI}/d62650a6f908e85643e557a236ea989c-vigra1.6.0.tar.gz"
709 ADDONS_SRC+=" ${ADDONS_URI}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz" # modifies source code
710 ADDONS_SRC+=" java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
711 ADDONS_SRC+=" libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )" # no release for 8 years, should we package it?
712 ADDONS_SRC+=" libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )" # Does not build with 1.6 rhino at all
713 ADDONS_SRC+=" libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )" # requirement of rhino
714 ADDONS_SRC+=" odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )" # not packageable
715 SRC_URI+=" ${ADDONS_SRC}"
716
717 unset ADDONS_URI
718 unset EXT_URI
719 unset ADDONS_SRC
720
721 IUSE="bluetooth +branding +cups dbus debug eds firebird gnome gstreamer +gtk
722 gtk3 jemalloc kde mysql odk opengl postgres telepathy test +vba vlc +webdav"
723
724 LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
725 # Unpackaged separate extensions:
726 # diagram: lo has 0.9.5 upstream is weirdly patched 0.9.4 -> wtf?
727 # hunart: only on ooo extensions -> fubared download path somewhere on sf
728 # numbertext, typo, validator, watch-window: ^^
729 # oooblogger: no homepage or anything
730 # Extensions that need extra work:
731 for lo_xt in ${LO_EXTS}; do
732 IUSE+=" libreoffice_extensions_${lo_xt}"
733 done
734 unset lo_xt
735
736 LICENSE="|| ( LGPL-3 MPL-1.1 )"
737 SLOT="0"
738 [[ ${PV} == *9999* ]] || \
739 KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
740
741 COMMON_DEPEND="
742 ${PYTHON_DEPS}
743 app-arch/zip
744 app-arch/unzip
745 >=app-text/hunspell-1.3.2-r3
746 app-text/mythes
747 app-text/libabw
748 >=app-text/libexttextcat-3.2
749 app-text/libebook
750 app-text/libetonyek
751 app-text/liblangtag
752 app-text/libmspub
753 >=app-text/libmwaw-0.2
754 >=app-text/libodfgen-0.0.3
755 app-text/libwpd:0.9[tools]
756 app-text/libwpg:0.2
757 >=app-text/libwps-0.2.2
758 >=app-text/poppler-0.16:=[xpdf-headers(+),cxx]
759 >=dev-cpp/clucene-2.3.3.4-r2
760 dev-cpp/libcmis:0.4
761 dev-db/unixODBC
762 >=dev-libs/boost-1.46:=
763 dev-libs/expat
764 >=dev-libs/hyphen-2.7.1
765 >=dev-libs/icu-4.8.1.1:=
766 >=dev-libs/libatomic_ops-7.2d
767 >=dev-libs/liborcus-0.5.1:=
768 >=dev-libs/nspr-4.8.8
769 >=dev-libs/nss-3.12.9
770 >=dev-lang/perl-5.0
771 >=dev-libs/openssl-1.0.0d
772 >=dev-libs/redland-1.0.16[ssl]
773 media-gfx/graphite2
774 >=media-libs/fontconfig-2.8.0
775 media-libs/freetype:2
776 >=media-libs/harfbuzz-0.9.18:=[icu(+)]
777 media-libs/lcms:2
778 >=media-libs/libpng-1.4
779 >=media-libs/libcdr-0.0.5
780 media-libs/libfreehand
781 media-libs/libvisio
782 >=net-misc/curl-7.21.4
783 net-nds/openldap
784 sci-mathematics/lpsolve
785 virtual/jpeg:0
786 >=x11-libs/cairo-1.10.0[X]
787 x11-libs/libXinerama
788 x11-libs/libXrandr
789 x11-libs/libXrender
790 bluetooth? ( net-wireless/bluez )
791 cups? ( net-print/cups )
792 dbus? ( >=dev-libs/dbus-glib-0.92 )
793 eds? ( gnome-extra/evolution-data-server )
794 firebird? ( >=dev-db/firebird-2.5 )
795 gnome? ( gnome-base/gconf:2 )
796 gtk? (
797 x11-libs/gdk-pixbuf[X]
798 >=x11-libs/gtk+-2.24:2
799 )
800 gtk3? ( >=x11-libs/gtk+-3.2:3 )
801 gstreamer? (
802 media-libs/gstreamer:1.0
803 media-libs/gst-plugins-base:1.0
804 )
805 jemalloc? ( dev-libs/jemalloc )
806 libreoffice_extensions_scripting-beanshell? ( >=dev-java/bsh-2.0_beta4 )
807 libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
808 libreoffice_extensions_wiki-publisher? (
809 dev-java/commons-codec:0
810 dev-java/commons-httpclient:3
811 dev-java/commons-lang:2.1
812 dev-java/commons-logging:0
813 dev-java/tomcat-servlet-api:3.0
814 )
815 mysql? ( >=dev-db/mysql-connector-c++-1.1.0 )
816 opengl? (
817 virtual/glu
818 virtual/opengl
819 )
820 postgres? ( >=dev-db/postgresql-base-9.0[kerberos] )
821 telepathy? (
822 dev-libs/glib:2
823 >=net-libs/telepathy-glib-0.18.0
824 >=x11-libs/gtk+-2.24:2
825 )
826 webdav? ( net-libs/neon )
827 "
828
829 RDEPEND="${COMMON_DEPEND}
830 !app-office/libreoffice-bin
831 !app-office/libreoffice-bin-debug
832 !<app-office/openoffice-bin-3.4.0-r1
833 !app-office/openoffice
834 media-fonts/libertine-ttf
835 media-fonts/liberation-fonts
836 media-fonts/urw-fonts
837 java? ( >=virtual/jre-1.6 )
838 vlc? ( media-video/vlc )
839 "
840
841 if [[ ${PV} != *9999* ]]; then
842 PDEPEND="~app-office/libreoffice-l10n-${PV}"
843 else
844 # Translations are not reliable on live ebuilds
845 # rather force people to use english only.
846 PDEPEND="!app-office/libreoffice-l10n"
847 fi
848
849 # FIXME: cppunit should be moved to test conditional
850 # after everything upstream is under gbuild
851 # as dmake execute tests right away
852 DEPEND="${COMMON_DEPEND}
853 >=dev-libs/libxml2-2.7.8
854 dev-libs/libxslt
855 dev-perl/Archive-Zip
856 dev-util/cppunit
857 >=dev-util/gperf-3
858 dev-util/intltool
859 >=dev-util/mdds-0.10.1:=
860 virtual/pkgconfig
861 net-misc/npapi-sdk
862 >=sys-apps/findutils-4.4.2
863 sys-devel/bison
864 sys-apps/coreutils
865 sys-devel/flex
866 sys-devel/gettext
867 >=sys-devel/make-3.82
868 sys-devel/ucpp
869 sys-libs/zlib
870 x11-libs/libXt
871 x11-libs/libXtst
872 x11-proto/randrproto
873 x11-proto/xextproto
874 x11-proto/xineramaproto
875 x11-proto/xproto
876 java? (
877 >=virtual/jdk-1.6
878 >=dev-java/ant-core-1.7
879 )
880 odk? ( >=app-doc/doxygen-1.8.4 )
881 test? ( dev-util/cppunit )
882 "
883
884 PATCHES=(
885 # not upstreamable stuff
886 "${FILESDIR}/${PN}-3.7-system-pyuno.patch"
887
888 # staged for git master
889 "${FILESDIR}/${PN}-4.2.0.4-curl-config.patch"
890 )
891
892 REQUIRED_USE="
893 ${PYTHON_REQUIRED_USE}
894 bluetooth? ( dbus )
895 gnome? ( gtk )
896 eds? ( gnome )
897 telepathy? ( gtk )
898 libreoffice_extensions_nlpsolver? ( java )
899 libreoffice_extensions_scripting-beanshell? ( java )
900 libreoffice_extensions_scripting-javascript? ( java )
901 libreoffice_extensions_wiki-publisher? ( java )
902 "
903
904 CHECKREQS_MEMORY="512M"
905 CHECKREQS_DISK_BUILD="6G"
906
907 pkg_pretend() {
908 local pgslot
909
910 if [[ ${MERGE_TYPE} != binary ]]; then
911 check-reqs_pkg_pretend
912
913 if [[ $(gcc-major-version) -lt 4 ]] || \
914 ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) \
915 ; then
916 eerror "Compilation with gcc older than 4.6 is not supported"
917 die "Too old gcc found."
918 fi
919 fi
920
921 # Ensure pg version but we have to be sure the pg is installed (first
922 # install on clean system)
923 if use postgres && has_version dev-db/postgresql-base; then
924 pgslot=$(postgresql-config show)
925 if [[ ${pgslot//.} < 90 ]] ; then
926 eerror "PostgreSQL slot must be set to 9.0 or higher."
927 eerror " postgresql-config set 9.0"
928 die "PostgreSQL slot is not set to 9.0 or higher."
929 fi
930 fi
931 }
932
933 pkg_setup() {
934 java-pkg-opt-2_pkg_setup
935 kde4-base_pkg_setup
936 python-single-r1_pkg_setup
937
938 [[ ${MERGE_TYPE} != binary ]] && check-reqs_pkg_setup
939 }
940
941 src_unpack() {
942 local mod mod2 dest tmplfile tmplname mypv
943
944 [[ -n ${PATCHSET} ]] && unpack ${PATCHSET}
945 use branding && unpack "${BRANDING}"
946
947 if [[ ${PV} != *9999* ]]; then
948 unpack "${P}.tar.xz"
949 for mod in ${MODULES}; do
950 [[ ${mod} == core ]] && continue
951 unpack "${PN}-${mod}-${PV}.tar.xz"
952 done
953 else
954 for mod in ${MODULES}; do
955 mypv=${PV/.9999}
956 [[ ${mypv} != ${PV} ]] && EGIT_BRANCH="${PN}-${mypv/./-}"
957 EGIT_PROJECT="${PN}/${mod}"
958 EGIT_SOURCEDIR="${WORKDIR}/${P}"
959 [[ ${mod} != core ]] && EGIT_SOURCEDIR="${WORKDIR}/${PN}-${mod}-${PV}"
960 EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${mod}"
961 EGIT_NOUNPACK="true"
962 git-2_src_unpack
963 if [[ ${mod} != core ]]; then
964 mod2=${mod}
965 # mapping does not match on help
966 [[ ${mod} == help ]] && mod2="helpcontent2"
967 mkdir -p "${S}/${mod2}/" || die
968 mv -n "${WORKDIR}/${PN}-${mod}-${PV}"/* "${S}/${mod2}" || die
969 rm -rf "${WORKDIR}/${PN}-${mod}-${PV}"
970 fi
971 done
972 unset EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
973 fi
974 }
975
976 src_prepare() {
977 # optimization flags
978 export GMAKE_OPTIONS="${MAKEOPTS}"
979 # System python 2.7 enablement:
980 export PYTHON_CFLAGS=$(python_get_CFLAGS)
981 export PYTHON_LIBS=$(python_get_LIBS)
982
983 # patchset
984 if [[ -n ${PATCHSET} ]]; then
985 EPATCH_FORCE="yes" \
986 EPATCH_SOURCE="${WORKDIR}/${PATCHSET/.tar.xz/}" \
987 EPATCH_SUFFIX="patch" \
988 epatch
989 fi
990
991 base_src_prepare
992
993 AT_M4DIR="m4" eautoreconf
994 # hack in the autogen.sh
995 touch autogen.lastrun
996
997 # system pyuno mess
998 sed \
999 -e "s:%eprefix%:${EPREFIX}:g" \
1000 -e "s:%libdir%:$(get_libdir):g" \
1001 -i pyuno/source/module/uno.py \
1002 -i scripting/source/pyprov/officehelper.py || die
1003 # sed in the tests
1004 sed -i \
1005 -e 's#all : build unitcheck#all : build#g' \
1006 solenv/gbuild/Module.mk || die
1007 sed -i \
1008 -e 's#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g' \
1009 -e 's#Makefile.gbuild all slowcheck#Makefile.gbuild all#g' \
1010 Makefile.in || die
1011
1012 if use branding; then
1013 # hack...
1014 mv -v "${WORKDIR}/branding-intro.png" "${S}/icon-themes/galaxy/brand/intro.png" || die
1015 fi
1016 }
1017
1018 src_configure() {
1019 local java_opts
1020 local internal_libs
1021 local lo_ext
1022 local ext_opts
1023 local jbs=$(sed -ne 's/.*\(-j[[:space:]]*\|--jobs=\)\([[:digit:]]\+\).*/\2/;T;p' <<< "${MAKEOPTS}")
1024
1025 # recheck that there is some value in jobs
1026 [[ -z ${jbs} ]] && jbs="1"
1027
1028 # sane: just sane.h header that is used for scan in writer, not
1029 # linked or anything else, worthless to depend on
1030 # vigra: just uses templates from there
1031 # it is serious pain in the ass for packaging
1032 # should be replaced by boost::gil if someone interested
1033 internal_libs+="
1034 --without-system-sane
1035 --without-system-vigra
1036 "
1037
1038 # libreoffice extensions handling
1039 for lo_xt in ${LO_EXTS}; do
1040 if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
1041 ext_opts+=" $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt})"
1042 else
1043 ext_opts+=" $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt})"
1044 fi
1045 done
1046
1047 if use java; then
1048 # hsqldb: system one is too new
1049 java_opts="
1050 --without-junit
1051 --without-system-hsqldb
1052 --with-ant-home="${ANT_HOME}"
1053 --with-jdk-home=$(java-config --jdk-home 2>/dev/null)
1054 --with-jvm-path="${EPREFIX}/usr/$(get_libdir)/"
1055 "
1056
1057 use libreoffice_extensions_scripting-beanshell && \
1058 java_opts+=" --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)"
1059
1060 use libreoffice_extensions_scripting-javascript && \
1061 java_opts+=" --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar)"
1062
1063 if use libreoffice_extensions_wiki-publisher; then
1064 java_opts+="
1065 --with-commons-codec-jar=$(java-pkg_getjar commons-codec commons-codec.jar)
1066 --with-commons-httpclient-jar=$(java-pkg_getjar commons-httpclient-3 commons-httpclient.jar)
1067 --with-commons-lang-jar=$(java-pkg_getjar commons-lang-2.1 commons-lang.jar)
1068 --with-commons-logging-jar=$(java-pkg_getjar commons-logging commons-logging.jar)
1069 --with-servlet-api-jar=$(java-pkg_getjar tomcat-servlet-api-3.0 servlet-api.jar)
1070 "
1071 fi
1072 fi
1073
1074 # system headers/libs/...: enforce using system packages
1075 # --enable-cairo: ensure that cairo is always required
1076 # --enable-graphite: disabling causes build breakages
1077 # --enable-*-link: link to the library rather than just dlopen on runtime
1078 # --enable-release-build: build the libreoffice as release
1079 # --disable-fetch-external: prevent dowloading during compile phase
1080 # --disable-gnome-vfs: old gnome virtual fs support
1081 # --disable-kdeab: kde3 adressbook
1082 # --disable-kde: kde3 support
1083 # --disable-systray: quickstarter does not actually work at all so do not
1084 # promote it
1085 # --enable-extension-integration: enable any extension integration support
1086 # --without-{afms,fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
1087 # --disable-report-builder: too much java packages pulled in without pkgs
1088 econf \
1089 --docdir="${EPREFIX}/usr/share/doc/${PF}/" \
1090 --with-system-headers \
1091 --with-system-libs \
1092 --with-system-jars \
1093 --with-system-dicts \
1094 --enable-cairo-canvas \
1095 --enable-graphite \
1096 --enable-largefile \
1097 --enable-mergelibs \
1098 --enable-python=system \
1099 --enable-randr \
1100 --enable-randr-link \
1101 --enable-release-build \
1102 --disable-hardlink-deliver \
1103 --disable-ccache \
1104 --disable-crashdump \
1105 --disable-dependency-tracking \
1106 --disable-epm \
1107 --disable-fetch-external \
1108 --disable-gnome-vfs \
1109 --disable-gstreamer-0-10 \
1110 --disable-report-builder \
1111 --disable-kdeab \
1112 --disable-kde \
1113 --disable-online-update \
1114 --disable-systray \
1115 --with-alloc=$(use jemalloc && echo "jemalloc" || echo "system") \
1116 --with-build-version="Gentoo official package" \
1117 --enable-extension-integration \
1118 --with-external-dict-dir="${EPREFIX}/usr/share/myspell" \
1119 --with-external-hyph-dir="${EPREFIX}/usr/share/myspell" \
1120 --with-external-thes-dir="${EPREFIX}/usr/share/myspell" \
1121 --with-external-tar="${DISTDIR}" \
1122 --with-lang="" \
1123 --with-parallelism=${jbs} \
1124 --with-system-ucpp \
1125 --with-vendor="Gentoo Foundation" \
1126 --with-x \
1127 --without-afms \
1128 --without-fonts \
1129 --without-myspell-dicts \
1130 --without-help \
1131 --with-helppack-integration \
1132 --without-sun-templates \
1133 $(use_enable bluetooth sdremote-bluetooth) \
1134 $(use_enable cups) \
1135 $(use_enable debug) \
1136 $(use_enable dbus) \
1137 $(use_enable eds evolution2) \
1138 $(use_enable firebird firebird-sdbc) \
1139 $(use_enable gnome gconf) \
1140 $(use_enable gnome gio) \
1141 $(use_enable gnome lockdown) \
1142 $(use_enable gstreamer) \
1143 $(use_enable gtk) \
1144 $(use_enable gtk3) \
1145 $(use_enable kde kde4) \
1146 $(use_enable mysql ext-mariadb-connector) \
1147 $(use_enable odk) \
1148 $(use_enable opengl) \
1149 $(use_enable postgres postgresql-sdbc) \
1150 $(use_enable telepathy) \
1151 $(use_enable vba) \
1152 $(use_enable vlc) \
1153 $(use_enable webdav neon) \
1154 $(use_with java) \
1155 $(use_with mysql system-mysql-cppconn) \
1156 $(use_with odk doxygen) \
1157 ${internal_libs} \
1158 ${java_opts} \
1159 ${ext_opts}
1160 }
1161
1162 src_compile() {
1163 # hack for offlinehelp, this needs fixing upstream at some point
1164 # it is broken because we send --without-help
1165 # https://bugs.freedesktop.org/show_bug.cgi?id=46506
1166 (
1167 grep "^export" "${S}/config_host.mk" > "${T}/config_host.mk"
1168 source "${T}/config_host.mk" 2&> /dev/null
1169
1170 local path="${WORKDIR}/helpcontent2/source/auxiliary/"
1171 mkdir -p "${path}" || die
1172
1173 echo "perl \"${S}/helpcontent2/helpers/create_ilst.pl\" -dir=icon-themes/galaxy/res/helpimg > \"${path}/helpimg.ilst\""
1174 perl "${S}/helpcontent2/helpers/create_ilst.pl" \
1175 -dir=icon-themes/galaxy/res/helpimg \
1176 > "${path}/helpimg.ilst"
1177 [[ -s "${path}/helpimg.ilst" ]] || ewarn "The help images list is empty, something is fishy, report a bug."
1178 )
1179
1180 local target
1181 use test && target="build" || target="build-nocheck"
1182
1183 # this is not a proper make script
1184 make ${target} || die
1185 }
1186
1187 src_test() {
1188 make unitcheck || die
1189 make slowcheck || die
1190 }
1191
1192 src_install() {
1193 # This is not Makefile so no buildserver
1194 make DESTDIR="${D}" distro-pack-install -o build -o check || die
1195
1196 # Fix bash completion placement
1197 newbashcomp "${ED}"/etc/bash_completion.d/libreoffice.sh ${PN}
1198 rm -rf "${ED}"/etc/
1199
1200 if use branding; then
1201 insinto /usr/$(get_libdir)/${PN}/program
1202 newins "${WORKDIR}/branding-sofficerc" sofficerc
1203 echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"/etc/env.d/99${PN}
1204 fi
1205
1206 # symlink the nsplugin to proper location
1207 # use gtk && inst_plugin /usr/$(get_libdir)/libreoffice/program/libnpsoplugin.so
1208
1209 # Hack for offlinehelp, this needs fixing upstream at some point.
1210 # It is broken because we send --without-help
1211 # https://bugs.freedesktop.org/show_bug.cgi?id=46506
1212 insinto /usr/$(get_libdir)/libreoffice/help
1213 doins xmlhelp/util/*.xsl
1214
1215 # Remove desktop files for support to old installs that can't parse mime
1216 rm -rf "${ED}"/usr/share/mimelnk/
1217
1218 pax-mark -m "${ED}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
1219 pax-mark -m "${ED}"/usr/$(get_libdir)/libreoffice/program/unopkg.bin
1220 }
1221
1222 pkg_preinst() {
1223 # Cache updates - all handled by kde eclass for all environments
1224 kde4-base_pkg_preinst
1225 }
1226
1227 pkg_postinst() {
1228 kde4-base_pkg_postinst
1229
1230 use java || \
1231 ewarn 'If you plan to use lbase application you should enable java or you will get various crashes.'
1232 }
1233
1234 pkg_postrm() {
1235 kde4-base_pkg_postrm
1236 }