diff options
author | Alistair Bush <ali_bush@gentoo.org> | 2007-10-04 09:59:29 +0000 |
---|---|---|
committer | Alistair Bush <ali_bush@gentoo.org> | 2007-10-04 09:59:29 +0000 |
commit | 30e71fb9808d1d17635538d72995c5cf6f9b8a18 (patch) | |
tree | 1f4b44e194a1499e01d24d2b27dd853de96ae2fc /eclass/java-virtuals-2.eclass | |
parent | Version bump (diff) | |
download | historical-30e71fb9808d1d17635538d72995c5cf6f9b8a18.tar.gz historical-30e71fb9808d1d17635538d72995c5cf6f9b8a18.tar.bz2 historical-30e71fb9808d1d17635538d72995c5cf6f9b8a18.zip |
Adding java-virtuals-2.eclass and updating java-utils-2.eclass to add support for java virtuals.
Diffstat (limited to 'eclass/java-virtuals-2.eclass')
-rw-r--r-- | eclass/java-virtuals-2.eclass | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/eclass/java-virtuals-2.eclass b/eclass/java-virtuals-2.eclass new file mode 100644 index 000000000000..3913806715c1 --- /dev/null +++ b/eclass/java-virtuals-2.eclass @@ -0,0 +1,41 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/java-virtuals-2.eclass,v 1.1 2007/10/04 09:59:29 ali_bush Exp $ + +# Original Author: Alistair John Bush <ali_bush@gentoo.org> +# Purpose: To provide a default (and only) src_install function +# for ebuilds in the java-virtuals category. + +inherit java-utils-2 + +EXPORT_FUNCTIONS src_install + +java-virtuals-2_src_install() { + java-virtuals-2_do_write +} + +# ------------------------------------------------------------------------------ +# @internal-function java-pkg_do_virtuals_write +# +# Writes the virtual env file out to disk. +# +# ------------------------------------------------------------------------------ +java-virtuals-2_do_write() { + java-pkg_init_paths_ + + dodir "${JAVA_PKG_VIRTUALS_PATH}" + if [[ -n "${JAVA_VIRTUAL_PROVIDES}" ]]; then + echo "PROVIDERS=\"${JAVA_VIRTUAL_PROVIDES}\"" \ + >> ${JAVA_PKG_VIRTUAL_PROVIDER} + fi + + if [[ -n "${JAVA_VIRTUAL_VM}" ]]; then + echo "VM=\"${JAVA_VIRTUAL_VM}\"" \ + >> ${JAVA_PKG_VIRTUAL_PROVIDER} + fi + + if [[ -n "${JAVA_VIRTUAL_VM_CLASSPATH}" ]]; then + echo "VM_CLASSPATH=\"${JAVA_VIRTUAL_VM_CLASSPATH}\"" \ + >> ${JAVA_PKG_VIRTUAL_PROVIDER} + fi +} |