diff options
author | Vlastimil Babka <caster@gentoo.org> | 2008-04-06 20:55:31 +0000 |
---|---|---|
committer | Vlastimil Babka <caster@gentoo.org> | 2008-04-06 20:55:31 +0000 |
commit | 498789cf836887a9bc318c92434e74ddedfac109 (patch) | |
tree | fafd86c6ac5fc940d70f434b0cdb69ae74c8db15 /dev-util/eclipse-sdk/files | |
parent | Stable on alpha, security bug #214627 (diff) | |
download | historical-498789cf836887a9bc318c92434e74ddedfac109.tar.gz historical-498789cf836887a9bc318c92434e74ddedfac109.tar.bz2 historical-498789cf836887a9bc318c92434e74ddedfac109.zip |
Revbump for workaround of bug #215150 in the eclipse startup script. Also get MOZILLA_FIVE_HOME variable from swt's package.env (bug #214785) - this was by mistake already applied to 3.3.1.1 when locking swt dep (see below) but only revbump gets this to everyone.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'dev-util/eclipse-sdk/files')
-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 |