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