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

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/stf/openoffice/openoffice.conf
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. # OpenOffice 1.1.4 produces build errors with gcc34 and later versions
  23. CC=no_usable_CC_version_found
  24. CXX=no_usable_CXX_version_found
  25. for V in gcc-30 gcc-31 gcc-32 gcc-33 gcc g++-30 g++-31 g++-32 g++-33 g++;
  26. do
  27. [ "`type -p $V`" == "" ] && continue
  28. case "`$V --version | grep "(GCC)" | cut -f3 -d" "`" in
  29. 3.[0-3].*) [ "${V:0:3}" == "gcc" ] && CC=$V || CXX=$V;;
  30. esac
  31. done
  32. export CC CXX
  33. # OpenOffice 1.1.4 produces build errors with JDK 1.5.0
  34. JAVADIR="`ls /opt/j2sdk1.4* -d | tail -n1`"
  35. build_openoffice() {
  36. unzip $archdir/gpc${GPCVER//./}.zip
  37. mv gpc*/* external/gpc
  38. # set LD_LIBRARY_PATH so libstdc++.so.5 is found
  39. CCVER="`$CC --version | grep "(GCC)" | cut -f3 -d" "`"
  40. CXXVER="`$CXX --version | grep "(GCC)" | cut -f3 -d" "`"
  41. CCMACHINE="`$CC -dumpmachine`"
  42. CXXMACHINE="`$CXX -dumpmachine`"
  43. LD_LIBRARY_PATH="/usr/lib/gcc-lib/$CCMACHINE/$CCVER:/usr/lib/gcc-lib/$CXXMACHINE/$CXXVER:$LD_LIBRARY_PATH"
  44. export LD_LIBRARY_PATH
  45. cd config_office
  46. # --prefix=<prefix> is ignored!?
  47. eval ./configure --prefix=/opt/OpenOffice --with-jdk-home=$JAVADIR
  48. cd ..
  49. ./bootstrap
  50. # OpenOffice 1.1.4 searches in /usr/lib/gcc-lib/*-*-1-*
  51. # instead of /usr/lib/gcc-lib/*-*-linux-*
  52. for N in /usr/lib/gcc-lib/*-*-*-*;
  53. do
  54. L="${N//-linux-/-1-}"
  55. if [[ -e "$N" && ! -e "$L" ]]; then
  56. tempLinks="$tempLinks $L"
  57. ln -svf "${N##*/}" "$L"
  58. fi
  59. done
  60. # the idl compiler needs a symlink to the idl preprocessor in every
  61. # directory an .idl file is compiled in even if idlcpp is in the PATH. o_O
  62. # run idlc_ln.sh in the src.openoffice*/debug.sh environment to
  63. # automatically create additional symlinks as required. Then use
  64. # 'find -type l -name idlcpp > idlcpp_links.txt' to get all symlinks.
  65. while read N;
  66. do
  67. M="`echo ${N%/*} | sed -e's,/[^/]*,/..,g'`";
  68. ln -svf "$M/solver/6*/unxlngi4.pro/bin/idlcpp" "$N"
  69. done < $confdir/idlcpp_links.txt
  70. # in expat/.../{xmltok,xmlparse} $MAKE is used but dmake is appropriate
  71. DMAKE=dmake
  72. # start build with bash
  73. . LinuxIntelEnv.Set.sh
  74. # set LD_LIBRARY_PATH so libstdc++.so.5 is found
  75. CCVER="`$CC --version | grep "(GCC)" | cut -f3 -d" "`"
  76. CXXVER="`$CXX --version | grep "(GCC)" | cut -f3 -d" "`"
  77. CCMACHINE="`$CC -dumpmachine`"
  78. CXXMACHINE="`$CXX -dumpmachine`"
  79. LD_LIBRARY_PATH="/usr/lib/gcc-lib/$CCMACHINE/$CCVER:/usr/lib/gcc-lib/$CXXMACHINE/$CXXVER:$LD_LIBRARY_PATH"
  80. export DMAKE LD_LIBRARY_PATH
  81. dmake
  82. # start build with tcsh
  83. # echo "source LinuxIntelEnv.Set;"\
  84. # " setenv LD_LIBRARY_PATH \"$LD_LIBRARY_PATH\";"\
  85. # " setenv DMAKE $DMAKE;"\
  86. # " rehash;"\
  87. # " dmake; echo $LD_LIBRARY_PATH;" | tcsh -s
  88. rm -f $tempLinks
  89. cd instsetoo/unxlngi4.pro/$ROCKCFG_PKG_OPENOFFICE_LANGUAGE/normal/
  90. # this will create an OpenOffice.org1.1.4 dir below prefix;
  91. # --single means no network install, the installation
  92. # will be ready to use without the need to run setup
  93. ./install --prefix=/opt --single
  94. }
  95. custmain=build_openoffice
  96. hook_add prepare 3 "mkdir OpenOffice-$ver; cd OpenOffice-$ver"
  97. nocvsinsrcdir=0