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.

58 lines
1.8 KiB

  1. #!/bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: package/.../java-dirtree/parse-config
  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 [ -f $root/var/adm/packages/java-dirtree ]; then
  16. # We have to set JAVA_HOME environment variable. For this we
  17. # check every jdk we know and verify if it is installed.
  18. JAVA_EVERYJDK="sun-jdk-142 ibm-jdk-142 blackdown-jdk"
  19. # ooo doesn't build with java 1.5+
  20. [ "$pkg" != "ooo" ] &&
  21. JAVA_EVERYJDK="sun-jdk-150 ibm-jdk-150 $JAVA_EVERYJDK"
  22. # use kaffe only for marked packages
  23. if hasflag KAFFE; then
  24. JAVA_EVERYJDK="kaffe $JAVA_EVERYJDK"
  25. fi
  26. # clean the enviroment
  27. unset JAVA_HOME CLASSPATH
  28. for jdk in $JAVA_EVERYJDK; do
  29. if [ -f $root$( pkgprefix sysconfdir java-dirtree )/$jdk.in ]; then
  30. pkgprefix -t $jdk
  31. # Make java home available to java packages.
  32. JAVA_HOME=$root/$( pkgprefix $jdk )
  33. CLASSPATH="$root$( pkgprefix libdir java-dirtree ):$CLASSPATH"
  34. CLASSPATH="$root/$( pkgprefix $jdk )/jre/lib:$CLASSPATH"
  35. CLASSPATH="$root/$( pkgprefix $jdk )/lib:$CLASSPATH"
  36. PATH="$root/$( pkgprefix $jdk )/jre/bin:$PATH"
  37. PATH="$root/$( pkgprefix $jdk )/bin:$PATH"
  38. echo_status "JAVA_HOME set to $jdk"
  39. export JAVA_HOME CLASSPATH PATH
  40. # Determine the java version.
  41. # Todo: might be important to some packages.
  42. break
  43. fi
  44. done
  45. # and remove the junk i injected
  46. unset jdk JAVA_EVERYJDK
  47. fi