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