1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/openoffice/openoffice.conf
3 # Copyright (C) 2007 - 2024 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 if [ $prefix_auto = 1 ]; then
13 # TODO: some upstream files artificially add 3, hunt and fix
20 # do not clean the source dir, it just wastes time
23 hook_add preconf 5 "autoconf"
25 # Append T2 to version string
26 var_append confopt ' ' "--with-build-version=T2-SDE www.t2-project.org"
28 # Select package format, default is rpm
29 # native => builds .dep
30 # portable => builds .tar.gz
32 var_append confopt ' ' "--with-package-format=portable"
34 # UI language, default is en
35 ooo_lang='de fr es it' # 'ALL' ...
36 var_append confopt ' ' '--with-lang=\"$(echo \$ooo_lang)\"'
38 # Dictionaries, hypenation and thesaurus
39 #ooo_dict='ALL' # 'ENUS ENGB' ...
40 #var_append confopt ' ' '--with-dict=\"$(echo \$ooo_dict)\"'
43 if pkginstalled gtk+2; then
44 var_append confopt ' ' "--enable-gtk"
45 if pkginstalled libbonobo; then
46 var_append confopt ' ' "--with-bonobo"
49 var_append confopt ' ' "--disable-gtk"
52 if false && pkginstalled kdelibs; then
53 var_append confopt ' ' "--enable-kde"
54 export KDEDIR=/`pkgprefix kdelibs`
56 var_append confopt ' ' "--disable-kde"
59 if pkginstalled openldap; then
60 var_append confopt ' ' "--with-openldap"
61 var_append GCC_WRAPPER_APPEND ' ' "-I`pkgprefix includedir openldap`"
62 var_append GCC_WRAPPER_APPEND ' ' "-L`pkgprefix libdir openldap`"
64 var_append confopt ' ' "--disable-ldap"
67 # disable mdb/access support, for now
68 var_append confopt ' ' "--disable-access"
70 # disable mono support
71 pkginstalled mono || var_append confopt ' ' "--disable-mono"
74 var_append confopt ' ' '--enable-vba'
77 var_append confopt ' ' "--disable-odk"
79 # use system fonts and ppds
80 var_append confopt ' ' "--without-ppds --without-fonts"
82 # do not disable this, build fails: "package complexlib does not exist"
85 #var_append confopt ' ' "--without-myspell-dicts"
87 pkginstalled gnome-vfs || var_append confopt ' ' '--disable-gnome-vfs'
88 pkginstalled evolution var_append confopt ' ' '--enable-evolution2'
89 pkginstalled cups && var_append confopt ' ' '--enable-cups'
90 pkginstalled cairo && var_append confopt ' ' '--enable-cairo --with-system-cairo'
91 pkginstalled bdb && var_append confopt ' ' '--with-system-db'
92 pkginstalled curl && var_append confopt ' ' '--with-system-curl'
94 # boost@trunk 1.36.0 is incompatible
95 #pkginstalled boost && var_append confopt ' ' '--with-system-boost'
97 # only a 3.6 patched version is supported, not our system pkg
98 #if pkginstalled icu4c; then
99 # var_append confopt ' ' "--with-system-icu"
102 # mandantory system libraries
104 var_append confopt ' ' "--with-system-gcc --with-system-zlib --with-system-freetype --with-system-expat \
105 --with-system-neon --with-system-jpeg --with-system-libxml --with-system-python"
109 pkginstalled -t xulrunner
110 var_append confopt ' ' "--with-system-mozilla=libxul"
111 var_append MOZ_NSS_CFLAGS ' ' "$(pkg-config --cflags mozilla-nss)"
112 var_append MOZ_NSS_LIBS ' ' "$(pkg-config --libs mozilla-nss)"
113 var_append MOZ_NSPR_CFLAGS ' ' "$(pkg-config --cflags mozilla-nspr)"
114 var_append MOZ_NSPR_LIBS ' ' "$(pkg-config --libs mozilla-nspr)"
116 # X11 (to find fontconfig.h)
118 var_append confopt ' ' "--x-includes=`pkgprefix includedir libx11`"
122 if [ -n $JAVA_HOME ] && pkginstalled apache-ant; then
123 var_append confopt ' ' "--with-java=java"
124 var_append confopt ' ' "--with-jdk-home=$root$JAVA_HOME"
125 var_append confopt ' ' "--with-ant-home=$root/$(pkgprefix apache-ant)"
127 # HACK: force shareutils/uudecode to be used instead of gmime (breaks bdb-4.2)
128 export PATH=$(echo $PATH | sed 's,/opt/gnome2/bin,,')
130 var_append confopt ' ' "--with-java=no"
133 ## OOo configure folder
134 #hook_add preconf 1 'pushd config_office'
136 ## Regenerate configure scripts
137 #hook_add preconf 5 'autoreconf -v'
139 # OOo 3 configure voodoo: pkg-config
140 hook_add preconf 7 'export PKG_CONFIG=/usr/bin/pkg-config'
142 hook_add premake 5 'ooo_premake'
151 hook_add inmake 5 'ooo_build'
154 export MAXPROCESS=$SDECFG_PARALLEL
157 # build language packs
158 echo_status "Building language packs ..."
159 (cd instsetoo_native/util; dmake ooolanguagepack)
163 hook_add postmake 5 'ooo_install'
165 # OOo package files build in:
166 odir='instsetoo_native/unxlng*.pro/OpenOffice/portable/install/en-US/linux-*'
168 # OOo language files build in:
169 ldir='instsetoo_native/unxlng*.pro/OpenOffice_languagepack/portable/install/*/*'
171 echo_status "Extracting package files into build root ..."
172 for SW in $odir/*.sw; do tar -C $root/ -xf $SW; done
174 echo_status "Extracting language packs into build root ..."
175 for SW in $ldir/*.sw; do tar -C $root/ -xf $SW; done
177 echo_status "Extracting dictionaries, hypenations and thesaurus ..."
179 rm -rfv /$prefix/share/extension/install/dict*.oxt
180 for f in dictionaries/unxlng*.pro/bin/*.oxt; do
181 l=${f##*-} l=${l%.oxt}
184 echo "Installing and registering $l ..."
185 /$prefix/program/unopkg add --shared $f \
186 -env:UserInstallation=file:///tmp/ \
187 -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 ||
191 echo "Saving $l into /$prefix/share/extension/install/ ..."
192 cp -v $f /$prefix/share/extension/install/
198 for appl in sbase scalc sdraw simpress smath soffice spadmin swriter
200 ln -v -sf $root/$prefix/program/$appl $root$bindir/$appl