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