1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 inherit autotools check-reqs db-use eutils fdo-mime flag-o-matic java-pkg-opt-2 mono multilib toolchain-funcs
10 IUSE="binfilter cups dbus debug eds gnome gstreamer gtk ldap mono nsplugin odk +infradicts opengl pam +postgres"
14 OOOTAG=${PATCHLEVEL}_m${MILESTONE}
15 OOOBUILDTAG=ooo310-m${MILESTONE}
18 S=${WORKDIR}/infra-ooo-files_${PV}
19 WORKSRC=${WORKDIR}/${OOOTAG}
21 DESCRIPTION="OpenOffice-Infra, office suite with enhanced Russian support from Infra-Resource"
23 SRC_URI="binfilter? ( mirror://openoffice/stable/${PV}/${SRC}_binfilter.tar.bz2 )
24 mirror://openoffice/stable/${PV}/${SRC}_core.tar.bz2
25 mirror://openoffice/stable/${PV}/${SRC}_l10n.tar.bz2
26 mirror://openoffice/stable/${PV}/${SRC}_extensions.tar.bz2
27 mirror://openoffice/stable/${PV}/${SRC}_system.tar.bz2
28 odk? ( java? ( http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll ) )
29 http://download.i-rs.ru/pub/openoffice/${PV}/ru/infra-ooo-files_${PV}.tar.gz"
32 LANGS="${LANGS1} en en_US"
34 # proper linguas handling
35 for X in ${LANGS} ; do
36 IUSE="${IUSE} linguas_${X}"
39 HOMEPAGE="http://www.i-rs.ru/ http://www.go-oo.org/"
43 KEYWORDS="~amd64 ~x86"
45 COMMON_DEPEND="!app-office/openoffice-infra-bin
46 !app-office/openoffice
47 !app-office/openoffice-bin
52 dbus? ( >=dev-libs/dbus-glib-0.71 )
53 gnome? ( >=x11-libs/gtk+-2.10
54 >=gnome-base/gnome-vfs-2.6
55 >=gnome-base/gconf-2.0
56 >=x11-libs/cairo-1.0.2 )
57 gtk? ( >=x11-libs/gtk+-2.10
58 >=x11-libs/cairo-1.0.2 )
59 eds? ( >=gnome-extra/evolution-data-server-1.2 )
60 gstreamer? ( >=media-libs/gstreamer-0.10
61 >=media-libs/gst-plugins-base-0.10 )
62 java? ( >=dev-java/bsh-2.0_beta4
63 >=dev-db/hsqldb-1.8.0.9 )
64 mono? ( || ( >dev-lang/mono-2.4-r1 <dev-lang/mono-2.4 ) )
65 nsplugin? ( || ( net-libs/xulrunner:1.8 net-libs/xulrunner:1.9 =www-client/seamonkey-1* )
67 >=dev-libs/nss-3.11-r1 )
68 opengl? ( virtual/opengl
70 >=net-misc/neon-0.24.7
71 >=dev-libs/openssl-0.9.8g
72 >=x11-libs/startup-notification-0.5
73 >=media-libs/freetype-2.1.10-r2
74 >=media-libs/fontconfig-2.3.0
75 cups? ( net-print/cups )
80 >=app-text/hunspell-1.1.4-r1
84 >=app-text/libwpd-0.8.8
85 >=media-libs/vigra-1.4
86 >=virtual/poppler-0.8.0"
88 RDEPEND="java? ( >=virtual/jre-1.5 )
91 DEPEND="${COMMON_DEPEND}
97 x11-proto/xineramaproto
98 >=sys-apps/findutils-4.1.20-r1
100 virtual/perl-IO-Compress
103 >=dev-libs/boost-1.33.1
107 >=dev-libs/libxml2-2.0
113 sys-apps/shadow[pam] )
115 >=dev-lang/python-2.3.4[threads]
116 java? ( || ( =virtual/jdk-1.6* =virtual/jdk-1.5* )
117 >=dev-java/ant-core-1.7 )
118 ldap? ( net-nds/openldap )
119 postgres? ( virtual/postgresql-base )"
121 PROVIDE="virtual/ooo"
122 RESTRICT="strip" # the openoffice.org from infra-resource is already stripped
126 ewarn " It is important to note that OpenOffice-Infra is a very fragile "
127 ewarn " build when it comes to CFLAGS. A number of flags have already "
128 ewarn " been filtered out. If you experience difficulty merging this "
129 ewarn " package and use agressive CFLAGS, lower the CFLAGS and try to "
130 ewarn " merge again. Also note that building OOo takes a lot of time and "
131 ewarn " hardware ressources: 4-6 GB free diskspace and 256 MB RAM are "
132 ewarn " the minimum requirements. If you have less, use openoffice-infra-bin "
134 ewarn " Also if you experience a build break, please make sure to retry "
135 ewarn " with MAKEOPTS="-j1" before filing a bug. "
138 # Check if we have enough RAM and free diskspace to build this beast
139 CHECKREQS_MEMORY="512"
140 use debug && CHECKREQS_DISK_BUILD="8192" || CHECKREQS_DISK_BUILD="6144"
143 strip-linguas ${LANGS}
145 if [[ -z "${LINGUAS}" ]]; then
146 export LINGUAS_OOO="en-US"
148 ewarn " To get a localized build, set the according "
149 ewarn " LINGUAS variable(s). LINGUAS=ru for example. "
152 export LINGUAS_OOO=$(echo ${LINGUAS} | sed -e 's/\ben\b/en_US/g;s/_/-/g')
156 if use infradicts; then
157 export DICTS_OOO="en ru uk"
159 for i in ${LINGUAS_OOO}; do
160 if [[ "${i}" != "tr" ]]; then
161 if [[ "${i}" == "en-US" ]]; then
162 DICTS_OOO="${DICTS_OOO} en"
164 DICTS_OOO="${DICTS_OOO} ${i}"
173 ewarn " You are building with java-support disabled, this results in some "
174 ewarn " of the OpenOffice-Infra functionality (i.e. help) being disabled. "
175 ewarn " If something you need does not work for you, rebuild with "
176 ewarn " java in your USE-flags. "
180 if use !gtk && use !gnome; then
182 ewarn " If you want the OpenOffice-Infra systray quickstarter to work "
183 ewarn " activate the 'gtk' and 'gnome' use flags. "
187 if is-flagq -ffast-math ; then
189 eerror " You are using -ffast-math, which is known to cause problems. "
190 eerror " Please remove it from your CFLAGS, using this globally causes "
191 eerror " all sorts of problems. "
192 eerror " After that you will also have to - at least - rebuild python otherwise "
193 eerror " the openoffice-infra build will break. "
197 if use nsplugin; then
198 if pkg-config --exists libxul; then
200 elif pkg-config --exists xulrunner-xpcom; then
202 elif pkg-config --exists seamonkey-xpcom; then
205 die "USE flag [nsplugin] set but no installed xulrunner or seamonkey found!"
209 java-pkg-opt-2_pkg_setup
211 # sys-libs/db version used
212 local db_ver=$(db_findver '>=sys-libs/db-4.3')
216 unpack infra-ooo-files_${PV}.tar.gz
217 use binfilter && unpack ${SRC}_binfilter.tar.bz2
218 unpack ${SRC}_core.tar.bz2
219 unpack ${SRC}_l10n.tar.bz2
220 unpack ${SRC}_extensions.tar.bz2
221 unpack ${SRC}_system.tar.bz2
225 if use odk && use java; then
226 cp -f "${DISTDIR}"/unowinreg.dll "${WORKSRC}"/external/unowinreg/ || die "cp of unowinreg.dll failed"
229 # Some fixes for our patchset
231 epatch "${FILESDIR}/${PV}/gentoo-infra-builder.diff"
232 epatch "${FILESDIR}/${PV}/gentoo-layout-simple-dialogs-svx.diff"
233 # fix vba parallel build
234 epatch "${FILESDIR}/gentoo-vba-parallel-build.diff"
235 # Patch for using Gentoo specific goo team patches and InfraGentoo/InfraGentooPG distro targets
236 epatch "${FILESDIR}/${PV}/gentoo-infra-gentoo.diff"
238 # Patches from go-oo mainstream
239 cp -f "${FILESDIR}/buildfix-gcc44.diff" "${S}/patches/hotfixes" || die "cp of hotfix patch failed"
241 cd "${WORKSRC}"; tar xjf "${WORKDIR}/infra-ooo-files_${PV}/files/extras-templates.tar.bz2" || die "untar failed"
243 for i in ${LINGUAS_OOO}; do
244 if [[ "${i}" == "ru" || "${i}" == "tr" ]]; then
245 cd "${WORKSRC}"; rm -rf "extras/source/autotext/lang/${i}/*" ; tar xjf "${WORKDIR}/infra-ooo-files_${PV}/files/extras_${i}.tar.bz2" \
246 || die "untar failed"
250 for i in ${DICTS_OOO}; do
251 if [[ "${i}" == "ru" || "${i}" == "uk" ]]; then
252 if [[ "${i}" == "ru" ]]; then
257 "${WORKDIR}"/infra-ooo-files_${PV}/bin/enable-dict "${longlang}" "${WORKDIR}/infra-ooo-files_${PV}/files/dict_${longlang}.tar.bz2" "${WORKSRC}" \
258 || die "enable-dict failed"
263 mkdir -p "${WORKSRC}"/{libwps,libwpg,libsvg}/download/ || die "mkdir failed"
264 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/libwps*.tar.gz "${WORKSRC}"/libwps/download/ || die "cp of libwps failed"
265 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/libwpg*.tar.gz "${WORKSRC}"/libwpg/download/ || die "cp of libwpg failed"
266 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/libsvg*.tar.gz "${WORKSRC}"/libsvg/download/ || die "cp of libsvg failed"
267 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/infra-logo-team.png "${WORKSRC}"/default_images/sw/res/ || die "cp of *.png failed"
268 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/go-oo-team.png "${WORKSRC}"/default_images/sw/res/ || die "cp of *.png failed"
269 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/res/infra/intro.bmp "${WORKSRC}"/ooo_custom_images/nologo/introabout/ || die "cp of *.png failed"
270 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/res/infra/about.bmp "${WORKSRC}"/default_images/introabout/ || die "cp of *.png failed"
271 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/res/infra/backing*.png "${WORKSRC}"/default_images/framework/res/ || die "cp of *.png failed"
274 patchconf="--tag=${OOOBUILDTAG} --distro=Localize"
276 if use postgres; then
277 patchconf="${patchconf} --distro=InfraGentooPG"
279 patchconf="${patchconf} --distro=InfraGentoo"
281 use binfilter && patchconf="${patchconf} --distro=Binfilter"
282 # add basic support of zemberek/tr
283 local dicts="${DICTS_OOO} tr"
284 for i in ${dicts}; do
285 if [[ "${i}" != "en" ]]; then
286 distrodicts="${distrodicts} --distro=InfraDict${i}"
289 [[ -n "${distrodicts}" ]] && patchconf="${patchconf} ${distrodicts}"
290 "${WORKDIR}"/infra-ooo-files_${PV}/bin/apply.pl "${WORKDIR}"/infra-ooo-files_${PV}/patches/dev300 "${WORKSRC}" ${patchconf} || die "apply failed"
291 "${WORKDIR}"/infra-ooo-files_${PV}/bin/transform --apply "${WORKDIR}"/infra-ooo-files_${PV} "${WORKSRC}" || die "transform failed"
293 if use postgres; then
294 # fix using of pg lib
295 epatch "${FILESDIR}/${PV}/gentoo-configure-pg.diff"
296 # fix handling of system libs for postgresql-base
297 epatch "${FILESDIR}/gentoo-system_pgsql.diff"
299 # enable/disable-gstreamer, disable scanning for rpm/dpkg and etc
300 epatch "${FILESDIR}/${PV}/gentoo-configure.diff"
302 epatch "${FILESDIR}/gentoo-mkdepend.diff"
304 epatch "${FILESDIR}/gentoo-epm-3.7.patch.diff"
306 use debug && epatch "${FILESDIR}/gentoo-dont_strip_libs.diff"
307 # fix jfreereport cr issue
308 sed -i -e 's/\x0D$//' "${WORKSRC}"/jfreereport/patches/*.patch || die "sed failed"
318 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-ant-home=${ANT_HOME}"
319 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-jdk-home=$(java-config --jdk-home 2>/dev/null)"
320 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-java-target-version=$(java-pkg_get-target)"
321 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-jvm-path=/usr/$(get_libdir)/"
322 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-system-beanshell"
323 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-system-hsqldb"
324 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)"
325 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-hsqldb-jar=$(java-pkg_getjar hsqldb hsqldb.jar)"
328 if use nsplugin ; then
329 CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-mozilla"
330 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-system-mozilla=${BRWS}"
332 CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-mozilla"
333 CONFIGURE_ARGS="${CONFIGURE_ARGS} --without-system-mozilla"
336 # Handle new dicts system
337 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-myspell-dicts"
339 for i in ${DICTS_OOO}; do
340 if [[ "${i}" != "en" ]]; then
341 tempdicts="${tempdicts},$(ls ${WORKSRC}/dictionaries/ | grep ${i} | sed -e 's/_//g;s/\///g' | tr '[a-z]' '[A-Z]')"
344 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-dict=${tempdicts}"
346 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable binfilter)"
347 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable cups)"
348 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable dbus)"
349 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable eds evolution2)"
350 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable gnome gconf)"
351 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable gnome gnome-vfs)"
352 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable gnome lockdown)"
353 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable gstreamer)"
354 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable gtk systray)"
355 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable ldap)"
356 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable opengl)"
357 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_with ldap openldap)"
358 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable debug crashdump)"
359 CONFIGURE_ARGS="${CONFIGURE_ARGS} $(use_enable debug strip-solver)"
362 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-extension-integration"
363 CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-minimizer"
364 CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-pdfimport"
365 CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-presenter-console"
366 CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-wiki-publisher"
367 CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-report-builder"
369 # Fix kdefilepicker crash on exit
370 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-alloc=system"
372 # Original branding results in black splash screens for some, so forcing ours
373 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-intro-bitmaps=\\\"${WORKSRC}/ooo_custom_images/nologo/introabout/intro.bmp\\\""
375 # Use multiprocessing by default now, it gets tested by upstream
376 export JOBS=$(echo "${MAKEOPTS}" | sed -e "s/.*-j\([0-9]\+\).*/\1/")
378 # Compile problems with these ...
379 filter-flags "-funroll-loops"
380 filter-flags "-fprefetch-loop-arrays"
381 filter-flags "-fno-default-inline"
382 filter-flags "-fstack-protector"
383 filter-flags "-fstack-protector-all"
384 filter-flags "-ftracer"
385 filter-flags "-fforce-addr"
387 filter-flags "-O[s2-9]"
389 # not very clever to disable warning, but ... users afraid it
390 append-flags "-Wno-implicit"
391 append-flags "-fno-strict-aliasing"
393 if [[ $(gcc-major-version) -lt 4 ]]; then
394 replace-flags "-fomit-frame-pointer" "-momit-leaf-frame-pointer"
397 # Build with NVidia cards breaks otherwise
398 use opengl && append-flags "-DGL_GLEXT_PROTOTYPES"
400 # Now for our optimization flags ...
401 export ARCH_FLAGS="${CXXFLAGS}"
402 use debug || export LINKFLAGSOPTIMIZE="${LDFLAGS}"
404 # Make sure gnome-users get gtk-support
405 local GTKFLAG="--disable-gtk --disable-cairo --without-system-cairo"
406 { use gtk || use gnome; } && GTKFLAG="--enable-gtk --enable-cairo --with-system-cairo"
408 # workaround for --with-system-*
409 export PKG_CONFIG=pkg-config
413 # distro-configs are not hooked in infra build, passing configure options as commandline arguments
415 --srcdir="${WORKSRC}" \
416 --with-lang="${LINGUAS_OOO}" \
417 --with-build-version="${OOOTAG}" \
421 $(use_enable debug symbols) \
426 --with-system-libxml \
427 --with-system-libwpd \
428 --with-system-hunspell \
431 --with-system-boost \
434 --with-system-expat \
436 --with-system-libxslt \
437 --with-system-vigra \
440 --with-system-stdlibs \
443 --enable-xrender-link \
444 --with-system-xrender \
445 --with-system-openssl \
446 --with-system-python \
447 --with-vba-package-format=builtin \
450 --mandir=/usr/share/man \
451 --libdir=/usr/$(get_libdir) \
452 --with-use-shell=bash \
453 --with-epm=internal \
454 --with-linker-hash-style=both \
455 --with-package-format=native \
456 --with-vendor="Infra-Resource" \
458 || die "Configuration failed!"
465 if [[ "${ARCH}" == "amd64" ]]; then
466 gentoo_env_set="${WORKSRC}/LinuxX86-64Env.Set.sh"
468 gentoo_env_set="${WORKSRC}/LinuxX86Env.Set.sh"
471 source "${gentoo_env_set}"
473 ./bootstrap || die "bootstrap failed"
475 cd transex3; build.pl --checkmodules ; build.pl -P${JOBS} --all --html --dontgraboutput -- -P${JOBS} && deliver.pl || die "build.pl failed"
479 for i in ${LINGUAS_OOO}; do
480 if [[ "${i}" == "ru" || "${i}" == "uk" ]]; then
481 if [ -f "${WORKDIR}"/infra-ooo-files_${PV}/sdf/${i}/${i}-vendor.sdf ]; then
482 "${WORKSRC}"/transex3/scripts/localize -m -l ${i} -f "${WORKDIR}"/infra-ooo-files_${PV}/sdf/${i}/${i}-vendor.sdf || die "localize failed"
485 if [[ "${i}" == "ru" ]]; then
486 if [ -f "${WORKDIR}"/infra-ooo-files_${PV}/sdf/${i}/${i}.sdf ]; then
487 "${WORKSRC}"/transex3/scripts/localize -m -l ${i} -f "${WORKDIR}"/infra-ooo-files_${PV}/sdf/${i}/${i}.sdf || die "localize failed"
489 if [ -f "${WORKDIR}"/infra-ooo-files_${PV}/sdf/${i}/${i}-patched.sdf ]; then
490 "${WORKSRC}"/transex3/scripts/localize -m -l ${i} -f "${WORKDIR}"/infra-ooo-files_${PV}/sdf/${i}/${i}-patched.sdf || die "localize failed"
495 if [[ "${JOBS}" != "1" ]]; then
496 cd instsetoo_native ; build.pl --checkmodules ; build.pl -P${JOBS} --all --html --dontgraboutput -- -P${JOBS} || die "Build failed"
498 dmake || die "Build failed"
505 einfo "Preparing Installation ..."
507 local instdir="/usr/$(get_libdir)/openoffice"
508 local basecomponents="base calc draw impress math writer"
511 local gentoo_env_set_dst
513 if [[ "${ARCH}" == "amd64" ]]; then
515 gentoo_env_set_dst="linux-2.6-x86_64"
518 gentoo_env_set_dst="linux-2.6-intel"
521 allcomponents="${basecomponents}"
522 use cups && allcomponents="${allcomponents} printeradmin"
523 { use gtk || use gnome; } && allcomponents="${allcomponents} qstart"
527 cp -af "${WORKSRC}"/instsetoo_native/unxlng"${arch_var}"6.pro/OpenOffice/native/install/en-US/"${gentoo_env_set_dst}"/buildroot/opt/* \
528 "${D}"${instdir} || "cp of dist failed"
530 for i in ${LINGUAS_OOO}; do
531 if [[ "${i}" != "en-US" ]]; then
532 cp -af "${WORKSRC}"/instsetoo_native/unxlng"${arch_var}"6.pro/OpenOffice_languagepack/native/install/"${i}"/"${gentoo_env_set_dst}"/buildroot/opt/* \
533 "${D}"${instdir} || "cp of langpacks failed"
538 cd "${D}"${instdir}/share/xdg/
539 for i in ${allcomponents}; do
540 if [[ "${i}" == "printeradmin" ]]; then
541 sed -i -e s/openoffice.org3-/oo/g "${i}".desktop || die "Sed failed"
543 sed -i -e s/openoffice.org3/ooffice/g "${i}".desktop || die "Sed failed"
545 domenu "${i}".desktop
549 insinto /usr/share/icons
550 doins -r "${WORKSRC}"/sysui/desktop/icons/{hicolor,locolor}
551 ecvs_clean "${D}/usr/share/icons"
552 for color in {hicolor,locolor}; do
553 for sizes in "${D}"usr/share/icons/${color}/* ; do
554 for i in ${allcomponents}; do
555 if [[ -f "${sizes}"/apps/"${i}".png ]]; then
556 mv "${sizes}"/apps/"${i}".png "${sizes}"/apps/openofficeorg3-"${i}".png || die "mv failed"
564 mkdir -p "${D}"/usr/share/icons/gnome
565 for size in {16x16,32x32,48x48}; do
566 if ! [[ -d "${D}"/usr/share/icons/gnome/"${size}" ]]; then
567 mkdir -p "${D}"/usr/share/icons/gnome/"${size}" || die "mkdir failed"
568 mkdir -p "${D}"/usr/share/icons/gnome/"${size}/apps"|| die "mkdir failed"
570 for i in ${allcomponents}; do
571 dosym /usr/share/icons/hicolor/"${size}"/apps/openofficeorg3-"${i}".png /usr/share/icons/gnome/"${size}"/apps/openofficeorg3-"${i}".png
576 for i in ${allcomponents}; do
577 dosym /usr/share/icons/hicolor/48x48/apps/openofficeorg3-"${i}".png /usr/share/pixmaps/openofficeorg3-"${i}".png
581 insinto /usr/share/mime/packages
582 doins "${WORKSRC}"/sysui/unxlng"${arch_var}"6.pro/misc/openoffice.org/openoffice.org.xml
584 # Install wrapper script
585 newbin "${FILESDIR}"/wrapper.in ooffice || die
586 sed -i -e s/LIBDIR/$(get_libdir)/g "${D}"/usr/bin/ooffice || die "Wrapper script failed"
589 for i in ${basecomponents}; do
590 dosym "${instdir}"/program/s"${i}" /usr/bin/oo"${i}"
593 use cups && dosym "${instdir}"/program/spadmin /usr/bin/ooprinteradmin
594 dosym "${instdir}"/program/soffice /usr/bin/soffice
595 dosym "${instdir}"/"${BASIS}"/program/setofficelang /usr/bin/setofficelang
596 dosym "${instdir}"/program/unopkg /usr/bin/unopkg
599 rm -f "${D}"${instdir}/share/extension/install/dict-*.oxt || die "rm dict-*.oxt failed"
600 insinto ${instdir}/share/extension/install
601 for i in ${DICTS_OOO}; do
602 doins "${WORKSRC}"/dictionaries/unxlng"${arch_var}"6.pro/bin/dict-"${i}".oxt
605 # manual install PostgreSQL SDBC extension
606 if use postgres; then
607 insinto /usr/$(get_libdir)/openoffice/share/extension/install
608 doins "${WORKSRC}"/connectivity/unxlng"${arch_var}"6.pro/lib/postgresql-sdbc-0.7.6.zip
609 fperms 444 /usr/$(get_libdir)/openoffice/share/extension/install/postgresql-sdbc-0.7.6.zip
612 # manual install Presenter Screen (Console) extension
613 cp -f "${WORKSRC}"/sdext/unxlng"${arch_var}"6.pro/bin/presenter-screen.oxt "${D}"${instdir}/share/extension/install/ \
614 || die "cp of presenter-screen failed"
617 # manual install Wiki Publisher, Report Builder extensions
618 cp -f "${WORKSRC}"/swext/unxlng"${arch_var}"6.pro/bin/wiki-publisher.oxt "${D}"${instdir}/share/extension/install/ \
619 || die "cp of wiki-publisher failed"
620 cp -f "${WORKSRC}"/reportbuilder/unxlng"${arch_var}"6.pro/bin/sun-report-builder.oxt "${D}"${instdir}/share/extension/install/ \
621 || die "cp of sun-report-builder failed"
622 # record java libraries
623 java-pkg_regjar "${D}"/usr/$(get_libdir)/openoffice/"${BASIS}"/program/classes/*.jar
624 java-pkg_regjar "${D}"/usr/$(get_libdir)/openoffice/ure/share/java/*.jar
625 # install java-set-classpath
626 insinto /usr/$(get_libdir)/openoffice/"${BASIS}"/program
627 newins "${FILESDIR}/java-set-classpath.in" java-set-classpath
628 fperms 755 /usr/$(get_libdir)/openoffice/"${BASIS}"/program/java-set-classpath
630 # Non-java weirdness see bug #99366
631 rm -f "${D}"${instdir}/ure/bin/javaldx || die "rm javaldx failed"
636 fdo-mime_desktop_database_update
637 fdo-mime_mime_database_update
639 [[ -x /sbin/chpax ]] && [[ -e /usr/$(get_libdir)/openoffice/program/soffice.bin ]] && chpax -zm /usr/$(get_libdir)/openoffice/program/soffice.bin
641 # Add available & useful jars to openoffice classpath
642 use java && /usr/$(get_libdir)/openoffice/"${BASIS}"/program/java-set-classpath $(java-config --classpath=jdbc-mysql 2>/dev/null) >/dev/null
644 elog " To start OpenOffice-Infra, run:"
647 elog " Also, for individual components, you can use any of:"
648 elog " oobase, oocalc, oodraw, ooimpress, oomath or oowriter"
650 if use infradicts; then
651 elog " If You dont want to build extensions for all bundled dicts from Infra-Resource "
652 elog " re-emerge the package with USE=\"-infradicts\" "
655 elog " Spell checking is now provided through OO own dicts extensions, "
656 elog " please install the correct extension from /usr/$(get_libdir)/openoffice/share/extension/install/ "
657 elog " via Extension Manager according to your language needs. "
659 elog " Some aditional functionality can be installed via Extension Manager: "
660 elog " *) PDF Import "
661 elog " *) Presentation Console "
662 elog " *) Presentation Minimizer "
664 elog " *) Wiki Publisher "
665 elog " *) Report Builder "
668 elog " Please use the packages provided in "
669 elog " /usr/$(get_libdir)/openoffice/share/extension/install/ "
670 elog " instead of those from the SUN extension site. "
671 if use postgres; then
673 elog " PostgreSQL SDBC extension provided in "
674 elog " /usr/$(get_libdir)/openoffice/share/extension/install/ "