summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2011-10-11 10:55:06 +0000
committerFabian Groffen <grobian@gentoo.org>2011-10-11 10:55:06 +0000
commit49ebc8851714bb9e0fb55439cce76542222af38d (patch)
tree60c6f2ecfac37ef2437d3cf22c8cfbf9e9f90c36 /eclass/java-vm-2.eclass
parentAdd x86 keyword. (diff)
downloadgentoo-2-49ebc8851714bb9e0fb55439cce76542222af38d.tar.gz
gentoo-2-49ebc8851714bb9e0fb55439cce76542222af38d.tar.bz2
gentoo-2-49ebc8851714bb9e0fb55439cce76542222af38d.zip
set_java_env: fix symlink in JAVA_VM_DIR for Prefix
java_home contains EPREFIX, hence, when used with helpers (dosym in this case), the result gets $EPREFIX$EPREFIX/.... Strip EPREFIX from java_home before using it with dosym.
Diffstat (limited to 'eclass/java-vm-2.eclass')
-rw-r--r--eclass/java-vm-2.eclass9
1 files changed, 6 insertions, 3 deletions
diff --git a/eclass/java-vm-2.eclass b/eclass/java-vm-2.eclass
index 86fc40fc95bf..d7c4021a5ab9 100644
--- a/eclass/java-vm-2.eclass
+++ b/eclass/java-vm-2.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.33 2011/09/01 14:15:57 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.34 2011/10/11 10:55:06 grobian Exp $
# -----------------------------------------------------------------------------
# @eclass-begin
@@ -115,7 +115,10 @@ get_system_arch() {
set_java_env() {
debug-print-function ${FUNCNAME} $*
- has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
+ if has ${EAPI:-0} 0 1 2 && ! use prefix ; then
+ ED="${D}"
+ EPREFIX=""
+ fi
local platform="$(get_system_arch)"
local env_file="${ED}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}"
@@ -156,7 +159,7 @@ set_java_env() {
# Make the symlink
dodir "${JAVA_VM_DIR}"
- dosym ${java_home} ${JAVA_VM_DIR}/${VMHANDLE} \
+ dosym ${java_home#${EPREFIX}} ${JAVA_VM_DIR}/${VMHANDLE} \
|| die "Failed to make VM symlink at ${JAVA_VM_DIR}/${VMHANDLE}"
}