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