summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2008-05-03 21:28:07 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2008-05-03 21:28:07 +0000
commit879154e1eb098149a078d88ce93d782b3ffe6689 (patch)
tree63fb19e344806049cf5077cf2f946aa937196558 /eclass
parentVersion bump (diff)
downloadhistorical-879154e1eb098149a078d88ce93d782b3ffe6689.tar.gz
historical-879154e1eb098149a078d88ce93d782b3ffe6689.tar.bz2
historical-879154e1eb098149a078d88ce93d782b3ffe6689.zip
Fix ejunit to work when the package has no dependencies and getjars to work with VM provided virtuals.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/java-utils-2.eclass25
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