summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2007-01-12 16:12:15 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2007-01-12 16:12:15 +0000
commit6ffa986db554e5a4f4773d22a331813bf5c78eea (patch)
treef9683ef84393c058d740d185951c5bf1b48ed963 /eclass
parentVersion bump, bug#161712 (diff)
downloadgentoo-2-6ffa986db554e5a4f4773d22a331813bf5c78eea.tar.gz
gentoo-2-6ffa986db554e5a4f4773d22a331813bf5c78eea.tar.bz2
gentoo-2-6ffa986db554e5a4f4773d22a331813bf5c78eea.zip
Moving EANT_GENTOO_CLASSPATH handling to eant implementation so that it can be used automatically in both src_compile and src_test.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/java-pkg-2.eclass14
-rw-r--r--eclass/java-utils-2.eclass14
2 files changed, 15 insertions, 13 deletions
diff --git a/eclass/java-pkg-2.eclass b/eclass/java-pkg-2.eclass
index c433e04ed327..742b62ea235d 100644
--- a/eclass/java-pkg-2.eclass
+++ b/eclass/java-pkg-2.eclass
@@ -5,7 +5,7 @@
#
# Licensed under the GNU General Public License, v2
#
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.11 2007/01/12 13:48:12 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.12 2007/01/12 16:12:15 betelgeuse Exp $
inherit java-utils-2
@@ -56,8 +56,7 @@ java-pkg-2_pkg_setup() {
# EANT_DOC_TARGET - the target to build extra docs under the doc use flag
# (default: the one provided by use_doc in
# java-utils-2.eclass)
-# EANT_GENTOO_CLASSPATH - class java-pkg_getjars for the value and adds to the
-# gentoo.classpath property
+# EANT_GENTOO_CLASSPATH - @see eant documention in java-utils-2.eclass
# EANT_EXTRA_ARGUMENTS - extra arguments to pass to eant
# ------------------------------------------------------------------------------
java-pkg-2_src_compile() {
@@ -66,15 +65,6 @@ java-pkg-2_src_compile() {
java-pkg_filter-compiler ${EANT_FILTER_COMPILER}
local antflags="${EANT_BUILD_TARGET:=jar}"
-
- local gcp="${EANT_GENTOO_CLASSPATH}"
-
- if [[ "${gcp}" ]]; then
- local cp="$(java-pkg_getjars ${gcp})"
- # It seems ant does not like single quotes around ${cp}
- antflags="${antflags} -Dgentoo.classpath=\"${cp}\""
- fi
-
hasq doc ${IUSE} && antflags="${antflags} $(use_doc ${EANT_DOC_TARGET})"
eant ${antflags} -f "${EANT_BUILD_XML}" ${EANT_EXTRA_ARGUMENTS}
else
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index d8093fbb1ca8..f6d1c2badc02 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.40 2007/01/10 09:52:51 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-utils-2.eclass,v 1.41 2007/01/12 16:12:15 betelgeuse Exp $
# -----------------------------------------------------------------------------
@@ -1336,6 +1336,10 @@ java-pkg_ensure-test() {
#
# Ant wrapper function. Will use the appropriate compiler, based on user-defined
# compiler.
+# variables:
+# EANT_GENTOO_CLASSPATH - calls java-pkg_getjars for the value and adds to the
+# gentoo.classpath property. Be sure to call
+# java-ant_rewrite-classpath in src_unpack.
#
# ------------------------------------------------------------------------------
eant() {
@@ -1379,6 +1383,14 @@ eant() {
antflags="${antflags} -debug"
fi
+ local gcp="${EANT_GENTOO_CLASSPATH}"
+
+ if [[ "${gcp}" ]]; then
+ local cp="$(java-pkg_getjars ${gcp})"
+ # It seems ant does not like single quotes around ${cp}
+ antflags="${antflags} -Dgentoo.classpath=\"${cp}\""
+ fi
+
[[ -n ${JAVA_PKG_DEBUG} ]] && echo ant ${antflags} "${@}"
ant ${antflags} "${@}" || die "eant failed"