|
|
@ -1,3 +1,4 @@ |
|
|
|
#!/bin/bash |
|
|
|
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
|
|
|
# |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
@ -20,97 +21,91 @@ |
|
|
|
# |
|
|
|
# --- ROCK-COPYRIGHT-NOTE-END --- |
|
|
|
|
|
|
|
# OpenOffice 1.1.4 produces build errors with gcc34 and later versions |
|
|
|
CC=no_usable_CC_version_found |
|
|
|
CXX=no_usable_CXX_version_found |
|
|
|
for V in gcc-30 gcc-31 gcc-32 gcc-33 gcc g++-30 g++-31 g++-32 g++-33 g++; |
|
|
|
do |
|
|
|
[ "`type -p $V`" == "" ] && continue |
|
|
|
case "`$V --version | grep "(GCC)" | cut -f3 -d" "`" in |
|
|
|
3.[0-3].*) [ "${V:0:3}" == "gcc" ] && CC=$V || CXX=$V;; |
|
|
|
esac |
|
|
|
done |
|
|
|
chownsrcdir=0 |
|
|
|
nocvsinsrcdir=0 |
|
|
|
with_java=0 |
|
|
|
var_append extraconfopt " " "--with-package-format=portable --with-system-stdlibs" |
|
|
|
var_append extraconfopt " " "--disable-qadevooo --disable-odk" |
|
|
|
var_append extraconfopt " " "--disable-mozilla" |
|
|
|
|
|
|
|
export CC CXX |
|
|
|
|
|
|
|
# OpenOffice 1.1.4 produces build errors with JDK 1.5.0 |
|
|
|
JAVADIR="`ls /opt/j2sdk1.4* -d | tail -n1`" |
|
|
|
# building with java only works in manual builds for some reason. |
|
|
|
[ "$with_java" == 0 ] && var_append extraconfopt " " " --without-java" |
|
|
|
|
|
|
|
build_openoffice() { |
|
|
|
unzip $archdir/gpc${GPCVER//./}.zip |
|
|
|
mv gpc*/* external/gpc |
|
|
|
pkginstalled evolution && var_append extraconfopt " " "--enable-evolution2" |
|
|
|
#pkginstalled firefox && var_append extraconfopt " " "--with-firefox" |
|
|
|
pkginstalled openldap && var_append extraconfopt " " "--with-openldap" |
|
|
|
pkginstalled bitstream-vera-fonts \ |
|
|
|
&& var_append extraconfopt " " "--without-fonts" |
|
|
|
pkginstalled cups && var_append extraconfopt " " "--without-ppds" |
|
|
|
|
|
|
|
# set LD_LIBRARY_PATH so libstdc++.so.5 is found |
|
|
|
CCVER="`$CC --version | grep "(GCC)" | cut -f3 -d" "`" |
|
|
|
CXXVER="`$CXX --version | grep "(GCC)" | cut -f3 -d" "`" |
|
|
|
CCMACHINE="`$CC -dumpmachine`" |
|
|
|
CXXMACHINE="`$CXX -dumpmachine`" |
|
|
|
LD_LIBRARY_PATH="/usr/lib/gcc-lib/$CCMACHINE/$CCVER:/usr/lib/gcc-lib/$CXXMACHINE/$CXXVER:$LD_LIBRARY_PATH" |
|
|
|
export LD_LIBRARY_PATH |
|
|
|
# if pkginstalled mozilla || pkginstalled firefox ; then |
|
|
|
# var_append extraconfopt " " "--with-system-mozilla" |
|
|
|
# fi |
|
|
|
|
|
|
|
cd config_office |
|
|
|
# --prefix=<prefix> is ignored!? |
|
|
|
eval ./configure --prefix=/opt/OpenOffice --with-jdk-home=$JAVADIR |
|
|
|
|
|
|
|
cd .. |
|
|
|
./bootstrap |
|
|
|
|
|
|
|
# OpenOffice 1.1.4 searches in /usr/lib/gcc-lib/*-*-1-* |
|
|
|
# instead of /usr/lib/gcc-lib/*-*-linux-* |
|
|
|
for N in /usr/lib/gcc-lib/*-*-*-*; |
|
|
|
do |
|
|
|
L="${N//-linux-/-1-}" |
|
|
|
if [[ -e "$N" && ! -e "$L" ]]; then |
|
|
|
tempLinks="$tempLinks $L" |
|
|
|
ln -svf "${N##*/}" "$L" |
|
|
|
fi |
|
|
|
done |
|
|
|
if pkginstalled "bdb[0-9]*" ; then |
|
|
|
if [ "$with_java" == 0 ] ; then |
|
|
|
var_append extraconfopt " " "--with-system-db" |
|
|
|
else |
|
|
|
# bdb4[12] with java bindings required; bdb 4.3 and above |
|
|
|
# miss a class Dbt. |
|
|
|
pkginstalled "bdb4[12]" && [ -e $root/usr/lib/db.jar ] && \ |
|
|
|
var_append extraconfopt " " "--with-system-db --with-db-jar=/usr/lib/db.jar" |
|
|
|
fi |
|
|
|
fi |
|
|
|
# var_append extraconfopt " " "--with-system-dict" |
|
|
|
|
|
|
|
pkginstalled boost && var_append extraconfopt " " "--with-system-boost" |
|
|
|
pkginstalled curl && var_append extraconfopt " " "--with-system-curl" |
|
|
|
pkginstalled expat && var_append extraconfopt " " "--with-system-expat" |
|
|
|
pkginstalled freetype && var_append extraconfopt " " "--with-system-freetype" |
|
|
|
pkginstalled libjpeg && var_append extraconfopt " " "--with-system-jpeg" |
|
|
|
pkginstalled libicu && var_append extraconfopt " " "--with-system-icu" |
|
|
|
pkginstalled libmspack && var_append extraconfopt " " "--with-system-mspack" |
|
|
|
pkginstalled libxml2 && var_append extraconfopt " " "--with-system-libxml" |
|
|
|
pkginstalled nas && var_append extraconfopt " " "--with-system-nas" |
|
|
|
#pkginstalled neon && var_append extraconfopt " " "--with-system-neon" |
|
|
|
pkginstalled portaudio && var_append extraconfopt " " "--with-system-portaudio" |
|
|
|
pkginstalled python && var_append extraconfopt " " "--with-system-python" |
|
|
|
pkginstalled sndfile && var_append extraconfopt " " "--with-system-sndfile" |
|
|
|
pkginstalled startup-notification \ |
|
|
|
&& var_append extraconfopt " " "--with-system-libsn" |
|
|
|
pkginstalled zlib && var_append extraconfopt " " "--with-system-zlib" |
|
|
|
|
|
|
|
pkginstalled sane && var_append extraconfopt " " "--with-system-sane-headers" |
|
|
|
pkginstalled libxrender && var_append extraconfopt " " "--with-system-xrender-headers" |
|
|
|
|
|
|
|
# the idl compiler needs a symlink to the idl preprocessor in every |
|
|
|
# directory an .idl file is compiled in even if idlcpp is in the PATH. o_O |
|
|
|
# run idlc_ln.sh in the src.openoffice*/debug.sh environment to |
|
|
|
# automatically create additional symlinks as required. Then use |
|
|
|
# 'find -type l -name idlcpp > idlcpp_links.txt' to get all symlinks. |
|
|
|
while read N; |
|
|
|
do |
|
|
|
M="`echo ${N%/*} | sed -e's,/[^/]*,/..,g'`"; |
|
|
|
ln -svf "$M/solver/6*/unxlngi4.pro/bin/idlcpp" "$N" |
|
|
|
done < $confdir/idlcpp_links.txt |
|
|
|
openoffice_custmain() { |
|
|
|
# extract |
|
|
|
for x in system ; do |
|
|
|
tar $taropt $archdir/OOo_${ver}_src_${x}.tar.bz2 -C ../ |
|
|
|
done |
|
|
|
|
|
|
|
# in expat/.../{xmltok,xmlparse} $MAKE is used but dmake is appropriate |
|
|
|
DMAKE=dmake |
|
|
|
unzip $archdir/gpc${GPCVER//./}.zip |
|
|
|
mv gpc*/* external/gpc |
|
|
|
|
|
|
|
# start build with bash |
|
|
|
. LinuxIntelEnv.Set.sh |
|
|
|
|
|
|
|
# set LD_LIBRARY_PATH so libstdc++.so.5 is found |
|
|
|
CCVER="`$CC --version | grep "(GCC)" | cut -f3 -d" "`" |
|
|
|
CXXVER="`$CXX --version | grep "(GCC)" | cut -f3 -d" "`" |
|
|
|
CCMACHINE="`$CC -dumpmachine`" |
|
|
|
CXXMACHINE="`$CXX -dumpmachine`" |
|
|
|
LD_LIBRARY_PATH="/usr/lib/gcc-lib/$CCMACHINE/$CCVER:/usr/lib/gcc-lib/$CXXMACHINE/$CXXVER:$LD_LIBRARY_PATH" |
|
|
|
cp -a $archdir/unowinreg.dll external/unowinreg |
|
|
|
# cp -a $archdir/mozilla-source-$MOZVER.tar.bz2 moz/download |
|
|
|
|
|
|
|
export DMAKE LD_LIBRARY_PATH |
|
|
|
cd config_office |
|
|
|
eval $configprefix ./configure $confopt |
|
|
|
echo $configprefix ./configure $confopt |
|
|
|
|
|
|
|
# build |
|
|
|
cd .. |
|
|
|
. Linux*Env.Set.sh |
|
|
|
./bootstrap |
|
|
|
dmake |
|
|
|
|
|
|
|
# start build with tcsh |
|
|
|
# echo "source LinuxIntelEnv.Set;"\ |
|
|
|
# " setenv LD_LIBRARY_PATH \"$LD_LIBRARY_PATH\";"\ |
|
|
|
# " setenv DMAKE $DMAKE;"\ |
|
|
|
# " rehash;"\ |
|
|
|
# " dmake; echo $LD_LIBRARY_PATH;" | tcsh -s |
|
|
|
|
|
|
|
rm -f $tempLinks |
|
|
|
|
|
|
|
cd instsetoo/unxlngi4.pro/$ROCKCFG_PKG_OPENOFFICE_LANGUAGE/normal/ |
|
|
|
|
|
|
|
# this will create an OpenOffice.org1.1.4 dir below prefix; |
|
|
|
# --single means no network install, the installation |
|
|
|
# will be ready to use without the need to run setup |
|
|
|
./install --prefix=/opt --single |
|
|
|
# install |
|
|
|
cd instsetoo_native/unxlngi6.pro/OpenOffice/portable/install |
|
|
|
for x in ./*/*/openoffice.org-*.sw ; do |
|
|
|
[ -f "$x" ] && tar xf "$x" -C ${root:-/} |
|
|
|
done |
|
|
|
} |
|
|
|
|
|
|
|
custmain=build_openoffice |
|
|
|
hook_add prepare 3 "mkdir OpenOffice-$ver; cd OpenOffice-$ver" |
|
|
|
nocvsinsrcdir=0 |
|
|
|
custmain=openoffice_custmain |
|
|
|
|
|
|
|
# cpan-archive-zip |
|
|
|
# sun-jdk15 |
|
|
|
# orbit2 gconf gnome-mime-data gnome-vfs |
|
|
|
# ant |