mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

116 lines
3.9 KiB

# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/stf/openoffice/openoffice.conf
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- 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
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=<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