diff options
Diffstat (limited to 'dev-util/eclipse-sdk/files/3.3')
-rw-r--r-- | dev-util/eclipse-sdk/files/3.3/eclipse-3.3-r1 | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/dev-util/eclipse-sdk/files/3.3/eclipse-3.3-r1 b/dev-util/eclipse-sdk/files/3.3/eclipse-3.3-r1 new file mode 100644 index 000000000000..26a50e86dae6 --- /dev/null +++ b/dev-util/eclipse-sdk/files/3.3/eclipse-3.3-r1 @@ -0,0 +1,45 @@ +#!/bin/bash +# +# Tiny startup wrapper for Eclipse-3.3 +# +# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org> +# Copyright (c) 2007-2008, Jean-Noël Rivasseau <elvanor@gentoo.org> +# Copyright (c) 2004-2008, Gentoo Foundation +# +# Licensed under the GNU General Public License, version 2 +# + +[[ -f "/etc/eclipserc" ]] && source "/etc/eclipserc" +[[ -f "$HOME/.gentoo/eclipserc" ]] && source "$HOME/.gentoo/eclipserc" + +ECLIPSE_HOME=${ECLIPSE_HOME:="/usr/lib/eclipse-3.3"} +ECLIPSE_BIN="${ECLIPSE_HOME}/eclipse" + +if [[ ! -x "${ECLIPSE_BIN}" ]] ; then + echo "Failed to find executable '${ECLIPSE_BIN}'" > /dev/stderr + exit -1 +fi + +if ((EUID==0)); then + echo "!!! You are running Eclipse as root." + echo "!!! This is not recommended, nor needed." +fi + +# get MOZILLA_FIVE_HOME from swt's package.env +# a bit hackish way but works, bug #214785 +eval $(gjl --package swt-3 --get-args) + +if [[ "${ECLIPSE_XMS}" ]]; then VM_ARGS="${VM_ARGS} -Xms${ECLIPSE_XMS}"; fi +if [[ "${ECLIPSE_XMX}" ]]; then VM_ARGS="${VM_ARGS} -Xmx${ECLIPSE_XMX}"; fi +if [[ "${ECLIPSE_PERMSIZE}" ]]; then VM_ARGS="${VM_ARGS} -XX:PermSize=${ECLIPSE_PERMSIZE}"; fi +if [[ "${ECLIPSE_MAX_PERMSIZE}" ]]; then VM_ARGS="${VM_ARGS} -XX:MaxPermSize=${ECLIPSE_MAX_PERMSIZE}"; fi + +# workaround for bug #215150 +if [[ $(java-config -f) == sun-jdk-1.6 || $(java-config -f) == sun-jre-bin-1.6 ]]; then + if [[ $(java-config -g VERSION) == *1.6.0.04 || $(java-config -g VERSION) == *1.6.0.05 ]]; then + echo "Performing workaround for bug #215150" + VM_ARGS="${VM_ARGS} -XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith" + fi +fi + +exec "${ECLIPSE_BIN}" "$@" -vmargs ${VM_ARGS} -Djava.library.path=/usr/lib |