--- ant-tasks.eclass.orig 2008-02-19 18:28:49.000000000 +0100 +++ ant-tasks.eclass 2008-02-19 18:54:13.000000000 +0100 @@ -1,9 +1,19 @@ -# Eclass for building dev-java/ant-* packages -# -# Copyright 2007 Gentoo Foundation +# Copyright 2007-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later -# Author Vlastimil Babka -# $Header: /var/cvsroot/gentoo-x86/eclass/ant-tasks.eclass,v 1.4 2007/02/02 22:59:53 caster Exp $ +# $Header: $ + +# @ECLASS: ant-tasks.eclass +# @MAINTAINER: +# java@gentoo.org +# +# Original author Vlastimil Babka +# @BLURB: Eclass for building dev-java/ant-* packages +# @DESCRIPTION: +# This eclass provides functionality and default ebuild variables for building +# dev-java/ant-* packages easily. +# +# It inherits versionator, java-pkg-2, and java-ant-2 + # we set ant-core dep ourselves, restricted JAVA_ANT_DISABLE_ANT_CORE_DEP=true @@ -13,58 +23,35 @@ EXPORT_FUNCTIONS src_unpack src_compile src_install -# ----------------------------------------------------------------------------- -# @eclass-begin -# @eclass-shortdesc Eclass for building dev-java/ant-* packages -# @eclass-maintainer java@gentoo.org -# -# This eclass provides functionality and default ebuild variables for building -# dev-java/ant-* packages easily. -# -# ----------------------------------------------------------------------------- - -# ----------------------------------------------------------------------------- -# @variable-preinherit ANT_TASK_JDKVER -# @variable-default 1.4 -# +# @ECLASS-VARIABLE: ANT_TASK_JDKVER +# @DESCRIPTION: # Affects the >=virtual/jdk version set in DEPEND string. Defaults to 1.4, can # be overriden from ebuild BEFORE inheriting this eclass. -# ----------------------------------------------------------------------------- ANT_TASK_JDKVER=${ANT_TASK_JDKVER-1.4} -# ----------------------------------------------------------------------------- # @variable-preinherit ANT_TASK_JREVER -# @variable-default 1.4 -# +# @DESCRIPTION: # Affects the >=virtual/jre version set in DEPEND string. Defaults to 1.4, can # be overriden from ebuild BEFORE inheriting this eclass. -# ----------------------------------------------------------------------------- ANT_TASK_JREVER=${ANT_TASK_JREVER-1.4} -# ----------------------------------------------------------------------------- -# @variable-internal ANT_TASK_NAME -# @variable-default the rest of $PN after "ant-" -# +# @ECLASS-VARIABLE: ANT_TASK_NAME +# @DESCRIPTION: # The name of this ant task as recognized by ant's build.xml, derived from $PN. -# ----------------------------------------------------------------------------- +# Default the rest of $PN after "ant-" ANT_TASK_NAME="${PN#ant-}" -# ----------------------------------------------------------------------------- -# @variable-preinherit ANT_TASK_DEPNAME -# @variable-default $ANT_TASK_NAME -# +# @ECLASS-VARIABLE: ANT_TASK_DEPNAME +# @DESCRIPTION: # Specifies JAVA_PKG_NAME (PN{-SLOT} used with java-pkg_jar-from) of the package # that this one depends on. Defaults to the name of ant task, ebuild can # override it before inheriting this eclass. -# ----------------------------------------------------------------------------- ANT_TASK_DEPNAME=${ANT_TASK_DEPNAME-${ANT_TASK_NAME}} -# ----------------------------------------------------------------------------- -# @variable-internal ANT_TASK_PV -# @variable-default Just the number in $PV without any beta/RC suffixes -# +# @ECLASS-VARIABLE: ANT_TASK_PV +# @DESCRIPTION: # Version of ant-core this task is intended to register and thus load with. -# ----------------------------------------------------------------------------- +# Default Just the number in $PV without any beta/RC suffixes ANT_TASK_PV="${PV}" # special care for beta/RC releases @@ -103,14 +90,15 @@ S="${WORKDIR}/${MY_P}" -# ------------------------------------------------------------------------------ -# @eclass-src_unpack -# +# @FUNCTION: eclass-src_unpack +# @USAGE: [ base ] [ jar-dep ] [ all ] +# @DESCRIPTION: # Is split into two parts, defaults to both of them ('all'). +# # base: performs the unpack, build.xml replacement and symlinks ant.jar from -# ant-core +# ant-core +# # jar-dep: symlinks the jar file(s) from dependency package -# ------------------------------------------------------------------------------ ant-tasks_src_unpack() { [[ -z "${1}" ]] && ant-tasks_src_unpack all @@ -140,22 +128,18 @@ } -# ------------------------------------------------------------------------------ -# @eclass-src_compile -# +# @FUNCTION: eclass-src_compile +# @DESCRIPTION: # Compiles the jar with installed ant-core. -# ------------------------------------------------------------------------------ ant-tasks_src_compile() { ANT_TASKS="none" eant -Dbuild.dep=${ANT_TASK_NAME} jar-dep } -# ------------------------------------------------------------------------------ -# @eclass-src_install -# +# @FUNCTION: eclass-src_install +# @DESCRIPTION: # Installs the jar and registers its presence for the ant launcher script. # Version param ensures it won't get loaded (thus break) when ant-core is # updated to newer version. -# ------------------------------------------------------------------------------ ant-tasks_src_install() { java-pkg_dojar build/lib/${PN}.jar java-pkg_register-ant-task --version "${ANT_TASK_PV}"