aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/eclipse-sdk-bin/files')
-rw-r--r--dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.5.0-eclipse-bin43
-rw-r--r--dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.5.0-eclipserc-bin20
2 files changed, 63 insertions, 0 deletions
diff --git a/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.5.0-eclipse-bin b/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.5.0-eclipse-bin
new file mode 100644
index 0000000..87d5531
--- /dev/null
+++ b/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.5.0-eclipse-bin
@@ -0,0 +1,43 @@
+#! /bin/bash
+#
+# Tiny startup wrapper for Eclipse
+#
+# 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
+# Copyright (c) 2015, Sebastian Pipping <sping@gentoo.org>
+#
+# Licensed under the GNU General Public License, version 2
+#
+
+[[ -f "/etc/eclipserc-bin-%SLOT%" ]] && . "/etc/eclipserc-bin-%SLOT%"
+[[ -f "$HOME/gentoo/.eclipserc" ]] && . "$HOME/gentoo/.eclipserc"
+
+ECLIPSE_HOME=${ECLIPSE_HOME:="/opt/eclipse-sdk-bin-%SLOT%"}
+ECLIPSE_BIN="${ECLIPSE_HOME}/eclipse"
+
+if [[ ! -x "${ECLIPSE_BIN}" ]] ; then
+ echo "Failed to find executable '${ECLIPSE_BIN}'" > /dev/stderr
+ exit 1
+fi
+
+if [[ $(id -u) -eq 0 ]] ; then
+ echo "Do not run eclipse as root user! Exiting ..." > /dev/stderr
+ exit 1
+fi
+
+case "$(java-config -f)" in
+ *gcj*)
+ export JAVA_PKG_CLASSMAP="${ECLIPSE_HOME}/eclipse.gcjdb"
+ ;;
+esac
+
+[ -n "${ECLIPSE_XMS}" ] && VM_ARGS="${VM_ARGS} -Xms${ECLIPSE_XMS}"
+[ -n "${ECLIPSE_XMX}" ] && VM_ARGS="${VM_ARGS} -Xmx${ECLIPSE_XMX}"
+[ -n "${ECLIPSE_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:PermSize=${ECLIPSE_PERMSIZE}"
+[ -n "${ECLIPSE_MAX_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:MaxPermSize=${ECLIPSE_MAX_PERMSIZE}"
+
+# Fix for JRE 1.5.
+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib
+
+exec "${ECLIPSE_BIN}" -vm $(java-config --java) "$@" "${ECLIPSE_USER_ARGS}" -vmargs ${VM_ARGS}
diff --git a/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.5.0-eclipserc-bin b/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.5.0-eclipserc-bin
new file mode 100644
index 0000000..c2c334e
--- /dev/null
+++ b/dev-util/eclipse-sdk-bin/files/eclipse-sdk-bin-4.5.0-eclipserc-bin
@@ -0,0 +1,20 @@
+# This file specifies some initial Eclipse settings, like memory allowed
+# These settings only affect Eclipse startup and overall configuration
+# Main Eclipse configuration should be done within Eclipse (with the GUI)
+
+# Following variables controls the minimal and maximum amounts of memory
+# allocated to Eclipse (respectively).
+# Increase those numbers if you get OutOfMemory errors.
+
+ECLIPSE_XMS=128m
+ECLIPSE_XMX=256m
+
+# Following variables controls the minimal and maximum amounts of memory
+# allocated to the permanent generation space.
+# This space contains data related to all classes.
+# Thus, if you use a lot of Eclipse plugins, it is recommended to uncomment
+# these variables and even increase it, if you have enough RAM.
+# Else you will get crashes related to OutOfMemory in PermGen exceptions.
+
+#ECLIPSE_PERMSIZE=64m
+#ECLIPSE_MAX_PERMSIZE=128m