OpenSDE Packages Database (without history before r20070)
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.

76 lines
2.0 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../eclipse/eclipse.conf
  5. # Copyright (C) 2007 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. if [ $prefix_auto -eq 1 ]; then
  16. prefix=opt/eclipse
  17. set_confopt
  18. fi
  19. # Arch conversion from t2 to the one used by eclipse.
  20. ECLIPSE_ARCH=$arch
  21. case "$ECLIPSE_ARCH" in
  22. x86-64)
  23. ECLIPSE_ARCH="x86_64" ;;
  24. powerpc)
  25. ECLIPSE_ARCH="ppc" ;;
  26. powerpc*)
  27. ECLIPSE_ARCH="ppc64" ;;
  28. esac
  29. # package doesn't contain a base dir
  30. custextract=eclipse_extract
  31. eclipse_extract() {
  32. mkdir $pkg-$ver
  33. var_append zipopt ' ' -d$pkg-$ver
  34. autoextract_zip "$@"
  35. }
  36. makeopt=
  37. makeinstopt=
  38. ECJ="-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter"
  39. # create ECJ
  40. ANTOPT="$ECJ -lib \$PWD/jdtcoresrc/ecj.jar"
  41. hook_add premake 2 "ant -buildfile jdtcoresrc/compilejdtcorewithjavac.xml"
  42. hook_add premake 3 "ant -buildfile jdtcoresrc/compilejdtcore.xml $ANTOPT"
  43. # compile & install
  44. ANTOPT="$ECJ -lib \$PWD/ecj.jar -DinstallOs=linux -DinstallWs=gtk -DinstallArch=$ECLIPSE_ARCH"
  45. # Custom installation.
  46. eclipse_postmake() {
  47. # Have eclipse put it all together.
  48. ant $ANTOPT install
  49. # Copy all stuff from the eclipse build to our prefix location.
  50. # But to make sure any possible links stay intact we use
  51. # tar | untar instead of cp.
  52. ( cd eclipse; tar -c * | tar -x -C /$prefix )
  53. # and a $PATH friendly `eclipse`
  54. cat <<-EOT > $bindir/eclipse
  55. #!/bin/sh
  56. exec \${0%/*}/../eclipse
  57. EOT
  58. chmod +x $bindir/eclipse
  59. }
  60. hook_add inmake 5 "ant $ANTOPT compilelibs"
  61. hook_add postmake 5 eclipse_postmake