blob: 26a50e86dae66eba1bcc61186bd788001bc0eeff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
|