Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/libreoffice/
Date: Wed, 08 Mar 2017 19:42:35
Message-Id: 1489002127.88b0b6efbb45bf49d0dd5d72146d2ca9981d5e65.asturm@gentoo
1 commit: 88b0b6efbb45bf49d0dd5d72146d2ca9981d5e65
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 28 23:21:33 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 8 19:42:07 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88b0b6ef
7
8 app-office/libreoffice: 5.3.1.2 version bump
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 app-office/libreoffice/Manifest | 2 +
13 app-office/libreoffice/libreoffice-5.3.1.2.ebuild | 593 ++++++++++++++++++++++
14 2 files changed, 595 insertions(+)
15
16 diff --git a/app-office/libreoffice/Manifest b/app-office/libreoffice/Manifest
17 index ff59c62d69f..3269bd1b065 100644
18 --- a/app-office/libreoffice/Manifest
19 +++ b/app-office/libreoffice/Manifest
20 @@ -10,8 +10,10 @@ DIST libreoffice-5.2.3.3.tar.xz 183870036 SHA256 a8f1365d166bf24ac4b97ed8466f46c
21 DIST libreoffice-5.2.5.1.tar.xz 184242832 SHA256 9756a322a497aa83d096fa0ac5541622d9a8f5038ce9c0ded48199566ab0d300 SHA512 72b88fc44bc440def7be8971a6976b87de41562eaa968eeb40bc5b9bd2d3ce4fb8581fc070ade804a8f7257e350df2cc8f2ac42c9d3241bd65d2a89c35602c00 WHIRLPOOL 776845b4b34afd42c7b65179c2d77449e7f2917b4a475b93434ff0817688cbecc69f946640408750221cdd950f6982c4a3f9a9ce370c977a6d10613c61f5d494
22 DIST libreoffice-5.2.6.2.tar.xz 164804780 SHA256 3d49e339631114652820b890859eef85601d1aeda2acb1309f0de24009f53570 SHA512 b84420a773739162555b28700a5588771a1fa7131d82a5861799f402df65f84a17715f80b8ba9aa793c1fed78c7e38b8bfbff2c3b9e0e8f119c9b453a8e6edc9 WHIRLPOOL fe6e739c78172add6fb1235c5ddcffc7d62767008ca5acafd2d95ba143367b26bae94c7f295527d55312ecec4bee47d53daab8b2f2ac159f8d581c7532e3ee48
23 DIST libreoffice-5.3.0.3.tar.xz 168797580 SHA256 04b9215e1c4b8c7ce2d79b8e322bff8d097426a2d103476cf237cfd42262556e SHA512 06cf8a59c2b08f6aaf5012347aeae482ecccc4587c67fc6d3f267572f236999ec6fe1f1290926830ebe5631c705cf4e938b65a5765e99556c8d19178e0fece45 WHIRLPOOL 4591366575e5e8da7f892d6549d0ae0cdae7e0afcd8e1c1d771fe735e73de901ae26f8b95ca589ffeba1d3b73830853aea14a84e26a94a5465b872583ed0519d
24 +DIST libreoffice-5.3.1.2.tar.xz 189706056 SHA256 5746cd7ccaf64e51eb0fc07128e75cf145a32b318d572aba18855f14c10754ff SHA512 f35a037eb823603295187f958bab290a51dd3d189ab5bf10b087a7900bad50de5cb477c5a0cf2ca5e5190e9c31b0e7f382980cc03d139014f3b706b4cd4082b0 WHIRLPOOL a4a697ee460f3a96cf8b406645d77f11b2ce9814245ad2b8c191d6b362e0f2fef571b46c64e9b34cc304545740af8807ad77087b6c613e83c50898755f738a29
25 DIST libreoffice-branding-gentoo-0.8.tar.xz 151568 SHA256 22722121be062742624e0634beae92289c75e6a99ed507d3bf0a05c5164e3c69 SHA512 785031a699b1d1895ce4b50ffc3ddf645f3a0ef9acdf37facfd18cf75db9484cb8f53a50abb63d6006ead76a80b6ff5aa99661063245ebb84bd64013d713de7f WHIRLPOOL 1f36652a52d501d6548cfa9aa013b3e3a1867aa2b0693d2274cf7816d4aa4e0cde3c7096cc71ed47cf74e5f96da2757bf537f553021f8fd86939accb227bf538
26 DIST libreoffice-help-5.2.3.3.tar.xz 1936920 SHA256 443be26b35c6b454d5d1ca17c58cc33ae90946f8e1003a98118467b49989cd3a SHA512 927421887d2d41538ba79d6d584bf84ad3fd7a58d3b9d95801cf67a0dcce61421934cd273a38803b5519c434232d1aaeb88d52cab391ae7292809ebbb3b501f9 WHIRLPOOL 36da9c200c0174f745827afb099530d06f6489f8be4a521b7dd37441fc2a1f9691a7d4a07e2914dec0f57845f96e4e143133105e5a730eebeb2e1c5c3283d3bb
27 DIST libreoffice-help-5.2.5.1.tar.xz 1936260 SHA256 11199cca59748dc9cade4f5cbb0478f600d3c54114b09819eac54338dbbd49b4 SHA512 2319784da7733eb21a15fba4dab4b74a1aff89c89634727e6d5013b4ca14bd65d0951bdaff569a79544a8c44ff494e92eb0573e11391ec88e2cb811e47689cf9 WHIRLPOOL 714d6bfe696f4fc69203f5cd3e9a2914d2d73cc78c06f6ef4ae860f52b5c1c34305e1c7330eff380d73b8006e2c47e3f033ec6fdefe14e65c8e11289aa75364e
28 DIST libreoffice-help-5.2.6.2.tar.xz 1446048 SHA256 c0cd648d9994814925083d1a891b63b5e5233718eb8f8782810bb602c0fdb88b SHA512 10568ffb0d7fbd1a01681e52e594b39f120802e8fd70d12824a2be0185bdf491c28818fc8a9fe16fed8533fa61119b90d6f0a1a8f9488a83b33f6a6be2d75e37 WHIRLPOOL e3921ba0b64819b19cd278f7a87dec4313e6cd9df58108170e2d438b0c08644395ac568f7cc601e88ff466e78fa6bbd426fdc9b4a704d3d8693b8c0cb1537ab8
29 DIST libreoffice-help-5.3.0.3.tar.xz 1615344 SHA256 df58d501b9514160767810df0b0e4b44a01262244f81f83df8654b0ccd4b1a7f SHA512 c575b19beb42ec44fe8d63d72df31853d224e78ca14bf8bd6d5b81bfebfda71c17943fd0b59c019548910bb76ea269340436d54375121f559bdb1d38d6b3296f WHIRLPOOL cd662dcfe8e6eaa63872820b42a68aa4e0913c4fb4688db1f1c611169f9ba1e7f05e77dba5786d42cb738b353a2df81caa417c60e525a073c04beee0f2bbcfa0
30 +DIST libreoffice-help-5.3.1.2.tar.xz 2127368 SHA256 df49c7bf1caa872f542a69875b44b450b724644585fc847f41e549f88da4c20e SHA512 a6fc9912c67e485a01a71fa85c09eca464f6ae37024e7ae96e92d9f9582390955df069c3ef633b5df83eb6cd96c3654bd22eab728a58961a08dda7b18f754391 WHIRLPOOL 0746f8a5be49bd67b8eff536c97c1b398e2490794dd3f8147ba33adafc887c550bf4a446f81bf5fec427970ec377774e6baf7ab6d1ba4d12e80653d8e087825f
31
32 diff --git a/app-office/libreoffice/libreoffice-5.3.1.2.ebuild b/app-office/libreoffice/libreoffice-5.3.1.2.ebuild
33 new file mode 100644
34 index 00000000000..b6479dabcbb
35 --- /dev/null
36 +++ b/app-office/libreoffice/libreoffice-5.3.1.2.ebuild
37 @@ -0,0 +1,593 @@
38 +# Copyright 1999-2017 Gentoo Foundation
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=6
42 +
43 +KDE_REQUIRED="optional"
44 +KDE_SCM="git"
45 +CMAKE_REQUIRED="never"
46 +
47 +PYTHON_COMPAT=( python{2_7,3_4,3_5} )
48 +PYTHON_REQ_USE="threads,xml"
49 +
50 +# experimental ; release ; old
51 +# Usually the tarballs are moved a lot so this should make
52 +# everyone happy.
53 +DEV_URI="
54 + http://dev-builds.libreoffice.org/pre-releases/src
55 + http://download.documentfoundation.org/libreoffice/src/${PV:0:5}/
56 + http://download.documentfoundation.org/libreoffice/old/${PV}/
57 +"
58 +ADDONS_URI="http://dev-www.libreoffice.org/src/"
59 +
60 +BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
61 +# PATCHSET="${P}-patchset-01.tar.xz"
62 +
63 +[[ ${PV} == *9999* ]] && SCM_ECLASS="git-r3"
64 +inherit 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 versionator xdg-utils qmake-utils ${SCM_ECLASS}
65 +unset SCM_ECLASS
66 +
67 +DESCRIPTION="A full office productivity suite"
68 +HOMEPAGE="http://www.libreoffice.org"
69 +SRC_URI="branding? ( http://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
70 +[[ -n ${PATCHSET} ]] && SRC_URI+=" http://dev.gentooexperimental.org/~scarabeus/${PATCHSET}"
71 +
72 +# Split modules following git/tarballs
73 +# Core MUST be first!
74 +# Help is used for the image generator
75 +MODULES="core help"
76 +# Only release has the tarballs
77 +if [[ ${PV} != *9999* ]]; then
78 + for i in ${DEV_URI}; do
79 + for mod in ${MODULES}; do
80 + if [[ ${mod} == core ]]; then
81 + SRC_URI+=" ${i}/${P}.tar.xz"
82 + else
83 + SRC_URI+=" ${i}/${PN}-${mod}-${PV}.tar.xz"
84 + fi
85 + done
86 + unset mod
87 + done
88 + unset i
89 +fi
90 +unset DEV_URI
91 +
92 +# Really required addons
93 +# These are bundles that can't be removed for now due to huge patchsets.
94 +# If you want them gone, patches are welcome.
95 +ADDONS_SRC=(
96 + "${ADDONS_URI}/86b1daaa438f5a7bea9a52d7b9799ac0-xmlsec1-1.2.23.tar.gz" # modifies source code
97 + "collada? ( ${ADDONS_URI}/4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2 )"
98 + "java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
99 + # no release for 8 years, should we package it?
100 + "libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )"
101 + # Does not build with 1.6 rhino at all
102 + "libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )"
103 + # requirement of rhino
104 + "libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )"
105 + # not packageable
106 + "odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )"
107 +)
108 +SRC_URI+=" ${ADDONS_SRC[*]}"
109 +
110 +unset ADDONS_URI
111 +unset ADDONS_SRC
112 +
113 +# Extensions that need extra work:
114 +LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
115 +
116 +IUSE="bluetooth +branding coinmp collada +cups dbus debug eds firebird gltf gnome googledrive
117 +gstreamer +gtk gtk3 jemalloc kde libressl mysql odk pdfimport postgres quickstarter telepathy test vlc
118 +$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
119 +
120 +LICENSE="|| ( LGPL-3 MPL-1.1 )"
121 +SLOT="0"
122 +[[ ${PV} == *9999* ]] || \
123 +KEYWORDS=""
124 +#KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
125 +
126 +COMMON_DEPEND="${PYTHON_DEPS}
127 + app-arch/unzip
128 + app-arch/zip
129 + app-text/hunspell
130 + >=app-text/libabw-0.1.0
131 + >=app-text/libebook-0.1
132 + >=app-text/libetonyek-0.1
133 + app-text/libexttextcat
134 + app-text/liblangtag
135 + >=app-text/libmspub-0.1.0
136 + >=app-text/libmwaw-0.3.1
137 + >=app-text/libodfgen-0.1.0
138 + app-text/libstaroffice
139 + app-text/libwpd:0.10[tools]
140 + app-text/libwpg:0.3
141 + >=app-text/libwps-0.4
142 + app-text/mythes
143 + >=dev-cpp/clucene-2.3.3.4-r2
144 + =dev-cpp/libcmis-0.5*
145 + dev-db/unixODBC
146 + dev-lang/perl
147 + dev-libs/boost:=
148 + dev-libs/expat
149 + dev-libs/hyphen
150 + dev-libs/icu:=
151 + >=dev-libs/liborcus-0.12.1
152 + dev-libs/librevenge
153 + dev-libs/nspr
154 + dev-libs/nss
155 + !libressl? ( >=dev-libs/openssl-1.0.0d:0 )
156 + libressl? ( dev-libs/libressl )
157 + >=dev-libs/redland-1.0.16
158 + media-gfx/graphite2
159 + media-libs/fontconfig
160 + media-libs/freetype:2
161 + >=media-libs/glew-1.10:=
162 + media-libs/harfbuzz:=[graphite,icu]
163 + media-libs/lcms:2
164 + >=media-libs/libcdr-0.1.0
165 + >=media-libs/libfreehand-0.1.0
166 + media-libs/libpagemaker
167 + >=media-libs/libpng-1.4:0=
168 + >=media-libs/libvisio-0.1.0
169 + media-libs/libzmf
170 + net-libs/neon
171 + net-misc/curl
172 + net-nds/openldap
173 + sci-mathematics/lpsolve
174 + x11-libs/cairo[X,-xlib-xcb(-)]
175 + x11-libs/libXinerama
176 + x11-libs/libXrandr
177 + x11-libs/libXrender
178 + virtual/glu
179 + virtual/jpeg:0
180 + virtual/opengl
181 + bluetooth? ( net-wireless/bluez )
182 + coinmp? ( sci-libs/coinor-mp )
183 + collada? ( media-libs/opencollada )
184 + cups? ( net-print/cups )
185 + dbus? ( dev-libs/dbus-glib )
186 + eds? (
187 + dev-libs/glib:2
188 + gnome-extra/evolution-data-server
189 + )
190 + firebird? ( >=dev-db/firebird-2.5 )
191 + gltf? ( media-libs/libgltf )
192 + gnome? ( gnome-base/dconf )
193 + gstreamer? (
194 + media-libs/gstreamer:1.0
195 + media-libs/gst-plugins-base:1.0
196 + )
197 + gtk? (
198 + x11-libs/gdk-pixbuf
199 + >=x11-libs/gtk+-2.24:2
200 + )
201 + gtk3? (
202 + dev-libs/glib:2
203 + dev-libs/gobject-introspection
204 + x11-libs/gtk+:3
205 + )
206 + jemalloc? ( dev-libs/jemalloc )
207 + libreoffice_extensions_scripting-beanshell? ( dev-java/bsh )
208 + libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
209 + mysql? ( dev-db/mysql-connector-c++ )
210 + pdfimport? ( app-text/poppler:=[cxx] )
211 + postgres? ( >=dev-db/postgresql-9.0:*[kerberos] )
212 + telepathy? ( net-libs/telepathy-glib )
213 +"
214 +
215 +RDEPEND="${COMMON_DEPEND}
216 + !app-office/libreoffice-bin
217 + !app-office/libreoffice-bin-debug
218 + !app-office/openoffice
219 + media-fonts/liberation-fonts
220 + media-fonts/libertine
221 + media-fonts/urw-fonts
222 + java? ( >=virtual/jre-1.6 )
223 + kde? ( $(add_kdeapps_dep kioclient) )
224 + vlc? ( media-video/vlc )
225 +"
226 +
227 +if [[ ${PV} != *9999* ]]; then
228 + PDEPEND="=app-office/libreoffice-l10n-$(get_version_component_range 1-2)*"
229 +else
230 + # Translations are not reliable on live ebuilds
231 + # rather force people to use english only.
232 + PDEPEND="!app-office/libreoffice-l10n"
233 +fi
234 +
235 +# FIXME: cppunit should be moved to test conditional
236 +# after everything upstream is under gbuild
237 +# as dmake execute tests right away
238 +DEPEND="${COMMON_DEPEND}
239 + !<sys-devel/make-3.82
240 + >=dev-libs/libatomic_ops-7.2d
241 + >=dev-libs/libxml2-2.7.8
242 + dev-libs/libxslt
243 + dev-perl/Archive-Zip
244 + dev-util/cppunit
245 + >=dev-util/gperf-3
246 + dev-util/intltool
247 + >=dev-util/mdds-1.2.2:1=
248 + media-libs/glm
249 + sys-devel/bison
250 + sys-devel/flex
251 + sys-devel/gettext
252 + sys-devel/ucpp
253 + sys-libs/zlib
254 + virtual/pkgconfig
255 + x11-libs/libXt
256 + x11-libs/libXtst
257 + x11-proto/randrproto
258 + x11-proto/xextproto
259 + x11-proto/xineramaproto
260 + x11-proto/xproto
261 + java? (
262 + dev-java/ant-core
263 + >=virtual/jdk-1.6
264 + )
265 + odk? ( >=app-doc/doxygen-1.8.4 )
266 + test? ( dev-util/cppunit )
267 +"
268 +
269 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
270 + bluetooth? ( dbus )
271 + collada? ( gltf )
272 + eds? ( gnome )
273 + gnome? ( gtk )
274 + telepathy? ( gtk )
275 + libreoffice_extensions_nlpsolver? ( java )
276 + libreoffice_extensions_scripting-beanshell? ( java )
277 + libreoffice_extensions_scripting-javascript? ( java )
278 + libreoffice_extensions_wiki-publisher? ( java )
279 +"
280 +
281 +PATCHES=(
282 + # not upstreamable stuff
283 + "${FILESDIR}/${PN}-5.3-system-pyuno.patch"
284 +
285 + # TODO: upstream
286 + "${FILESDIR}/${PN}-5.2.5.1-glibc-2.24.patch"
287 +)
288 +
289 +pkg_pretend() {
290 + use java || \
291 + ewarn "If you plan to use lbase application you should enable java or you will get various crashes."
292 +
293 + if [[ ${MERGE_TYPE} != binary ]]; then
294 +
295 + CHECKREQS_MEMORY="512M"
296 + if is-flagq "-g*" && ! is-flagq "-g*0" ; then
297 + CHECKREQS_DISK_BUILD="22G"
298 + else
299 + CHECKREQS_DISK_BUILD="6G"
300 + fi
301 + check-reqs_pkg_pretend
302 +
303 + if ! $(tc-is-clang) && { [[ $(gcc-major-version) -lt 4 ]] ||
304 + [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]]; } then
305 + eerror "Compilation with gcc older than 4.7 is not supported"
306 + die "Too old gcc found."
307 + fi
308 + fi
309 +
310 + # Ensure pg version but we have to be sure the pg is installed (first
311 + # install on clean system)
312 + if use postgres && has_version dev-db/postgresql; then
313 + local pgslot=$(postgresql-config show)
314 + if [[ ${pgslot//.} -lt 90 ]] ; then
315 + eerror "PostgreSQL slot must be set to 9.0 or higher."
316 + eerror " postgresql-config set 9.0"
317 + die "PostgreSQL slot is not set to 9.0 or higher."
318 + fi
319 + fi
320 +}
321 +
322 +pkg_setup() {
323 + java-pkg-opt-2_pkg_setup
324 + kde4-base_pkg_setup
325 + python-single-r1_pkg_setup
326 + xdg_environment_reset
327 +
328 + if [[ ${MERGE_TYPE} != binary ]]; then
329 + CHECKREQS_MEMORY="512M"
330 + if is-flagq "-g*" && ! is-flagq "-g*0" ; then
331 + CHECKREQS_DISK_BUILD="22G"
332 + else
333 + CHECKREQS_DISK_BUILD="6G"
334 + fi
335 + check-reqs_pkg_setup
336 + fi
337 +}
338 +
339 +src_unpack() {
340 + local mod
341 +
342 + [[ -n ${PATCHSET} ]] && unpack ${PATCHSET}
343 + use branding && unpack "${BRANDING}"
344 +
345 + if [[ ${PV} != *9999* ]]; then
346 + unpack "${P}.tar.xz"
347 + for mod in ${MODULES}; do
348 + [[ ${mod} == core ]] && continue
349 + unpack "${PN}-${mod}-${PV}.tar.xz"
350 + done
351 + else
352 + local base_uri branch checkout mypv
353 + base_uri="git://anongit.freedesktop.org"
354 + for mod in ${MODULES}; do
355 + branch="master"
356 + mypv=${PV/.9999}
357 + [[ ${mypv} != ${PV} ]] && branch="${PN}-${mypv/./-}"
358 + git-r3_fetch "${base_uri}/${PN}/${mod}" "refs/heads/${branch}"
359 + [[ ${mod} != core ]] && checkout="${S}/${mod}"
360 + [[ ${mod} == help ]] && checkout="helpcontent2" # doesn't match on help
361 + git-r3_checkout "${base_uri}/${PN}/${mod}" ${checkout}
362 + done
363 + fi
364 +}
365 +
366 +src_prepare() {
367 + [[ -n ${PATCHSET} ]] && eapply "${WORKDIR}/${PATCHSET/.tar.xz/}"
368 + eapply "${PATCHES[@]}"
369 + eapply_user
370 +
371 + AT_M4DIR="m4" eautoreconf
372 + # hack in the autogen.sh
373 + touch autogen.lastrun
374 +
375 + # system pyuno mess
376 + sed -i \
377 + -e "s:%eprefix%:${EPREFIX}:g" \
378 + -e "s:%libdir%:$(get_libdir):g" \
379 + pyuno/source/module/uno.py \
380 + pyuno/source/officehelper.py || die
381 + # sed in the tests
382 + sed -i \
383 + -e "s#all : build unitcheck#all : build#g" \
384 + solenv/gbuild/Module.mk || die
385 + sed -i \
386 + -e "s#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g" \
387 + -e "s#Makefile.gbuild all slowcheck#Makefile.gbuild all#g" \
388 + Makefile.in || die
389 +
390 + sed -i \
391 + -e "s,/usr/share/bash-completion/completions,$(get_bashcompdir)," \
392 + -e "s,\$INSTALLDIRNAME.sh,${PN}," \
393 + bin/distro-install-desktop-integration || die
394 +
395 + if use branding; then
396 + # hack...
397 + mv -v "${WORKDIR}/branding-intro.png" "${S}/icon-themes/galaxy/brand/intro.png" || die
398 + fi
399 +
400 + # Don't list pdfimport support in desktop when built with none, bug # 605464
401 + if ! use pdfimport; then
402 + sed -i \
403 + -e ":MimeType: s:application/pdf;::" \
404 + -e ":Keywords: s:pdf;::" \
405 + sysui/desktop/menus/draw.desktop || die
406 + fi
407 +}
408 +
409 +src_configure() {
410 + local java_opts
411 + local ext_opts
412 +
413 + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
414 + # Note: these are for Gentoo use ONLY. For your own distribution, please get
415 + # your own set of keys. Feel free to contact chromium@g.o for more info.
416 + local google_default_client_id="329227923882.apps.googleusercontent.com"
417 + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
418 +
419 + # optimization flags
420 + export GMAKE_OPTIONS="${MAKEOPTS}"
421 + # System python enablement:
422 + export PYTHON_CFLAGS=$(python_get_CFLAGS)
423 + export PYTHON_LIBS=$(python_get_LIBS)
424 +
425 + if use collada; then
426 + export OPENCOLLADA_CFLAGS="-I/usr/include/opencollada/COLLADABaseUtils -I/usr/include/opencollada/COLLADAFramework -I/usr/include/opencollada/COLLADASaxFrameworkLoader -I/usr/include/opencollada/GeneratedSaxParser"
427 + export OPENCOLLADA_LIBS="-L /usr/$(get_libdir)/opencollada -lOpenCOLLADABaseUtils -lOpenCOLLADAFramework -lOpenCOLLADASaxFrameworkLoader -lGeneratedSaxParser"
428 + fi
429 +
430 + # libreoffice extensions handling
431 + for lo_xt in ${LO_EXTS}; do
432 + if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
433 + ext_opts+=" $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt})"
434 + else
435 + ext_opts+=" $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt})"
436 + fi
437 + done
438 +
439 + if use java; then
440 + # hsqldb: system one is too new
441 + java_opts="
442 + --without-junit
443 + --without-system-hsqldb
444 + --with-ant-home="${ANT_HOME}"
445 + --with-jdk-home=$(java-config --jdk-home 2>/dev/null)
446 + --with-jvm-path="${EPREFIX}/usr/lib/"
447 + "
448 +
449 + use libreoffice_extensions_scripting-beanshell && \
450 + java_opts+=" --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)"
451 +
452 + use libreoffice_extensions_scripting-javascript && \
453 + java_opts+=" --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar)"
454 + fi
455 +
456 + if use kde; then
457 + # bug 544108, bug 599076
458 + export QMAKEQT4="$(qt4_get_bindir)/qmake"
459 + export MOCQT4="$(qt4_get_bindir)/moc"
460 + fi
461 +
462 + # system headers/libs/...: enforce using system packages
463 + # --disable-breakpad: requires not-yet-in-tree dev-utils/breakpad
464 + # --enable-cairo: ensure that cairo is always required
465 + # --enable-graphite: disabling causes build breakages
466 + # --enable-*-link: link to the library rather than just dlopen on runtime
467 + # --enable-release-build: build the libreoffice as release
468 + # --disable-fetch-external: prevent dowloading during compile phase
469 + # --enable-extension-integration: enable any extension integration support
470 + # --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
471 + # --disable-report-builder: too much java packages pulled in without pkgs
472 + # --without-system-sane: just sane.h header that is used for scan in writer,
473 + # not linked or anything else, worthless to depend on
474 + econf \
475 + --docdir="${EPREFIX}/usr/share/doc/${PF}/" \
476 + --with-system-dicts \
477 + --with-system-headers \
478 + --with-system-jars \
479 + --with-system-libs \
480 + --enable-cairo-canvas \
481 + --enable-graphite \
482 + --enable-largefile \
483 + --enable-mergelibs \
484 + --enable-neon \
485 + --enable-python=system \
486 + --enable-randr \
487 + --enable-release-build \
488 + --disable-breakpad \
489 + --disable-ccache \
490 + --disable-dependency-tracking \
491 + --disable-epm \
492 + --disable-fetch-external \
493 + --disable-gstreamer-0-10 \
494 + --disable-online-update \
495 + --disable-report-builder \
496 + --with-alloc=$(use jemalloc && echo "jemalloc" || echo "system") \
497 + --with-build-version="Gentoo official package" \
498 + --enable-extension-integration \
499 + --with-external-dict-dir="${EPREFIX}/usr/share/myspell" \
500 + --with-external-hyph-dir="${EPREFIX}/usr/share/myspell" \
501 + --with-external-thes-dir="${EPREFIX}/usr/share/myspell" \
502 + --with-external-tar="${DISTDIR}" \
503 + --with-lang="" \
504 + --with-parallelism=$(makeopts_jobs) \
505 + --with-system-ucpp \
506 + --with-vendor="Gentoo Foundation" \
507 + --with-x \
508 + --without-fonts \
509 + --without-myspell-dicts \
510 + --without-help \
511 + --with-helppack-integration \
512 + --without-system-sane \
513 + $(use_enable bluetooth sdremote-bluetooth) \
514 + $(use_enable coinmp) \
515 + $(use_enable collada) \
516 + $(use_enable cups) \
517 + $(use_enable debug) \
518 + $(use_enable dbus) \
519 + $(use_enable eds evolution2) \
520 + $(use_enable firebird firebird-sdbc) \
521 + $(use_enable gltf) \
522 + $(use_enable gnome gio) \
523 + $(use_enable gnome dconf) \
524 + $(use_enable gstreamer gstreamer-1-0) \
525 + $(use_enable gtk) \
526 + $(use_enable gtk3) \
527 + $(use_enable kde kde4) \
528 + $(use_enable mysql ext-mariadb-connector) \
529 + $(use_enable odk) \
530 + $(use_enable pdfimport) \
531 + $(use_enable postgres postgresql-sdbc) \
532 + $(use_enable quickstarter systray) \
533 + $(use_enable telepathy) \
534 + $(use_enable vlc) \
535 + $(use_with coinmp system-coinmp) \
536 + $(use_with collada system-opencollada) \
537 + $(use_with gltf system-libgltf) \
538 + $(use_with googledrive gdrive-client-id ${google_default_client_id}) \
539 + $(use_with googledrive gdrive-client-secret ${google_default_client_secret}) \
540 + $(use_with java) \
541 + $(use_with mysql system-mysql-cppconn) \
542 + $(use_with odk doxygen) \
543 + ${java_opts} \
544 + ${ext_opts}
545 +}
546 +
547 +src_compile() {
548 + # more and more LO stuff tries to use OpenGL, including tests during build
549 + # bug 501508, bug 540624, bug 545974 and probably more
550 + addpredict /dev/dri
551 + addpredict /dev/ati
552 + addpredict /dev/nvidiactl
553 +
554 + # hack for offlinehelp, this needs fixing upstream at some point
555 + # it is broken because we send --without-help
556 + # https://bugs.freedesktop.org/show_bug.cgi?id=46506
557 + (
558 + grep "^export" "${S}/config_host.mk" > "${T}/config_host.mk" || die
559 + source "${T}/config_host.mk" 2&> /dev/null
560 +
561 + local path="${WORKDIR}/helpcontent2/source/auxiliary/"
562 + mkdir -p "${path}" || die
563 +
564 + echo "perl \"${S}/helpcontent2/helpers/create_ilst.pl\" -dir=icon-themes/galaxy/res/helpimg > \"${path}/helpimg.ilst\""
565 + perl "${S}/helpcontent2/helpers/create_ilst.pl" \
566 + -dir=icon-themes/galaxy/res/helpimg \
567 + > "${path}/helpimg.ilst"
568 + [[ -s "${path}/helpimg.ilst" ]] || \
569 + ewarn "The help images list is empty, something is fishy, report a bug."
570 + )
571 +
572 + local target
573 + use test && target="build" || target="build-nocheck"
574 +
575 + # this is not a proper make script
576 + make ${target} || die
577 +}
578 +
579 +src_test() {
580 + make unitcheck || die
581 + make slowcheck || die
582 +}
583 +
584 +src_install() {
585 + # This is not Makefile so no buildserver
586 + make DESTDIR="${D}" distro-pack-install -o build -o check || die
587 +
588 + # bug 593514
589 + if use gtk3; then
590 + dosym /usr/$(get_libdir)/libreoffice/program/liblibreofficekitgtk.so \
591 + /usr/$(get_libdir)/liblibreofficekitgtk.so
592 + fi
593 +
594 + # bash completion aliases
595 + bashcomp_alias \
596 + libreoffice \
597 + unopkg loimpress lobase localc lodraw lomath lowriter lofromtemplate loweb loffice
598 +
599 + if use branding; then
600 + insinto /usr/$(get_libdir)/${PN}/program
601 + newins "${WORKDIR}/branding-sofficerc" sofficerc
602 + dodir /etc/env.d
603 + echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"etc/env.d/99${PN} || die
604 + fi
605 +
606 + # Hack for offlinehelp, this needs fixing upstream at some point.
607 + # It is broken because we send --without-help
608 + # https://bugs.freedesktop.org/show_bug.cgi?id=46506
609 + insinto /usr/$(get_libdir)/libreoffice/help
610 + doins xmlhelp/util/*.xsl
611 +
612 + # Remove desktop files to support old installs that can't parse mime
613 + rm -r "${ED}"usr/share/mimelnk/ || die
614 +
615 + pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/soffice.bin
616 + pax-mark -m "${ED}"usr/$(get_libdir)/libreoffice/program/unopkg.bin
617 +}
618 +
619 +pkg_preinst() {
620 + # Cache updates - all handled by kde eclass for all environments
621 + kde4-base_pkg_preinst
622 +}
623 +
624 +pkg_postinst() {
625 + kde4-base_pkg_postinst
626 +}
627 +
628 +pkg_postrm() {
629 + kde4-base_pkg_postrm
630 +}