aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Nichols <nichoj@gentoo.org>2007-05-20 17:48:02 +0000
committerJoshua Nichols <nichoj@gentoo.org>2007-05-20 17:48:02 +0000
commit99bc6c24a640a136a52ad778923ddd34ebc95d57 (patch)
tree7daf9133fa621db8c56134cae4b6581ab03b65b5
parentCommiting changes to gjl so it respects JAVA_LIBRARY_PATH and LD_LIBRARY_PATH (diff)
downloadjava-config-99bc6c24a640a136a52ad778923ddd34ebc95d57.tar.gz
java-config-99bc6c24a640a136a52ad778923ddd34ebc95d57.tar.bz2
java-config-99bc6c24a640a136a52ad778923ddd34ebc95d57.zip
Created profile.d directory, and brought most recent version of the profile.d files from tree in. Also brought in the revdep-rebuild files. Addressed bug #175883 by updating the profile.d files, and removing the entry from the env.d file.
svn path=/projects/java-config-2/trunk/; revision=4722
-rw-r--r--setup.py2
-rw-r--r--src/java-config-2.profiled17
-rw-r--r--src/profile.d/java-config-2.csh21
-rw-r--r--src/profile.d/java-config-2.sh33
-rw-r--r--src/revdep-rebuild/60-java9
5 files changed, 65 insertions, 17 deletions
diff --git a/setup.py b/setup.py
index c7743b1..2442f4b 100644
--- a/setup.py
+++ b/setup.py
@@ -28,6 +28,8 @@ setup (
('/etc/java-config-2/', ['config/virtuals']),
('/etc/java-config-2/build/', ['config/jdk.conf','config/compilers.conf']),
('/etc/env.d/',['config/20java-config']),
+ ('/etc/profile.d/', ['src/profile.d/'+file for file in listdir('src/profile.d')]),
+ ('/etc/revdep-rebuild/', ['src/revdep-rebuild/60-java'])
]
)
diff --git a/src/java-config-2.profiled b/src/java-config-2.profiled
deleted file mode 100644
index 045eb96..0000000
--- a/src/java-config-2.profiled
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/files/Attic/java-config-2.profiled,v 1.3 2006/08/25 02:13:17 nichoj Exp $
-
-# If we have a current-user-vm (and aren't root)... set it to JAVA_HOME
-gentoo_user_vm="${HOME}/.gentoo/java-config-2/current-user-vm"
-gentoo_system_vm="/etc/java-config-2/current-system-vm"
-
-if [[ ${UID} != 0 && -L ${gentoo_user_vm} ]]; then
- export JAVA_HOME=${gentoo_user_vm}
-# Otherwise set to the current system vm
-elif [[ -L /etc/java-config-2/current-system-vm ]]; then
- export JAVA_HOME=${gentoo_system_vm}
-fi
-export JDK_HOME=${JAVA_HOME}
-export JAVAC=${JDK_HOME}/bin/javac
-unset gentoo_user_vm gentoo_system_vm
diff --git a/src/profile.d/java-config-2.csh b/src/profile.d/java-config-2.csh
new file mode 100644
index 0000000..0f4e77e
--- /dev/null
+++ b/src/profile.d/java-config-2.csh
@@ -0,0 +1,21 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/files/java-config-2.profiled.csh,v 1.3 2007/01/13 17:17:08 grobian Exp $
+
+set gentoo_user_vm = "${HOME}/.gentoo/java-config-2/current-user-vm"
+set gentoo_system_vm = "/etc/java-config-2/current-system-vm"
+
+## If we have a current-user-vm (and aren't root)... set it to JAVA_HOME
+## Otherwise set to the current system vm
+if ( ( "$uid" != "0" ) && ( -l $gentoo_user_vm ) ) then
+ setenv JAVA_HOME $gentoo_user_vm
+else if ( -l $gentoo_system_vm ) then
+ setenv JAVA_HOME $gentoo_system_vm
+endif
+unset gentoo_user_vm gentoo_system_vm
+
+if ( $?JAVA_HOME ) then
+ setenv MANPATH "${MANPATH}:${JAVA_HOME}/man"
+ setenv JDK_HOME $JAVA_HOME
+ setenv JAVAC ${JDK_HOME}/bin/javac
+endif
diff --git a/src/profile.d/java-config-2.sh b/src/profile.d/java-config-2.sh
new file mode 100644
index 0000000..483d1f0
--- /dev/null
+++ b/src/profile.d/java-config-2.sh
@@ -0,0 +1,33 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/dev-java/java-config/files/java-config-2.profiled.sh-r1,v 1.1 2007/03/16 11:13:16 betelgeuse Exp $
+
+# If we have a current-user-vm (and aren't root)... set it to JAVA_HOME
+gentoo_user_vm="${HOME}/.gentoo/java-config-2/current-user-vm"
+gentoo_system_vm="/etc/java-config-2/current-system-vm"
+
+# Please make sure that this script is POSIX compliant
+# See https://bugs.gentoo.org/show_bug.cgi?id=169925
+# for more details"
+
+if [ -z "${UID}" ] ; then
+ # id lives in /usr/bin which might not be mounted
+ if type id >/dev/null 2>/dev/null ; then
+ user_id=$(id -u)
+ else
+ [ "${USER}" = "root" ] && user_id=0
+ fi
+fi
+
+# The root user uses the system vm
+if [ "${user_id}" != 0 -a -L "${gentoo_user_vm}" ]; then
+ export JAVA_HOME=${gentoo_user_vm}
+# Otherwise set to the current system vm
+elif [ -L /etc/java-config-2/current-system-vm ]; then
+ export JAVA_HOME=${gentoo_system_vm}
+fi
+
+export MANPATH="${MANPATH}:${JAVA_HOME}/man"
+export JDK_HOME=${JAVA_HOME}
+export JAVAC=${JDK_HOME}/bin/javac
+unset gentoo_user_vm gentoo_system_vm user_id
diff --git a/src/revdep-rebuild/60-java b/src/revdep-rebuild/60-java
new file mode 100644
index 0000000..1aca594
--- /dev/null
+++ b/src/revdep-rebuild/60-java
@@ -0,0 +1,9 @@
+# The VM dynamically loads these at runtime so they will end up as missing
+# but actually work just fine. See for example
+# https://bugs.gentoo.org/show_bug.cgi?id=152039
+#
+# This file should only have files the are used by things like swt. If there
+# are "broken" links inside the jre itself, the jre should install it's own
+# control file.
+
+LD_LIBRARY_MASK="libjvm.so libjawt.so"