ports/java/eclipse/files/eclipse.in
Tom McLaughlin 5a821ecb4b - Fixes for internal web browser [1]
- Fixes for internal web browser on amd64 [2]
- Convert to USE_GECKO [3]

Note: Port defaults to xulrunner as the preffered gecko port because it is
the only port which allows the internal web browser to work but eclipse will
build using other gecko ports (ie. firefox, mozilla, seamonkey) though it
will lack a working internal web browser.  An argument can be made that
xulrunner should be the only available gecko but maybe 5 people have
xulrunner installed and it's another 45 minute mozilla dependency on even my
speedy machine.  The maintainer mentioned working on getting the internal
web browser to work with firefox so I'm leaving well enough alone.  When
eclipse fully works with firefox the USE_GECKO ordering should probably be
revistited.

PR:             105581
Submitted by:   Maintainer [1], Kurt Miller <lists at intricatesoftware.com> [2], me [3]
2007-01-03 18:13:55 +00:00

49 lines
1.3 KiB
Bash

#!/bin/sh
#
# FreeBSD-specific startup script for Eclipse Platform
#
# See: http://www.eclipse.org
#
# $FreeBSD$
#
DEFAULT_JAVA_HOME=%%PREFIX%%
ECLIPSE_HOME=%%ECLIPSE_HOME%%
DEFAULT_JAVA_CMD=java
MOZILLA_FIVE_HOME=%%LOCALBASE%%/lib/%%BROWSER%%
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MOZILLA_FIVE_HOME
export MOZILLA_FIVE_HOME LD_LIBRARY_PATH
#-----------------------------------------------------------------------------
# Determine configuration settings
#-----------------------------------------------------------------------------
# Determine the JDK home directory
if [ -z "${JAVA_HOME}" ]; then
JAVA_HOME=${DEFAULT_JAVA_HOME}
fi
# Determine 'java' executable
if [ -z "${JAVACMD}" ]; then
if [ -n "${JAVA_HOME}" ]; then
JAVACMD="${JAVA_HOME}/bin/java"
else
JAVACMD=${DEFAULT_JAVACMD}
fi
fi
# Check if 'java' executable can be found
if [ ! -x "$JAVACMD" ]; then
echo "Error: JAVA_HOME is not defined correctly: ${JAVA_HOME}"
echo " Unable to find ${JAVACMD}"
exit 1
fi
# Check if 'eclipse' executable can be found
if [ ! -x "${ECLIPSE_HOME}/eclipse" ]; then
echo "Error: ECLIPSE_HOME is not defined correctly: ${ECLIPSE_HOME}"
echo " Unable to find eclipse launcher binary"
exit 1
fi
JAVA_VERSION="%%JAVA_VERSION%%" JAVA_OS="%%JAVA_OS%%" PATH=${JAVA_HOME}/bin:${PATH} exec "${ECLIPSE_HOME}/eclipse" $@