summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Nichols <nichoj@gentoo.org>2006-07-21 15:31:50 +0000
committerJoshua Nichols <nichoj@gentoo.org>2006-07-21 15:31:50 +0000
commit08a3dc7b23df27bc6c40e375c55e273710149d63 (patch)
tree838d45b474f4b39ac8cea0e1f74ce9834429354a /eclass/java-ant-2.eclass
parentUpdated message for displaying VM being used (diff)
downloadhistorical-08a3dc7b23df27bc6c40e375c55e273710149d63.tar.gz
historical-08a3dc7b23df27bc6c40e375c55e273710149d63.tar.bz2
historical-08a3dc7b23df27bc6c40e375c55e273710149d63.zip
Update to java-ant-2 to use post phase hook instead of the annoying ant_src_unpack. Will warn when ant_src_unpack is used.
Diffstat (limited to 'eclass/java-ant-2.eclass')
-rw-r--r--eclass/java-ant-2.eclass26
1 files changed, 13 insertions, 13 deletions
diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass
index ad923182b1f8..0ddcb03dab06 100644
--- a/eclass/java-ant-2.eclass
+++ b/eclass/java-ant-2.eclass
@@ -12,11 +12,8 @@ inherit java-utils-2
# ant to build. In particular, it will attempt to fix build.xml files, so that
# they use the appropriate 'target' and 'source' attributes.
-# Only exports src_unpack
-EXPORT_FUNCTIONS src_unpack
-
-# We need some tools from java-toolkit
-DEPEND=">=dev-java/javatoolkit-0.1.5"
+# We need some tools from javatoolkit. We also need portage 2.1 for phase hooks
+DEPEND=">=dev-java/javatoolkit-0.1.5 ${JAVA_PKG_PORTAGE_DEP}"
# ------------------------------------------------------------------------------
# @global JAVA_ANT_BSFIX
@@ -69,8 +66,11 @@ JAVA_ANT_BSFIX_SOURCE_TAGS=${JAVA_PKG_BSFIX_SOURCE_TAGS:="javadoc javac xjavac j
#
# Unpacks the source, and attempts to fix build files.
# ------------------------------------------------------------------------------
-java-ant-2_src_unpack() {
- ant_src_unpack
+post_src_unpack() {
+ if java-pkg_func-exists ant_src_unpack; then
+ java-pkg_announce-qa-violation "Using old ant_src_unpack. Should be src_unpack"
+ ant_src_unpack
+ fi
java-ant_bsfix
}
@@ -80,12 +80,12 @@ java-ant-2_src_unpack() {
# Helper function which does the actual unpacking
# ------------------------------------------------------------------------------
# TODO maybe use base.eclass for some patching love?
-ant_src_unpack() {
- debug-print-function ${FUNCNAME} $*
- if [[ -n "${A}" ]]; then
- unpack ${A}
- fi
-}
+#ant_src_unpack() {
+# debug-print-function ${FUNCNAME} $*
+# if [[ -n "${A}" ]]; then
+# unpack ${A}
+# fi
+#}
# ------------------------------------------------------------------------------
# @private java-ant_bsfix