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.

94 lines
2.9 KiB

  1. # OpenOffice 1.1.4 produces build errors with gcc34 and later versions
  2. CC=no_usable_CC_version_found
  3. CXX=no_usable_CXX_version_found
  4. for V in gcc-30 gcc-31 gcc-32 gcc-33 gcc g++-30 g++-31 g++-32 g++-33 g++;
  5. do
  6. [ "`type -p $V`" == "" ] && continue
  7. case "`$V --version | grep "(GCC)" | cut -f3 -d" "`" in
  8. 3.[0-3].*) [ "${V:0:3}" == "gcc" ] && CC=$V || CXX=$V;;
  9. esac
  10. done
  11. export CC CXX
  12. # OpenOffice 1.1.4 produces build errors with JDK 1.5.0
  13. JAVADIR="`ls /opt/j2sdk1.4* -d | tail -n1`"
  14. build_openoffice() {
  15. unzip $archdir/gpc${GPCVER//./}.zip
  16. mv gpc*/* external/gpc
  17. # set LD_LIBRARY_PATH so libstdc++.so.5 is found
  18. CCVER="`$CC --version | grep "(GCC)" | cut -f3 -d" "`"
  19. CXXVER="`$CXX --version | grep "(GCC)" | cut -f3 -d" "`"
  20. CCMACHINE="`$CC -dumpmachine`"
  21. CXXMACHINE="`$CXX -dumpmachine`"
  22. LD_LIBRARY_PATH="/usr/lib/gcc-lib/$CCMACHINE/$CCVER:/usr/lib/gcc-lib/$CXXMACHINE/$CXXVER:$LD_LIBRARY_PATH"
  23. export LD_LIBRARY_PATH
  24. cd config_office
  25. # --prefix=<prefix> is ignored!?
  26. eval ./configure --prefix=/opt/OpenOffice --with-jdk-home=$JAVADIR
  27. cd ..
  28. ./bootstrap
  29. # OpenOffice 1.1.4 searches in /usr/lib/gcc-lib/*-*-1-*
  30. # instead of /usr/lib/gcc-lib/*-*-linux-*
  31. for N in /usr/lib/gcc-lib/*-*-*-*;
  32. do
  33. L="${N//-linux-/-1-}"
  34. if [[ -e "$N" && ! -e "$L" ]]; then
  35. tempLinks="$tempLinks $L"
  36. ln -svf "${N##*/}" "$L"
  37. fi
  38. done
  39. # the idl compiler needs a symlink to the idl preprocessor in every
  40. # directory an .idl file is compiled in even if idlcpp is in the PATH. o_O
  41. # run idlc_ln.sh in the src.openoffice*/debug.sh environment to
  42. # automatically create additional symlinks as required. Then use
  43. # 'find -type l -name idlcpp > idlcpp_links.txt' to get all symlinks.
  44. while read N;
  45. do
  46. M="`echo ${N%/*} | sed -e's,/[^/]*,/..,g'`";
  47. ln -svf "$M/solver/6*/unxlngi4.pro/bin/idlcpp" "$N"
  48. done < $confdir/idlcpp_links.txt
  49. # in expat/.../{xmltok,xmlparse} $MAKE is used but dmake is appropriate
  50. DMAKE=dmake
  51. # start build with bash
  52. . LinuxIntelEnv.Set.sh
  53. # set LD_LIBRARY_PATH so libstdc++.so.5 is found
  54. CCVER="`$CC --version | grep "(GCC)" | cut -f3 -d" "`"
  55. CXXVER="`$CXX --version | grep "(GCC)" | cut -f3 -d" "`"
  56. CCMACHINE="`$CC -dumpmachine`"
  57. CXXMACHINE="`$CXX -dumpmachine`"
  58. LD_LIBRARY_PATH="/usr/lib/gcc-lib/$CCMACHINE/$CCVER:/usr/lib/gcc-lib/$CXXMACHINE/$CXXVER:$LD_LIBRARY_PATH"
  59. export DMAKE LD_LIBRARY_PATH
  60. dmake
  61. # start build with tcsh
  62. # echo "source LinuxIntelEnv.Set;"\
  63. # " setenv LD_LIBRARY_PATH \"$LD_LIBRARY_PATH\";"\
  64. # " setenv DMAKE $DMAKE;"\
  65. # " rehash;"\
  66. # " dmake; echo $LD_LIBRARY_PATH;" | tcsh -s
  67. rm -f $tempLinks
  68. cd instsetoo/unxlngi4.pro/$ROCKCFG_PKG_OPENOFFICE_LANGUAGE/normal/
  69. # this will create an OpenOffice.org1.1.4 dir below prefix;
  70. # --single means no network install, the installation
  71. # will be ready to use without the need to run setup
  72. ./install --prefix=/opt --single
  73. }
  74. custmain=build_openoffice
  75. hook_add prepare 3 "mkdir OpenOffice-$ver; cd OpenOffice-$ver"
  76. nocvsinsrcdir=0