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-9999-r1.ebuild ChangeLog libreoffice-3.4.9999-r1.ebuild libreoffice-3.4.3.2-r1.ebuild libreoffice-3.4.9999.ebuild libreoffice-9999.ebuild libreoffice-3.4.3.2.ebuild
Date: Sat, 03 Sep 2011 21:01:31
Message-Id: 20110903210118.BD0F220051@flycatcher.gentoo.org
1 scarabeus 11/09/03 21:01:18
2
3 Modified: ChangeLog
4 Added: libreoffice-9999-r1.ebuild
5 libreoffice-3.4.9999-r1.ebuild
6 libreoffice-3.4.3.2-r1.ebuild
7 Removed: libreoffice-3.4.9999.ebuild libreoffice-9999.ebuild
8 libreoffice-3.4.3.2.ebuild
9 Log:
10 Revision bump in order to REALLY avoid the collisions, the -l10n will block the non-revisioned versions.
11
12 (Portage version: 2.2.0_alpha52/cvs/Linux x86_64)
13
14 Revision Changes Path
15 1.122 app-office/libreoffice/ChangeLog
16
17 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/ChangeLog?rev=1.122&view=markup
18 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/ChangeLog?rev=1.122&content-type=text/plain
19 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/ChangeLog?r1=1.121&r2=1.122
20
21 Index: ChangeLog
22 ===================================================================
23 RCS file: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v
24 retrieving revision 1.121
25 retrieving revision 1.122
26 diff -u -r1.121 -r1.122
27 --- ChangeLog 3 Sep 2011 19:13:13 -0000 1.121
28 +++ ChangeLog 3 Sep 2011 21:01:18 -0000 1.122
29 @@ -1,6 +1,17 @@
30 # ChangeLog for app-office/libreoffice
31 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
32 -# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v 1.121 2011/09/03 19:13:13 scarabeus Exp $
33 +# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v 1.122 2011/09/03 21:01:18 scarabeus Exp $
34 +
35 +*libreoffice-9999-r1 (03 Sep 2011)
36 +*libreoffice-3.4.9999-r1 (03 Sep 2011)
37 +*libreoffice-3.4.3.2-r1 (03 Sep 2011)
38 +
39 + 03 Sep 2011; Tomáš Chvátal <scarabeus@g.o>
40 + -libreoffice-3.4.3.2.ebuild, +libreoffice-3.4.3.2-r1.ebuild,
41 + -libreoffice-3.4.9999.ebuild, +libreoffice-3.4.9999-r1.ebuild,
42 + -libreoffice-9999.ebuild, +libreoffice-9999-r1.ebuild:
43 + Revision bump in order to REALLY avoid the collisions, the -l10n will block
44 + the non-revisioned versions.
45
46 03 Sep 2011; Tomáš Chvátal <scarabeus@g.o>
47 libreoffice-3.4.3.2.ebuild, libreoffice-3.4.9999.ebuild,
48
49
50
51 1.1 app-office/libreoffice/libreoffice-9999-r1.ebuild
52
53 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-9999-r1.ebuild?rev=1.1&view=markup
54 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-9999-r1.ebuild?rev=1.1&content-type=text/plain
55
56 Index: libreoffice-9999-r1.ebuild
57 ===================================================================
58 # Copyright 1999-2011 Gentoo Foundation
59 # Distributed under the terms of the GNU General Public License v2
60 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-9999-r1.ebuild,v 1.1 2011/09/03 21:01:18 scarabeus Exp $
61
62 EAPI=3
63
64 KDE_REQUIRED="optional"
65 KDE_SCM="git"
66 CMAKE_REQUIRED="never"
67
68 PYTHON_DEPEND="2"
69 PYTHON_USE_WITH="threads,xml"
70
71 # experimental ; release ; old
72 # Usually the tarballs are moved a lot so this should make
73 # everyone happy.
74 DEV_URI="
75 http://dev-builds.libreoffice.org/pre-releases/src
76 http://download.documentfoundation.org/libreoffice/src
77 http://download.documentfoundation.org/libreoffice/old/src
78 "
79 EXT_URI="http://ooo.itc.hu/oxygenoffice/download/libreoffice"
80 ADDONS_URI="http://dev-www.libreoffice.org/src/"
81
82 BRANDING="${PN}-branding-gentoo-0.3.tar.xz"
83
84 [[ ${PV} == *9999* ]] && SCM_ECLASS="git-2"
85 inherit base autotools bash-completion check-reqs eutils java-pkg-opt-2 kde4-base pax-utils prefix python multilib toolchain-funcs flag-o-matic nsplugins ${SCM_ECLASS}
86 unset SCM_ECLASS
87
88 DESCRIPTION="LibreOffice, a full office productivity suite."
89 HOMEPAGE="http://www.libreoffice.org"
90 SRC_URI="branding? ( http://dev.gentooexperimental.org/~scarabeus/${BRANDING} )"
91
92 # Split modules following git/tarballs
93 # Core MUST be first!
94 MODULES="core binfilter dictionaries help"
95 # Only release has the tarballs
96 if [[ ${PV} != *9999* ]]; then
97 for i in ${DEV_URI}; do
98 for mod in ${MODULES}; do
99 SRC_URI+=" ${i}/${PN}-${mod}-${PV}.tar.bz2"
100 done
101 unset mod
102 done
103 unset i
104 fi
105 unset DEV_URI
106
107 # addons
108 # FIXME: actually review which one of these are used
109 ADDONS_SRC+=" ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip"
110 ADDONS_SRC+=" ${ADDONS_URI}/bd30e9cf5523cdfc019b94f5e1d7fd19-cppunit-1.12.1.tar.gz"
111 ADDONS_SRC+=" ${ADDONS_URI}/1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz"
112 ADDONS_SRC+=" ${ADDONS_URI}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz"
113 ADDONS_SRC+=" ${ADDONS_URI}/24be19595acad0a2cae931af77a0148a-LICENSE_source-9.0.0.7-bj.html"
114 ADDONS_SRC+=" ${ADDONS_URI}/2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz"
115 ADDONS_SRC+=" ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip"
116 ADDONS_SRC+=" ${ADDONS_URI}/35efabc239af896dfb79be7ebdd6e6b9-gentiumbasic-fonts-1.10.zip"
117 ADDONS_SRC+=" ${ADDONS_URI}/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip"
118 ADDONS_SRC+=" ${ADDONS_URI}/48470d662650c3c074e1c3fabbc67bbd-README_source-9.0.0.7-bj.txt"
119 ADDONS_SRC+=" ${ADDONS_URI}/4a660ce8466c9df01f19036435425c3a-glibc-2.1.3-stub.tar.gz"
120 ADDONS_SRC+=" ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip"
121 ADDONS_SRC+=" ${ADDONS_URI}/8294d6c42e3553229af9934c5c0ed997-stax-api-1.0-2-sources.jar"
122 ADDONS_SRC+=" ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip"
123 ADDONS_SRC+=" ${ADDONS_URI}/ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip"
124 ADDONS_SRC+=" ${ADDONS_URI}/d4c4d91ab3a8e52a2e69d48d34ef4df4-core.zip"
125 ADDONS_SRC+=" ${ADDONS_URI}/fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz"
126 ADDONS_SRC+=" ${ADDONS_URI}/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip"
127 ADDONS_SRC+=" ${ADDONS_URI}/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip"
128 ADDONS_SRC+=" ${ADDONS_URI}/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip"
129 ADDONS_SRC+=" ${ADDONS_URI}/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip"
130 ADDONS_SRC+=" ${ADDONS_URI}/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip"
131 ADDONS_SRC+=" ${ADDONS_URI}/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip"
132 ADDONS_SRC+=" ${ADDONS_URI}/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip"
133 ADDONS_SRC+=" ${ADDONS_URI}/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip"
134 ADDONS_SRC+=" ${ADDONS_URI}/451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt"
135 ADDONS_SRC+=" ${ADDONS_URI}/47e1edaa44269bc537ae8cabebb0f638-JLanguageTool-1.0.0.tar.bz2"
136 ADDONS_SRC+=" ${ADDONS_URI}/90401bca927835b6fbae4a707ed187c8-nlpsolver-0.9.tar.bz2"
137 ADDONS_SRC+=" ${ADDONS_URI}/0f63ee487fda8f21fafa767b3c447ac9-ixion-0.2.0.tar.gz"
138 ADDONS_SRC+=" ${ADDONS_URI}/71474203939fafbe271e1263e61d083e-nss-3.12.8-with-nspr-4.8.6.tar.gz"
139 ADDONS_SRC+=" http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll"
140 ADDONS_SRC+=" http://www.numbertext.org/linux/881af2b7dca9b8259abbca00bbbc004d-LinLibertineG-20110101.zip"
141 SRC_URI+=" ${ADDONS_SRC}"
142
143 TDEPEND="${EXT_URI}/472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt"
144 TDEPEND+=" linguas_de? ( ${EXT_URI}/53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt )"
145 TDEPEND+=" linguas_en_GB? ( ${EXT_URI}/472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt )"
146 TDEPEND+=" linguas_en_ZA? ( ${EXT_URI}/472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt )"
147 TDEPEND+=" linguas_es? ( ${EXT_URI}/4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt )"
148 TDEPEND+=" linguas_fr? ( ${EXT_URI}/a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt )"
149 TDEPEND+=" linguas_hu? ( ${EXT_URI}/09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt )"
150 TDEPEND+=" linguas_it? ( ${EXT_URI}/b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt )"
151 SRC_URI+=" templates? ( ${TDEPEND} )"
152
153 unset ADDONS_URI
154 unset EXT_URI
155 unset ADDONS_SRC
156
157 IUSE="binfilter +branding custom-cflags dbus debug eds gnome graphite
158 gstreamer gtk kde ldap mysql nsplugin odk opengl svg templates test +vba
159 webdav"
160 LICENSE="LGPL-3"
161 SLOT="0"
162 [[ ${PV} == *9999* ]] || KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
163
164 # lingua for templates
165 LANGUAGES="de en_GB en_ZA es fr hu it"
166 for X in ${LANGUAGES} ; do
167 IUSE+=" linguas_${X}"
168 done
169 unset X
170
171 COMMON_DEPEND="
172 app-arch/zip
173 app-arch/unzip
174 >=app-text/hunspell-1.3.2
175 app-text/mythes
176 app-text/libtextcat
177 app-text/libwpd:0.9[tools]
178 app-text/libwpg:0.2
179 >=app-text/libwps-0.2.2
180 >=app-text/poppler-0.12.3-r3[xpdf-headers]
181 dev-db/unixODBC
182 dev-libs/expat
183 >=dev-libs/glib-2.18
184 >=dev-libs/hyphen-2.7.1
185 >=dev-libs/icu-4.0
186 >=dev-lang/perl-5.0
187 >=dev-libs/openssl-0.9.8g
188 dev-libs/redland[ssl]
189 >=dev-python/translate-toolkit-1.8.0
190 media-libs/freetype:2
191 >=media-libs/fontconfig-2.3.0
192 >=media-libs/vigra-1.7
193 >=media-libs/libpng-1.4
194 net-print/cups
195 sci-mathematics/lpsolve
196 >=sys-libs/db-4.8
197 virtual/jpeg
198 >=x11-libs/cairo-1.10.0
199 x11-libs/libXinerama
200 x11-libs/libXrandr
201 x11-libs/libXrender
202 dbus? ( >=dev-libs/dbus-glib-0.94 )
203 eds? ( gnome-extra/evolution-data-server )
204 gnome? ( gnome-base/gconf:2 )
205 gtk? ( >=x11-libs/gtk+-2.24:2 )
206 graphite? ( media-gfx/graphite2 )
207 gstreamer? (
208 >=media-libs/gstreamer-0.10
209 >=media-libs/gst-plugins-base-0.10
210 )
211 java? (
212 >=dev-java/bsh-2.0_beta4
213 dev-java/lucene:2.9
214 dev-java/lucene-analyzers:2.3
215 dev-java/saxon:0
216 )
217 ldap? ( net-nds/openldap )
218 mysql? ( >=dev-db/mysql-connector-c++-1.1.0 )
219 nsplugin? (
220 net-libs/xulrunner:1.9
221 >=dev-libs/nspr-4.8.8
222 >=dev-libs/nss-3.12.9
223 )
224 opengl? ( virtual/opengl )
225 svg? ( gnome-base/librsvg )
226 webdav? ( net-libs/neon )
227 "
228
229 RDEPEND="${COMMON_DEPEND}
230 !app-office/libreoffice-bin
231 !app-office/openoffice-bin
232 !app-office/openoffice
233 java? ( >=virtual/jre-1.6 )
234 "
235
236 # FIXME: l10n after release/branching
237 PDEPEND="
238 >=app-office/libreoffice-l10n-3.4
239 "
240
241 DEPEND="${COMMON_DEPEND}
242 >=dev-libs/boost-1.46
243 >=dev-libs/libxml2-2.7.8
244 dev-libs/libxslt
245 dev-perl/Archive-Zip
246 >=dev-util/gperf-3
247 dev-util/intltool
248 dev-util/mdds
249 >=dev-util/pkgconfig-0.26
250 >=net-misc/curl-7.21.7
251 >=sys-apps/findutils-4.5.9
252 sys-devel/bison
253 sys-apps/coreutils
254 sys-devel/flex
255 sys-devel/gettext
256 >=sys-devel/make-3.82
257 sys-libs/zlib
258 x11-libs/libXtst
259 x11-proto/randrproto
260 x11-proto/xextproto
261 x11-proto/xineramaproto
262 x11-proto/xproto
263 java? (
264 =virtual/jdk-1.6*
265 >=dev-java/ant-core-1.7
266 test? ( dev-java/junit:4 )
267 )
268 "
269
270 PATCHES=(
271 "${FILESDIR}/${PN}-3.3.1-neon_remove_SSPI_support.diff"
272 "${FILESDIR}/sdext-presenter.diff"
273 "${FILESDIR}/${PN}-svx.patch"
274 "${FILESDIR}/${PN}-installed-files-permissions.patch"
275 "${FILESDIR}/${PN}-binfilter-as-needed.patch"
276 "${FILESDIR}/${PN}-kill-cppunit.patch"
277 )
278
279 # Uncoment me when updating to eapi4
280 # REQUIRED_USE="
281 # || ( gtk gnome kde )
282 # gnome? ( gtk )
283 # nsplugin? ( gtk )
284 #"
285
286 # Needs lots and lots of work and compiling
287 RESTRICT="test"
288
289 S="${WORKDIR}/${PN}-core-${PV}"
290
291 pkg_setup() {
292 java-pkg-opt-2_pkg_setup
293 kde4-base_pkg_setup
294
295 python_set_active_version 2
296 python_pkg_setup
297
298 if [[ $(gcc-major-version) -lt 4 ]]; then
299 eerror "Compilation with gcc older than 4.0 is not supported"
300 die "Too old gcc found."
301 fi
302
303 if use custom-cflags; then
304 ewarn "You are using custom CFLAGS, which is NOT supported and can cause"
305 ewarn "all sorts of build and runtime errors."
306 ewarn
307 ewarn "Before reporting a bug, please make sure you rebuild and try with"
308 ewarn "basic CFLAGS, otherwise the bug will not be accepted."
309 ewarn
310 fi
311
312 if ! use java; then
313 ewarn "You are building with java-support disabled, this results in some"
314 ewarn "of the LibreOffice functionality being disabled."
315 ewarn "If something you need does not work for you, rebuild with"
316 ewarn "java in your USE-flags."
317 ewarn
318 ewarn "Some java libraries will be provided internally by libreoffice"
319 ewarn "during the build. You should really reconsider enabling java"
320 ewarn "use flag."
321 ewarn
322 fi
323
324 if ! use gtk; then
325 ewarn "If you want the LibreOffice systray quickstarter to work"
326 ewarn "activate the 'gtk' use flag."
327 ewarn
328 fi
329
330 ewarn "Libreoffice compilation often fails on parallel issues"
331 ewarn "but the slowdown by enforcing MAKEOPTS=-j1 is too huge."
332 ewarn "If you encounter errors try yourself to disable parallel build."
333
334 # Check if we have enough RAM and free diskspace to build this beast
335 CHECKREQS_MEMORY="1024"
336 use debug && CHECKREQS_DISK_BUILD="15360" || CHECKREQS_DISK_BUILD="9216"
337 check_reqs
338 }
339
340 src_unpack() {
341 local mod dest tmplfile tmplname mypv
342
343 if use branding; then
344 unpack "${BRANDING}"
345 fi
346
347 if [[ ${PV} != *9999* ]]; then
348 for mod in ${MODULES}; do
349 unpack "${PN}-${mod}-${PV}.tar.bz2"
350 if [[ ${mod} != core ]]; then
351 mv -n "${WORKDIR}/${PN}-${mod}-${PV}"/* "${S}"
352 rm -rf "${WORKDIR}/${PN}-${mod}-${PV}"
353 fi
354 done
355 else
356 for mod in ${MODULES}; do
357 mypv=${PV/.9999}
358 [[ ${mypv} != ${PV} ]] && EGIT_BRANCH="${PN}-${mypv/./-}"
359 EGIT_PROJECT="${PN}/${mod}"
360 EGIT_SOURCEDIR="${WORKDIR}/${PN}-${mod}-${PV}"
361 EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${mod}"
362 EGIT_NOUNPACK="true"
363 git-2_src_unpack
364 if [[ ${mod} != core ]]; then
365 mv -n "${WORKDIR}/${PN}-${mod}-${PV}"/* "${S}"
366 rm -rf "${WORKDIR}/${PN}-${mod}-${PV}"
367 fi
368 done
369 unset EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
370 fi
371
372 # copy extension templates; o what fun ...
373 if use templates; then
374 dest="${S}/extras/source/extensions"
375 mkdir -p "${dest}"
376
377 for template in ${TDEPEND}; do
378 if [[ ${template} == *.oxt ]]; then
379 tmplfile="${DISTDIR}/$(basename ${template})"
380 tmplname="$(echo "${template}" | \
381 cut -f 2- -s -d - | cut -f 1 -d _)"
382 echo ">>> Unpacking ${tmplfile/\*/} to ${dest}"
383 if [[ -f ${tmplfile} && ! -f "${dest}/${tmplname}.oxt" ]]; then
384 cp -v "${tmplfile}" "${dest}/${tmplname}.oxt" || die
385 fi
386 fi
387 done
388 fi
389 }
390
391 src_prepare() {
392 # optimization flags
393 export ARCH_FLAGS="${CXXFLAGS}"
394 use debug || export LINKFLAGSOPTIMIZE="${LDFLAGS}"
395
396 # compiler flags
397 use custom-cflags || strip-flags
398 use debug || filter-flags "-g*"
399 # silent miscompiles; LO/OOo adds -O2/1/0 where appropriate
400 filter-flags "-O*"
401
402 base_src_prepare
403 eautoreconf
404 }
405
406 src_configure() {
407 local java_opts
408 local internal_libs
409 local extensions
410 local themes="crystal"
411 local jbs=$(sed -ne 's/.*\(-j[[:space:]]*\|--jobs=\)\([[:digit:]]\+\).*/\2/;T;p' <<< "${MAKEOPTS}")
412
413 # recheck that there is some value in jobs
414 [[ -z ${jbs} ]] && jbs="1"
415
416 # expand themes we are going to build based on DE useflags
417 use gnome && themes+=" tango"
418 use kde && themes+=" oxygen"
419
420 # list the extensions we are going to build by default
421 extensions="
422 --enable-ext-pdfimport
423 --enable-ext-presenter-console
424 --enable-ext-presenter-minimizer
425 "
426
427 # hsqldb: requires just 1.8.0 not 1.8.1 which we don't ship at all
428 # dmake: not worth of splitting out
429 # cppunit: patched not to run anything, just main() { return 0; }
430 # workaround to upstream running the tests during build
431 # sane: just sane.h header that is used for scan in writer, not
432 # linked or anything else, worthless to depend on
433 internal_libs+="
434 --without-system-hsqldb
435 --without-system-cppunit
436 --without-system-sane
437 "
438
439 # When building without java some things needs to be done
440 # as internal libraries.
441 if ! use java; then
442 internal_libs+="
443 --without-system-beanshell
444 --without-system-lucene
445 --without-system-saxon
446 --without-junit
447 "
448 else
449 java_opts="
450 --with-ant-home="${ANT_HOME}"
451 --with-jdk-home=$(java-config --jdk-home 2>/dev/null)
452 --with-java-target-version=$(java-pkg_get-target)
453 --with-jvm-path="${EPREFIX}/usr/$(get_libdir)/"
454 --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)
455 --with-lucene-core-jar=$(java-pkg_getjar lucene-2.9 lucene-core.jar)
456 --with-lucene-analyzers-jar=$(java-pkg_getjar lucene-analyzers-2.3 lucene-analyzers.jar)
457 --with-saxon-jar=$(java-pkg_getjar saxon saxon8.jar)
458 "
459 if use test; then
460 java_opts+=" --with-junit=$(java-pkg_getjar junit-4 junit.jar)"
461 else
462 java_opts+=" --without-junit"
463 fi
464 fi
465
466 if use branding; then
467 extensions+="
468 --with-about-bitmap="${WORKDIR}/branding-about.png"
469 --with-intro-bitmap="${WORKDIR}/branding-intro.png"
470 "
471 fi
472
473 # system headers/libs/...: enforce using system packages
474 # only expections are mozilla and odbc/sane/xrender-header(s).
475 # for jars the exception is db.jar controlled by --with-system-db
476 # --enable-unix-qstart-libpng: use libpng splashscreen that is faster
477 # --enable-cairo: ensure that cairo is always required
478 # --enable-*-link: link to the library rather than just dlopen on runtime
479 # --enable-release-build: build the libreoffice as release
480 # --disable-fetch-external: prevent dowloading during compile phase
481 # --disable-gnome-vfs: old gnome virtual fs support
482 # --disable-kdeab: kde3 adressbook
483 # --disable-kde: kde3 support
484 # --disable-pch: precompiled headers cause build crashes
485 # --disable-rpath: relative runtime path is not desired
486 # --disable-static-gtk: ensure that gtk is linked dynamically
487 # --disable-ugly: disable ugly pieces of code
488 # --disable-zenity: disable build icon
489 # --with-extension-integration: enable any extension integration support
490 # --with-{max-jobs,num-cpus}: ensuring parallel building
491 # --without-{afms,fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
492 # --without-stlport: disable deprecated extensions framework
493 econf \
494 --docdir="${EPREFIX}/usr/share/doc/${PF}/" \
495 --with-system-headers \
496 --with-system-libs \
497 --with-system-jars \
498 --with-system-db \
499 --with-system-dicts \
500 --enable-cairo-canvas \
501 --enable-largefile \
502 --enable-python=system \
503 --enable-randr \
504 --enable-randr-link \
505 --enable-release-build \
506 --enable-unix-qstart-libpng \
507 --enable-xrender-link \
508 --disable-crashdump \
509 --disable-dependency-tracking \
510 --disable-epm \
511 --disable-fetch-external \
512 --disable-gnome-vfs \
513 --disable-kdeab \
514 --disable-kde \
515 --disable-online-update \
516 --disable-pch \
517 --disable-rpath \
518 --disable-static-gtk \
519 --disable-strip-solver \
520 --disable-ugly \
521 --disable-zenity \
522 --with-alloc=system \
523 --with-build-version="Gentoo official package" \
524 --with-extension-integration \
525 --with-external-dict-dir="${EPREFIX}/usr/share/myspell" \
526 --with-external-hyph-dir="${EPREFIX}/usr/share/myspell" \
527 --with-external-thes-dir="${EPREFIX}/usr/share/myspell" \
528 --with-external-tar="${DISTDIR}" \
529 --with-lang="" \
530 --with-max-jobs=${jbs} \
531 --with-num-cpus=1 \
532 --with-theme="${themes}" \
533 --with-unix-wrapper=libreoffice \
534 --with-vendor="Gentoo Foundation" \
535 --with-x \
536 --without-afms \
537 --without-fonts \
538 --without-myspell-dicts \
539 --without-ppds \
540 --without-stlport \
541 $(use_enable binfilter) \
542 $(use_enable dbus) \
543 $(use_enable debug crashdump) \
544 $(use_enable eds evolution2) \
545 $(use_enable gnome gconf) \
546 $(use_enable gnome gio) \
547 $(use_enable gnome lockdown) \
548 $(use_enable graphite) \
549 $(use_enable gstreamer) \
550 $(use_enable gtk) \
551 $(use_enable gtk gtk3) \
552 $(use_enable gtk systray) \
553 $(use_enable java ext-scripting-beanshell) \
554 $(use_enable kde kde4) \
555 $(use_enable ldap) \
556 $(use_enable mysql ext-mysql-connector) \
557 $(use_enable nsplugin mozilla) \
558 $(use_enable odk) \
559 $(use_enable opengl) \
560 $(use_enable svg librsvg system) \
561 $(use_enable vba) \
562 $(use_enable vba activex-component) \
563 $(use_enable webdav neon) \
564 $(use_with java) \
565 $(use_with ldap openldap) \
566 $(use_with mysql system-mysql-cppconn) \
567 $(use_with nsplugin system-mozilla libxul) \
568 $(use_with templates sun-templates) \
569 ${internal_libs} \
570 ${java_opts} \
571 ${extensions}
572 }
573
574 src_compile() {
575 # this is not a proper make script and the jobs are passed during configure
576 make || die
577 }
578
579 src_install() {
580 # This is not Makefile so no buildserver
581 make DESTDIR="${D}" distro-pack-install || die
582
583 # Fix bash completion placement
584 dobashcompletion "${ED}"/etc/bash_completion.d/libreoffice.sh ${PN}
585 rm -rf "${ED}"/etc/
586
587 # symlink the plugin to system location
588 if use nsplugin; then
589 inst_plugin /usr/$(get_libdir)/libreoffice/program/libnpsoplugin.so
590 fi
591
592 if use branding; then
593 insinto /usr/$(get_libdir)/${PN}/program
594 newins "${WORKDIR}/branding-sofficerc" sofficerc || die
595 fi
596 }
597
598 pkg_preinst() {
599 # Cache updates - all handled by kde eclass for all environments
600 kde4-base_pkg_preinst
601 }
602
603 pkg_postinst() {
604 kde4-base_pkg_postinst
605
606 pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
607 }
608
609 pkg_postrm() {
610 kde4-base_pkg_postrm
611 }
612
613
614
615 1.1 app-office/libreoffice/libreoffice-3.4.9999-r1.ebuild
616
617 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-3.4.9999-r1.ebuild?rev=1.1&view=markup
618 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-3.4.9999-r1.ebuild?rev=1.1&content-type=text/plain
619
620 Index: libreoffice-3.4.9999-r1.ebuild
621 ===================================================================
622 # Copyright 1999-2011 Gentoo Foundation
623 # Distributed under the terms of the GNU General Public License v2
624 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-3.4.9999-r1.ebuild,v 1.1 2011/09/03 21:01:18 scarabeus Exp $
625
626 EAPI=3
627
628 KDE_REQUIRED="optional"
629 KDE_SCM="git"
630 CMAKE_REQUIRED="never"
631
632 PYTHON_DEPEND="2"
633 PYTHON_USE_WITH="threads,xml"
634
635 # experimental ; release ; old
636 # Usually the tarballs are moved a lot so this should make
637 # everyone happy.
638 DEV_URI="
639 http://dev-builds.libreoffice.org/pre-releases/src
640 http://download.documentfoundation.org/libreoffice/src
641 http://download.documentfoundation.org/libreoffice/old/src
642 "
643 EXT_URI="http://ooo.itc.hu/oxygenoffice/download/libreoffice"
644 ADDONS_URI="http://dev-www.libreoffice.org/src/"
645
646 BRANDING="${PN}-branding-gentoo-0.3.tar.xz"
647
648 [[ ${PV} == *9999* ]] && SCM_ECLASS="git-2"
649 inherit base autotools bash-completion check-reqs eutils java-pkg-opt-2 kde4-base pax-utils prefix python multilib toolchain-funcs flag-o-matic nsplugins versionator ${SCM_ECLASS}
650 unset SCM_ECLASS
651
652 DESCRIPTION="LibreOffice, a full office productivity suite."
653 HOMEPAGE="http://www.libreoffice.org"
654 SRC_URI="branding? ( http://dev.gentooexperimental.org/~scarabeus/${BRANDING} )"
655
656 # Bootstrap MUST be first!
657 MODULES="bootstrap artwork base calc components extensions extras filters help
658 impress libs-core libs-extern libs-extern-sys libs-gui postprocess sdk testing
659 ure writer"
660 # Only release has the tarballs
661 if [[ ${PV} != *9999* ]]; then
662 for i in ${DEV_URI}; do
663 for mod in ${MODULES}; do
664 SRC_URI+=" ${i}/${PN}-${mod}-${PV}.tar.bz2"
665 done
666 unset mod
667 done
668 unset i
669 fi
670 unset DEV_URI
671
672 # addons
673 # FIXME: actually review which one of these are used
674 ADDONS_SRC+=" ${ADDONS_URI}/128cfc86ed5953e57fe0f5ae98b62c2e-libtextcat-2.2.tar.gz"
675 ADDONS_SRC+=" ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip"
676 ADDONS_SRC+=" ${ADDONS_URI}/bd30e9cf5523cdfc019b94f5e1d7fd19-cppunit-1.12.1.tar.gz"
677 ADDONS_SRC+=" ${ADDONS_URI}/1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz"
678 ADDONS_SRC+=" ${ADDONS_URI}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz"
679 ADDONS_SRC+=" ${ADDONS_URI}/24be19595acad0a2cae931af77a0148a-LICENSE_source-9.0.0.7-bj.html"
680 ADDONS_SRC+=" ${ADDONS_URI}/2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz"
681 ADDONS_SRC+=" ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip"
682 ADDONS_SRC+=" ${ADDONS_URI}/35efabc239af896dfb79be7ebdd6e6b9-gentiumbasic-fonts-1.10.zip"
683 ADDONS_SRC+=" ${ADDONS_URI}/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip"
684 ADDONS_SRC+=" ${ADDONS_URI}/48470d662650c3c074e1c3fabbc67bbd-README_source-9.0.0.7-bj.txt"
685 ADDONS_SRC+=" ${ADDONS_URI}/4a660ce8466c9df01f19036435425c3a-glibc-2.1.3-stub.tar.gz"
686 ADDONS_SRC+=" ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip"
687 ADDONS_SRC+=" ${ADDONS_URI}/8294d6c42e3553229af9934c5c0ed997-stax-api-1.0-2-sources.jar"
688 ADDONS_SRC+=" ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip"
689 ADDONS_SRC+=" ${ADDONS_URI}/ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip"
690 ADDONS_SRC+=" ${ADDONS_URI}/d4c4d91ab3a8e52a2e69d48d34ef4df4-core.zip"
691 ADDONS_SRC+=" ${ADDONS_URI}/fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz"
692 ADDONS_SRC+=" ${ADDONS_URI}/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip"
693 ADDONS_SRC+=" ${ADDONS_URI}/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip"
694 ADDONS_SRC+=" ${ADDONS_URI}/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip"
695 ADDONS_SRC+=" ${ADDONS_URI}/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip"
696 ADDONS_SRC+=" ${ADDONS_URI}/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip"
697 ADDONS_SRC+=" ${ADDONS_URI}/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip"
698 ADDONS_SRC+=" ${ADDONS_URI}/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip"
699 ADDONS_SRC+=" ${ADDONS_URI}/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip"
700 ADDONS_SRC+=" ${ADDONS_URI}/451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt"
701 ADDONS_SRC+=" ${ADDONS_URI}/47e1edaa44269bc537ae8cabebb0f638-JLanguageTool-1.0.0.tar.bz2"
702 ADDONS_SRC+=" ${ADDONS_URI}/90401bca927835b6fbae4a707ed187c8-nlpsolver-0.9.tar.bz2"
703 ADDONS_SRC+=" ${ADDONS_URI}/0f63ee487fda8f21fafa767b3c447ac9-ixion-0.2.0.tar.gz"
704 ADDONS_SRC+=" ${ADDONS_URI}/71474203939fafbe271e1263e61d083e-nss-3.12.8-with-nspr-4.8.6.tar.gz"
705 ADDONS_SRC+=" http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll"
706 ADDONS_SRC+=" http://download.go-oo.org/extern/b4cae0700aa1c2aef7eb7f345365e6f1-translate-toolkit-1.8.1.tar.bz2"
707 ADDONS_SRC+=" http://www.numbertext.org/linux/881af2b7dca9b8259abbca00bbbc004d-LinLibertineG-20110101.zip"
708 SRC_URI+=" ${ADDONS_SRC}"
709
710 TDEPEND="${EXT_URI}/472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt"
711 TDEPEND+=" linguas_de? ( ${EXT_URI}/53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt )"
712 TDEPEND+=" linguas_en_GB? ( ${EXT_URI}/472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt )"
713 TDEPEND+=" linguas_en_ZA? ( ${EXT_URI}/472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt )"
714 TDEPEND+=" linguas_es? ( ${EXT_URI}/4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt )"
715 TDEPEND+=" linguas_fr? ( ${EXT_URI}/a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt )"
716 TDEPEND+=" linguas_hu? ( ${EXT_URI}/09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt )"
717 TDEPEND+=" linguas_it? ( ${EXT_URI}/b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt )"
718 SRC_URI+=" templates? ( ${TDEPEND} )"
719
720 unset ADDONS_URI
721 unset EXT_URI
722 unset ADDONS_SRC
723
724 IUSE="binfilter +branding cups custom-cflags dbus debug eds gnome graphite
725 gstreamer gtk kde ldap mysql nsplugin odk opengl python templates test +vba
726 webdav"
727 LICENSE="LGPL-3"
728 SLOT="0"
729 [[ ${PV} == *9999* ]] || KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
730
731 # lingua for templates
732 LANGUAGES="de en_GB en_ZA es fr hu it"
733 for X in ${LANGUAGES} ; do
734 IUSE+=" linguas_${X}"
735 done
736 unset X
737
738 COMMON_DEPEND="
739 app-arch/zip
740 app-arch/unzip
741 >=app-text/hunspell-1.3.2
742 app-text/mythes
743 app-text/libwpd:0.9[tools]
744 app-text/libwpg:0.2
745 >=app-text/libwps-0.2.2
746 >=app-text/poppler-0.12.3-r3[xpdf-headers]
747 dev-db/unixODBC
748 dev-libs/expat
749 >=dev-libs/glib-2.18
750 >=dev-libs/hyphen-2.7.1
751 >=dev-libs/icu-4.0
752 >=dev-lang/perl-5.0
753 >=dev-libs/openssl-0.9.8g
754 dev-libs/redland[ssl]
755 media-libs/freetype:2
756 >=media-libs/fontconfig-2.3.0
757 >=media-libs/vigra-1.7
758 >=media-libs/libpng-1.4
759 sci-mathematics/lpsolve
760 >=sys-libs/db-4.8
761 virtual/jpeg
762 >=x11-libs/cairo-1.10.0
763 x11-libs/libXaw
764 x11-libs/libXinerama
765 x11-libs/libXrandr
766 x11-libs/libXrender
767 cups? ( net-print/cups )
768 dbus? ( >=dev-libs/dbus-glib-0.94 )
769 eds? ( gnome-extra/evolution-data-server )
770 gnome? ( gnome-base/gconf:2 )
771 gtk? ( >=x11-libs/gtk+-2.24:2 )
772 graphite? ( media-gfx/graphite2 )
773 gstreamer? (
774 >=media-libs/gstreamer-0.10
775 >=media-libs/gst-plugins-base-0.10
776 )
777 java? (
778 >=dev-java/bsh-2.0_beta4
779 dev-java/lucene:2.9
780 dev-java/lucene-analyzers:2.3
781 dev-java/saxon:0
782 )
783 ldap? ( net-nds/openldap )
784 mysql? ( >=dev-db/mysql-connector-c++-1.1.0 )
785 nsplugin? (
786 net-libs/xulrunner:1.9
787 >=dev-libs/nspr-4.8.8
788 >=dev-libs/nss-3.12.9
789 )
790 opengl? ( virtual/opengl )
791 webdav? ( net-libs/neon )
792 "
793
794 RDEPEND="${COMMON_DEPEND}
795 !app-office/libreoffice-bin
796 !app-office/openoffice-bin
797 !app-office/openoffice
798 java? ( >=virtual/jre-1.6 )
799 "
800
801 PDEPEND="
802 >=app-office/libreoffice-l10n-$(get_version_component_range 1-2)
803 "
804
805 DEPEND="${COMMON_DEPEND}
806 >=dev-libs/boost-1.46
807 >=dev-libs/libxml2-2.7.8
808 dev-libs/libxslt
809 dev-perl/Archive-Zip
810 >=dev-util/gperf-3
811 dev-util/intltool
812 dev-util/mdds
813 >=dev-util/pkgconfig-0.26
814 >=net-misc/curl-7.21.7
815 >=sys-apps/findutils-4.5.9
816 sys-devel/bison
817 sys-apps/coreutils
818 sys-devel/flex
819 >=sys-devel/make-3.82
820 sys-libs/zlib
821 x11-libs/libXtst
822 x11-proto/randrproto
823 x11-proto/xextproto
824 x11-proto/xineramaproto
825 x11-proto/xproto
826 java? (
827 =virtual/jdk-1.6*
828 >=dev-java/ant-core-1.7
829 test? ( dev-java/junit:4 )
830 )
831 "
832
833 PATCHES=(
834 "${FILESDIR}/${PN}-3.3.1-neon_remove_SSPI_support.diff"
835 "${FILESDIR}/${PN}-libdb5-fix-check.diff"
836 "${FILESDIR}/${PN}-3.4.1-salfix.diff"
837 "${FILESDIR}/sdext-presenter.diff"
838 "${FILESDIR}/${PN}-svx.patch"
839 "${FILESDIR}/${PN}-vbaobj-visibility-fix.patch"
840 "${FILESDIR}/${PN}-solenv-build-crash.patch"
841 "${FILESDIR}/${PN}-as-needed-gtk.patch"
842 "${FILESDIR}/${PN}-translate-toolkit-parallel-solenv.patch"
843 "${FILESDIR}/${PN}-gbuild-use-cxxflags.patch"
844 "${FILESDIR}/${PN}-installed-files-permissions.patch"
845 "${FILESDIR}/${PN}-check-for-avx.patch"
846 "${FILESDIR}/${PN}-append-no-avx.patch"
847 "${FILESDIR}/${PN}-32b-qt4-libdir.patch"
848 "${FILESDIR}/${PN}-binfilter-as-needed.patch"
849 "${FILESDIR}/${PN}-kill-cppunit.patch"
850 )
851
852 # Uncoment me when updating to eapi4
853 # REQUIRED_USE="
854 # || ( gtk gnome kde )
855 # gnome? ( gtk )
856 # nsplugin? ( gtk )
857 #"
858
859 # Needs lots and lots of work and compiling
860 RESTRICT="test"
861
862 S="${WORKDIR}/${PN}-bootstrap-${PV}"
863
864 pkg_setup() {
865 java-pkg-opt-2_pkg_setup
866 kde4-base_pkg_setup
867
868 python_set_active_version 2
869 python_pkg_setup
870
871 if [[ $(gcc-major-version) -lt 4 ]]; then
872 eerror "Compilation with gcc older than 4.0 is not supported"
873 die "Too old gcc found."
874 fi
875
876 if use custom-cflags; then
877 ewarn "You are using custom CFLAGS, which is NOT supported and can cause"
878 ewarn "all sorts of build and runtime errors."
879 ewarn
880 ewarn "Before reporting a bug, please make sure you rebuild and try with"
881 ewarn "basic CFLAGS, otherwise the bug will not be accepted."
882 ewarn
883 fi
884
885 if ! use java; then
886 ewarn "You are building with java-support disabled, this results in some"
887 ewarn "of the LibreOffice functionality being disabled."
888 ewarn "If something you need does not work for you, rebuild with"
889 ewarn "java in your USE-flags."
890 ewarn
891 ewarn "Some java libraries will be provided internally by libreoffice"
892 ewarn "during the build. You should really reconsider enabling java"
893 ewarn "use flag."
894 ewarn
895 fi
896
897 if ! use gtk; then
898 ewarn "If you want the LibreOffice systray quickstarter to work"
899 ewarn "activate the 'gtk' use flag."
900 ewarn
901 fi
902
903 ewarn "Libreoffice compilation often fails on parallel issues"
904 ewarn "but the slowdown by enforcing MAKEOPTS=-j1 is too huge."
905 ewarn "If you encounter errors try yourself to disable parallel build."
906
907 # Check if we have enough RAM and free diskspace to build this beast
908 CHECKREQS_MEMORY="1024"
909 use debug && CHECKREQS_DISK_BUILD="15360" || CHECKREQS_DISK_BUILD="9216"
910 check_reqs
911 }
912
913 src_unpack() {
914 local mod dest tmplfile tmplname mypv
915
916 if use branding; then
917 unpack "${BRANDING}"
918 fi
919
920 if [[ ${PV} != *9999* ]]; then
921 for mod in ${MODULES}; do
922 unpack "${PN}-${mod}-${PV}.tar.bz2"
923 if [[ ${mod} != bootstrap ]]; then
924 mv -n "${WORKDIR}/${PN}-${mod}-${PV}"/* "${S}"
925 rm -rf "${WORKDIR}/${PN}-${mod}-${PV}"
926 fi
927 done
928 else
929 for mod in ${MODULES}; do
930 mypv=${PV/.9999}
931 [[ ${mypv} != ${PV} ]] && EGIT_BRANCH="${PN}-${mypv/./-}"
932 EGIT_PROJECT="${PN}/${mod}"
933 EGIT_SOURCEDIR="${WORKDIR}/${PN}-${mod}-${PV}"
934 EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${mod}"
935 EGIT_NOUNPACK="true"
936 git-2_src_unpack
937 if [[ ${mod} != bootstrap ]]; then
938 mv -n "${WORKDIR}/${PN}-${mod}-${PV}"/* "${S}"
939 rm -rf "${WORKDIR}/${PN}-${mod}-${PV}"
940 fi
941 done
942 unset EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
943 fi
944
945 # copy extension templates; o what fun ...
946 if use templates; then
947 dest="${S}/extras/source/extensions"
948 mkdir -p "${dest}"
949
950 for template in ${TDEPEND}; do
951 if [[ ${template} == *.oxt ]]; then
952 tmplfile="${DISTDIR}/$(basename ${template})"
953 tmplname="$(echo "${template}" | \
954 cut -f 2- -s -d - | cut -f 1 -d _)"
955 echo ">>> Unpacking ${tmplfile/\*/} to ${dest}"
956 if [[ -f ${tmplfile} && ! -f "${dest}/${tmplname}.oxt" ]]; then
957 cp -v "${tmplfile}" "${dest}/${tmplname}.oxt" || die
958 fi
959 fi
960 done
961 fi
962 }
963
964 src_prepare() {
965 # optimization flags
966 export ARCH_FLAGS="${CXXFLAGS}"
967 use debug || export LINKFLAGSOPTIMIZE="${LDFLAGS}"
968
969 # compiler flags
970 use custom-cflags || strip-flags
971 use debug || filter-flags "-g*"
972 # silent miscompiles; LO/OOo adds -O2/1/0 where appropriate
973 filter-flags "-O*"
974
975 base_src_prepare
976 eautoreconf
977 }
978
979 src_configure() {
980 local java_opts
981 local internal_libs
982 local extensions
983 local themes="crystal"
984 local jbs=$(sed -ne 's/.*\(-j[[:space:]]*\|--jobs=\)\([[:digit:]]\+\).*/\2/;T;p' <<< "${MAKEOPTS}")
985
986 # recheck that there is some value in jobs
987 [[ -z ${jbs} ]] && jbs="1"
988
989 # expand themes we are going to build based on DE useflags
990 use gnome && themes+=" tango"
991 use kde && themes+=" oxygen"
992
993 # list the extensions we are going to build by default
994 extensions="
995 --enable-ext-pdfimport
996 --enable-ext-presenter-console
997 --enable-ext-presenter-minimizer
998 "
999
1000 # hsqldb: requires just 1.8.0 not 1.8.1 which we don't ship at all
1001 # dmake: not worth of splitting out
1002 # cppunit: patched not to run anything, just main() { return 0; }
1003 # workaround to upstream running the tests during build
1004 # sane: just sane.h header that is used for scan in writer, not
1005 # linked or anything else, worthless to depend on
1006 internal_libs+="
1007 --without-system-hsqldb
1008 --without-system-cppunit
1009 --without-system-sane-header
1010 "
1011
1012 # When building without java some things needs to be done
1013 # as internal libraries.
1014 if ! use java; then
1015 internal_libs+="
1016 --without-system-beanshell
1017 --without-system-lucene
1018 --without-system-saxon
1019 --without-junit
1020 "
1021 else
1022 java_opts="
1023 --with-ant-home="${ANT_HOME}"
1024 --with-jdk-home=$(java-config --jdk-home 2>/dev/null)
1025 --with-java-target-version=$(java-pkg_get-target)
1026 --with-jvm-path="${EPREFIX}/usr/$(get_libdir)/"
1027 --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)
1028 --with-lucene-core-jar=$(java-pkg_getjar lucene-2.9 lucene-core.jar)
1029 --with-lucene-analyzers-jar=$(java-pkg_getjar lucene-analyzers-2.3 lucene-analyzers.jar)
1030 --with-saxon-jar=$(java-pkg_getjar saxon saxon8.jar)
1031 "
1032 if use test; then
1033 java_opts+=" --with-junit=$(java-pkg_getjar junit-4 junit.jar)"
1034 else
1035 java_opts+=" --without-junit"
1036 fi
1037 fi
1038
1039 if use branding; then
1040 extensions+="
1041 --with-about-bitmap="${WORKDIR}/branding-about.png"
1042 --with-intro-bitmap="${WORKDIR}/branding-intro.png"
1043 "
1044 fi
1045
1046 # system headers/libs/...: enforce using system packages
1047 # only expections are mozilla and odbc/sane/xrender-header(s).
1048 # for jars the exception is db.jar controlled by --with-system-db
1049 # --enable-unix-qstart-libpng: use libpng splashscreen that is faster
1050 # --disable-broffice: do not use brazillian brand just be uniform
1051 # --enable-cairo: ensure that cairo is always required
1052 # --enable-*-link: link to the library rather than just dlopen on runtime
1053 # --disable-fetch-external: prevent dowloading during compile phase
1054 # --disable-gnome-vfs: old gnome virtual fs support
1055 # --disable-kdeab: kde3 adressbook
1056 # --disable-kde: kde3 support
1057 # --disable-pch: precompiled headers cause build crashes
1058 # --disable-rpath: relative runtime path is not desired
1059 # --disable-static-gtk: ensure that gtk is linked dynamically
1060 # --disable-zenity: disable build icon
1061 # --with-extension-integration: enable any extension integration support
1062 # --with-{max-jobs,num-cpus}: ensuring parallel building
1063 # --without-{afms,fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
1064 # --without-stlport: disable deprecated extensions framework
1065 econf \
1066 --docdir="${EPREFIX}/usr/share/doc/${PF}/" \
1067 --with-system-headers \
1068 --with-system-libs \
1069 --with-system-jars \
1070 --with-system-db \
1071 --with-system-dicts \
1072 --enable-cairo \
1073 --enable-fontconfig \
1074 --enable-largefile \
1075 --enable-randr \
1076 --enable-randr-link \
1077 --enable-unix-qstart-libpng \
1078 --enable-Xaw \
1079 --enable-xrender-link \
1080 --disable-broffice \
1081 --disable-crashdump \
1082 --disable-dependency-tracking \
1083 --disable-epm \
1084 --disable-fetch-external \
1085 --disable-gnome-vfs \
1086 --disable-kdeab \
1087 --disable-kde \
1088 --disable-online-update \
1089 --disable-pch \
1090 --disable-rpath \
1091 --disable-static-gtk \
1092 --disable-strip-solver \
1093 --disable-zenity \
1094 --with-alloc=system \
1095 --with-build-version="Gentoo official package" \
1096 --with-extension-integration \
1097 --with-external-dict-dir="${EPREFIX}/usr/share/myspell" \
1098 --with-external-hyph-dir="${EPREFIX}/usr/share/myspell" \
1099 --with-external-thes-dir="${EPREFIX}/usr/share/myspell" \
1100 --with-external-tar="${DISTDIR}" \
1101 --with-lang="" \
1102 --with-max-jobs=${jbs} \
1103 --with-num-cpus=1 \
1104 --with-theme="${themes}" \
1105 --with-unix-wrapper=libreoffice \
1106 --with-vendor="Gentoo Foundation" \
1107 --with-x \
1108 --without-afms \
1109 --without-fonts \
1110 --without-myspell-dicts \
1111 --without-ppds \
1112 --without-stlport \
1113 $(use_enable binfilter) \
1114 $(use_enable cups) \
1115 $(use_enable dbus) \
1116 $(use_enable debug crashdump) \
1117 $(use_enable eds evolution2) \
1118 $(use_enable gnome gconf) \
1119 $(use_enable gnome gio) \
1120 $(use_enable gnome lockdown) \
1121 $(use_enable graphite) \
1122 $(use_enable gstreamer) \
1123 $(use_enable gtk) \
1124 $(use_enable gtk systray) \
1125 $(use_enable java ext-scripting-beanshell) \
1126 $(use_enable kde kde4) \
1127 $(use_enable ldap) \
1128 $(use_enable mysql ext-mysql-connector) \
1129 $(use_enable nsplugin mozilla) \
1130 $(use_enable odk) \
1131 $(use_enable opengl) \
1132 $(use_enable python) \
1133 $(use_enable python ext-scripting-python) \
1134 $(use_enable vba) \
1135 $(use_enable vba activex-component) \
1136 $(use_enable webdav neon) \
1137 $(use_with java) \
1138 $(use_with ldap openldap) \
1139 $(use_with mysql system-mysql-cppconn) \
1140 $(use_with nsplugin system-mozilla libxul) \
1141 $(use_with templates sun-templates) \
1142 ${internal_libs} \
1143 ${java_opts} \
1144 ${extensions}
1145 }
1146
1147 src_compile() {
1148 # this is not a proper make script and the jobs are passed during configure
1149 make || die
1150 }
1151
1152 src_install() {
1153 # This is not Makefile so no buildserver
1154 make DESTDIR="${D}" distro-pack-install || die
1155
1156 # Fix bash completion placement
1157 dobashcompletion "${ED}"/etc/bash_completion.d/libreoffice.sh ${PN}
1158 rm -rf "${ED}"/etc/
1159
1160 # symlink the plugin to system location
1161 if use nsplugin; then
1162 inst_plugin /usr/$(get_libdir)/libreoffice/program/libnpsoplugin.so
1163 fi
1164
1165 if use branding; then
1166 insinto /usr/$(get_libdir)/${PN}/program
1167 newins "${WORKDIR}/branding-sofficerc" sofficerc || die
1168 fi
1169 }
1170
1171 pkg_preinst() {
1172 # Cache updates - all handled by kde eclass for all environments
1173 kde4-base_pkg_preinst
1174 }
1175
1176 pkg_postinst() {
1177 kde4-base_pkg_postinst
1178
1179 pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
1180 }
1181
1182 pkg_postrm() {
1183 kde4-base_pkg_postrm
1184 }
1185
1186
1187
1188 1.1 app-office/libreoffice/libreoffice-3.4.3.2-r1.ebuild
1189
1190 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-3.4.3.2-r1.ebuild?rev=1.1&view=markup
1191 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/libreoffice-3.4.3.2-r1.ebuild?rev=1.1&content-type=text/plain
1192
1193 Index: libreoffice-3.4.3.2-r1.ebuild
1194 ===================================================================
1195 # Copyright 1999-2011 Gentoo Foundation
1196 # Distributed under the terms of the GNU General Public License v2
1197 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-3.4.3.2-r1.ebuild,v 1.1 2011/09/03 21:01:18 scarabeus Exp $
1198
1199 EAPI=3
1200
1201 KDE_REQUIRED="optional"
1202 KDE_SCM="git"
1203 CMAKE_REQUIRED="never"
1204
1205 PYTHON_DEPEND="2"
1206 PYTHON_USE_WITH="threads,xml"
1207
1208 # experimental ; release ; old
1209 # Usually the tarballs are moved a lot so this should make
1210 # everyone happy.
1211 DEV_URI="
1212 http://dev-builds.libreoffice.org/pre-releases/src
1213 http://download.documentfoundation.org/libreoffice/src
1214 http://download.documentfoundation.org/libreoffice/old/src
1215 "
1216 EXT_URI="http://ooo.itc.hu/oxygenoffice/download/libreoffice"
1217 ADDONS_URI="http://dev-www.libreoffice.org/src/"
1218
1219 BRANDING="${PN}-branding-gentoo-0.3.tar.xz"
1220
1221 [[ ${PV} == *9999* ]] && SCM_ECLASS="git-2"
1222 inherit base autotools bash-completion check-reqs eutils java-pkg-opt-2 kde4-base pax-utils prefix python multilib toolchain-funcs flag-o-matic nsplugins versionator ${SCM_ECLASS}
1223 unset SCM_ECLASS
1224
1225 DESCRIPTION="LibreOffice, a full office productivity suite."
1226 HOMEPAGE="http://www.libreoffice.org"
1227 SRC_URI="branding? ( http://dev.gentooexperimental.org/~scarabeus/${BRANDING} )"
1228
1229 # Bootstrap MUST be first!
1230 MODULES="bootstrap artwork base calc components extensions extras filters help
1231 impress libs-core libs-extern libs-extern-sys libs-gui postprocess sdk testing
1232 ure writer"
1233 # Only release has the tarballs
1234 if [[ ${PV} != *9999* ]]; then
1235 for i in ${DEV_URI}; do
1236 for mod in ${MODULES}; do
1237 SRC_URI+=" ${i}/${PN}-${mod}-${PV}.tar.bz2"
1238 done
1239 unset mod
1240 done
1241 unset i
1242 fi
1243 unset DEV_URI
1244
1245 # addons
1246 # FIXME: actually review which one of these are used
1247 ADDONS_SRC+=" ${ADDONS_URI}/128cfc86ed5953e57fe0f5ae98b62c2e-libtextcat-2.2.tar.gz"
1248 ADDONS_SRC+=" ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip"
1249 ADDONS_SRC+=" ${ADDONS_URI}/bd30e9cf5523cdfc019b94f5e1d7fd19-cppunit-1.12.1.tar.gz"
1250 ADDONS_SRC+=" ${ADDONS_URI}/1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz"
1251 ADDONS_SRC+=" ${ADDONS_URI}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz"
1252 ADDONS_SRC+=" ${ADDONS_URI}/24be19595acad0a2cae931af77a0148a-LICENSE_source-9.0.0.7-bj.html"
1253 ADDONS_SRC+=" ${ADDONS_URI}/2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz"
1254 ADDONS_SRC+=" ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip"
1255 ADDONS_SRC+=" ${ADDONS_URI}/35efabc239af896dfb79be7ebdd6e6b9-gentiumbasic-fonts-1.10.zip"
1256 ADDONS_SRC+=" ${ADDONS_URI}/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip"
1257 ADDONS_SRC+=" ${ADDONS_URI}/48470d662650c3c074e1c3fabbc67bbd-README_source-9.0.0.7-bj.txt"
1258 ADDONS_SRC+=" ${ADDONS_URI}/4a660ce8466c9df01f19036435425c3a-glibc-2.1.3-stub.tar.gz"
1259 ADDONS_SRC+=" ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip"
1260 ADDONS_SRC+=" ${ADDONS_URI}/8294d6c42e3553229af9934c5c0ed997-stax-api-1.0-2-sources.jar"
1261 ADDONS_SRC+=" ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip"
1262 ADDONS_SRC+=" ${ADDONS_URI}/ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip"
1263 ADDONS_SRC+=" ${ADDONS_URI}/d4c4d91ab3a8e52a2e69d48d34ef4df4-core.zip"
1264 ADDONS_SRC+=" ${ADDONS_URI}/fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz"
1265 ADDONS_SRC+=" ${ADDONS_URI}/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip"
1266 ADDONS_SRC+=" ${ADDONS_URI}/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip"
1267 ADDONS_SRC+=" ${ADDONS_URI}/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip"
1268 ADDONS_SRC+=" ${ADDONS_URI}/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip"
1269 ADDONS_SRC+=" ${ADDONS_URI}/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip"
1270 ADDONS_SRC+=" ${ADDONS_URI}/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip"
1271 ADDONS_SRC+=" ${ADDONS_URI}/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip"
1272 ADDONS_SRC+=" ${ADDONS_URI}/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip"
1273 ADDONS_SRC+=" ${ADDONS_URI}/451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt"
1274 ADDONS_SRC+=" ${ADDONS_URI}/47e1edaa44269bc537ae8cabebb0f638-JLanguageTool-1.0.0.tar.bz2"
1275 ADDONS_SRC+=" ${ADDONS_URI}/90401bca927835b6fbae4a707ed187c8-nlpsolver-0.9.tar.bz2"
1276 ADDONS_SRC+=" ${ADDONS_URI}/0f63ee487fda8f21fafa767b3c447ac9-ixion-0.2.0.tar.gz"
1277 ADDONS_SRC+=" ${ADDONS_URI}/71474203939fafbe271e1263e61d083e-nss-3.12.8-with-nspr-4.8.6.tar.gz"
1278 ADDONS_SRC+=" http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll"
1279 ADDONS_SRC+=" http://download.go-oo.org/extern/b4cae0700aa1c2aef7eb7f345365e6f1-translate-toolkit-1.8.1.tar.bz2"
1280 ADDONS_SRC+=" http://www.numbertext.org/linux/881af2b7dca9b8259abbca00bbbc004d-LinLibertineG-20110101.zip"
1281 SRC_URI+=" ${ADDONS_SRC}"
1282
1283 TDEPEND="${EXT_URI}/472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt"
1284 TDEPEND+=" linguas_de? ( ${EXT_URI}/53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt )"
1285 TDEPEND+=" linguas_en_GB? ( ${EXT_URI}/472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt )"
1286 TDEPEND+=" linguas_en_ZA? ( ${EXT_URI}/472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt )"
1287 TDEPEND+=" linguas_es? ( ${EXT_URI}/4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt )"
1288 TDEPEND+=" linguas_fr? ( ${EXT_URI}/a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt )"
1289 TDEPEND+=" linguas_hu? ( ${EXT_URI}/09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt )"
1290 TDEPEND+=" linguas_it? ( ${EXT_URI}/b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt )"
1291 SRC_URI+=" templates? ( ${TDEPEND} )"
1292
1293 unset ADDONS_URI
1294 unset EXT_URI
1295 unset ADDONS_SRC
1296
1297 IUSE="binfilter +branding cups custom-cflags dbus debug eds gnome graphite
1298 gstreamer gtk kde ldap mysql nsplugin odk opengl python templates test +vba
1299 webdav"
1300 LICENSE="LGPL-3"
1301 SLOT="0"
1302 [[ ${PV} == *9999* ]] || KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
1303
1304 # lingua for templates
1305 LANGUAGES="de en_GB en_ZA es fr hu it"
1306 for X in ${LANGUAGES} ; do
1307 IUSE+=" linguas_${X}"
1308 done
1309 unset X
1310
1311 COMMON_DEPEND="
1312 app-arch/zip
1313 app-arch/unzip
1314 >=app-text/hunspell-1.3.2
1315 app-text/mythes
1316 app-text/libwpd:0.9[tools]
1317 app-text/libwpg:0.2
1318 >=app-text/libwps-0.2.2
1319 >=app-text/poppler-0.12.3-r3[xpdf-headers]
1320 dev-db/unixODBC
1321 dev-libs/expat
1322 >=dev-libs/glib-2.18
1323 >=dev-libs/hyphen-2.7.1
1324 >=dev-libs/icu-4.0
1325 >=dev-lang/perl-5.0
1326 >=dev-libs/openssl-0.9.8g
1327 dev-libs/redland[ssl]
1328 media-libs/freetype:2
1329 >=media-libs/fontconfig-2.3.0
1330 >=media-libs/vigra-1.7
1331 >=media-libs/libpng-1.4
1332 sci-mathematics/lpsolve
1333 >=sys-libs/db-4.8
1334 virtual/jpeg
1335 >=x11-libs/cairo-1.10.0
1336 x11-libs/libXaw
1337 x11-libs/libXinerama
1338 x11-libs/libXrandr
1339 x11-libs/libXrender
1340 cups? ( net-print/cups )
1341 dbus? ( >=dev-libs/dbus-glib-0.94 )
1342 eds? ( gnome-extra/evolution-data-server )
1343 gnome? ( gnome-base/gconf:2 )
1344 gtk? ( >=x11-libs/gtk+-2.24:2 )
1345 graphite? ( media-gfx/graphite2 )
1346 gstreamer? (
1347 >=media-libs/gstreamer-0.10
1348 >=media-libs/gst-plugins-base-0.10
1349 )
1350 java? (
1351 >=dev-java/bsh-2.0_beta4
1352 dev-java/lucene:2.9
1353 dev-java/lucene-analyzers:2.3
1354 dev-java/saxon:0
1355 )
1356 ldap? ( net-nds/openldap )
1357 mysql? ( >=dev-db/mysql-connector-c++-1.1.0 )
1358 nsplugin? (
1359 net-libs/xulrunner:1.9
1360 >=dev-libs/nspr-4.8.8
1361 >=dev-libs/nss-3.12.9
1362 )
1363 opengl? ( virtual/opengl )
1364 webdav? ( net-libs/neon )
1365 "
1366
1367 RDEPEND="${COMMON_DEPEND}
1368 !app-office/libreoffice-bin
1369 !app-office/openoffice-bin
1370 !app-office/openoffice
1371 java? ( >=virtual/jre-1.6 )
1372 "
1373
1374 PDEPEND="
1375 >=app-office/libreoffice-l10n-$(get_version_component_range 1-2)
1376 "
1377
1378 DEPEND="${COMMON_DEPEND}
1379 >=dev-libs/boost-1.46
1380 >=dev-libs/libxml2-2.7.8
1381 dev-libs/libxslt
1382 dev-perl/Archive-Zip
1383 >=dev-util/gperf-3
1384 dev-util/intltool
1385 dev-util/mdds
1386 >=dev-util/pkgconfig-0.26
1387 >=net-misc/curl-7.21.7
1388 >=sys-apps/findutils-4.5.9
1389 sys-devel/bison
1390 sys-apps/coreutils
1391 sys-devel/flex
1392 >=sys-devel/make-3.82
1393 sys-libs/zlib
1394 x11-libs/libXtst
1395 x11-proto/randrproto
1396 x11-proto/xextproto
1397 x11-proto/xineramaproto
1398 x11-proto/xproto
1399 java? (
1400 =virtual/jdk-1.6*
1401 >=dev-java/ant-core-1.7
1402 test? ( dev-java/junit:4 )
1403 )
1404 "
1405
1406 PATCHES=(
1407 "${FILESDIR}/${PN}-3.3.1-neon_remove_SSPI_support.diff"
1408 "${FILESDIR}/${PN}-libdb5-fix-check.diff"
1409 "${FILESDIR}/${PN}-3.4.1-salfix.diff"
1410 "${FILESDIR}/sdext-presenter.diff"
1411 "${FILESDIR}/${PN}-svx.patch"
1412 "${FILESDIR}/${PN}-vbaobj-visibility-fix.patch"
1413 "${FILESDIR}/${PN}-solenv-build-crash.patch"
1414 "${FILESDIR}/${PN}-as-needed-gtk.patch"
1415 "${FILESDIR}/${PN}-translate-toolkit-parallel-solenv.patch"
1416 "${FILESDIR}/${PN}-gbuild-use-cxxflags.patch"
1417 "${FILESDIR}/${PN}-installed-files-permissions.patch"
1418 "${FILESDIR}/${PN}-check-for-avx.patch"
1419 "${FILESDIR}/${PN}-append-no-avx.patch"
1420 "${FILESDIR}/${PN}-32b-qt4-libdir.patch"
1421 "${FILESDIR}/${PN}-binfilter-as-needed.patch"
1422 "${FILESDIR}/${PN}-kill-cppunit.patch"
1423 )
1424
1425 # Uncoment me when updating to eapi4
1426 # REQUIRED_USE="
1427 # || ( gtk gnome kde )
1428 # gnome? ( gtk )
1429 # nsplugin? ( gtk )
1430 #"
1431
1432 # Needs lots and lots of work and compiling
1433 RESTRICT="test"
1434
1435 S="${WORKDIR}/${PN}-bootstrap-${PV}"
1436
1437 pkg_setup() {
1438 java-pkg-opt-2_pkg_setup
1439 kde4-base_pkg_setup
1440
1441 python_set_active_version 2
1442 python_pkg_setup
1443
1444 if [[ $(gcc-major-version) -lt 4 ]]; then
1445 eerror "Compilation with gcc older than 4.0 is not supported"
1446 die "Too old gcc found."
1447 fi
1448
1449 if use custom-cflags; then
1450 ewarn "You are using custom CFLAGS, which is NOT supported and can cause"
1451 ewarn "all sorts of build and runtime errors."
1452 ewarn
1453 ewarn "Before reporting a bug, please make sure you rebuild and try with"
1454 ewarn "basic CFLAGS, otherwise the bug will not be accepted."
1455 ewarn
1456 fi
1457
1458 if ! use java; then
1459 ewarn "You are building with java-support disabled, this results in some"
1460 ewarn "of the LibreOffice functionality being disabled."
1461 ewarn "If something you need does not work for you, rebuild with"
1462 ewarn "java in your USE-flags."
1463 ewarn
1464 ewarn "Some java libraries will be provided internally by libreoffice"
1465 ewarn "during the build. You should really reconsider enabling java"
1466 ewarn "use flag."
1467 ewarn
1468 fi
1469
1470 if ! use gtk; then
1471 ewarn "If you want the LibreOffice systray quickstarter to work"
1472 ewarn "activate the 'gtk' use flag."
1473 ewarn
1474 fi
1475
1476 ewarn "Libreoffice compilation often fails on parallel issues"
1477 ewarn "but the slowdown by enforcing MAKEOPTS=-j1 is too huge."
1478 ewarn "If you encounter errors try yourself to disable parallel build."
1479
1480 # Check if we have enough RAM and free diskspace to build this beast
1481 CHECKREQS_MEMORY="1024"
1482 use debug && CHECKREQS_DISK_BUILD="15360" || CHECKREQS_DISK_BUILD="9216"
1483 check_reqs
1484 }
1485
1486 src_unpack() {
1487 local mod dest tmplfile tmplname mypv
1488
1489 if use branding; then
1490 unpack "${BRANDING}"
1491 fi
1492
1493 if [[ ${PV} != *9999* ]]; then
1494 for mod in ${MODULES}; do
1495 unpack "${PN}-${mod}-${PV}.tar.bz2"
1496 if [[ ${mod} != bootstrap ]]; then
1497 mv -n "${WORKDIR}/${PN}-${mod}-${PV}"/* "${S}"
1498 rm -rf "${WORKDIR}/${PN}-${mod}-${PV}"
1499 fi
1500 done
1501 else
1502 for mod in ${MODULES}; do
1503 mypv=${PV/.9999}
1504 [[ ${mypv} != ${PV} ]] && EGIT_BRANCH="${PN}-${mypv/./-}"
1505 EGIT_PROJECT="${PN}/${mod}"
1506 EGIT_SOURCEDIR="${WORKDIR}/${PN}-${mod}-${PV}"
1507 EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${mod}"
1508 EGIT_NOUNPACK="true"
1509 git-2_src_unpack
1510 if [[ ${mod} != bootstrap ]]; then
1511 mv -n "${WORKDIR}/${PN}-${mod}-${PV}"/* "${S}"
1512 rm -rf "${WORKDIR}/${PN}-${mod}-${PV}"
1513 fi
1514 done
1515 unset EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
1516 fi
1517
1518 # copy extension templates; o what fun ...
1519 if use templates; then
1520 dest="${S}/extras/source/extensions"
1521 mkdir -p "${dest}"
1522
1523 for template in ${TDEPEND}; do
1524 if [[ ${template} == *.oxt ]]; then
1525 tmplfile="${DISTDIR}/$(basename ${template})"
1526 tmplname="$(echo "${template}" | \
1527 cut -f 2- -s -d - | cut -f 1 -d _)"
1528 echo ">>> Unpacking ${tmplfile/\*/} to ${dest}"
1529 if [[ -f ${tmplfile} && ! -f "${dest}/${tmplname}.oxt" ]]; then
1530 cp -v "${tmplfile}" "${dest}/${tmplname}.oxt" || die
1531 fi
1532 fi
1533 done
1534 fi
1535 }
1536
1537 src_prepare() {
1538 # optimization flags
1539 export ARCH_FLAGS="${CXXFLAGS}"
1540 use debug || export LINKFLAGSOPTIMIZE="${LDFLAGS}"
1541
1542 # compiler flags
1543 use custom-cflags || strip-flags
1544 use debug || filter-flags "-g*"
1545 # silent miscompiles; LO/OOo adds -O2/1/0 where appropriate
1546 filter-flags "-O*"
1547
1548 base_src_prepare
1549 eautoreconf
1550 }
1551
1552 src_configure() {
1553 local java_opts
1554 local internal_libs
1555 local extensions
1556 local themes="crystal"
1557 local jbs=$(sed -ne 's/.*\(-j[[:space:]]*\|--jobs=\)\([[:digit:]]\+\).*/\2/;T;p' <<< "${MAKEOPTS}")
1558
1559 # recheck that there is some value in jobs
1560 [[ -z ${jbs} ]] && jbs="1"
1561
1562 # expand themes we are going to build based on DE useflags
1563 use gnome && themes+=" tango"
1564 use kde && themes+=" oxygen"
1565
1566 # list the extensions we are going to build by default
1567 extensions="
1568 --enable-ext-pdfimport
1569 --enable-ext-presenter-console
1570 --enable-ext-presenter-minimizer
1571 "
1572
1573 # hsqldb: requires just 1.8.0 not 1.8.1 which we don't ship at all
1574 # dmake: not worth of splitting out
1575 # cppunit: patched not to run anything, just main() { return 0; }
1576 # workaround to upstream running the tests during build
1577 # sane: just sane.h header that is used for scan in writer, not
1578 # linked or anything else, worthless to depend on
1579 internal_libs+="
1580 --without-system-hsqldb
1581 --without-system-cppunit
1582 --without-system-sane-header
1583 "
1584
1585 # When building without java some things needs to be done
1586 # as internal libraries.
1587 if ! use java; then
1588 internal_libs+="
1589 --without-system-beanshell
1590 --without-system-lucene
1591 --without-system-saxon
1592 --without-junit
1593 "
1594 else
1595 java_opts="
1596 --with-ant-home="${ANT_HOME}"
1597 --with-jdk-home=$(java-config --jdk-home 2>/dev/null)
1598 --with-java-target-version=$(java-pkg_get-target)
1599 --with-jvm-path="${EPREFIX}/usr/$(get_libdir)/"
1600 --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)
1601 --with-lucene-core-jar=$(java-pkg_getjar lucene-2.9 lucene-core.jar)
1602 --with-lucene-analyzers-jar=$(java-pkg_getjar lucene-analyzers-2.3 lucene-analyzers.jar)
1603 --with-saxon-jar=$(java-pkg_getjar saxon saxon8.jar)
1604 "
1605 if use test; then
1606 java_opts+=" --with-junit=$(java-pkg_getjar junit-4 junit.jar)"
1607 else
1608 java_opts+=" --without-junit"
1609 fi
1610 fi
1611
1612 if use branding; then
1613 extensions+="
1614 --with-about-bitmap="${WORKDIR}/branding-about.png"
1615 --with-intro-bitmap="${WORKDIR}/branding-intro.png"
1616 "
1617 fi
1618
1619 # system headers/libs/...: enforce using system packages
1620 # only expections are mozilla and odbc/sane/xrender-header(s).
1621 # for jars the exception is db.jar controlled by --with-system-db
1622 # --enable-unix-qstart-libpng: use libpng splashscreen that is faster
1623 # --disable-broffice: do not use brazillian brand just be uniform
1624 # --enable-cairo: ensure that cairo is always required
1625 # --enable-*-link: link to the library rather than just dlopen on runtime
1626 # --disable-fetch-external: prevent dowloading during compile phase
1627 # --disable-gnome-vfs: old gnome virtual fs support
1628 # --disable-kdeab: kde3 adressbook
1629 # --disable-kde: kde3 support
1630 # --disable-pch: precompiled headers cause build crashes
1631 # --disable-rpath: relative runtime path is not desired
1632 # --disable-static-gtk: ensure that gtk is linked dynamically
1633 # --disable-zenity: disable build icon
1634 # --with-extension-integration: enable any extension integration support
1635 # --with-{max-jobs,num-cpus}: ensuring parallel building
1636 # --without-{afms,fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
1637 # --without-stlport: disable deprecated extensions framework
1638 econf \
1639 --docdir="${EPREFIX}/usr/share/doc/${PF}/" \
1640 --with-system-headers \
1641 --with-system-libs \
1642 --with-system-jars \
1643 --with-system-db \
1644 --with-system-dicts \
1645 --enable-cairo \
1646 --enable-fontconfig \
1647 --enable-largefile \
1648 --enable-randr \
1649 --enable-randr-link \
1650 --enable-unix-qstart-libpng \
1651 --enable-Xaw \
1652 --enable-xrender-link \
1653 --disable-broffice \
1654 --disable-crashdump \
1655 --disable-dependency-tracking \
1656 --disable-epm \
1657 --disable-fetch-external \
1658 --disable-gnome-vfs \
1659 --disable-kdeab \
1660 --disable-kde \
1661 --disable-online-update \
1662 --disable-pch \
1663 --disable-rpath \
1664 --disable-static-gtk \
1665 --disable-strip-solver \
1666 --disable-zenity \
1667 --with-alloc=system \
1668 --with-build-version="Gentoo official package" \
1669 --with-extension-integration \
1670 --with-external-dict-dir="${EPREFIX}/usr/share/myspell" \
1671 --with-external-hyph-dir="${EPREFIX}/usr/share/myspell" \
1672 --with-external-thes-dir="${EPREFIX}/usr/share/myspell" \
1673 --with-external-tar="${DISTDIR}" \
1674 --with-lang="" \
1675 --with-max-jobs=${jbs} \
1676 --with-num-cpus=1 \
1677 --with-theme="${themes}" \
1678 --with-unix-wrapper=libreoffice \
1679 --with-vendor="Gentoo Foundation" \
1680 --with-x \
1681 --without-afms \
1682 --without-fonts \
1683 --without-myspell-dicts \
1684 --without-ppds \
1685 --without-stlport \
1686 $(use_enable binfilter) \
1687 $(use_enable cups) \
1688 $(use_enable dbus) \
1689 $(use_enable debug crashdump) \
1690 $(use_enable eds evolution2) \
1691 $(use_enable gnome gconf) \
1692 $(use_enable gnome gio) \
1693 $(use_enable gnome lockdown) \
1694 $(use_enable graphite) \
1695 $(use_enable gstreamer) \
1696 $(use_enable gtk) \
1697 $(use_enable gtk systray) \
1698 $(use_enable java ext-scripting-beanshell) \
1699 $(use_enable kde kde4) \
1700 $(use_enable ldap) \
1701 $(use_enable mysql ext-mysql-connector) \
1702 $(use_enable nsplugin mozilla) \
1703 $(use_enable odk) \
1704 $(use_enable opengl) \
1705 $(use_enable python) \
1706 $(use_enable python ext-scripting-python) \
1707 $(use_enable vba) \
1708 $(use_enable vba activex-component) \
1709 $(use_enable webdav neon) \
1710 $(use_with java) \
1711 $(use_with ldap openldap) \
1712 $(use_with mysql system-mysql-cppconn) \
1713 $(use_with nsplugin system-mozilla libxul) \
1714 $(use_with templates sun-templates) \
1715 ${internal_libs} \
1716 ${java_opts} \
1717 ${extensions}
1718 }
1719
1720 src_compile() {
1721 # this is not a proper make script and the jobs are passed during configure
1722 make || die
1723 }
1724
1725 src_install() {
1726 # This is not Makefile so no buildserver
1727 make DESTDIR="${D}" distro-pack-install || die
1728
1729 # Fix bash completion placement
1730 dobashcompletion "${ED}"/etc/bash_completion.d/libreoffice.sh ${PN}
1731 rm -rf "${ED}"/etc/
1732
1733 # symlink the plugin to system location
1734 if use nsplugin; then
1735 inst_plugin /usr/$(get_libdir)/libreoffice/program/libnpsoplugin.so
1736 fi
1737
1738 if use branding; then
1739 insinto /usr/$(get_libdir)/${PN}/program
1740 newins "${WORKDIR}/branding-sofficerc" sofficerc || die
1741 fi
1742 }
1743
1744 pkg_preinst() {
1745 # Cache updates - all handled by kde eclass for all environments
1746 kde4-base_pkg_preinst
1747 }
1748
1749 pkg_postinst() {
1750 kde4-base_pkg_postinst
1751
1752 pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin
1753 }
1754
1755 pkg_postrm() {
1756 kde4-base_pkg_postrm
1757 }