Gentoo Archives: gentoo-commits

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