1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 inherit autotools check-reqs db-use eutils fdo-mime flag-o-matic java-pkg-opt-2 kde-functions mono multilib toolchain-funcs
11 IUSE="binfilter cups dbus debug eds gnome gstreamer gtk kde ldap mono nsplugin odk oodict opengl pam postgres"
15 OOOTAG=${PATCHLEVEL}_m${MILESTONE}
16 OOOBUILDTAG=ooo300-m${MILESTONE}
19 S="${WORKDIR}/infra-ooo-files_${PV}"
20 WORKSRC="${WORKDIR}/${OOOTAG}"
22 DESCRIPTION="OpenOffice-Infra, office suite with enhanced Russian support from Infra-Resource"
24 SRC_URI="binfilter? ( mirror://openoffice/stable/${PV}/${SRC}_binfilter.tar.bz2 )
25 mirror://openoffice/stable/${PV}/${SRC}_core.tar.bz2
26 mirror://openoffice/stable/${PV}/${SRC}_l10n.tar.bz2
27 mirror://openoffice/stable/${PV}/${SRC}_extensions.tar.bz2
28 mirror://openoffice/stable/${PV}/${SRC}_system.tar.bz2
29 odk? ( java? ( http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll ) )
30 http://download.i-rs.ru/pub/openoffice/${PV}/ru/infra-ooo-files_${PV}.tar.gz"
33 LANGS="${LANGS1} en en_US"
35 # proprt linguas handling
36 for X in ${LANGS} ; do
37 IUSE="${IUSE} linguas_${X}"
40 HOMEPAGE="http://www.i-rs.ru/ http://www.go-oo.org/"
44 KEYWORDS="~amd64 ~x86"
46 COMMON_DEPEND="!app-office/openoffice-infra-bin
47 !app-office/openoffice
48 !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 kde? ( kde-base/kdelibs:3.5 )
63 java? ( >=dev-java/bsh-2.0_beta4
64 >=dev-db/hsqldb-1.8.0.9 )
65 mono? ( >=dev-lang/mono-1.2.3.1 )
66 nsplugin? ( || ( net-libs/xulrunner:1.8 net-libs/xulrunner:1.9 =www-client/seamonkey-1* )
68 >=dev-libs/nss-3.11-r1 )
69 opengl? ( virtual/opengl
71 >=net-misc/neon-0.24.7
72 >=dev-libs/openssl-0.9.8g
73 >=x11-libs/startup-notification-0.5
74 >=media-libs/freetype-2.1.10-r2
75 >=media-libs/fontconfig-2.3.0
76 cups? ( net-print/cups )
81 >=app-text/hunspell-1.1.4-r1
85 >=app-text/libwpd-0.8.8
86 >=media-libs/vigra-1.4
87 >=app-text/poppler-0.8.0"
89 RDEPEND="java? ( >=virtual/jre-1.5 )
92 DEPEND="${COMMON_DEPEND}
98 x11-proto/xineramaproto
99 >=sys-apps/findutils-4.1.20-r1
101 virtual/perl-Compress-Zlib
102 >=virtual/perl-Compress-Raw-Zlib-2.002
103 virtual/perl-IO-Compress-Base
106 >=dev-libs/boost-1.33.1
110 >=dev-libs/libxml2-2.0
115 pam? ( sys-libs/pam )
117 >=dev-lang/python-2.3.4
118 java? ( || ( =virtual/jdk-1.6* =virtual/jdk-1.5* )
119 >=dev-java/ant-core-1.7 )
120 ldap? ( net-nds/openldap )
121 postgres? ( virtual/postgresql-base )"
123 PROVIDE="virtual/ooo"
124 RESTRICT="strip" # the openoffice.org from infra-resource is already stripped
129 ewarn " It is important to note that OpenOffice-Infra is a very fragile "
130 ewarn " build when it comes to CFLAGS. A number of flags have already "
131 ewarn " been filtered out. If you experience difficulty merging this "
132 ewarn " package and use agressive CFLAGS, lower the CFLAGS and try to "
133 ewarn " merge again. Also note that building OOo takes a lot of time and "
134 ewarn " hardware ressources: 4-6 GB free diskspace and 256 MB RAM are "
135 ewarn " the minimum requirements. If you have less, use openoffice-infra-bin "
137 ewarn " Also if you experience a build break, please make sure to retry "
138 ewarn " with MAKEOPTS="-j1" before filing a bug. "
141 # Check if we have enough RAM and free diskspace to build this beast
142 CHECKREQS_MEMORY="512"
143 use debug && CHECKREQS_DISK_BUILD="8192" || CHECKREQS_DISK_BUILD="5120"
146 strip-linguas ${LANGS}
148 if [[ -z "${LINGUAS}" ]]; then
149 export LINGUAS_OOO="en-US"
151 ewarn " To get a localized build, set the according "
152 ewarn " LINGUAS variable(s). LINGUAS=ru for example. "
155 export LINGUAS_OOO=`echo ${LINGUAS} | \
156 sed -e 's/\ben\b/en_US/g' -e 's/_/-/g'`
161 ewarn " You are building with java-support disabled, this results in some "
162 ewarn " of the OpenOffice.org functionality (i.e. help) being disabled. "
163 ewarn " If something you need does not work for you, rebuild with "
164 ewarn " java in your USE-flags. "
168 if use !gtk && use !gnome; then
170 ewarn " If you want the OpenOffice-Infra systray quickstarter to work "
171 ewarn " activate the 'gtk' and 'gnome' use flags. "
175 if is-flagq -ffast-math ; then
177 eerror " You are using -ffast-math, which is known to cause problems. "
178 eerror " Please remove it from your CFLAGS, using this globally causes "
179 eerror " all sorts of problems. "
180 eerror " After that you will also have to - at least - rebuild python otherwise "
181 eerror " the openoffice build will break. "
186 if ! built_with_use sys-apps/shadow pam; then
188 eerror " shadow needs to be built with pam-support. "
189 eerror " rebuild it accordingly or remove the pam use-flag "
194 if use nsplugin; then
195 if pkg-config --exists libxul; then
197 elif pkg-config --exists xulrunner-xpcom; then
199 elif pkg-config --exists seamonkey-xpcom; then
202 die "USE flag [nsplugin] set but no installed xulrunner or seamonkey found!"
207 if ! built_with_use dev-lang/python threads
209 eerror "Python needs to be built with threads."
213 java-pkg-opt-2_pkg_setup
215 # sys-libs/db version used
216 local db_ver="$(db_findver '>=sys-libs/db-4.3')"
222 unpack infra-ooo-files_${PV}.tar.gz
223 use binfilter && unpack ${SRC}_binfilter.tar.bz2
224 unpack ${SRC}_core.tar.bz2
225 unpack ${SRC}_l10n.tar.bz2
226 unpack ${SRC}_extensions.tar.bz2
227 unpack ${SRC}_system.tar.bz2
229 if use odk && use java; then
230 cp -f "${DISTDIR}"/unowinreg.dll "${WORKSRC}"/external/unowinreg/
233 # Some fixes for our patchset
235 epatch "${FILESDIR}/${PV}/gentoo-scripts.diff"
236 # Patch for using Gentoo specific goo team patches and InfraGentoo/InfraGentooPG distro targets
237 epatch "${FILESDIR}/${PV}/gentoo-infragentoo.diff"
239 # Patches from go-oo mainstream
240 cp -f "${FILESDIR}/${PV}/gentoo-nojavanostax.diff" "${WORKDIR}/infra-ooo-files_${PV}/patches/dev300/nojavanostax.diff" || die
241 cp -f "${FILESDIR}/${PV}/gentoo-hunspell.diff" "${WORKDIR}/infra-ooo-files_${PV}/patches/dev300/hunspell-one-dir-nocrash.diff" || die
242 cp -f "${FILESDIR}/${PV}/gentoo-buildfix-mono-2-2.diff" "${WORKDIR}/infra-ooo-files_${PV}/patches/dev300/buildfix-mono-2-2.diff" || die
244 cd "${WORKSRC}"; tar xjf "${WORKDIR}/infra-ooo-files_${PV}/files/extras-templates.tar.bz2"
245 cd "${WORKSRC}"; rm -rf "extras/source/autotext/lang/ru/*" ; tar xjf "${WORKDIR}/infra-ooo-files_${PV}/files/extras_ru.tar.bz2"
246 "${WORKDIR}"/infra-ooo-files_${PV}/bin/enable-dict ru_RU "${WORKDIR}"/infra-ooo-files_${PV}/files/dict_ru_RU.tar.bz2 ${WORKSRC}
247 "${WORKDIR}"/infra-ooo-files_${PV}/bin/enable-dict uk_UA "${WORKDIR}"/infra-ooo-files_${PV}/files/dict_uk_UA.tar.bz2 ${WORKSRC}
249 mkdir -p "${WORKSRC}"/libwps/download/
250 mkdir -p "${WORKSRC}"/libwpg/download/
251 mkdir -p "${WORKSRC}"/libwpd/download/
252 mkdir -p "${WORKSRC}"/libsvg/download/
254 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/libwps*.tar.gz "${WORKSRC}"/libwps/download/
255 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/libwpg*.tar.gz "${WORKSRC}"/libwpg/download/
256 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/libwpd*.tar.gz "${WORKSRC}"/libwpd/download/
257 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/libsvg*.tar.gz "${WORKSRC}"/libsvg/download/
258 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/infra-logo-team.png "${WORKSRC}"/default_images/sw/res/
259 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/files/go-oo-team.png "${WORKSRC}"/default_images/sw/res/
260 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/res/infra/intro.bmp "${WORKSRC}"/ooo_custom_images/nologo/introabout/
261 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/res/infra/about.bmp "${WORKSRC}"/default_images/introabout/
262 cp -f "${WORKDIR}"/infra-ooo-files_${PV}/res/infra/backing*.png "${WORKSRC}"/default_images/framework/res/
266 if use postgres; then
271 patchconf="--tag=${OOOBUILDTAG} --distro=${distro} --distro=Localize"
272 if use binfilter; then
273 patchconf="${patchconf} --distro=Binfilter"
276 "${WORKDIR}"/infra-ooo-files_${PV}/bin/apply.pl "${WORKDIR}"/infra-ooo-files_${PV}/patches/dev300 ${WORKSRC} ${patchconf}
277 "${WORKDIR}"/infra-ooo-files_${PV}/bin/transform --apply "${WORKDIR}"/infra-ooo-files_${PV} ${WORKSRC}
279 if use postgres; then
280 # fix using of pg lib
281 epatch "${FILESDIR}/${PV}/gentoo-configure-pg.diff"
283 # enable/disable-gstreamer, disable scanning for rpm/dpkg and etc
284 epatch "${FILESDIR}/${PV}/gentoo-configure.diff"
285 # disable mkdepend warning
286 epatch "${FILESDIR}/${PV}/gentoo-mkdepend.diff"
287 # completion_matches -> rl_completion_matches
288 epatch "${FILESDIR}/${PV}/gentoo-completion_matches.diff"
290 epatch "${FILESDIR}/gentoo-epm-3.7.patch.diff"
291 if use postgres; then
292 # fix handling of system libs for postgresql-base
293 epatch "${FILESDIR}/gentoo-system_pgsql.diff"
295 # more stabillity on multiprocessing build
296 epatch "${FILESDIR}/${PV}/gentoo-vba_incl.diff"
297 cp -f "${FILESDIR}/${PV}/gentoo-ReturnInteger.hdl" "${WORKSRC}/scripting/source/vbaevents/ReturnInteger.hdl" || die
298 cp -f "${FILESDIR}/${PV}/gentoo-ReturnInteger.hpp" "${WORKSRC}/scripting/source/vbaevents/ReturnInteger.hpp" || die
299 cp -f "${FILESDIR}/${PV}/gentoo-XVBAToOOEventDescGen.hdl" "${WORKSRC}/scripting/source/vbaevents/XVBAToOOEventDescGen.hdl" || die
300 cp -f "${FILESDIR}/${PV}/gentoo-XVBAToOOEventDescGen.hpp" "${WORKSRC}/scripting/source/vbaevents/XVBAToOOEventDescGen.hpp" || die
302 epatch "${FILESDIR}/${PV}/gentoo-ru_dict.diff"
306 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-ant-home=${ANT_HOME}"
307 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-jdk-home=$(java-config --jdk-home 2>/dev/null)"
308 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-java-target-version=$(java-pkg_get-target)"
309 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-system-beanshell"
310 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-system-hsqldb"
311 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar)"
312 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-hsqldb-jar=$(java-pkg_getjar hsqldb hsqldb.jar)"
315 if use nsplugin ; then
316 CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-mozilla"
317 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-system-mozilla=${BRWS}"
319 CONFIGURE_ARGS="${CONFIGURE_ARGS} --disable-mozilla"
320 CONFIGURE_ARGS="${CONFIGURE_ARGS} --without-system-mozilla"
323 # Handle new dicts system
325 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-myspell-dicts"
328 for i in ${LINGUAS_OOO}; do
329 if [[ "${i}" != "en-US" ]]; then
330 tempdict=`ls ${WORKSRC}/dictionaries/ | grep ${i} | sed -e 's/_//g' -e 's/\///g' | tr '[a-z]' '[A-Z]'`
331 tempdicts="${tempdicts},${tempdict}"
334 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-dict=${tempdicts}"
336 CONFIGURE_ARGS="${CONFIGURE_ARGS} --without-myspell-dicts"
337 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-system-dicts"
338 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-external-dict-dir=/usr/share/myspell"
339 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-external-hyph-dir=/usr/share/myspell"
340 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-external-thes-dir=/usr/share/myspell"
343 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable binfilter`"
344 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable cups`"
345 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable dbus`"
346 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable eds evolution2`"
347 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable gnome gnome-vfs`"
348 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable gnome lockdown`"
349 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable gstreamer`"
350 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable gtk systray`"
351 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable ldap`"
352 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable opengl`"
353 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_with ldap openldap`"
354 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable debug crashdump`"
355 CONFIGURE_ARGS="${CONFIGURE_ARGS} `use_enable debug strip-solver`"
358 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-extension-integration"
359 CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-minimizer"
360 CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-pdfimport"
361 CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-presenter-console"
362 CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-wiki-publisher"
363 CONFIGURE_ARGS="${CONFIGURE_ARGS} --enable-report-builder"
365 # Fix kdefilepicker crash on exit
366 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-alloc=system"
368 # Original branding results in black splash screens for some, so forcing ours
369 CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-intro-bitmaps=\\\"${WORKSRC}/ooo_custom_images/nologo/introabout/intro.bmp\\\""
371 export CONFIGURE_ARGS
373 cd "${WORKSRC}/config_office"
380 # Should the build use multiprocessing? Not enabled by default, as it tends to break
382 if [[ "${WANT_MP}" == "true" ]]; then
383 export JOBS=`echo "${MAKEOPTS}" | sed -e "s/.*-j\([0-9]\+\).*/\1/"`
386 # Compile problems with these ...
387 filter-flags "-funroll-loops"
388 filter-flags "-fprefetch-loop-arrays"
389 filter-flags "-fno-default-inline"
390 filter-flags "-fstack-protector"
391 filter-flags "-fstack-protector-all"
392 filter-flags "-ftracer"
393 filter-flags "-fforce-addr"
394 replace-flags "-O?" "-O2"
395 # not very clever to disable warning, but ... users afraid it
396 append-flags "-Wno-implicit"
397 append-flags "-fno-strict-aliasing"
399 if [[ $(gcc-major-version) -lt 4 ]]; then
400 replace-flags "-fomit-frame-pointer" "-momit-leaf-frame-pointer"
403 # Build with NVidia cards breaks otherwise
404 use opengl && append-flags "-DGL_GLEXT_PROTOTYPES"
406 # Now for our optimization flags ...
407 export ARCH_FLAGS="${CXXFLAGS}"
408 use debug || export LINKFLAGSOPTIMIZE="${LDFLAGS}"
410 # Make sure gnome-users get gtk-support
411 local GTKFLAG="--disable-gtk --disable-cairo --without-system-cairo"
412 ( use gtk || use gnome ) && GTKFLAG="--enable-gtk --enable-cairo --with-system-cairo"
414 use kde && set-kdedir 3
416 # workaround for --with-system-*
417 export PKG_CONFIG=pkg-config
419 cd "${WORKSRC}/config_office"
422 --srcdir="${DISTDIR}" \
423 --with-lang="${LINGUAS_OOO}" \
424 --with-build-version="${OOOTAG}" \
428 `use_enable debug symbols` \
433 --with-system-libxml \
434 --with-system-libwpd \
435 --with-system-hunspell \
438 --with-system-boost \
441 --with-system-expat \
443 --with-system-libxslt \
444 --with-system-vigra \
447 --with-system-stdlibs \
450 --enable-xrender-link \
451 --with-system-xrender \
452 --with-system-openssl \
453 --with-system-python \
454 --with-vba-package-format=builtin \
457 --mandir=/usr/share/man \
458 --libdir=/usr/$(get_libdir) \
459 --with-use-shell=bash \
460 --with-epm=internal \
461 --with-linker-hash-style=both \
462 --with-package-format=native \
463 --with-vendor="Infra-Resource" \
465 || die "Configuration failed!"
467 einfo "Building OpenOffice-Infra..."
472 if [[ "${ARCH}" == "amd64" ]]; then
473 gentoo_env_set="${WORKSRC}/LinuxX86-64Env.Set.sh"
475 gentoo_env_set="${WORKSRC}/LinuxX86Env.Set.sh"
478 source "${gentoo_env_set}"
482 cd transex3; build.pl --checkmodules ; build.pl -P${JOBS} --all --html --dontgraboutput -- -P${JOBS} && deliver.pl
486 for i in ${LINGUAS_OOO}; do
487 if [[ "${i}" == "ru" || "${i}" == "uk" ]]; then
488 [ -f "${WORKDIR}"/infra-ooo-files_${PV}/sdf/${i}/${i}-vendor.sdf ] && "${WORKSRC}"/transex3/scripts/localize -m -l ${i} -f "${WORKDIR}"/infra-ooo-files_${PV}/sdf/${i}/${i}-vendor.sdf
490 if [[ "${i}" == "ru" ]]; then
491 [ -f "${WORKDIR}"/infra-ooo-files_${PV}/sdf/${i}/${i}.sdf ] && "${WORKSRC}"/transex3/scripts/localize -m -l ${i} -f "${WORKDIR}"/infra-ooo-files_${PV}/sdf/${i}/${i}.sdf
492 [ -f "${WORKDIR}"/infra-ooo-files_${PV}/sdf/${i}/${i}-patched.sdf ] && "${WORKSRC}"/transex3/scripts/localize -m -l ${i} -f "${WORKDIR}"/infra-ooo-files_${PV}/sdf/${i}/${i}-patched.sdf
496 if [[ "${JOBS}" != "1" ]]; then
497 cd instsetoo_native ; build.pl --checkmodules ; build.pl -P${JOBS} --all --html --dontgraboutput -- -P${JOBS} || die "Build failed"
499 dmake || die "Build failed"
509 einfo "Preparing Installation ..."
511 local instdir="/usr/$(get_libdir)/openoffice"
512 local basecomponents="base calc draw impress math writer"
515 local gentoo_env_set_dst
517 if [[ "${ARCH}" == "amd64" ]]; then
519 gentoo_env_set_dst="linux-2.6-x86_64"
522 gentoo_env_set_dst="linux-2.6-intel"
525 allcomponents="${basecomponents}"
527 allcomponents="${allcomponents} printeradmin"
530 if use gtk || use gnome; then
531 allcomponents="${allcomponents} qstart"
536 cp -af "${WORKSRC}"/instsetoo_native/unxlng"${arch_var}"6.pro/OpenOffice/native/install/en-US/"${gentoo_env_set_dst}"/buildroot/opt/* \
539 for i in ${LINGUAS_OOO}; do
540 if [[ "${i}" != "en-US" ]]; then
541 cp -af "${WORKSRC}"/instsetoo_native/unxlng"${arch_var}"6.pro/OpenOffice_languagepack/native/install/"${i}"/"${gentoo_env_set_dst}"/buildroot/opt/* \
548 rm -f "${D}"${instdir}/share/extension/install/dict-*.oxt
549 insinto ${instdir}/share/extension/install
551 for i in ${LINGUAS_OOO}; do
552 if [[ "${i}" == "en-US" ]]; then
557 doins "${WORKSRC}"/dictionaries/unxlng"${arch_var}"6.pro/bin/dict-"${dictlang}".oxt
562 cd "${D}"${instdir}/share/xdg/
564 for i in ${allcomponents}; do
565 if [[ "${i}" == "printeradmin" ]]; then
566 sed -i -e s/openoffice.org3-/oo/g "${i}".desktop || die "Sed failed"
568 sed -i -e s/openoffice.org3/ooffice/g "${i}".desktop || die "Sed failed"
570 domenu "${i}".desktop
574 insinto /usr/share/icons
575 doins -r "${WORKSRC}"/sysui/desktop/icons/{hicolor,locolor}
576 find "${D}"/usr/share/icons -name 'CVS' | xargs rm -rf
577 for color in {hicolor,locolor}; do
578 for sizes in "${D}"usr/share/icons/${color}/* ; do
579 for i in ${allcomponents}; do
580 [[ -f "${sizes}"/apps/"${i}".png ]] && mv "${sizes}"/apps/"${i}".png "${sizes}"/apps/openofficeorg3-"${i}".png
587 mkdir -p "${D}"/usr/share/icons/gnome
588 for size in {16x16,32x32,48x48}; do
589 if ! [[ -d "${D}"/usr/share/icons/gnome/"${size}" ]]; then
590 mkdir -p "${D}"/usr/share/icons/gnome/"${size}"
591 mkdir -p "${D}"/usr/share/icons/gnome/"${size}/apps"
593 for i in ${allcomponents}; do
594 dosym /usr/share/icons/hicolor/"${size}"/apps/openofficeorg3-"${i}".png /usr/share/icons/gnome/"${size}"/apps/openofficeorg3-"${i}".png
599 for i in ${allcomponents}; do
600 dosym /usr/share/icons/hicolor/48x48/apps/openofficeorg3-"${i}".png /usr/share/pixmaps/openofficeorg3-"${i}".png
604 insinto /usr/share/mime/packages
605 doins "${WORKSRC}"/sysui/unxlng"${arch_var}"6.pro/misc/openoffice.org/openoffice.org.xml
607 # Install wrapper script
608 newbin "${FILESDIR}"/wrapper.in ooffice
609 sed -i -e s/LIBDIR/$(get_libdir)/g "${D}"/usr/bin/ooffice || die "Wrapper script failed"
611 # Install PostgreSQL SDBC extension
612 if use postgres; then
613 insinto /usr/$(get_libdir)/openoffice/share/extension/install
614 doins "${WORKSRC}"/connectivity/unxlng"${arch_var}"6.pro/lib/postgresql-sdbc-0.7.6.zip
615 fperms 444 /usr/$(get_libdir)/openoffice/share/extension/install/postgresql-sdbc-0.7.6.zip
619 for i in ${basecomponents}; do
620 dosym "${instdir}"/program/s"${i}" /usr/bin/oo"${i}"
624 dosym "${instdir}"/program/spadmin /usr/bin/ooprinteradmin
626 dosym "${instdir}"/program/soffice /usr/bin/soffice
627 dosym "${instdir}"/basis3.0/program/setofficelang /usr/bin/setofficelang
628 dosym "${instdir}"/program/unopkg /usr/bin/unopkg
630 # Fix the permissions for security reasons
631 # chown -R root:0 "${D}"
633 # Non-java weirdness see bug #99366
634 use !java && rm -f "${D}"${instdir}/ure/bin/javaldx
636 # record java libraries
637 use java && java-pkg_regjar "${D}"/usr/$(get_libdir)/openoffice/basis3.0/program/classes/*.jar
639 # install java-set-classpath
641 insinto /usr/$(get_libdir)/openoffice/basis3.0/program
642 newins "${FILESDIR}/java-set-classpath.in" java-set-classpath
643 fperms 755 /usr/$(get_libdir)/openoffice/basis3.0/program/java-set-classpath
650 use java && java-pkg-2_pkg_preinst
656 fdo-mime_desktop_database_update
657 fdo-mime_mime_database_update
659 [[ -x /sbin/chpax ]] && [[ -e /usr/$(get_libdir)/openoffice/program/soffice.bin ]] && chpax -zm /usr/$(get_libdir)/openoffice/program/soffice.bin
661 # Add available & useful jars to openoffice classpath
662 use java && /usr/$(get_libdir)/openoffice/basis3.0/program/java-set-classpath $(java-config --classpath=jdbc-mysql 2>/dev/null) >/dev/null
664 elog " To start OpenOffice-Infra, run:"
668 elog " Also, for individual components, you can use any of:"
670 elog " oobase, oocalc, oodraw, ooimpress, oomath or oowriter"
673 elog " Spell checking is now provided through your own myspell-ebuilds, "
674 elog " if you want to use it, please install the correct myspell package "
675 elog " according to your language needs. "
676 elog " For example, for myspell and the russian language You should do "
678 elog " emerge -av myspell-ru "
680 elog " If You want to use internal openoffice extensions dicts re-emerge the package with "
681 elog " USE=\"oodict\" "
683 elog " Spell checking is now provided through OO own dicts extensions, "
684 elog " please install the correct extension from /usr/$(get_libdir)/openoffice/share/extension/install/ "
685 elog " via Extension Manager according to your language needs. "
688 elog " Some aditional functionality can be installed via Extension Manager: "
689 elog " *) PDF Import "
690 elog " *) Presentation Console "
691 elog " *) Presentation Minimizer "
692 elog " *) Wiki Publisher "
693 elog " *) Report Builder "
695 elog " Please use the packages provided in "
696 elog " /usr/$(get_libdir)/openoffice/share/extension/install/ "
697 elog " instead of those from the SUN extension site. "
698 if use postgres; then
700 elog " PostgreSQL SDBC extension provided in "
701 elog " /usr/$(get_libdir)/openoffice/share/extension/install/ "
709 fdo-mime_desktop_database_update
710 fdo-mime_mime_database_update