diff options
author | 2010-02-12 23:51:44 +0000 | |
---|---|---|
committer | 2010-02-12 23:51:44 +0000 | |
commit | 32e32b3a30b012329d4aa40b2908ba3b548896f2 (patch) | |
tree | b0917c31bb8466eb6a5dac724e0c05937b1d681d /eclass | |
parent | Do the same with 5.1.10, might help bug #292876 as well. (diff) | |
download | historical-32e32b3a30b012329d4aa40b2908ba3b548896f2.tar.gz historical-32e32b3a30b012329d4aa40b2908ba3b548896f2.tar.bz2 historical-32e32b3a30b012329d4aa40b2908ba3b548896f2.zip |
Add a separate java-pkg_get-bootclasspath function and make java-pkg_rewrite-bootclasspath use it.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/java-ant-2.eclass | 17 | ||||
-rw-r--r-- | eclass/java-utils-2.eclass | 32 |
2 files changed, 34 insertions, 15 deletions
diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass index a3d1902eb002..a8be8b4f57e9 100644 --- a/eclass/java-ant-2.eclass +++ b/eclass/java-ant-2.eclass @@ -14,7 +14,7 @@ # # Licensed under the GNU General Public License, v2 # -# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.47 2010/02/01 09:38:44 caster Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.48 2010/02/12 23:51:44 caster Exp $ inherit java-utils-2 @@ -477,19 +477,8 @@ java-ant_rewrite-bootclasspath() { local extra_before="${3}" local extra_after="${4}" - local bcp - case "${version}" in - auto) - bcp="$(java-config -g BOOTCLASSPATH)" - ;; - 1.5) - bcp="$(java-pkg_getjars --build-only gnu-classpath-0.98)" - ;; - *) - eerror "unknown parameter of java-ant_rewrite-bootclasspath" - die "unknown parameter of java-ant_rewrite-bootclasspath" - ;; - esac + local bcp="$(java-pkg_get-bootclasspath "${version}")" + if [[ -n "${extra_before}" ]]; then bcp="${extra_before}:${bcp}" fi diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 488c328136d4..de13051e2947 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -6,7 +6,7 @@ # # Licensed under the GNU General Public License, v2 # -# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.131 2010/01/17 12:53:18 betelgeuse Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.132 2010/02/12 23:51:44 caster Exp $ # ----------------------------------------------------------------------------- # @eclass-begin @@ -1304,6 +1304,36 @@ java-pkg_register-environment-variable() { java-pkg_do_write_ } +# ------------------------------------------------------------------------------ +# @ebuild-function java-pkg_get-bootclasspath +# +# Returns classpath of a given bootclasspath-providing package version. +# +# @param $1 - the version of bootclasspath (e.g. 1.5), 'auto' for bootclasspath +# of the current JDK +# ------------------------------------------------------------------------------ + +java-pkg_get-bootclasspath() { + local version="${1}" + + local bcp + case "${version}" in + auto) + bcp="$(java-config -g BOOTCLASSPATH)" + ;; + 1.5) + bcp="$(java-pkg_getjars --build-only gnu-classpath-0.98)" + ;; + *) + eerror "unknown parameter of java-pkg_get-bootclasspath" + die "unknown parameter of java-pkg_get-bootclasspath" + ;; + esac + + echo "${bcp}" +} + + # This function reads stdin, and based on that input, figures out how to # populate jars from the filesystem. # Need to figure out a good way of making use of this, ie be able to use a |