# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/openoffice/openoffice.conf # Copyright (C) 2007 - 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- if [ $prefix_auto = 1 ]; then # TODO: some upstream files artificially add 3, hunt and fix prefix=opt/openoffice set_confopt fi srcdir="*/main" # do not clean the source dir, it just wastes time nocvsinsrcdir=0 hook_add preconf 5 "autoconf" # Append T2 to version string var_append confopt ' ' "--with-build-version=T2-SDE www.t2-project.org" # Select package format, default is rpm # native => builds .dep # portable => builds .tar.gz # tardist => ? var_append confopt ' ' "--with-package-format=portable" # UI language, default is en ooo_lang='de fr es it' # 'ALL' ... var_append confopt ' ' '--with-lang=\"$(echo \$ooo_lang)\"' # Dictionaries, hypenation and thesaurus #ooo_dict='ALL' # 'ENUS ENGB' ... #var_append confopt ' ' '--with-dict=\"$(echo \$ooo_dict)\"' # GNOME support if pkginstalled gtk+2; then var_append confopt ' ' "--enable-gtk" if pkginstalled libbonobo; then var_append confopt ' ' "--with-bonobo" fi else var_append confopt ' ' "--disable-gtk" fi if false && pkginstalled kdelibs; then var_append confopt ' ' "--enable-kde" export KDEDIR=/`pkgprefix kdelibs` else var_append confopt ' ' "--disable-kde" fi if pkginstalled openldap; then var_append confopt ' ' "--with-openldap" var_append GCC_WRAPPER_APPEND ' ' "-I`pkgprefix includedir openldap`" var_append GCC_WRAPPER_APPEND ' ' "-L`pkgprefix libdir openldap`" else var_append confopt ' ' "--disable-ldap" fi # disable mdb/access support, for now var_append confopt ' ' "--disable-access" # disable mono support pkginstalled mono || var_append confopt ' ' "--disable-mono" # visual basic var_append confopt ' ' '--enable-vba' # disable odk var_append confopt ' ' "--disable-odk" # use system fonts and ppds var_append confopt ' ' "--without-ppds --without-fonts" # do not disable this, build fails: "package complexlib does not exist" #--disable-qadevooo #var_append confopt ' ' "--without-myspell-dicts" pkginstalled gnome-vfs || var_append confopt ' ' '--disable-gnome-vfs' pkginstalled evolution var_append confopt ' ' '--enable-evolution2' pkginstalled cups && var_append confopt ' ' '--enable-cups' pkginstalled cairo && var_append confopt ' ' '--enable-cairo --with-system-cairo' pkginstalled bdb && var_append confopt ' ' '--with-system-db' pkginstalled curl && var_append confopt ' ' '--with-system-curl' # boost@trunk 1.36.0 is incompatible #pkginstalled boost && var_append confopt ' ' '--with-system-boost' # only a 3.6 patched version is supported, not our system pkg #if pkginstalled icu4c; then # var_append confopt ' ' "--with-system-icu" #fi # mandantory system libraries # var_append confopt ' ' "--with-system-gcc --with-system-zlib --with-system-freetype --with-system-expat \ --with-system-neon --with-system-jpeg --with-system-libxml --with-system-python" # Mozilla support # pkginstalled -t xulrunner var_append confopt ' ' "--with-system-mozilla=libxul" var_append MOZ_NSS_CFLAGS ' ' "$(pkg-config --cflags mozilla-nss)" var_append MOZ_NSS_LIBS ' ' "$(pkg-config --libs mozilla-nss)" var_append MOZ_NSPR_CFLAGS ' ' "$(pkg-config --cflags mozilla-nspr)" var_append MOZ_NSPR_LIBS ' ' "$(pkg-config --libs mozilla-nspr)" # X11 (to find fontconfig.h) # var_append confopt ' ' "--x-includes=`pkgprefix includedir libx11`" # Java support # if [ -n $JAVA_HOME ] && pkginstalled apache-ant; then var_append confopt ' ' "--with-java=java" var_append confopt ' ' "--with-jdk-home=$root$JAVA_HOME" var_append confopt ' ' "--with-ant-home=$root/$(pkgprefix apache-ant)" # HACK: force shareutils/uudecode to be used instead of gmime (breaks bdb-4.2) export PATH=$(echo $PATH | sed 's,/opt/gnome2/bin,,') else var_append confopt ' ' "--with-java=no" fi ## OOo configure folder #hook_add preconf 1 'pushd config_office' # ## Regenerate configure scripts #hook_add preconf 5 'autoreconf -v' # # OOo 3 configure voodoo: pkg-config hook_add preconf 7 'export PKG_CONFIG=/usr/bin/pkg-config' hook_add premake 5 'ooo_premake' ooo_premake() { ./bootstrap #rehash #export MAKE=dmake export GNUMAKE=make } makeopt='' hook_add inmake 5 'ooo_build' ooo_build() { export nodep=TRUE export MAXPROCESS=$SDECFG_PARALLEL_MAX dmake # build language packs echo_status "Building language packs ..." (cd instsetoo_native/util; dmake ooolanguagepack) } makeinstopt='' hook_add postmake 5 'ooo_install' ooo_install() { # OOo package files build in: odir='instsetoo_native/unxlng*.pro/OpenOffice/portable/install/en-US/linux-*' # OOo language files build in: ldir='instsetoo_native/unxlng*.pro/OpenOffice_languagepack/portable/install/*/*' echo_status "Extracting package files into build root ..." for SW in $odir/*.sw; do tar -C $root/ -xf $SW; done echo_status "Extracting language packs into build root ..." for SW in $ldir/*.sw; do tar -C $root/ -xf $SW; done echo_status "Extracting dictionaries, hypenations and thesaurus ..." rm -rfv /$prefix/share/extension/install/dict*.oxt for f in dictionaries/unxlng*.pro/bin/*.oxt; do l=${f##*-} l=${l%.oxt} case $l in de|en|es|fr) echo "Installing and registering $l ..." /$prefix/program/unopkg add --shared $f \ -env:UserInstallation=file:///tmp/ \ -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 || true ;; *) echo "Saving $l into /$prefix/share/extension/install/ ..." cp -v $f /$prefix/share/extension/install/ ;; esac done # create shortcuts for appl in sbase scalc sdraw simpress smath soffice spadmin swriter do ln -v -sf $root/$prefix/program/$appl $root$bindir/$appl done }