2014-01-25 18:12:55 +04:00
# Copyright 1999-2014 Gentoo Foundation
2011-11-09 11:33:19 +04:00
# Distributed under the terms of the GNU General Public License v2
2014-09-08 09:32:03 +04:00
# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-9999-r2.ebuild,v 1.223 2014/09/07 12:37:30 scarabeus Exp $
2011-11-09 11:33:19 +04:00
2013-01-02 00:05:22 +04:00
EAPI = 5
2011-11-09 11:33:19 +04:00
KDE_REQUIRED = "optional"
2012-03-18 21:32:10 +04:00
QT_MINIMAL = "4.7.4"
2011-11-09 11:33:19 +04:00
KDE_SCM = "git"
CMAKE_REQUIRED = "never"
2014-05-19 08:49:53 +04:00
PYTHON_COMPAT = ( python2_7 python3_3 python3_4 )
2013-01-02 00:05:22 +04:00
PYTHON_REQ_USE = "threads,xml"
2011-11-09 11:33:19 +04:00
# experimental ; release ; old
# Usually the tarballs are moved a lot so this should make
# everyone happy.
DEV_URI = "
http://dev-builds.libreoffice.org/pre-releases/src
2012-08-09 00:23:19 +04:00
http://download.documentfoundation.org/libreoffice/src/${ PV : 0 : 5 } /
http://download.documentfoundation.org/libreoffice/old/${ PV } /
2011-11-09 11:33:19 +04:00
"
EXT_URI = "http://ooo.itc.hu/oxygenoffice/download/libreoffice"
ADDONS_URI = "http://dev-www.libreoffice.org/src/"
2013-09-21 21:38:51 +04:00
BRANDING = " ${ PN } -branding-gentoo-0.8.tar.xz "
2011-11-10 11:05:36 +04:00
# PATCHSET="${P}-patchset-01.tar.xz"
2011-11-09 11:33:19 +04:00
[ [ ${ PV } = = *9999* ] ] && SCM_ECLASS = "git-2"
2013-01-17 00:06:27 +04:00
inherit base autotools bash-completion-r1 check-reqs eutils java-pkg-opt-2 kde4-base pax-utils python-single-r1 multilib toolchain-funcs flag-o-matic nsplugins ${ SCM_ECLASS }
2011-11-09 11:33:19 +04:00
unset SCM_ECLASS
2014-08-12 12:57:09 +04:00
DESCRIPTION = "LibreOffice, a full office productivity suite"
2011-11-09 11:33:19 +04:00
HOMEPAGE = "http://www.libreoffice.org"
2012-05-14 22:09:04 +04:00
SRC_URI = " branding? ( http://dev.gentoo.org/~dilfridge/distfiles/ ${ BRANDING } ) "
2011-11-10 11:05:36 +04:00
[ [ -n ${ PATCHSET } ] ] && SRC_URI += " http://dev.gentooexperimental.org/~scarabeus/ ${ PATCHSET } "
2011-11-09 11:33:19 +04:00
# Split modules following git/tarballs
# Core MUST be first!
2012-05-07 00:14:41 +04:00
# Help is used for the image generator
2012-11-11 01:02:21 +04:00
MODULES = "core help"
2011-11-09 11:33:19 +04:00
# Only release has the tarballs
if [ [ ${ PV } != *9999* ] ] ; then
for i in ${ DEV_URI } ; do
for mod in ${ MODULES } ; do
2013-01-12 18:52:28 +04:00
if [ [ ${ mod } = = core ] ] ; then
SRC_URI += " ${ i } / ${ P } .tar.xz "
else
SRC_URI += " ${ i } / ${ PN } - ${ mod } - ${ PV } .tar.xz "
fi
2011-11-09 11:33:19 +04:00
done
unset mod
done
unset i
fi
unset DEV_URI
# Really required addons
# These are bundles that can't be removed for now due to huge patchsets.
# If you want them gone, patches are welcome.
2013-07-08 22:13:27 +04:00
ADDONS_SRC += " ${ ADDONS_URI } /d62650a6f908e85643e557a236ea989c-vigra1.6.0.tar.gz "
2012-08-12 23:52:52 +04:00
ADDONS_SRC += " ${ ADDONS_URI } /1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz " # modifies source code
2011-11-09 11:33:19 +04:00
ADDONS_SRC += " java? ( ${ ADDONS_URI } /17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip ) "
2012-05-07 00:14:41 +04:00
ADDONS_SRC += " libreoffice_extensions_wiki-publisher? ( ${ ADDONS_URI } /a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip ) " # no release for 8 years, should we package it?
2012-08-12 23:52:52 +04:00
ADDONS_SRC += " libreoffice_extensions_scripting-javascript? ( ${ ADDONS_URI } /798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip ) " # Does not build with 1.6 rhino at all
2012-08-14 16:43:02 +04:00
ADDONS_SRC += " libreoffice_extensions_scripting-javascript? ( ${ ADDONS_URI } /35c94d2df8893241173de1d16b6034c0-swingExSrc.zip ) " # requirement of rhino
2012-05-07 00:14:41 +04:00
ADDONS_SRC += " odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )" # not packageable
2011-11-09 11:33:19 +04:00
SRC_URI += " ${ ADDONS_SRC } "
unset ADDONS_URI
unset EXT_URI
unset ADDONS_SRC
2013-07-30 13:03:10 +04:00
IUSE = " bluetooth +branding +cups dbus debug eds firebird gnome gstreamer +gtk
2013-09-11 11:09:26 +04:00
gtk3 jemalloc kde mysql odk opengl postgres telepathy test +vba vlc +webdav"
2012-05-05 09:43:27 +04:00
2013-11-16 14:47:56 +04:00
LO_EXTS = "nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
2012-05-10 02:56:39 +04:00
# Unpackaged separate extensions:
# diagram: lo has 0.9.5 upstream is weirdly patched 0.9.4 -> wtf?
# hunart: only on ooo extensions -> fubared download path somewhere on sf
# numbertext, typo, validator, watch-window: ^^
# oooblogger: no homepage or anything
2012-05-05 09:43:27 +04:00
# Extensions that need extra work:
for lo_xt in ${ LO_EXTS } ; do
IUSE += " libreoffice_extensions_ ${ lo_xt } "
done
unset lo_xt
2012-05-11 09:43:35 +04:00
LICENSE = "|| ( LGPL-3 MPL-1.1 )"
2011-11-09 11:33:19 +04:00
SLOT = "0"
2013-04-30 17:28:57 +04:00
[ [ ${ PV } = = *9999* ] ] || \
KEYWORDS = "~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
2011-11-09 11:33:19 +04:00
COMMON_DEPEND = "
2013-01-02 00:05:22 +04:00
${ PYTHON_DEPS }
2011-11-09 11:33:19 +04:00
app-arch/zip
app-arch/unzip
>= app-text/hunspell-1.3.2-r3
app-text/mythes
2014-09-08 09:32:03 +04:00
>= app-text/libabw-0.1.0
2011-11-14 23:36:02 +04:00
>= app-text/libexttextcat-3.2
2014-09-08 09:32:03 +04:00
>= app-text/libebook-0.1.1
2013-11-02 12:59:46 +04:00
app-text/libetonyek
2013-11-16 14:47:56 +04:00
app-text/liblangtag
2012-06-07 21:14:05 +04:00
app-text/libmspub
2013-11-16 14:47:56 +04:00
>= app-text/libmwaw-0.2
2013-11-10 00:53:58 +04:00
>= app-text/libodfgen-0.0.3
2014-09-08 09:32:03 +04:00
app-text/libwpd:0.10[ tools]
app-text/libwpg:0.3
>= app-text/libwps-0.3.0
2013-03-13 14:52:44 +04:00
>= app-text/poppler-0.16:= [ xpdf-headers( +) ,cxx]
2012-03-21 16:32:45 +04:00
>= dev-cpp/clucene-2.3.3.4-r2
2013-08-09 15:53:18 +04:00
dev-cpp/libcmis:0.4
2011-11-09 11:33:19 +04:00
dev-db/unixODBC
2013-07-10 14:17:42 +04:00
>= dev-libs/boost-1.46:=
2011-11-09 11:33:19 +04:00
dev-libs/expat
>= dev-libs/hyphen-2.7.1
2013-01-24 10:21:41 +04:00
>= dev-libs/icu-4.8.1.1:=
2013-07-17 22:37:14 +04:00
>= dev-libs/libatomic_ops-7.2d
2014-03-26 11:32:16 +04:00
>= dev-libs/liborcus-0.7.0:=
2012-08-12 23:52:52 +04:00
>= dev-libs/nspr-4.8.8
>= dev-libs/nss-3.12.9
2011-11-09 11:33:19 +04:00
>= dev-lang/perl-5.0
2014-08-01 19:23:15 +04:00
>= dev-libs/openssl-1.0.0d:0
>= dev-libs/redland-1.0.16
2012-08-13 17:09:35 +04:00
media-gfx/graphite2
2011-11-09 11:33:19 +04:00
>= media-libs/fontconfig-2.8.0
media-libs/freetype:2
2014-03-26 11:32:16 +04:00
>= media-libs/glew-1.10
2013-09-04 01:10:26 +04:00
>= media-libs/harfbuzz-0.9.18:= [ icu( +) ]
2012-06-05 10:10:30 +04:00
media-libs/lcms:2
2011-11-09 11:33:19 +04:00
>= media-libs/libpng-1.4
2012-04-19 21:59:51 +04:00
>= media-libs/libcdr-0.0.5
2013-11-02 12:59:46 +04:00
media-libs/libfreehand
2011-11-09 11:33:19 +04:00
media-libs/libvisio
2012-03-28 19:42:39 +04:00
>= net-misc/curl-7.21.4
2012-08-02 09:25:05 +04:00
net-nds/openldap
2011-11-09 11:33:19 +04:00
sci-mathematics/lpsolve
2013-08-28 11:01:52 +04:00
virtual/jpeg:0
2012-02-15 02:20:37 +04:00
>= x11-libs/cairo-1.10.0[ X]
2011-11-09 11:33:19 +04:00
x11-libs/libXinerama
x11-libs/libXrandr
x11-libs/libXrender
2012-09-20 15:54:07 +04:00
bluetooth? ( net-wireless/bluez )
2012-05-10 02:56:39 +04:00
cups? ( net-print/cups )
2011-11-09 11:33:19 +04:00
dbus? ( >= dev-libs/dbus-glib-0.92 )
eds? ( gnome-extra/evolution-data-server )
2013-07-30 13:03:10 +04:00
firebird? ( >= dev-db/firebird-2.5 )
2012-06-01 07:47:26 +04:00
gnome? ( gnome-base/gconf:2 )
2012-02-08 10:13:10 +04:00
gtk? (
x11-libs/gdk-pixbuf[ X]
>= x11-libs/gtk+-2.24:2
)
2011-12-05 09:06:06 +04:00
gtk3? ( >= x11-libs/gtk+-3.2:3 )
2011-11-09 11:33:19 +04:00
gstreamer? (
2012-12-06 10:19:10 +04:00
media-libs/gstreamer:1.0
media-libs/gst-plugins-base:1.0
2011-11-09 11:33:19 +04:00
)
2012-05-05 09:43:27 +04:00
jemalloc? ( dev-libs/jemalloc )
2012-05-07 00:14:41 +04:00
libreoffice_extensions_scripting-beanshell? ( >= dev-java/bsh-2.0_beta4 )
libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 )
libreoffice_extensions_wiki-publisher? (
dev-java/commons-codec:0
dev-java/commons-httpclient:3
dev-java/commons-lang:2.1
dev-java/commons-logging:0
dev-java/tomcat-servlet-api:3.0
2011-11-09 11:33:19 +04:00
)
mysql? ( >= dev-db/mysql-connector-c++-1.1.0 )
2012-09-17 18:29:23 +04:00
opengl? (
virtual/glu
virtual/opengl
)
2012-08-09 21:02:33 +04:00
postgres? ( >= dev-db/postgresql-base-9.0[ kerberos] )
2012-09-20 15:54:07 +04:00
telepathy? (
dev-libs/glib:2
>= net-libs/telepathy-glib-0.18.0
2013-01-29 23:07:16 +04:00
>= x11-libs/gtk+-2.24:2
2012-09-20 15:54:07 +04:00
)
2011-11-09 11:33:19 +04:00
webdav? ( net-libs/neon )
"
RDEPEND = " ${ COMMON_DEPEND }
!app-office/libreoffice-bin
2012-03-01 13:09:09 +04:00
!app-office/libreoffice-bin-debug
2012-11-24 22:55:16 +04:00
!<app-office/openoffice-bin-3.4.0-r1
2011-11-09 11:33:19 +04:00
!app-office/openoffice
media-fonts/libertine-ttf
media-fonts/liberation-fonts
2012-02-29 19:55:09 +04:00
media-fonts/urw-fonts
2011-11-09 11:33:19 +04:00
java? ( >= virtual/jre-1.6 )
2013-09-11 11:09:26 +04:00
vlc? ( media-video/vlc )
2011-11-09 11:33:19 +04:00
"
2013-01-31 19:28:00 +04:00
if [ [ ${ PV } != *9999* ] ] ; then
PDEPEND = " ~app-office/libreoffice-l10n- ${ PV } "
else
# Translations are not reliable on live ebuilds
# rather force people to use english only.
PDEPEND = "!app-office/libreoffice-l10n"
fi
2011-11-09 11:33:19 +04:00
# FIXME: cppunit should be moved to test conditional
# after everything upstream is under gbuild
# as dmake execute tests right away
DEPEND = " ${ COMMON_DEPEND }
>= dev-libs/libxml2-2.7.8
dev-libs/libxslt
dev-perl/Archive-Zip
2012-04-25 13:42:57 +04:00
dev-util/cppunit
2011-11-09 11:33:19 +04:00
>= dev-util/gperf-3
dev-util/intltool
2014-08-17 23:03:33 +04:00
>= dev-util/mdds-0.10.3:=
2014-03-26 11:32:16 +04:00
media-libs/glm
2011-11-09 11:33:19 +04:00
net-misc/npapi-sdk
>= sys-apps/findutils-4.4.2
sys-devel/bison
sys-apps/coreutils
sys-devel/flex
sys-devel/gettext
>= sys-devel/make-3.82
2012-09-24 21:34:58 +04:00
sys-devel/ucpp
2011-11-09 11:33:19 +04:00
sys-libs/zlib
2014-03-26 11:32:16 +04:00
virtual/pkgconfig
2012-05-01 11:13:34 +04:00
x11-libs/libXt
2011-11-09 11:33:19 +04:00
x11-libs/libXtst
x11-proto/randrproto
x11-proto/xextproto
x11-proto/xineramaproto
x11-proto/xproto
java? (
2012-06-22 16:51:20 +04:00
>= virtual/jdk-1.6
2011-11-09 11:33:19 +04:00
>= dev-java/ant-core-1.7
)
2013-06-05 17:39:11 +04:00
odk? ( >= app-doc/doxygen-1.8.4 )
2012-04-19 09:19:22 +04:00
test? ( dev-util/cppunit )
2011-11-09 11:33:19 +04:00
"
PATCHES = (
2012-04-19 09:19:22 +04:00
# not upstreamable stuff
2012-09-20 15:54:07 +04:00
" ${ FILESDIR } / ${ PN } -3.7-system-pyuno.patch "
2011-11-09 11:33:19 +04:00
)
REQUIRED_USE = "
2013-07-01 01:16:55 +04:00
${ PYTHON_REQUIRED_USE }
2012-09-20 15:54:07 +04:00
bluetooth? ( dbus )
2011-11-09 11:33:19 +04:00
gnome? ( gtk )
2011-11-10 23:46:46 +04:00
eds? ( gnome )
2013-06-23 19:08:17 +04:00
telepathy? ( gtk )
2012-05-05 09:43:27 +04:00
libreoffice_extensions_nlpsolver? ( java )
libreoffice_extensions_scripting-beanshell? ( java )
libreoffice_extensions_scripting-javascript? ( java )
2012-05-07 00:14:41 +04:00
libreoffice_extensions_wiki-publisher? ( java )
2011-11-09 11:33:19 +04:00
"
2012-04-18 13:58:38 +04:00
CHECKREQS_MEMORY = "512M"
CHECKREQS_DISK_BUILD = "6G"
2011-11-09 11:33:19 +04:00
pkg_pretend( ) {
2011-11-19 15:40:57 +04:00
local pgslot
2011-11-09 11:33:19 +04:00
if [ [ ${ MERGE_TYPE } != binary ] ] ; then
check-reqs_pkg_pretend
2012-06-02 16:03:44 +04:00
if [ [ $( gcc-major-version) -lt 4 ] ] || \
2012-11-05 22:15:23 +04:00
( [ [ $( gcc-major-version) -eq 4 && $( gcc-minor-version) -lt 6 ] ] ) \
2012-06-02 16:03:44 +04:00
; then
2012-11-05 22:15:23 +04:00
eerror "Compilation with gcc older than 4.6 is not supported"
2011-11-09 11:33:19 +04:00
die "Too old gcc found."
fi
fi
2011-11-19 15:40:57 +04:00
2013-06-20 17:44:09 +04:00
# Ensure pg version but we have to be sure the pg is installed (first
# install on clean system)
if use postgres && has_version dev-db/postgresql-base; then
2011-11-19 15:40:57 +04:00
pgslot = $( postgresql-config show)
2011-12-05 09:06:06 +04:00
if [ [ ${ pgslot //. } < 90 ] ] ; then
2012-05-23 14:41:30 +04:00
eerror "PostgreSQL slot must be set to 9.0 or higher."
2011-12-05 09:06:06 +04:00
eerror " postgresql-config set 9.0"
die "PostgreSQL slot is not set to 9.0 or higher."
2011-11-19 15:40:57 +04:00
fi
fi
2011-11-09 11:33:19 +04:00
}
pkg_setup( ) {
java-pkg-opt-2_pkg_setup
kde4-base_pkg_setup
2013-01-02 00:05:22 +04:00
python-single-r1_pkg_setup
2011-11-09 11:33:19 +04:00
2012-04-18 13:58:38 +04:00
[ [ ${ MERGE_TYPE } != binary ] ] && check-reqs_pkg_setup
2011-11-09 11:33:19 +04:00
}
src_unpack( ) {
2012-10-28 22:18:29 +04:00
local mod mod2 dest tmplfile tmplname mypv
2011-11-09 11:33:19 +04:00
2011-11-10 11:05:36 +04:00
[ [ -n ${ PATCHSET } ] ] && unpack ${ PATCHSET }
2013-01-12 18:52:28 +04:00
use branding && unpack " ${ BRANDING } "
2011-11-09 11:33:19 +04:00
if [ [ ${ PV } != *9999* ] ] ; then
2013-01-12 18:52:28 +04:00
unpack " ${ P } .tar.xz "
2011-11-09 11:33:19 +04:00
for mod in ${ MODULES } ; do
2013-01-12 18:52:28 +04:00
[ [ ${ mod } = = core ] ] && continue
2011-12-14 10:06:15 +04:00
unpack " ${ PN } - ${ mod } - ${ PV } .tar.xz "
2011-11-09 11:33:19 +04:00
done
else
for mod in ${ MODULES } ; do
mypv = ${ PV /.9999 }
[ [ ${ mypv } != ${ PV } ] ] && EGIT_BRANCH = " ${ PN } - ${ mypv /./- } "
EGIT_PROJECT = " ${ PN } / ${ mod } "
2013-01-14 22:42:11 +04:00
EGIT_SOURCEDIR = " ${ WORKDIR } / ${ P } "
[ [ ${ mod } != core ] ] && EGIT_SOURCEDIR = " ${ WORKDIR } / ${ PN } - ${ mod } - ${ PV } "
2011-11-09 11:33:19 +04:00
EGIT_REPO_URI = " git://anongit.freedesktop.org/ ${ PN } / ${ mod } "
EGIT_NOUNPACK = "true"
git-2_src_unpack
if [ [ ${ mod } != core ] ] ; then
2012-10-28 22:18:29 +04:00
mod2 = ${ mod }
2012-10-25 20:53:04 +04:00
# mapping does not match on help
2012-10-28 22:18:29 +04:00
[ [ ${ mod } = = help ] ] && mod2 = "helpcontent2"
mkdir -p " ${ S } / ${ mod2 } / " || die
mv -n " ${ WORKDIR } / ${ PN } - ${ mod } - ${ PV } " /* " ${ S } / ${ mod2 } " || die
2011-11-09 11:33:19 +04:00
rm -rf " ${ WORKDIR } / ${ PN } - ${ mod } - ${ PV } "
fi
done
unset EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
fi
}
src_prepare( ) {
# optimization flags
2012-05-01 11:13:34 +04:00
export GMAKE_OPTIONS = " ${ MAKEOPTS } "
2013-03-31 18:49:30 +04:00
# System python 2.7 enablement:
export PYTHON_CFLAGS = $( python_get_CFLAGS)
export PYTHON_LIBS = $( python_get_LIBS)
2011-11-09 11:33:19 +04:00
2011-11-10 11:05:36 +04:00
# patchset
if [ [ -n ${ PATCHSET } ] ] ; then
EPATCH_FORCE = "yes" \
EPATCH_SOURCE = " ${ WORKDIR } / ${ PATCHSET /.tar.xz/ } " \
EPATCH_SUFFIX = "patch" \
epatch
fi
2011-11-09 11:33:19 +04:00
base_src_prepare
2012-05-14 22:09:04 +04:00
2013-03-31 18:49:30 +04:00
AT_M4DIR = "m4" eautoreconf
2011-11-09 11:33:19 +04:00
# hack in the autogen.sh
touch autogen.lastrun
2012-03-02 10:00:17 +04:00
# system pyuno mess
sed \
-e " s:%eprefix%: ${ EPREFIX } :g " \
-e " s:%libdir%: $( get_libdir) :g " \
-i pyuno/source/module/uno.py \
-i scripting/source/pyprov/officehelper.py || die
2013-03-05 11:57:30 +04:00
# sed in the tests
sed -i \
-e 's#all : build unitcheck#all : build#g' \
solenv/gbuild/Module.mk || die
sed -i \
-e 's#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g' \
2013-03-06 00:46:46 +04:00
-e 's#Makefile.gbuild all slowcheck#Makefile.gbuild all#g' \
2013-03-05 11:57:30 +04:00
Makefile.in || die
2013-03-31 18:49:30 +04:00
if use branding; then
# hack...
2013-05-27 22:58:32 +04:00
mv -v " ${ WORKDIR } /branding-intro.png " " ${ S } /icon-themes/galaxy/brand/intro.png " || die
2013-03-31 18:49:30 +04:00
fi
2011-11-09 11:33:19 +04:00
}
src_configure( ) {
local java_opts
local internal_libs
2012-05-05 09:43:27 +04:00
local lo_ext
local ext_opts
2011-11-09 11:33:19 +04:00
local jbs = $( sed -ne 's/.*\(-j[[:space:]]*\|--jobs=\)\([[:digit:]]\+\).*/\2/;T;p' <<< " ${ MAKEOPTS } " )
# recheck that there is some value in jobs
[ [ -z ${ jbs } ] ] && jbs = "1"
# sane: just sane.h header that is used for scan in writer, not
# linked or anything else, worthless to depend on
2011-11-30 22:18:14 +04:00
# vigra: just uses templates from there
# it is serious pain in the ass for packaging
# should be replaced by boost::gil if someone interested
2011-11-09 11:33:19 +04:00
internal_libs += "
--without-system-sane
2011-11-30 22:18:14 +04:00
--without-system-vigra
2011-11-09 11:33:19 +04:00
"
2012-05-05 09:43:27 +04:00
# libreoffice extensions handling
for lo_xt in ${ LO_EXTS } ; do
2012-10-09 15:58:41 +04:00
if [ [ " ${ lo_xt } " = = "scripting-beanshell" || " ${ lo_xt } " = = "scripting-javascript" ] ] ; then
ext_opts += " $( use_enable libreoffice_extensions_${ lo_xt } ${ lo_xt } ) "
else
ext_opts += " $( use_enable libreoffice_extensions_${ lo_xt } ext-${ lo_xt } ) "
fi
2012-05-05 09:43:27 +04:00
done
2011-11-09 11:33:19 +04:00
if use java; then
2011-11-24 00:50:15 +04:00
# hsqldb: system one is too new
2011-11-09 11:33:19 +04:00
java_opts = "
2012-11-24 00:05:48 +04:00
--without-junit
2011-11-09 11:33:19 +04:00
--without-system-hsqldb
--with-ant-home= " ${ ANT_HOME } "
--with-jdk-home= $( java-config --jdk-home 2>/dev/null)
2014-03-11 09:59:29 +04:00
--with-jvm-path= " ${ EPREFIX } /usr/lib/ "
2011-11-09 11:33:19 +04:00
"
2012-05-07 00:14:41 +04:00
use libreoffice_extensions_scripting-beanshell && \
java_opts += " --with-beanshell-jar= $( java-pkg_getjar bsh bsh.jar) "
use libreoffice_extensions_scripting-javascript && \
java_opts += " --with-rhino-jar= $( java-pkg_getjar rhino-1.6 js.jar) "
if use libreoffice_extensions_wiki-publisher; then
java_opts += "
--with-commons-codec-jar= $( java-pkg_getjar commons-codec commons-codec.jar)
--with-commons-httpclient-jar= $( java-pkg_getjar commons-httpclient-3 commons-httpclient.jar)
--with-commons-lang-jar= $( java-pkg_getjar commons-lang-2.1 commons-lang.jar)
--with-commons-logging-jar= $( java-pkg_getjar commons-logging commons-logging.jar)
--with-servlet-api-jar= $( java-pkg_getjar tomcat-servlet-api-3.0 servlet-api.jar)
"
fi
2011-11-09 11:33:19 +04:00
fi
# system headers/libs/...: enforce using system packages
# --enable-cairo: ensure that cairo is always required
2012-08-13 17:09:35 +04:00
# --enable-graphite: disabling causes build breakages
2011-11-09 11:33:19 +04:00
# --enable-*-link: link to the library rather than just dlopen on runtime
# --enable-release-build: build the libreoffice as release
# --disable-fetch-external: prevent dowloading during compile phase
# --disable-gnome-vfs: old gnome virtual fs support
# --disable-kdeab: kde3 adressbook
# --disable-kde: kde3 support
2012-04-07 16:21:43 +04:00
# --disable-systray: quickstarter does not actually work at all so do not
# promote it
2011-11-09 11:33:19 +04:00
# --enable-extension-integration: enable any extension integration support
2014-03-27 23:45:12 +04:00
# --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
2013-03-19 11:13:21 +04:00
# --disable-report-builder: too much java packages pulled in without pkgs
2011-11-09 11:33:19 +04:00
econf \
--docdir= " ${ EPREFIX } /usr/share/doc/ ${ PF } / " \
--with-system-headers \
--with-system-libs \
--with-system-jars \
--with-system-dicts \
--enable-cairo-canvas \
2012-08-13 17:09:35 +04:00
--enable-graphite \
2011-11-09 11:33:19 +04:00
--enable-largefile \
2012-02-08 10:13:10 +04:00
--enable-mergelibs \
2011-11-09 11:33:19 +04:00
--enable-python= system \
--enable-randr \
--enable-randr-link \
--enable-release-build \
2013-12-30 15:54:47 +04:00
--disable-hardlink-deliver \
2011-12-16 10:22:42 +04:00
--disable-ccache \
2011-11-09 11:33:19 +04:00
--disable-crashdump \
--disable-dependency-tracking \
--disable-epm \
--disable-fetch-external \
--disable-gnome-vfs \
2012-12-06 10:19:10 +04:00
--disable-gstreamer-0-10 \
2013-03-19 11:13:21 +04:00
--disable-report-builder \
2011-11-09 11:33:19 +04:00
--disable-kdeab \
--disable-kde \
--disable-online-update \
2012-04-07 16:21:43 +04:00
--disable-systray \
2011-11-09 11:33:19 +04:00
--with-alloc= $( use jemalloc && echo "jemalloc" || echo "system" ) \
--with-build-version= "Gentoo official package" \
--enable-extension-integration \
--with-external-dict-dir= " ${ EPREFIX } /usr/share/myspell " \
--with-external-hyph-dir= " ${ EPREFIX } /usr/share/myspell " \
--with-external-thes-dir= " ${ EPREFIX } /usr/share/myspell " \
--with-external-tar= " ${ DISTDIR } " \
--with-lang= "" \
2012-11-01 10:40:17 +04:00
--with-parallelism= ${ jbs } \
2012-09-28 22:23:39 +04:00
--with-system-ucpp \
2011-11-09 11:33:19 +04:00
--with-vendor= "Gentoo Foundation" \
--with-x \
--without-fonts \
--without-myspell-dicts \
2011-11-10 11:05:36 +04:00
--without-help \
2012-02-25 13:22:04 +04:00
--with-helppack-integration \
2011-11-13 15:18:31 +04:00
--without-sun-templates \
2012-11-18 01:33:06 +04:00
$( use_enable bluetooth sdremote-bluetooth) \
2012-05-10 02:56:39 +04:00
$( use_enable cups) \
2012-12-01 22:49:09 +04:00
$( use_enable debug) \
2011-11-09 11:33:19 +04:00
$( use_enable dbus) \
$( use_enable eds evolution2) \
2013-07-30 13:03:10 +04:00
$( use_enable firebird firebird-sdbc) \
2011-11-09 11:33:19 +04:00
$( use_enable gnome gconf) \
$( use_enable gnome gio) \
$( use_enable gnome lockdown) \
2013-09-16 23:37:48 +04:00
$( use_enable gstreamer) \
2011-11-09 11:33:19 +04:00
$( use_enable gtk) \
2011-12-05 09:06:06 +04:00
$( use_enable gtk3) \
2011-11-09 11:33:19 +04:00
$( use_enable kde kde4) \
2013-03-13 23:03:02 +04:00
$( use_enable mysql ext-mariadb-connector) \
2011-11-09 11:33:19 +04:00
$( use_enable odk) \
$( use_enable opengl) \
2012-02-15 02:20:37 +04:00
$( use_enable postgres postgresql-sdbc) \
2012-09-20 15:54:07 +04:00
$( use_enable telepathy) \
2011-11-09 11:33:19 +04:00
$( use_enable vba) \
2013-09-11 11:09:26 +04:00
$( use_enable vlc) \
2011-11-09 11:33:19 +04:00
$( use_enable webdav neon) \
$( use_with java) \
$( use_with mysql system-mysql-cppconn) \
2012-08-12 23:52:52 +04:00
$( use_with odk doxygen) \
2011-11-09 11:33:19 +04:00
${ internal_libs } \
2012-05-05 09:43:27 +04:00
${ java_opts } \
${ ext_opts }
2011-11-09 11:33:19 +04:00
}
src_compile( ) {
2012-05-07 00:14:41 +04:00
# hack for offlinehelp, this needs fixing upstream at some point
# it is broken because we send --without-help
# https://bugs.freedesktop.org/show_bug.cgi?id=46506
(
2012-10-25 20:53:04 +04:00
grep "^export" " ${ S } /config_host.mk " > " ${ T } /config_host.mk "
source " ${ T } /config_host.mk " 2& > /dev/null
2012-05-07 00:14:41 +04:00
2013-11-16 14:47:56 +04:00
local path = " ${ WORKDIR } /helpcontent2/source/auxiliary/ "
2012-05-07 00:14:41 +04:00
mkdir -p " ${ path } " || die
echo " perl \" ${ S } /helpcontent2/helpers/create_ilst.pl\" -dir=icon-themes/galaxy/res/helpimg > \" ${ path } /helpimg.ilst\" "
perl " ${ S } /helpcontent2/helpers/create_ilst.pl " \
-dir= icon-themes/galaxy/res/helpimg \
> " ${ path } /helpimg.ilst "
[ [ -s " ${ path } /helpimg.ilst " ] ] || ewarn "The help images list is empty, something is fishy, report a bug."
)
2013-08-31 23:07:17 +04:00
local target
use test && target = "build" || target = "build-nocheck"
2012-05-01 11:13:34 +04:00
# this is not a proper make script
2013-08-31 23:07:17 +04:00
make ${ target } || die
2011-11-09 11:33:19 +04:00
}
src_test( ) {
2012-04-18 13:58:38 +04:00
make unitcheck || die
make slowcheck || die
2011-11-09 11:33:19 +04:00
}
src_install( ) {
# This is not Makefile so no buildserver
make DESTDIR = " ${ D } " distro-pack-install -o build -o check || die
# Fix bash completion placement
newbashcomp " ${ ED } " /etc/bash_completion.d/libreoffice.sh ${ PN }
rm -rf " ${ ED } " /etc/
if use branding; then
insinto /usr/$( get_libdir) /${ PN } /program
newins " ${ WORKDIR } /branding-sofficerc " sofficerc
2013-12-30 15:54:47 +04:00
echo " CONFIG_PROTECT=/usr/ $( get_libdir) / ${ PN } /program/sofficerc " > " ${ ED } " /etc/env.d/99${ PN }
2011-11-09 11:33:19 +04:00
fi
2012-03-18 21:32:10 +04:00
2012-11-14 18:04:50 +04:00
# symlink the nsplugin to proper location
2013-09-16 01:02:03 +04:00
# use gtk && inst_plugin /usr/$(get_libdir)/libreoffice/program/libnpsoplugin.so
2012-11-14 18:04:50 +04:00
2012-03-18 21:32:10 +04:00
# Hack for offlinehelp, this needs fixing upstream at some point.
# It is broken because we send --without-help
# https://bugs.freedesktop.org/show_bug.cgi?id=46506
insinto /usr/$( get_libdir) /libreoffice/help
2012-05-07 00:14:41 +04:00
doins xmlhelp/util/*.xsl
2012-08-25 22:22:17 +04:00
# Remove desktop files for support to old installs that can't parse mime
rm -rf " ${ ED } " /usr/share/mimelnk/
2013-12-27 19:20:11 +04:00
pax-mark -m " ${ ED } " /usr/$( get_libdir) /libreoffice/program/soffice.bin
pax-mark -m " ${ ED } " /usr/$( get_libdir) /libreoffice/program/unopkg.bin
2011-11-09 11:33:19 +04:00
}
pkg_preinst( ) {
# Cache updates - all handled by kde eclass for all environments
kde4-base_pkg_preinst
}
pkg_postinst( ) {
kde4-base_pkg_postinst
2012-05-10 02:56:39 +04:00
use java || \
2012-11-18 01:33:06 +04:00
ewarn 'If you plan to use lbase application you should enable java or you will get various crashes.'
2011-11-09 11:33:19 +04:00
}
pkg_postrm( ) {
kde4-base_pkg_postrm
}