# 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 export CC CXX # OpenOffice 1.1.4 produces build errors with JDK 1.5.0 JAVADIR="`ls /opt/j2sdk1.4* -d | tail -n1`" build_openoffice() { unzip $archdir/gpc${GPCVER//./}.zip mv gpc*/* external/gpc # 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 cd config_office # --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 # 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 # in expat/.../{xmltok,xmlparse} $MAKE is used but dmake is appropriate DMAKE=dmake # 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" export DMAKE LD_LIBRARY_PATH 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 } custmain=build_openoffice hook_add prepare 3 "mkdir OpenOffice-$ver; cd OpenOffice-$ver" nocvsinsrcdir=0