diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2008-05-03 21:28:07 +0000 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2008-05-03 21:28:07 +0000 |
commit | b12d8e0125fd71a26f964c634a79244c6e5e5b28 (patch) | |
tree | 27d65292ad6b6c1d9724cb70ad1d3c05c229c298 /eclass/java-utils-2.eclass | |
parent | Version bump (diff) | |
download | gentoo-2-b12d8e0125fd71a26f964c634a79244c6e5e5b28.tar.gz gentoo-2-b12d8e0125fd71a26f964c634a79244c6e5e5b28.tar.bz2 gentoo-2-b12d8e0125fd71a26f964c634a79244c6e5e5b28.zip |
Fix ejunit to work when the package has no dependencies and getjars to work with VM provided virtuals.
Diffstat (limited to 'eclass/java-utils-2.eclass')
-rw-r--r-- | eclass/java-utils-2.eclass | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 2f75ab339ce8..9b64b29b76ab 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.105 2008/03/26 23:00:23 ali_bush Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.106 2008/05/03 21:28:07 betelgeuse Exp $ # ----------------------------------------------------------------------------- # @eclass-begin @@ -614,6 +614,7 @@ java-pkg_dojavadoc() { dosym ${dest}/api "${JAVA_PKG_SHAREPATH}/api" || die if [[ ${symlink} ]]; then + debug-print "symlinking ${dest}/{api,${symlink}}" dosym ${dest}/{api,${symlink}} || die fi } @@ -1022,26 +1023,20 @@ java-pkg_getjars() { [[ ${#} -ne 1 ]] && die "${FUNCNAME} takes only one argument besides --*" - local classpath pkgs="${1}" + local pkgs="${1}" if [[ "${EAPI}" == "1" ]]; then pkgs="${pkgs//:/-}" fi jars="$(java-config ${deep} --classpath=${pkgs})" - [[ $? != 0 || -z "${jars}" ]] && die "java-config --classpath=${pkgs} failed" + [[ $? != 0 ]] && die "java-config --classpath=${pkgs} failed" debug-print "${pkgs}:${jars}" for pkg in ${pkgs//,/ }; do java-pkg_ensure-dep "${build_only}" "${pkg}" done - if [[ -z "${classpath}" ]]; then - classpath="${jars}" - else - classpath="${classpath}:${jars}" - fi - # Only record jars that aren't build-only if [[ -z "${build_only}" ]]; then for pkg in ${pkgs//,/ }; do @@ -1049,7 +1044,7 @@ java-pkg_getjars() { done fi - echo "${classpath}" + echo "${jars}" } # ------------------------------------------------------------------------------ @@ -1777,13 +1772,15 @@ java-pkg_ant-tasks-depend() { # @param $2 - classpath; junit and recorded dependencies get appended # @param $@ - the rest of the parameters are passed to java # ------------------------------------------------------------------------------ -ejunit() { +ejunit{ debug-print-function ${FUNCNAME} $* local pkgs - for atom in $(cat ${JAVA_PKG_DEPEND_FILE} | tr : ' '); do - pkgs=${pkgs},$(echo ${atom} | sed -re "s/^.*@//") - done + if [[ -f ${JAVA_PKG_DEPEND_FILE} ]]; then + for atom in $(cat ${JAVA_PKG_DEPEND_FILE} | tr : ' '); do + pkgs=${pkgs},$(echo ${atom} | sed -re "s/^.*@//") + done + fi local cp=$(java-pkg_getjars --with-dependencies junit${pkgs}) if [[ ${1} = -cp || ${1} = -classpath ]]; then |