. Avoid an infinite loop by ignoring JAVA_HOME if its set to the location

of the wrapper script.  I'm using a different patch than Herve submitted,
  but the idea is the same.
. Bump PORTREVISION.

Submitted by:	hq
This commit is contained in:
Greg Lewis 2005-11-02 21:03:56 +00:00
parent c0b47a8e05
commit dbc431427c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=147050
2 changed files with 11 additions and 8 deletions

View file

@ -9,7 +9,7 @@
PORTNAME= javavmwrapper
PORTVERSION= 2.0
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= java
MASTER_SITES= # none
DISTFILES= # none

View file

@ -414,13 +414,16 @@ if [ "${IAM}" = "javavm" ]; then
IAM=java
fi
# Use JAVA_HOME if its set in the environment
if [ ! -z "${JAVA_HOME}" -a -x "${JAVA_HOME}/bin/${IAM}" ]; then
export JAVA_HOME
tryJavaCommand "${JAVA_HOME}/bin/${IAM}" "${@}"
elif [ ! -z "${JAVA_HOME}" -a -x "${JAVA_HOME}/jre/bin/${IAM}" ]; then
export JAVA_HOME
tryJavaCommand "${JAVA_HOME}/jre/bin/${IAM}" "${@}"
# Ignore JAVA_HOME if it's set to %%PREFIX%%
if [ "`realpath "${JAVA_HOME}"`" != "`realpath "${PREFIX}"`" ]; then
# Otherwise use JAVA_HOME if it's set
if [ ! -z "${JAVA_HOME}" -a -x "${JAVA_HOME}/bin/${IAM}" ]; then
export JAVA_HOME
tryJavaCommand "${JAVA_HOME}/bin/${IAM}" "${@}"
elif [ ! -z "${JAVA_HOME}" -a -x "${JAVA_HOME}/jre/bin/${IAM}" ]; then
export JAVA_HOME
tryJavaCommand "${JAVA_HOME}/jre/bin/${IAM}" "${@}"
fi
fi
unset JAVA_HOME