| 1 |
# Copyright 1999-2013 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-9999-r2.ebuild,v 1.145 2012/12/18 21:52:42 scarabeus Exp $ |
| 4 |
|
| 5 |
EAPI=5 |
| 6 |
|
| 7 |
KDE_REQUIRED="optional" |
| 8 |
QT_MINIMAL="4.7.4" |
| 9 |
KDE_SCM="git" |
| 10 |
CMAKE_REQUIRED="never" |
| 11 |
|
| 12 |
PYTHON_COMPAT=( python3_3 ) |
| 13 |
PYTHON_REQ_USE="threads,xml" |
| 14 |
|
| 15 |
# experimental ; release ; old |
| 16 |
# Usually the tarballs are moved a lot so this should make |
| 17 |
# everyone happy. |
| 18 |
DEV_URI=" |
| 19 |
http://dev-builds.libreoffice.org/pre-releases/src |
| 20 |
http://download.documentfoundation.org/libreoffice/src/${PV:0:5}/ |
| 21 |
http://download.documentfoundation.org/libreoffice/old/${PV}/ |
| 22 |
" |
| 23 |
EXT_URI="http://ooo.itc.hu/oxygenoffice/download/libreoffice" |
| 24 |
ADDONS_URI="http://dev-www.libreoffice.org/src/" |
| 25 |
|
| 26 |
BRANDING="${PN}-branding-gentoo-0.7.tar.xz" |
| 27 |
# PATCHSET="${P}-patchset-01.tar.xz" |
| 28 |
|
| 29 |
[[ ${PV} == *9999* ]] && SCM_ECLASS="git-2" |
| 30 |
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 ${SCM_ECLASS} |
| 31 |
unset SCM_ECLASS |
| 32 |
|
| 33 |
DESCRIPTION="LibreOffice, a full office productivity suite." |
| 34 |
HOMEPAGE="http://www.libreoffice.org" |
| 35 |
SRC_URI="branding? ( http://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )" |
| 36 |
[[ -n ${PATCHSET} ]] && SRC_URI+=" http://dev.gentooexperimental.org/~scarabeus/${PATCHSET}" |
| 37 |
|
| 38 |
# Split modules following git/tarballs |
| 39 |
# Core MUST be first! |
| 40 |
# Help is used for the image generator |
| 41 |
MODULES="core help" |
| 42 |
# Only release has the tarballs |
| 43 |
if [[ ${PV} != *9999* ]]; then |
| 44 |
for i in ${DEV_URI}; do |
| 45 |
for mod in ${MODULES}; do |
| 46 |
SRC_URI+=" ${i}/${PN}-${mod}-${PV}.tar.xz" |
| 47 |
done |
| 48 |
unset mod |
| 49 |
done |
| 50 |
unset i |
| 51 |
fi |
| 52 |
unset DEV_URI |
| 53 |
|
| 54 |
# Really required addons |
| 55 |
# These are bundles that can't be removed for now due to huge patchsets. |
| 56 |
# If you want them gone, patches are welcome. |
| 57 |
ADDONS_SRC+=" ${ADDONS_URI}/ea91f2fb4212a21d708aced277e6e85a-vigra1.4.0.tar.gz" |
| 58 |
ADDONS_SRC+=" ${ADDONS_URI}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz" # modifies source code |
| 59 |
ADDONS_SRC+=" java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )" |
| 60 |
ADDONS_SRC+=" libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )" # no release for 8 years, should we package it? |
| 61 |
ADDONS_SRC+=" libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )" # Does not build with 1.6 rhino at all |
| 62 |
ADDONS_SRC+=" libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )" # requirement of rhino |
| 63 |
ADDONS_SRC+=" odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )" # not packageable |
| 64 |
SRC_URI+=" ${ADDONS_SRC}" |
| 65 |
|
| 66 |
unset ADDONS_URI |
| 67 |
unset EXT_URI |
| 68 |
unset ADDONS_SRC |
| 69 |
|
| 70 |
IUSE="bluetooth +branding +cups dbus debug eds gnome gstreamer +gtk |
| 71 |
gtk3 jemalloc kde mysql nsplugin odk opengl pdfimport postgres |
| 72 |
telepathy test +vba +webdav" |
| 73 |
|
| 74 |
LO_EXTS="nlpsolver presenter-minimizer scripting-beanshell scripting-javascript wiki-publisher" |
| 75 |
# Unpackaged separate extensions: |
| 76 |
# diagram: lo has 0.9.5 upstream is weirdly patched 0.9.4 -> wtf? |
| 77 |
# hunart: only on ooo extensions -> fubared download path somewhere on sf |
| 78 |
# numbertext, typo, validator, watch-window: ^^ |
| 79 |
# oooblogger: no homepage or anything |
| 80 |
# Extensions that need extra work: |
| 81 |
# report-builder: missing java packages |
| 82 |
for lo_xt in ${LO_EXTS}; do |
| 83 |
IUSE+=" libreoffice_extensions_${lo_xt}" |
| 84 |
done |
| 85 |
unset lo_xt |
| 86 |
|
| 87 |
LICENSE="|| ( LGPL-3 MPL-1.1 )" |
| 88 |
SLOT="0" |
| 89 |
[[ ${PV} == *9999* ]] || KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux" |
| 90 |
|
| 91 |
COMMON_DEPEND=" |
| 92 |
${PYTHON_DEPS} |
| 93 |
app-arch/zip |
| 94 |
app-arch/unzip |
| 95 |
>=app-text/hunspell-1.3.2-r3 |
| 96 |
app-text/mythes |
| 97 |
>=app-text/libexttextcat-3.2 |
| 98 |
app-text/liblangtag |
| 99 |
app-text/libmspub |
| 100 |
app-text/libwpd:0.9[tools] |
| 101 |
app-text/libwpg:0.2 |
| 102 |
>=app-text/libwps-0.2.2 |
| 103 |
>=dev-cpp/clucene-2.3.3.4-r2 |
| 104 |
dev-cpp/libcmis:0.3 |
| 105 |
dev-db/unixODBC |
| 106 |
dev-libs/expat |
| 107 |
>=dev-libs/hyphen-2.7.1 |
| 108 |
>=dev-libs/icu-4.8.1.1 |
| 109 |
>=dev-libs/liborcus-0.3 |
| 110 |
>=dev-libs/nspr-4.8.8 |
| 111 |
>=dev-libs/nss-3.12.9 |
| 112 |
>=dev-lang/perl-5.0 |
| 113 |
>=dev-libs/openssl-1.0.0d |
| 114 |
>=dev-libs/redland-1.0.14[ssl] |
| 115 |
media-gfx/graphite2 |
| 116 |
>=media-libs/fontconfig-2.8.0 |
| 117 |
media-libs/freetype:2 |
| 118 |
media-libs/lcms:2 |
| 119 |
>=media-libs/libpng-1.4 |
| 120 |
>=media-libs/libcdr-0.0.5 |
| 121 |
media-libs/libvisio |
| 122 |
>=net-misc/curl-7.21.4 |
| 123 |
net-misc/npapi-sdk |
| 124 |
net-nds/openldap |
| 125 |
sci-mathematics/lpsolve |
| 126 |
virtual/jpeg |
| 127 |
>=x11-libs/cairo-1.10.0[X] |
| 128 |
x11-libs/libXinerama |
| 129 |
x11-libs/libXrandr |
| 130 |
x11-libs/libXrender |
| 131 |
bluetooth? ( net-wireless/bluez ) |
| 132 |
cups? ( net-print/cups ) |
| 133 |
dbus? ( >=dev-libs/dbus-glib-0.92 ) |
| 134 |
eds? ( gnome-extra/evolution-data-server ) |
| 135 |
gnome? ( gnome-base/gconf:2 ) |
| 136 |
gtk? ( |
| 137 |
x11-libs/gdk-pixbuf[X] |
| 138 |
>=x11-libs/gtk+-2.24:2 |
| 139 |
) |
| 140 |
gtk3? ( >=x11-libs/gtk+-3.2:3 ) |
| 141 |
gstreamer? ( |
| 142 |
media-libs/gstreamer:1.0 |
| 143 |
media-libs/gst-plugins-base:1.0 |
| 144 |
) |
| 145 |
jemalloc? ( dev-libs/jemalloc ) |
| 146 |
libreoffice_extensions_scripting-beanshell? ( >=dev-java/bsh-2.0_beta4 ) |
| 147 |
libreoffice_extensions_scripting-javascript? ( dev-java/rhino:1.6 ) |
| 148 |
libreoffice_extensions_wiki-publisher? ( |
| 149 |
dev-java/commons-codec:0 |
| 150 |
dev-java/commons-httpclient:3 |
| 151 |
dev-java/commons-lang:2.1 |
| 152 |
dev-java/commons-logging:0 |
| 153 |
dev-java/tomcat-servlet-api:3.0 |
| 154 |
) |
| 155 |
mysql? ( >=dev-db/mysql-connector-c++-1.1.0 ) |
| 156 |
opengl? ( |
| 157 |
virtual/glu |
| 158 |
virtual/opengl |
| 159 |
) |
| 160 |
pdfimport? ( >=app-text/poppler-0.16[xpdf-headers(+),cxx] ) |
| 161 |
postgres? ( >=dev-db/postgresql-base-9.0[kerberos] ) |
| 162 |
telepathy? ( |
| 163 |
dev-libs/glib:2 |
| 164 |
>=net-libs/telepathy-glib-0.18.0 |
| 165 |
) |
| 166 |
webdav? ( net-libs/neon ) |
| 167 |
" |
| 168 |
|
| 169 |
RDEPEND="${COMMON_DEPEND} |
| 170 |
!app-office/libreoffice-bin |
| 171 |
!app-office/libreoffice-bin-debug |
| 172 |
!<app-office/openoffice-bin-3.4.0-r1 |
| 173 |
!app-office/openoffice |
| 174 |
media-fonts/libertine-ttf |
| 175 |
media-fonts/liberation-fonts |
| 176 |
media-fonts/urw-fonts |
| 177 |
java? ( >=virtual/jre-1.6 ) |
| 178 |
" |
| 179 |
|
| 180 |
PDEPEND=" |
| 181 |
=app-office/libreoffice-l10n-3.6* |
| 182 |
" |
| 183 |
|
| 184 |
# FIXME: cppunit should be moved to test conditional |
| 185 |
# after everything upstream is under gbuild |
| 186 |
# as dmake execute tests right away |
| 187 |
DEPEND="${COMMON_DEPEND} |
| 188 |
>=dev-libs/boost-1.46 |
| 189 |
>=dev-libs/libxml2-2.7.8 |
| 190 |
dev-libs/libxslt |
| 191 |
dev-perl/Archive-Zip |
| 192 |
dev-util/cppunit |
| 193 |
>=dev-util/gperf-3 |
| 194 |
dev-util/intltool |
| 195 |
dev-util/mdds |
| 196 |
virtual/pkgconfig |
| 197 |
net-misc/npapi-sdk |
| 198 |
>=sys-apps/findutils-4.4.2 |
| 199 |
sys-devel/bison |
| 200 |
sys-apps/coreutils |
| 201 |
sys-devel/flex |
| 202 |
sys-devel/gettext |
| 203 |
>=sys-devel/make-3.82 |
| 204 |
sys-devel/ucpp |
| 205 |
sys-libs/zlib |
| 206 |
x11-libs/libXt |
| 207 |
x11-libs/libXtst |
| 208 |
x11-proto/randrproto |
| 209 |
x11-proto/xextproto |
| 210 |
x11-proto/xineramaproto |
| 211 |
x11-proto/xproto |
| 212 |
java? ( |
| 213 |
>=virtual/jdk-1.6 |
| 214 |
>=dev-java/ant-core-1.7 |
| 215 |
) |
| 216 |
odk? ( app-doc/doxygen ) |
| 217 |
test? ( dev-util/cppunit ) |
| 218 |
" |
| 219 |
|
| 220 |
PATCHES=( |
| 221 |
# not upstreamable stuff |
| 222 |
"${FILESDIR}/${PN}-3.7-system-pyuno.patch" |
| 223 |
"${FILESDIR}/${PN}-3.7-separate-checks.patch" |
| 224 |
) |
| 225 |
|
| 226 |
REQUIRED_USE=" |
| 227 |
bluetooth? ( dbus ) |
| 228 |
gnome? ( gtk ) |
| 229 |
eds? ( gnome ) |
| 230 |
libreoffice_extensions_nlpsolver? ( java ) |
| 231 |
libreoffice_extensions_scripting-beanshell? ( java ) |
| 232 |
libreoffice_extensions_scripting-javascript? ( java ) |
| 233 |
libreoffice_extensions_wiki-publisher? ( java ) |
| 234 |
nsplugin? ( gtk ) |
| 235 |
" |
| 236 |
|
| 237 |
S="${WORKDIR}/${PN}-core-${PV}" |
| 238 |
|
| 239 |
CHECKREQS_MEMORY="512M" |
| 240 |
CHECKREQS_DISK_BUILD="6G" |
| 241 |
|
| 242 |
pkg_pretend() { |
| 243 |
local pgslot |
| 244 |
|
| 245 |
if [[ ${MERGE_TYPE} != binary ]]; then |
| 246 |
check-reqs_pkg_pretend |
| 247 |
|
| 248 |
if [[ $(gcc-major-version) -lt 4 ]] || \ |
| 249 |
( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) \ |
| 250 |
; then |
| 251 |
eerror "Compilation with gcc older than 4.6 is not supported" |
| 252 |
die "Too old gcc found." |
| 253 |
fi |
| 254 |
fi |
| 255 |
|
| 256 |
# ensure pg version |
| 257 |
if use postgres; then |
| 258 |
pgslot=$(postgresql-config show) |
| 259 |
if [[ ${pgslot//.} < 90 ]] ; then |
| 260 |
eerror "PostgreSQL slot must be set to 9.0 or higher." |
| 261 |
eerror " postgresql-config set 9.0" |
| 262 |
die "PostgreSQL slot is not set to 9.0 or higher." |
| 263 |
fi |
| 264 |
fi |
| 265 |
} |
| 266 |
|
| 267 |
pkg_setup() { |
| 268 |
java-pkg-opt-2_pkg_setup |
| 269 |
kde4-base_pkg_setup |
| 270 |
python-single-r1_pkg_setup |
| 271 |
|
| 272 |
[[ ${MERGE_TYPE} != binary ]] && check-reqs_pkg_setup |
| 273 |
} |
| 274 |
|
| 275 |
src_unpack() { |
| 276 |
local mod mod2 dest tmplfile tmplname mypv |
| 277 |
|
| 278 |
[[ -n ${PATCHSET} ]] && unpack ${PATCHSET} |
| 279 |
if use branding; then |
| 280 |
unpack "${BRANDING}" |
| 281 |
fi |
| 282 |
|
| 283 |
if [[ ${PV} != *9999* ]]; then |
| 284 |
for mod in ${MODULES}; do |
| 285 |
unpack "${PN}-${mod}-${PV}.tar.xz" |
| 286 |
if [[ ${mod} != core ]]; then |
| 287 |
mod2=${mod} |
| 288 |
# mapping does not match on help |
| 289 |
[[ ${mod} == help ]] && mod2="helpcontent2" |
| 290 |
mkdir -p "${S}/${mod2}/" || die |
| 291 |
mv -n "${WORKDIR}/${PN}-${mod}-${PV}"/* "${S}/${mod2}" || die |
| 292 |
rm -rf "${WORKDIR}/${PN}-${mod}-${PV}" |
| 293 |
fi |
| 294 |
done |
| 295 |
else |
| 296 |
for mod in ${MODULES}; do |
| 297 |
mypv=${PV/.9999} |
| 298 |
[[ ${mypv} != ${PV} ]] && EGIT_BRANCH="${PN}-${mypv/./-}" |
| 299 |
EGIT_PROJECT="${PN}/${mod}" |
| 300 |
EGIT_SOURCEDIR="${WORKDIR}/${PN}-${mod}-${PV}" |
| 301 |
EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${mod}" |
| 302 |
EGIT_NOUNPACK="true" |
| 303 |
git-2_src_unpack |
| 304 |
if [[ ${mod} != core ]]; then |
| 305 |
mod2=${mod} |
| 306 |
# mapping does not match on help |
| 307 |
[[ ${mod} == help ]] && mod2="helpcontent2" |
| 308 |
mkdir -p "${S}/${mod2}/" || die |
| 309 |
mv -n "${WORKDIR}/${PN}-${mod}-${PV}"/* "${S}/${mod2}" || die |
| 310 |
rm -rf "${WORKDIR}/${PN}-${mod}-${PV}" |
| 311 |
fi |
| 312 |
done |
| 313 |
unset EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH |
| 314 |
fi |
| 315 |
} |
| 316 |
|
| 317 |
src_prepare() { |
| 318 |
# optimization flags |
| 319 |
export ARCH_FLAGS="${CXXFLAGS}" |
| 320 |
export LINKFLAGSOPTIMIZE="${LDFLAGS}" |
| 321 |
export GMAKE_OPTIONS="${MAKEOPTS}" |
| 322 |
|
| 323 |
# patchset |
| 324 |
if [[ -n ${PATCHSET} ]]; then |
| 325 |
EPATCH_FORCE="yes" \ |
| 326 |
EPATCH_SOURCE="${WORKDIR}/${PATCHSET/.tar.xz/}" \ |
| 327 |
EPATCH_SUFFIX="patch" \ |
| 328 |
epatch |
| 329 |
fi |
| 330 |
|
| 331 |
base_src_prepare |
| 332 |
|
| 333 |
AT_M4DIR="m4" |
| 334 |
eautoreconf |
| 335 |
# hack in the autogen.sh |
| 336 |
touch autogen.lastrun |
| 337 |
|
| 338 |
# system pyuno mess |
| 339 |
sed \ |
| 340 |
-e "s:%eprefix%:${EPREFIX}:g" \ |
| 341 |
-e "s:%libdir%:$(get_libdir):g" \ |
| 342 |
-i pyuno/source/module/uno.py \ |
| 343 |
-i scripting/source/pyprov/officehelper.py || die |
| 344 |
} |
| 345 |
|
| 346 |
src_configure() { |
| 347 |
local java_opts |
| 348 |
local internal_libs |
| 349 |
local lo_ext |
| 350 |
local ext_opts |
| 351 |
local jbs=$(sed -ne 's/.*\(-j[[:space:]]*\|--jobs=\)\([[:digit:]]\+\).*/\2/;T;p' <<< "${MAKEOPTS}") |
| 352 |
|
| 353 |
# recheck that there is some value in jobs |
| 354 |
[[ -z ${jbs} ]] && jbs="1" |
| 355 |
|
| 356 |
# sane: just sane.h header that is used for scan in writer, not |
| 357 |
# linked or anything else, worthless to depend on |
| 358 |
# vigra: just uses templates from there |
| 359 |
# it is serious pain in the ass for packaging |
| 360 |
# should be replaced by boost::gil if someone interested |
| 361 |
internal_libs+=" |
| 362 |
--without-system-sane |
| 363 |
--without-system-vigra |
| 364 |
" |
| 365 |
|
| 366 |
# libreoffice extensions handling |
| 367 |
for lo_xt in ${LO_EXTS}; do |
| 368 |
if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then |
| 369 |
ext_opts+=" $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt})" |
| 370 |
else |
| 371 |
ext_opts+=" $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt})" |
| 372 |
fi |
| 373 |
done |
| 374 |
|
| 375 |
if use java; then |
| 376 |
# hsqldb: system one is too new |
| 377 |
java_opts=" |
| 378 |
--without-junit |
| 379 |
--without-system-hsqldb |
| 380 |
--with-ant-home="${ANT_HOME}" |
| 381 |
--with-jdk-home=$(java-config --jdk-home 2>/dev/null) |
| 382 |
--with-java-target-version=$(java-pkg_get-target) |
| 383 |
--with-jvm-path="${EPREFIX}/usr/$(get_libdir)/" |
| 384 |
" |
| 385 |
|
| 386 |
use libreoffice_extensions_scripting-beanshell && \ |
| 387 |
java_opts+=" --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)" |
| 388 |
|
| 389 |
use libreoffice_extensions_scripting-javascript && \ |
| 390 |
java_opts+=" --with-rhino-jar=$(java-pkg_getjar rhino-1.6 js.jar)" |
| 391 |
|
| 392 |
if use libreoffice_extensions_wiki-publisher; then |
| 393 |
java_opts+=" |
| 394 |
--with-commons-codec-jar=$(java-pkg_getjar commons-codec commons-codec.jar) |
| 395 |
--with-commons-httpclient-jar=$(java-pkg_getjar commons-httpclient-3 commons-httpclient.jar) |
| 396 |
--with-commons-lang-jar=$(java-pkg_getjar commons-lang-2.1 commons-lang.jar) |
| 397 |
--with-commons-logging-jar=$(java-pkg_getjar commons-logging commons-logging.jar) |
| 398 |
--with-servlet-api-jar=$(java-pkg_getjar tomcat-servlet-api-3.0 servlet-api.jar) |
| 399 |
" |
| 400 |
fi |
| 401 |
fi |
| 402 |
|
| 403 |
if use branding; then |
| 404 |
# hack... |
| 405 |
mv -v "${WORKDIR}/branding-intro.png" "${S}/icon-themes/galaxy/brand/intro.png" || die |
| 406 |
fi |
| 407 |
|
| 408 |
# system headers/libs/...: enforce using system packages |
| 409 |
# --enable-unix-qstart-libpng: use libpng splashscreen that is faster |
| 410 |
# --enable-cairo: ensure that cairo is always required |
| 411 |
# --enable-graphite: disabling causes build breakages |
| 412 |
# --enable-*-link: link to the library rather than just dlopen on runtime |
| 413 |
# --enable-release-build: build the libreoffice as release |
| 414 |
# --disable-fetch-external: prevent dowloading during compile phase |
| 415 |
# --disable-gnome-vfs: old gnome virtual fs support |
| 416 |
# --disable-kdeab: kde3 adressbook |
| 417 |
# --disable-kde: kde3 support |
| 418 |
# --disable-rpath: relative runtime path is not desired |
| 419 |
# --disable-systray: quickstarter does not actually work at all so do not |
| 420 |
# promote it |
| 421 |
# --disable-zenity: disable build icon |
| 422 |
# --enable-extension-integration: enable any extension integration support |
| 423 |
# --without-{afms,fonts,myspell-dicts,ppsd}: prevent install of sys pkgs |
| 424 |
# --without-stlport: disable deprecated extensions framework |
| 425 |
# --disable-ext-report-builder: too much java packages pulled in |
| 426 |
econf \ |
| 427 |
--docdir="${EPREFIX}/usr/share/doc/${PF}/" \ |
| 428 |
--with-system-headers \ |
| 429 |
--with-system-libs \ |
| 430 |
--with-system-jars \ |
| 431 |
--with-system-dicts \ |
| 432 |
--enable-cairo-canvas \ |
| 433 |
--enable-graphite \ |
| 434 |
--enable-largefile \ |
| 435 |
--enable-mergelibs \ |
| 436 |
--enable-python=system \ |
| 437 |
--enable-randr \ |
| 438 |
--enable-randr-link \ |
| 439 |
--enable-release-build \ |
| 440 |
--enable-unix-qstart-libpng \ |
| 441 |
--disable-ccache \ |
| 442 |
--disable-crashdump \ |
| 443 |
--disable-dependency-tracking \ |
| 444 |
--disable-epm \ |
| 445 |
--disable-fetch-external \ |
| 446 |
--disable-gnome-vfs \ |
| 447 |
--disable-gstreamer-0-10 \ |
| 448 |
--disable-ext-report-builder \ |
| 449 |
--disable-kdeab \ |
| 450 |
--disable-kde \ |
| 451 |
--disable-online-update \ |
| 452 |
--disable-rpath \ |
| 453 |
--disable-systray \ |
| 454 |
--disable-zenity \ |
| 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=${jbs} \ |
| 464 |
--with-system-ucpp \ |
| 465 |
--with-unix-wrapper=libreoffice \ |
| 466 |
--with-vendor="Gentoo Foundation" \ |
| 467 |
--with-x \ |
| 468 |
--without-afms \ |
| 469 |
--without-fonts \ |
| 470 |
--without-myspell-dicts \ |
| 471 |
--without-stlport \ |
| 472 |
--without-help \ |
| 473 |
--with-helppack-integration \ |
| 474 |
--without-sun-templates \ |
| 475 |
$(use_enable bluetooth sdremote-bluetooth) \ |
| 476 |
$(use_enable cups) \ |
| 477 |
$(use_enable debug) \ |
| 478 |
$(use_enable dbus) \ |
| 479 |
$(use_enable eds evolution2) \ |
| 480 |
$(use_enable gnome gconf) \ |
| 481 |
$(use_enable gnome gio) \ |
| 482 |
$(use_enable gnome lockdown) \ |
| 483 |
$(use_enable gtk) \ |
| 484 |
$(use_enable gtk3) \ |
| 485 |
$(use_enable kde kde4) \ |
| 486 |
$(use_enable mysql ext-mysql-connector) \ |
| 487 |
$(use_enable nsplugin) \ |
| 488 |
$(use_enable odk) \ |
| 489 |
$(use_enable opengl) \ |
| 490 |
$(use_enable pdfimport) \ |
| 491 |
$(use_enable postgres postgresql-sdbc) \ |
| 492 |
$(use_enable telepathy) \ |
| 493 |
$(use_enable test linkoo) \ |
| 494 |
$(use_enable vba) \ |
| 495 |
$(use_enable webdav neon) \ |
| 496 |
$(use_with java) \ |
| 497 |
$(use_with mysql system-mysql-cppconn) \ |
| 498 |
$(use_with odk doxygen) \ |
| 499 |
${internal_libs} \ |
| 500 |
${java_opts} \ |
| 501 |
${ext_opts} |
| 502 |
} |
| 503 |
|
| 504 |
src_compile() { |
| 505 |
# hack for offlinehelp, this needs fixing upstream at some point |
| 506 |
# it is broken because we send --without-help |
| 507 |
# https://bugs.freedesktop.org/show_bug.cgi?id=46506 |
| 508 |
( |
| 509 |
grep "^export" "${S}/config_host.mk" > "${T}/config_host.mk" |
| 510 |
source "${T}/config_host.mk" 2&> /dev/null |
| 511 |
|
| 512 |
local path="${SOLARVER}/${INPATH}/res/img" |
| 513 |
mkdir -p "${path}" || die |
| 514 |
|
| 515 |
echo "perl \"${S}/helpcontent2/helpers/create_ilst.pl\" -dir=icon-themes/galaxy/res/helpimg > \"${path}/helpimg.ilst\"" |
| 516 |
perl "${S}/helpcontent2/helpers/create_ilst.pl" \ |
| 517 |
-dir=icon-themes/galaxy/res/helpimg \ |
| 518 |
> "${path}/helpimg.ilst" |
| 519 |
[[ -s "${path}/helpimg.ilst" ]] || ewarn "The help images list is empty, something is fishy, report a bug." |
| 520 |
) |
| 521 |
|
| 522 |
# this is not a proper make script |
| 523 |
make build || die |
| 524 |
} |
| 525 |
|
| 526 |
src_test() { |
| 527 |
make unitcheck || die |
| 528 |
make slowcheck || die |
| 529 |
} |
| 530 |
|
| 531 |
src_install() { |
| 532 |
# This is not Makefile so no buildserver |
| 533 |
make DESTDIR="${D}" distro-pack-install -o build -o check || die |
| 534 |
|
| 535 |
# Fix bash completion placement |
| 536 |
newbashcomp "${ED}"/etc/bash_completion.d/libreoffice.sh ${PN} |
| 537 |
rm -rf "${ED}"/etc/ |
| 538 |
|
| 539 |
if use branding; then |
| 540 |
insinto /usr/$(get_libdir)/${PN}/program |
| 541 |
newins "${WORKDIR}/branding-sofficerc" sofficerc |
| 542 |
fi |
| 543 |
|
| 544 |
# symlink the nsplugin to proper location |
| 545 |
use nsplugin && inst_plugin /usr/$(get_libdir)/libreoffice/program/libnpsoplugin.so |
| 546 |
|
| 547 |
# Hack for offlinehelp, this needs fixing upstream at some point. |
| 548 |
# It is broken because we send --without-help |
| 549 |
# https://bugs.freedesktop.org/show_bug.cgi?id=46506 |
| 550 |
insinto /usr/$(get_libdir)/libreoffice/help |
| 551 |
doins xmlhelp/util/*.xsl |
| 552 |
|
| 553 |
# Remove desktop files for support to old installs that can't parse mime |
| 554 |
rm -rf "${ED}"/usr/share/mimelnk/ |
| 555 |
} |
| 556 |
|
| 557 |
pkg_preinst() { |
| 558 |
# Cache updates - all handled by kde eclass for all environments |
| 559 |
kde4-base_pkg_preinst |
| 560 |
} |
| 561 |
|
| 562 |
pkg_postinst() { |
| 563 |
kde4-base_pkg_postinst |
| 564 |
|
| 565 |
pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/soffice.bin |
| 566 |
pax-mark -m "${EPREFIX}"/usr/$(get_libdir)/libreoffice/program/unopkg.bin |
| 567 |
|
| 568 |
use java || \ |
| 569 |
ewarn 'If you plan to use lbase application you should enable java or you will get various crashes.' |
| 570 |
} |
| 571 |
|
| 572 |
pkg_postrm() { |
| 573 |
kde4-base_pkg_postrm |
| 574 |
} |