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