diff options
author | 2006-12-17 16:44:06 +0000 | |
---|---|---|
committer | 2006-12-17 16:44:06 +0000 | |
commit | eb4526a290939f4170c7c1526063ddf5a238c74d (patch) | |
tree | 814059ab7b02974718868a525ea1c3de06e254ab /eclass | |
parent | Version bump (diff) | |
download | gentoo-2-eb4526a290939f4170c7c1526063ddf5a238c74d.tar.gz gentoo-2-eb4526a290939f4170c7c1526063ddf5a238c74d.tar.bz2 gentoo-2-eb4526a290939f4170c7c1526063ddf5a238c74d.zip |
Added default src_compile.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/java-pkg-2.eclass | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/eclass/java-pkg-2.eclass b/eclass/java-pkg-2.eclass index 9dc792019331..6a495814236b 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.5 2006/12/08 12:12:04 betelgeuse Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v 1.6 2006/12/17 16:44:06 betelgeuse Exp $ inherit java-utils-2 @@ -33,7 +33,7 @@ DEPEND="${JAVA_PKG_E_DEPEND}" # ------------------------------------------------------------------------------ RDEPEND="${DEPEND}" -EXPORT_FUNCTIONS pkg_setup +EXPORT_FUNCTIONS pkg_setup src_compile # ------------------------------------------------------------------------------ # @eclass-pkg_setup @@ -46,6 +46,27 @@ java-pkg-2_pkg_setup() { } # ------------------------------------------------------------------------------ +# @eclass-src_compile +# +# Default src_compile for java packages +# variables: +# EANT_BUILD_XML - controls the location of the build.xml (default: ./build.xml) +# EANT_BUILD_TARGET - the ant target/targets to execute (default: jar) +# 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) +# ------------------------------------------------------------------------------ +java-pkg-2_src_compile() { + if [[ -e "${EANT_BUILD_XML:=build.xml}" ]]; then + local antflags="${EANT_BUILD_TARGET:=jar}" + hasq doc ${IUSE} && antflags="${antflags} $(use_doc ${EANT_DOC_TARGET})" + eant ${antflags} -f ${EANT_BUILD_XML} + else + vecho "${FUNCNAME}: No build.xml found so nothing to do." + fi +} + +# ------------------------------------------------------------------------------ # @note # # We need to initialize the environment in every function because Portage |